Quote: "TheComet, you have succumbed to inductive reasoning - it's your opinion, therefore it must be right."
Opinion? Where in the blazes did I ever say it was my
opinion. Unlike you, who didn't even bother to link the projects they supposedly found, who isn't backing up any of their claims, I'm supporting my arguments with facts.
I would say it is you who has succumbed to inductive reasoning. You're giving one example of some project you've worked on, and extrapolate from there, yet you dismiss the majority of other projects out there. You have 3 examples, I can throw thousands at you showing the opposite is true. How can you possibly claim it is generally acceptable to put all of your code into one file when the vast majority of projects out there don't do this?
I'll repeat what I've said because apparently I wasn't clear enough.
My premises are:
1) In general, the number of files are in proportional a relationship to the number of lines of code.
2) In general, programming projects almost never put all of their code into one file.
It is a
fact that lines of code has a proportional relationship to the number of files. I can prove this by examining 100 random projects from github with
this program here. For instance, here are the statistics from perl's source code:
$ cloc perl-5.10.0.tar.gz
4076 text files.
3883 unique files.
1521 files ignored.
http://cloc.sourceforge.net v 1.50 T=12.0 s (209.2 files/s, 70472.1 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Perl 2052 110356 130018 292281
C 135 18718 22862 140483
C/C++ Header 147 7650 12093 44042
Bourne Shell 116 3402 5789 36882
Lisp 1 684 2242 7515
make 7 498 473 2044
C++ 10 312 277 2000
XML 26 231 0 1972
yacc 2 128 97 1549
YAML 2 2 0 489
DOS Batch 11 85 50 322
HTML 1 19 2 98
-------------------------------------------------------------------------------
SUM: 2510 142085 173903 529677
-------------------------------------------------------------------------------
Every project will follow this trend.
From this, I construct the following claim:
Having your code organised into multiple files as opposed to having everything in a single file yields more maintainability.
I can support this claim based on the way the vast majority of projects organise their code. I can also support this claim based on the experiences of every programmer who has ever been involved in such a project where code has been organised into multiple files.
I therefore conclude that code is in general more maintainable when organised into multiple files.
Quote: "The ERP system I refer to is made up of over 9,000 files, so it isn't coded as a single file. Some of those files are up to 28,000 lines in length. Ergo, it isn't unreasonable for a complete program with less lines to be comprised of one file, if this size of file is maintainable."
The only programs that can be considered "reasonable" in one file are small shell scripts or something.
As already proven with the program above, even small projects are generally organised into multiple files.
Quote: "The point about single file projects on github is irrelevant. "
This is a senseless, baseless allegation and cannot be used to support any of your arguments until you are able to answer the following:
1) Why is it irrelevant?
2) Does github not represent a valid source for a general sense of how the majority of us program? If so, why?
The only way to do great work is to love what you do -- Steve Jobs