4 ms·
What is a good name? Sometimes the failure at finding a good name (and taking 30 minutes to name your variable) means your abstraction is not good and/or your
by alanfranz 7y ago
What is a good name?
Sometimes the failure at finding a good name (and taking 30 minutes to name your variable) means your abstraction is not good and/or your variable encloses multiple concepts.
Of course, a short-spanned internal-only variable used just once or twice doesn't deserve a 30-minutes debate; OTOH a public variable which could be externally exposed by a class could require a bit of thinking.
- diggan 7y agoElements of Clojure is an excellent book that goes through what a good name is and what it should represent. Don't be put off by the "Clojure" in the title, the book is really not about Clojure but about programming, using Clojure for its samples. You can read a sample chapter online, which is the chapter about naming. Highly recommended! https://leanpub.com/elementsofclojure/read_sample https://leanpub.com/elementsofclojure/read_sample