4 ms·
Better one good organized file than 100s of folders and subfolders and files and symlinks. I have worked on projects where even after 2 years I didn't grasp the
by holoduke 5y ago
Better one good organized file than 100s of folders and subfolders and files and symlinks. I have worked on projects where even after 2 years I didn't grasp the folder structure and just used search to locate files.
- civilized 5y agoPeople love to complain about things that are simple, fast, and easy to complain about, without regard to whether the complaint is insightful or useful. It's sort of the dark twin of bikeshedding. If you divide the single 11k-line file into a thousand 11-line files, it may become objectively much harder to understand, but it'll also receive much less flak, guaranteed. I suspect this is also why Architecture Astronaut-ery can be so successful within a company. If code is chock-full of superficial signs of order and craftsmanship, such as hierarchy, abstraction, and Design Patterns(TM), it takes a lot of mental effort to criticize it, and most people won't.
- smegsicle 5y ago> dark twin of bikeshedding is it different from regular bikeshedding? or are you saying that the dark twin is the evolutionary process of eg. architecture gaining complexity until it becomes difficult to criticize..
- civilized 5y agoBikeshedding is usually more about how something should be done than how it should not be done. But, yes, you could think of them as basically one thing.
- aaronchall 5y agoIf you divide a single 11k-line file into 20 files averaging 550 lines per each, by semantics and levels of abstraction, your code will quite possibly be easier to read, maintain and add to. Maybe. Perhaps.
- civilized 5y agoI mostly agree, but it's often not that big a deal, and some people and applications may favor bigger files. I have a 4000-line script in a single file that has served me very well. It's perfectly organized and modular. I thought about breaking it into more files but it seemed pointless. It's very convenient for jumping through every mention of a variable, for example.
- throwawaylinux 5y ago> If you divide the single 11k-line file into a thousand 11-line files, it may become objectively much harder to understand, but it'll also receive much less flak, guaranteed. A thousand 11-line files? You definitely could not make that guarantee of the people I work with.
- gameswithgo 5y ago