5 ms·
This might be obvious to some, but I've literally only realized a few months ago that when I write text, I will consult a thesaurus, whereas for some reason I'v
by mekoka 15y ago
This might be obvious to some, but I've literally only realized a few months ago that when I write text, I will consult a thesaurus, whereas for some reason I've neglected to do the same when I code. I would spend hours agonizing on how to call a module, wondering if I won't need the same word later for something else, or if it might be making things a bit ambiguous for the next guy.
So I've started also using a thesaurus when I code and so far I'm happy with the results. It's been helpful in accurately framing some of the hazier concepts with interesting names. I also revisit the naming much less than I use to, because I'm comforted with the notion that if I couldn't find a better word with a thesaurus, then maybe there isn't an obvious one. I also now use words that are clear, but that I so far neglected to include in my programming vocabulary, because other more prevalent ones would jump in my mind and put a shadow on my naming creativity.
So, if you need some help naming modules, functions, variables and db entities, a thesaurus could help. Though, take care to not abuse of it.
- panic 15y agoI do this too. Though my thesaurus doesn't always have the right technical meaning of certain words. I'd love to have a "programmer's thesaurus" with more detail on names that appear frequently in code. For one of the two hard problems in CS, the art of naming things has little reference material beyond raw source code.
- lars512 15y agoI'd never considered using a thesaurus for names, but it makes sense if the name you're starting with isn't quite right. Maybe something like Visual Wordnet (http://kylescholz.com/projects/wordnet/ http://kylescholz.com/projects/wordnet/) would be useful too.
- troels 15y agoI do it all the time. But then, English isn't my first language, so that probably makes it a more natural thing for me to do.
- vog 15y agoI'm using dict.cc for that purpose, which is not just a thesaurus but also a translation tool. Sometime I find the right words in my native language but not in english. Or, the synonyms are not satisfying, but switching between languages leads to words more loosely connected to my initial word, thus extending the search radius in a useful way.
- scott_s 15y agoMy attitude is that if I can't come up with a good name for something, I don't really understand what it is.
- Nick_C 15y agoI guess I should mention my vim script to do online thesaurus look-ups. http://www.nickcoleman.org/blog/index.cgi?post=vim-thesaurus%21201202170802%21general%2Cblogging%2Cinternet%2Cprogramming%2Csoftware%2Cunix http://www.nickcoleman.org/blog/index.cgi?post=vim-thesaurus...