DEV Community

Cover image for ๐Ÿšซ Stop Using These Bad Coding Habits (Your Future Self Will Thank You)

๐Ÿšซ Stop Using These Bad Coding Habits (Your Future Self Will Thank You)

Darshan Raval on July 13, 2026

Writing code is easy. Writing code that your future self (or your teammates) won't hate is the real challenge. Every developer starts with bad c...
Collapse
 
algorhymer profile image
algorhymer
  1. โŒ Naming Variables Like a, x, temp, data

Let's do a check list:

  • No variables, since it is not supported.
  • No mention of arguments at all.

Yup. I aced it.

extrapolate :: [Int] -> Int
extrapolate = sum . foldl' (flip (scanl (-))) []
Enter fullscreen mode Exit fullscreen mode

Fร ilte gu Alba!

heh

Btw, below is a pic of our famous military hero Lance Corporal Cruachan IV with his trusty human servant on his side:

lance-corporal-cruachan-iv

Collapse
 
darshanraval profile image
Darshan Raval

Modern problems require functional solutions! Can't have bad variable names if you don't use variables at all.

Collapse
 
ayushh profile image
Ayush Sharma

Python?

Collapse
 
algorhymer profile image
algorhymer

Dutch?! Ewwwww... nonono. Scottish, Glasgow :)

Collapse
 
kartik-nvjk profile image
Kartik N V J K

The naming and giant-function points matter even more now that a lot of code is machine-generated, because a model reuses whatever conventions it sees and single-letter names propagate fast. The one I would push hardest is the error handling, since a swallowed exception is the kind of failure that stays silent until it corrupts something downstream. Worth pairing these with a linter so the habit is enforced rather than remembered.

Collapse
 
darshanraval profile image
Darshan Raval

100% agreed! The point about AI propagating bad naming habits fast is so true. Also, swallowed exceptions are definitely the worst offender here. Automating these checks with a linter is a great takeaway to keep the codebase clean without the cognitive load.

Collapse
 
ayushh profile image
Ayush Sharma

hahaha I'm the one who doing this, I will not do this silly mistakes. thank you for this blog.

Collapse
 
darshanraval profile image
Darshan Raval

Welcome

Collapse
 
fugofresh profile image
FugoFresh

Good

Collapse
 
darshanraval profile image
Darshan Raval

thanks

Collapse
 
mia_keller_ffd2584c046ecb profile image
Mia Keller

This is a fantastic checklist, and point #8 on nested conditions is a total game-changerโ€”early returns completely rescue code from the 'pyramid of doom' and make it instantly readable. I also love the bonus habit of walking away and reading your own code with fresh eyes. It is amazing how a simple 20-minute coffee break can suddenly make you look at your own logic like a stranger who desperately needs a friendly code review!

Collapse
 
darshanraval profile image
Darshan Raval

Thanks, Mia! Glad those points resonated with you. You nailed it nothing humbles a developer faster than looking at their own code after a 20-minute coffee break and wondering, "Who let this person near a keyboard?" ๐Ÿ˜‚ Escaping the 'Pyramid of Doom' is honestly one of the best gifts we can give our future selves (and our teammates). Thanks for reading and sharing your thoughts!