![]() |
Re: Code Review requested: Postscript Interpreter
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. |
Re: Code Review requested: Postscript Interpreter
Gene <gene.ressler@gmail.com> 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. |
Re: Code Review requested: Postscript Interpreter
On Dec 20, 6:08*pm, b...@cs.stanford.edu (Ben Pfaff) wrote:
> Gene <gene.ress...@gmail.com> 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. |
Re: Code Review requested: Postscript Interpreter
On 12/21/10 02:47 PM, luser- -droog wrote:
> On Dec 20, 6:08 pm, b...@cs.stanford.edu (Ben Pfaff) wrote: >> Gene<gene.ress...@gmail.com> 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 |
Re: Code Review requested: Postscript Interpreter
On Dec 21, 12:08*am, b...@cs.stanford.edu (Ben Pfaff) wrote:
> Gene <gene.ress...@gmail.com> 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... |
| All times are GMT. The time now is 11:12 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.