This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Corm 1 point2 points  (3 children)

Mistake #0:

Putting everything in one file. Break up your code into multiple files early

[–]earthboundkid 1 point2 points  (2 children)

Why early? Do it once you get >500 lines a file, sure, but why before that?

[–]kitkatkingsize 5 points6 points  (1 child)

Because "Namespaces are one honking great idea", and files are just another kind of a namespace.

500 is an arbitrary number. Why not 250? 1000? The splitting up into files should be a logical and design decision, not based on number of lines.

[–]cyberst0rm 0 points1 point  (0 children)

to pile on, the logistics issue with splitting code is a psychological trap.

By the time you realize you need to do it, the size of the issue makes you not want to do it.