Categories
Uncategorized

Code Smell Like Roses

I’d like to start making my code simpler and more consistent, using the same structure so it’s easier to read and understand. One thing I wonder about is how long it takes me to write code after reading so much other code to figure out how it works and how to make my part fit with the rest. Then I go through my drawings, turn that into code, test it, and write my documentation based on everything I just did. While writing the docs, I often realize that some code smells or the logic doesn’t make as much sense. I also remember that phrase we’ve all heard: “If it works, don’t touch it.” In theory, yeah, if it works I shouldn’t touch it. But I need to make sure others understand what’s going on because at the end of the day, whatever’s happening in the code is just a combination of 0s and 1s that make the program do its job. Like Martin says, writing clean code isn’t optional when I think about code life, reusability, and improvement throughout the program’s life. I need to make sure the code is bug-free and clean so it works with others’ programs and doesn’t cause too many bugs. When I started coding, my mindset was just to code and make it work. But when I think about how long it takes me to read and understand other people’s code, I realize how important it is to write code with quality in mind.