Hacker News new | ask | show | jobs
Best practices for naming things in your code (lukagabric.com)
1 points by awartani 3242 days ago
1 comments

The only useful heuristic I've come across for naming things is huffman-coding by frequency and locality. Things that are used more often get shorter names, and the more public a name is the more space it's allowed to take. I kind of, sort of have Perl to thank for that insight; as weird as that may sound. In the end it's about finding the right balance for any piece of code, which depends on everything and requires experience.