TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What Are Your Programming Pet Peeves?

3 pointsby edmqkkalmost 4 years ago
I think my biggest programming pet peeve is people shooting down my long variable names. I don&#x27;t make all my variable names long. IMO, I make them all long enough, and I hate when people tell me to shorten them, as those names are often some of the things I&#x27;ve thought the hardest about in my PR.<p>Consider these two names:<p><pre><code> car_to_base_new_car_from base_car </code></pre> What&#x27;s the difference? Do they have the exact same connotation to you?<p>I would agree that they&#x27;re pretty much the same, but I think they have slightly different connotations. `car_to_base_new_car_from` to me hints that a new car could be based on any other car whereas `base_car`, although it could mean that, doesn&#x27;t necessarily nudge me in that direction (Maybe it&#x27;s a mostly empty skeleton car that is used in all situations--who knows).<p>Note: I also think that in certain situations `k`, `v`, and `i` are perfectly acceptable names (obviously depending on your team and language community).<p>This is all very situation specific, and, although it kills me sometimes, I typically don&#x27;t push back too much on this type of feedback.

3 comments

drostalmost 4 years ago
Dependency Injection frameworks. It&#x27;s not very difficult to manually build your composition root and a composition root makes the codebase easier to understand and navigate, especially for new people.<p>Letting `null` into the program. I really hate having to consider whether some value can be null
joshxyzalmost 4 years ago
That.<p>users_get_users could be users__get_users.<p>Also not using linters and being trigger happy about adding third-party libraries in the package.json.
评论 #27682961 未加载
higginsalmost 4 years ago
Huge pull requests in poorly structured commits with little context in the PR description.