I'm currently working on a project that's about to reach over 5,000 lines of code, but I never really completely thought out the design. What methods should I use to structure and organize my code? Paper and pen? UML diagrams? Something else?
How should I plan out my code base?
architecture;uml
You probably get about as many different views as there will be answers. But here is my perspective.For starters, 5000+ lines of code is very very small project. Now, how do you go about designing projects that grow. Firstly, you design your system and not a code. Code is actually secondary to the architecture. Start with supporting minimum current requirements. Put some simplistic drawing of components involved. I personally like UML, but anything visual will be good. Ideally, you want to adhere to good design practices here (interfaces, separation of concerns etc).Once you support minimal requirements in your design, code it. Again, try to adhere to good coding practices. After that, iteratively add more functionality as new requirements arise. Ideally you want to update your design as well.What is important, based on my experience, is not to design your system in anticipation of non existing requirements. Otherwise your project will grow very quickly and will get very complex in a short time. Again - adhere to good practices and starts with concrete current requirements.