This week at my new job, I was tasked with creating a new feature for one of our web apps. Specifically, I had to "expose" some information from our database to the web app, not for immediate use, but in case this data was necessary down the line.
My task required me to dive deeeeeeep 🌊 into our codebase. There were so many methods, variable definitions, modules and models to investigate and step over - all to decide if the data I sought to uncover had already been queried elsewhere in our app. That's when the absolute importance of clean, well-written code hit me. 🧱
As a bootcamper, I remember how often I heard "Name your variables, methods and functions intelligently". I admit, this is advice I didn't take seriously at first. After all, who else is reading the code for my kick-ass personal project? As long as I understand it right? However, in my opinion, that is one of the weaknesses of solo projects - we don't get to build those coding skills that enhance and promote collaboration. This is the main reason why, before landing my current job, I decided to get into opensource (starting with Dev.To - yay! 🎉). I needed to learn how to read and understand other people's code, and get comfortable with coding with others.
Typically, large professional codebases require significant energy to understand the various constructs, data types and paradigms that are being implemented. Clean code ensures that the newbie developer isn't further burdened with figuring out what a variable refers to. 🤔 Clean code really makes software development easier.
PS This journal entry doesn't delve into what constitutes clean code. I do understand that "clean code" can be defined subjectively.