Categories
Uncategorized

Clean it up

While I have taken the OSU courses on SWE, which both heavily discuss clean code and code smells. I find that some of the good tips and guidelines have been forgotten, or there are some that I haven’t seen before. For example this article from Patrick Karsh discusses the God Object, which is an object that unintentionally takes on too many responsibilities. This hasn’t ever been too much of an issue for me but I can see how someone could do this unintentionally. Though I must say I have a related worry given the programming goals I have and my capstone project I do worry about classes or files becoming too monolithic. Looking at the data structures and classes that are required I worry they might get too heavy. For example the player class has to handle many different tasks and objects from experience to inventory and relationships. I do think this would be a good topic to research, see how other devs have tackled this task, and what best practices exist.

The other side of it, things I would like to correct within myself has to do with my pride and history as a programmer. I don’t any cases besides snake case. I understand that other languages have different conventions, and this is due to me having started with Python but I find snake case to be the easiest to read and cleanest looking naming convention. Furthermore, I also want to get better at my general naming conventions. Being descriptive while eliminating “noise” words. Clean Code Explained describes noise as word like data, list, and info. I find that I will sometimes use these words when I’m running out of ideas for new variables. I’ve definitely used the name “temp_list” more than once. Hopefully, taking another look at these topics as I finish my education will stick with me for a while longer.

Leave a Reply

Your email address will not be published. Required fields are marked *