DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for JSCD: You Can Never Have Too-Clean Code
Arit Developer
Arit Developer

Posted on • Updated on

JSCD: You Can Never Have Too-Clean Code

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.

Top comments (7)

Collapse
qm3ster profile image
Mihail Malo

I see this post is part of a series.
Have you considered using the DEV.to series feature?
Here's how:

Collapse
aritdeveloper profile image
Arit Developer Author

Thank you Mihail! I didn't know about this!

Collapse
qm3ster profile image
Mihail Malo

finger guns emoji

Collapse
vitalipom profile image
Vitali Pomanitski

hi Arit, how do add this cool header picture?

Collapse
qm3ster profile image
Mihail Malo

I want to eat that soap

Collapse
vitalipom profile image
Vitali Pomanitski

Hhhhh haha I now have to see what the heck in all worlds did I wrote there for that comment :D

Collapse
theodesp profile image
Theofanis Despoudis

It's not only that, you also try to keep the same style of the codebase for consistency. That alone will take some time to accomplish.

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.