How and Why to Keep Your Code Clean
In Chapters 1 to 4, we learned all the basics of programming and are about to dive deep into developing our very own game.
But before we do so, we must realize that the code base for games can grow very large. This means that the code and systems we write one day can be buried under other code and systems. As a result, returning to our earlier work can be a hassle because we forget how or why we coded certain things in a certain way.
That is why now is the ideal moment to stand still and think about how to keep our code clean and understandable even months after writing it. Most of the things in this chapter were learned through making mistakes myself and having to find a solution in books and articles.
Although most of the tips can feel like critical thinking and will bring you to the same point (which they probably will), it always helps to voice them and explain why programmers employ them.
Holding them in the back of your mind while...