DEV Community

Kindred
Kindred

Posted on

Let’s Talk About Ugly Code and Apply it to Our Lives

When we talk about ‘best practices’ in programming, we’re going to assume that the people reading that article develop pretty consistent, functioning code. They’re probably looking to make their code more adaptable, cleaner, and coincide with what today’s developers consider ‘best practices’. Let’s consider that if engineer’s took programming’s best practices, translated it for real world application, and applied it to their daily lives as consistently as they applied these practices to their code, call me crazy, but I think their quality of life AND code would be an upward graph! Though in this blog post I want to talk about something less thread upon which for consistency sake, we’ll call ‘bad practices’. Developers and other professionals alike, whether they are newbies or seniors in their field, sometimes people don’t know they are practicing these bad habits.

In my own code, I profess, I have practiced some of the bad habits below as well as others that are not listed. So my intention with this post is to, hopefully, by identifying poor coding practices, we can actually translate this from programmer lingo into real-world application as personal bad habits. I have a theory that if we look into breaking, avoiding, or improving on these habits in our lifestyle, then in turn, we’ll also make a conscious (and subconscious) effort to make better decisions when coding.

Just to keep in mind, I gathered what I considered the most common bad practices from forum and thread research and made the real-world translations myself based on my professional and personal experience in various industries and fields such as marketing and product development. Let’s get into the ugly!

--

Bad Coding Practice:

Not commenting or documenting your code or providing TOO much unnecessary documentation on your code

=>

Bad Personal/Professional Practice:

Not properly planning things out and not communicating what your intentions are

--

Bad Coding Practice:

Violating the Single Responsibility Principle (SRP) and not breaking tasks out into smaller components/functions (AVOID spaghetti code)

=>

Bad Personal/Professional Practice:

Overloading your schedule and/or plate with too many tasks, which doesn’t allow for flexibility, so you end up overwhelming yourself with too many ‘large’ tasks

--

Bad Coding Practice:

Hard coding and inconsistent naming conventions

=>

Bad Personal/Professional Practice:

Resolving issues, arguments, problems with short, curt, and very one-sided solutions instead of having a plan of action so you can either avoid this issue in the future, or know how to handle damage-control. Not using vague statements and when you’re solving a problem or strategizing.

--

Bad Coding Practice:

Convincing yourself that code styling isn’t that important and it looks ‘better’ on one line.

=>

Bad Personal/Professional Practice:

Consider how you communicate is not always the best way for other people to interpret what you're saying; consider the personalities you have around you and separate your thoughts out so people have time to absorb what you’re saying. That way you also can go into more detail about each of your thoughts.

Top comments (0)