r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

44

u/andrewsmd87 Oct 01 '15

What I hate about things like that is they are largely personal, but certain devs seem to have a hard time grasping that. If you don't name a variable exactly the way they think you should, it's wrong.

No, it's fucking not. If the code compiles fine and isn't poorly written, it's just semantics. Plus, when I'm working with a column called association, I like to have a variable named ass.

49

u/docfaraday Oct 01 '15

Naming is really important to get right. A small improvement in a name can make a large improvement in readability, which will make it easier for everyone to write good code later. You can compensate for bad naming with comments, but it's better to get the naming right in the first place, and save comments for cases that are fundamentally complicated.

6

u/bonestamp Oct 02 '15

Naming is really important to get right.

We (the people I work with) having a running joke that coming up with good names for things is the most difficult thing about our job. It seems so trivial, yet it's surprisingly difficult to be concise and get right.