Big massively long exotic source file

Miscellaneous Forums/General Discussion/Big massively long exotic source file

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I used to use one big source file. Now I don't. I've seen the light.

I use TortoiseSVN for incremental backups throughout development. Subversion folders have icons which instantly show you which folders contain modified files, and which files have been modified. If I change a code file and break something, I can compare the edited version with the most recent backup, side by side, and its very easy to see every change I've made to the code.

It is much MUCH easier to split code up into smaller files. What is the point of having 20,000 lines of code in the IDE when you're only working on a couple of functions?

All of my code is split into classes - one per file. My main code file is only about 20 lines long and other than that, I don't have any code that exists outside of any classes.

Keeping everything modular means that I can always find the bit of code I need to work on, and that I can find it quickly. It also means that when I'm done working on a class, I can close it and forget about it, safe in the knowledge that it will all make sense when/if I need to go back to it later.

If you want to write well-structured and easily maintainable code, you absolutely need to split it up. If you're a masochist then you'll likely get a lot of benefit from cramming everything into one massive file.