Re: Code Review requested: Postscript Interpreter

Discussion in 'C Programming' started by Gene, Dec 20, 2010.

  1. Gene

    Gene Guest

    On Monday, December 20, 2010 7:48:09 AM UTC-5, Bart wrote:
    > But the 200-300 lines per source file rule sounds nonsense to me, if you
    > have to know yourself where everything lives (Unix -- or is it Linux --
    > source code is supposed to be 4Mloc, which would make it some 16,000 files
    > according to that rule; a tad unmanageable.)


    Yes, the 200-300 was common advice circa mid-80's when compilers were much slower and editors didn't have features (bookmarks, source navigation, etc.) to deal with longer files. These days 2,000-3,000 lines is perfectly fine and 20,000-30,000 occasionally if the code content has boilerplate similarity.
    Gene, Dec 20, 2010
    #1
    1. Advertising

  2. Gene

    Ben Pfaff Guest

    Gene <> writes:

    > Yes, the 200-300 was common advice circa mid-80's when
    > compilers were much slower and editors didn't have features
    > (bookmarks, source navigation, etc.) to deal with longer files.
    > These days 2,000-3,000 lines is perfectly fine and
    > 20,000-30,000 occasionally if the code content has boilerplate
    > similarity.


    I'd be really uncomfortable with 20,000-30,000 lines of
    boilerplate, unless it was automatically generated and maintained
    by modifying the generator, not by modifying the generated code.
    --
    A competent C programmer knows how to write C programs correctly,
    a C expert knows enough to argue with Dan Pop, and a C expert
    expert knows not to bother.
    Ben Pfaff, Dec 21, 2010
    #2
    1. Advertising

  3. On Dec 20, 6:08 pm, (Ben Pfaff) wrote:
    > Gene <> writes:
    > > Yes, the 200-300 was common advice circa mid-80's when
    > > compilers were much slower and editors didn't have features
    > > (bookmarks, source navigation, etc.) to deal with longer files.
    > > These days 2,000-3,000 lines is perfectly fine and
    > > 20,000-30,000 occasionally if the code content has boilerplate
    > > similarity.

    >
    > I'd be really uncomfortable with 20,000-30,000 lines of
    > boilerplate, unless it was automatically generated and maintained
    > by modifying the generator, not by modifying the generated code.


    I'm just using vim. It's probably got some crazy navigation tools
    but I haven't explored them. I'm afraid of emacs.

    And since my olpc xo-1 laptop has a quirk of deactivating the mouse
    if you happen to be touching it during a recalibration, I'm afraid
    of gui tools in general. Once the mouse is off, you have to reboot
    to turn it back on.

    So for my own purposes, I'm quite pleased with the small file
    sizes. To me it suggests that the code is concise. Perhaps Strunk
    and White isn't the best style guide for coding.
    luser- -droog, Dec 21, 2010
    #3
  4. Gene

    Ian Collins Guest

    On 12/21/10 02:47 PM, luser- -droog wrote:
    > On Dec 20, 6:08 pm, (Ben Pfaff) wrote:
    >> Gene<> writes:
    >>> Yes, the 200-300 was common advice circa mid-80's when
    >>> compilers were much slower and editors didn't have features
    >>> (bookmarks, source navigation, etc.) to deal with longer files.
    >>> These days 2,000-3,000 lines is perfectly fine and
    >>> 20,000-30,000 occasionally if the code content has boilerplate
    >>> similarity.

    >>

    <snip>
    >
    > So for my own purposes, I'm quite pleased with the small file
    > sizes. To me it suggests that the code is concise. Perhaps Strunk
    > and White isn't the best style guide for coding.


    Small file sizes is good - it's easier to read multiple files side by
    side than to be a several place in one file and if you ever use a
    parallel or distributed build system, things go faster.

    --
    Ian Collins
    Ian Collins, Dec 21, 2010
    #4
  5. On Dec 21, 12:08 am, (Ben Pfaff) wrote:
    > Gene <> writes:
    > > Yes, the 200-300 was common advice circa mid-80's when
    > > compilers were much slower and editors didn't have features
    > > (bookmarks, source navigation, etc.) to deal with longer files.
    > > These days 2,000-3,000 lines is perfectly fine and
    > > 20,000-30,000 occasionally if the code content has boilerplate
    > > similarity.

    >
    > I'd be really uncomfortable with 20,000-30,000 lines of
    > boilerplate, unless it was automatically generated and maintained
    > by modifying the generator, not by modifying the generated code.


    I have trouble imagining that much "boiler plate similarity". I'm
    actually not even sure what it means...
    Nick Keighley, Dec 30, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Pilcher

    Code review requested

    Ian Pilcher, Dec 15, 2003, in forum: Java
    Replies:
    0
    Views:
    342
    Ian Pilcher
    Dec 15, 2003
  2. Ed

    Code review requested

    Ed, Jul 19, 2004, in forum: Java
    Replies:
    1
    Views:
    356
    Filip Larsen
    Jul 19, 2004
  3. www
    Replies:
    51
    Views:
    1,473
  4. luserXtrog

    Code Review requested: Postscript Interpreter

    luserXtrog, Dec 19, 2010, in forum: C Programming
    Replies:
    21
    Views:
    870
    Keith Thompson
    Jan 1, 2011
  5. Gene
    Replies:
    4
    Views:
    373
    Nick Keighley
    Dec 30, 2010
Loading...

Share This Page