DEV Community

Cover image for 5 Small Habits That Make You a Better Developer
Tharindra Dasuni
Tharindra Dasuni

Posted on

5 Small Habits That Make You a Better Developer

When I started coding, I thought getting better meant learning more frameworks. Over time I realized the biggest improvements came from small, boring habits. Here are five that made a real difference.

1. Read error messages fully

It's tempting to copy the error and paste it into a search engine immediately. Instead, read it slowly. Most errors tell you the file, the line number, and often the exact cause. Five seconds of careful reading saves fifteen minutes of guessing.

2. Commit small and often

Big commits are hard to review and harder to undo. Small commits with clear messages give you a safety net.

git commit -m "Fix null check in user login"
Enter fullscreen mode Exit fullscreen mode

A good message answers one question: what changed, and why?

3. Write code for the next person

That next person is usually you, six months later. Use clear variable names, keep functions short, and add a comment only when the why isn't obvious.

// Hard to read
const d = u.filter(x => x.a > 18);

// Easy to read
const adultUsers = users.filter(user => user.age > 18);
Enter fullscreen mode Exit fullscreen mode

4. Learn to debug, not just to code

Use your debugger or console.log deliberately. Form a guess, test it, and narrow down the problem step by step. Debugging is a skill, and it improves with practice.

5. Build small projects regularly

Tutorials teach you concepts, but projects teach you how things fit together. A to-do app, a weather widget, or a tiny CLI tool is enough. Finish something small instead of abandoning something big.

Final thoughts

You don't need to master all five at once. Pick one, practice it for a week, then add another. Small habits compound faster than you'd expect.

What habit helped you the most as a developer? Share it in the comments, I'd love to hear it! 👇

Top comments (0)