Thoughts from Dan Miser RSS 2.0
# Friday, January 28, 2005
I came across this post today, talking about names as viewed from an intercultural perspective. It was a good read, but it triggered something in me that I knew I had to blog about, namely a quote that bites me time and again: "Writing the code is easy. Naming it properly is hard.".

I'd say this problem is pervasive, based on my experience. How many times have you seen code that does "for i:=0 to Count-1 do"? OK, maybe that's a stretch. Counter variables don't exactly require great names. But still, the point remains. Badly named variables, methods, components, etc. are very common. I find that when this happens in my code, it's due to a failure in my understanding of exactly what the code is meant to do. In the old days, you just had to change things around until they make sense. Today, it's called Refactoring. :-)

My advice is that when you find yourself starting to have to do mental gymnastics to keep track of what a variable/method/etc. is used for, it's time to immediately change either the purpose or name of the variable (or both). It may be a minor inconvenience now, but it will pay major dividends the next time that code is looked at.

Friday, January 28, 2005 1:30:00 PM (Central Standard Time, UTC-06:00)  #    Comments [3] -

Tracked by:
http://9nc-information.info/98237255/index.html [Pingback]
http://9nr-information.info/57359221/house-of-champagne.html [Pingback]
http://9ns-information.info/65219429/index.html [Pingback]
http://9nj-information.info/10145168/business-bank-of-skagit-counyt.html [Pingback]
http://9nr-information.info/43362073/denver-zoo-lights.html [Pingback]
http://9ng-information.info/33262724/index.html [Pingback]
http://9ns-information.info/48513696/creating-book-reports.html [Pingback]
http://9nt-information.info/43865688/index.html [Pingback]
http://9nt-information.info/71436764/index.html [Pingback]
http://9ny-information.info/93823286/index.html [Pingback]
http://9qk-information.info/79507873/presidente-ai-tempo-rivoluzione-cubana.html [Pingback]
http://9os-information.info/90210263/index.html [Pingback]
http://9qf-information.info/87438849/toshiba-p30-129.html [Pingback]
http://9os-information.info/16625695/sony-dvd-recorder-rdr-gx300-inputs.html [Pingback]
http://9om-information.info/05230485/index.html [Pingback]
http://9ov-information.info/74572862/index.html [Pingback]
http://9rq-information.info/72383976/the-royal-paridise-hotel-in-phuket.html [Pingback]
http://9rb-information.info/67959985/taos-ski-valley-summer-new-mexico-vacation.... [Pingback]
http://9re-information.info/20686192/index.html [Pingback]
http://9rw-information.info/26774665/index.html [Pingback]
http://9sm-information.info/87528860/index.html [Pingback]
http://9uafk-le-informazioni.info/57147456/codice-gratis-the-sim-2-pet.html [Pingback]
http://9uafe-le-informazioni.info/19178532/larry-sims-boxe.html [Pingback]
http://9uafb-le-informazioni.info/73501546/index.html [Pingback]
http://9uafh-le-informazioni.info/90341285/index.html [Pingback]
http://9uafe-le-informazioni.info/37987069/index.html [Pingback]
http://9uafb-le-informazioni.info/34098319/index.html [Pingback]
http://9uael-le-informazioni.info/36261645/offerta-speciale-chianciano-terme.htm... [Pingback]
http://9uafk-le-informazioni.info/76186030/index.html [Pingback]
http://9uaef-le-informazioni.info/49482065/download-kaspersky-in-italiano.html [Pingback]
http://9uagp-le-informazioni.info/41947164/index.html [Pingback]
http://9uagf-le-informazioni.info/28371828/hddfor-evox.html [Pingback]
http://9uahf-le-informazioni.info/96300446/index.html [Pingback]
http://9uagr-le-informazioni.info/86789666/index.html [Pingback]
http://9uahp-le-informazioni.info/78199928/arte-design-architettura-storia.html [Pingback]
http://9uagc-le-informazioni.info/36216826/mito-caverna-platone.html [Pingback]
http://9uagk-le-informazioni.info/50198511/werner-von-strasse-n-14-hersbruck.htm... [Pingback]
http://9uagc-le-informazioni.info/24832907/index.html [Pingback]
Navigation
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Dan Miser
Sign In
Statistics
Total Posts: 375
This Year: 3
This Month: 0
This Week: 0
Comments: 654
Themes
Pick a theme:
All Content © 2012, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)