Skip to content

Comment on Why Naming Variables Can Distinguish a Good Programmer from a Bad One

Comments

If you struggle to name something, it’s likely because you don’t fully understand it yet.

Nail struck squarely on the head. This is why naming things is is hard. The temptation and sometimes need to barrel through without real understanding in very strong.

My practice is to notice when I'm starting to struggle with naming things and take that as a signal that I don't quite have what I'm doing clear in my mind. I need to step back and take a few moments to reflect. It's saved me from future trouble more often than I can count.

alternative thinking - if you need to name something to understand it that is a smell…

https://degoes.net/articles/insufficiently-polymorphic

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.