DEV Community

dzaeltic
dzaeltic

Posted on

What makes a good codebase?

I am a currently student in a coding bootcamp. We have been focusing a lot on JavaScript, as we start to build fundamentals. Recently, as we have started exploring GitHub, CSS, and HTML, I've started to get exposed to larger codebases, and I've realized there is a lot that can be going on in one project. Collaboration is huge in development it seems, so having good fundamentals with how I layout codebases seems really important to me.

I say collaboration, and you probably immediately were thinking with other developers. While, yes, I was, I want to clarify that I am also talking about development with A.I. I know that my teachers don't really want me using A.I. to write code and I completely understand. It is a super powerful tool, and can easily become a crutch that hinders my learning largely. But, I would be a fool to not explore some coding with A.I on the side, and as I have, I have noticed that it can be hard to reign in the A.I. to actually fix the problem I need it to fix or even understand what the problem may be. Obviously, this is largely about the prompts I am giving it which could be improved upon. Communication is key to reaching a good codebase whether you are working with a person or AI!!

With clear instructions, the A.I is great at writing our code, saving us lots of time, but as a codebase grows, it gets harder and harder to communicate our vision and what our codebase should be doing as a whole. When it just solves problems through a lens without understanding the bigger picture, it leads to more modules. Simpler, but more. This gets harder to organize and navigate and becomes a problem as other developers struggle to understand what is happening in your codebase. Good codebases rely on more complex modules that have simpler interfaces, more functionality, and hidden complexity!

Tests, tests, tests! You have probably heard of T.D.D. (test driven development), but do you understand why it is important. This is what helps us communicate and focus on our main goal. Writing a test forces you to start with functionality. How does my code actually need to function? What possible bugs will I run into? These types of larger picture goals help to bridge the gap between two developers or AI and developer, so that goals can be reached more efficiently.

There is still a lot I don't understand in this field, but I can draw on my other life experiences to know that these things are key to building a good codebase. I didn't try to give micro-level tips and tricks because I am in no position to do so. Most people who read this will probably be more experienced at making codebases than I am.

I'm excited to start making my own codebases and applying what I've learned so far. I want to focus on designing architecture, making layouts that a toddler could understand. I want my code's purpose to be clear, and easy to edit. This is what makes a good codebase.

Top comments (0)