Best Coding Habits to Adopt Now (that I wish I did earlier)

Sufiya khan
3 min readJul 18, 2023

--

When teaching oneself a new skill, it is common to develop bad habits that can hinder progress. Without external feedback, these habits tend to become ingrained. Although they may not pose an immediate problem, they can limit one’s abilities in the long run, necessitating the correction of these bad habits.

For instance, consider the example of typing. If someone never learned touch typing and relied on a few fingers to type, they might reach a speed plateau of 60 to 80 words per minute. To improve further, they would need to learn touch typing. This principle also applies to coding, where certain habits can restrict career growth.

In this video, we will discuss five habits that are essential to cultivate in order to avoid limitations in your coding career.

  1. Plan First, Code Second: Many developers, both junior and senior, tend to immediately start coding when faced with a problem. While coding is enjoyable and a core aspect of software development, it is crucial to thoroughly understand the problem before jumping into coding. By properly analyzing the problem and determining the ideal solution, you can avoid merely addressing symptoms and instead solve the root cause.

2. Create Code Templates: Professional software development involves a significant amount of repetitive tasks for each application. Setting up APIs, databases, CI/CD pipelines, and infrastructure can be time-consuming. To enhance efficiency, you should build reusable templates that automate the creation of common application structures. These templates allow you to focus on the business logic rather than rewriting boilerplate code every time.

3. Don’t Reinvent the Wheel: Instead of attempting to build everything from scratch, leverage the work of others. There are numerous frameworks and libraries available that can save you time and effort. It is unnecessary to reinvent solutions that have already been implemented successfully. By utilizing existing libraries and components, you can streamline your development process and avoid unnecessary complexity.

4.Explain It to Others: Regardless of your experience level, getting stuck on a problem is common. However, senior developers understand the value of seeking help rather than spending an entire day struggling with a single issue. When facing a challenge, try explaining it to a friend or colleague. This process of articulating the problem often leads to a deeper understanding, helping you find a solution. Even if the person you ask doesn’t know the answer, the act of explaining can trigger insights and assist you in solving the problem independently.

5. Maintain a Developer Journal: Our memory is fallible, and it is unrealistic to rely on remembering every detail of a problem or its solution. Keeping a developer journal allows you to document what you learn and revisit it when needed. You don’t need to capture excessive detail; a brief summary of the problem and its resolution is usually sufficient. You can use physical notebooks, digital note-taking applications like Notion or Obsidian, or a combination of both. The advantage of digital tools is the ability to search and organize your notes efficiently.

6. By adopting these five habits — planning before coding, using code templates, leveraging existing solutions, explaining problems to others, and maintaining a developer journal — you can avoid limiting your potential as a coder and excel in your career.

--

--