Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Code Review requested: Postscript Interpreter

Reply
Thread Tools

Re: Code Review requested: Postscript Interpreter

 
 
Gene
Guest
Posts: n/a
 
      12-20-2010
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.
 
Reply With Quote
 
 
 
 
Ben Pfaff
Guest
Posts: n/a
 
      12-21-2010
Gene <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
luser- -droog
Guest
Posts: n/a
 
      12-21-2010
On Dec 20, 6:08*pm, (E-Mail Removed) (Ben Pfaff) wrote:
> Gene <(E-Mail Removed)> 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.
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      12-21-2010
On 12/21/10 02:47 PM, luser- -droog wrote:
> On Dec 20, 6:08 pm, (E-Mail Removed) (Ben Pfaff) wrote:
>> Gene<(E-Mail Removed)> 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
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      12-30-2010
On Dec 21, 12:08*am, (E-Mail Removed) (Ben Pfaff) wrote:
> Gene <(E-Mail Removed)> 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...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Review requested: Postscript Interpreter luserXtrog C Programming 21 01-01-2011 11:46 PM
Re: Code Review requested: Postscript Interpreter Gene C Programming 4 12-30-2010 07:25 AM
What is code review? (Java code review) www Java 51 05-15-2007 01:10 PM
Python embedded interpreter: how to initialize the interpreter ? ycollet@freesurf.fr Python 3 01-03-2007 01:00 AM
pretty print to postscript (or pdf or tex) for both code and pod ivowel@gmail.com Perl Misc 2 11-27-2006 12:47 AM



Advertisments