![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6
![]() |
we all know the importance of variable names. i usually write for a while then do a quick "find 'n replace" to replace my "x" var's with "homePhoneNumber" or whatever, after the infrastructure is in place. does everyone do this? or do we all just love typing?
![]()
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 770
Rep Power: 3
![]() |
I give 'em full names as I go so I don't have to replace 'em later. I don't mind the extra typing and I figure its a good habit. Besides, with so many IDEs featuring auto-complete, it shouldnt be that bad (either way, I still get along fine using vim). Pretty much the only single char variable names I have are for loops or where such a short name would be appropriate.
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
In VC# there is a feature called re-factoring, that does this for you.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#4 | |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 770
Rep Power: 3
![]() |
Quote:
|
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Apr 2006
Location: Calgary, Alberta
Posts: 67
Rep Power: 3
![]() |
Yeah, I only use really short variable names for loops and in very small functions. Otherwise it's just too wierd to have someone look at.
|
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I always start with meaningful names, like countThangy.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
* pokes DaWei *
Bad! ![]() I always use decent variable names when the project's longer than, say, 50 lines or so. If it's just a little hack I want, I don't always bother. I pay for it later though. |
|
|
|
|
|
#8 |
|
Programming Guru
![]() ![]() ![]() |
I always type it out... varName, etc. On occassion, I go back with search-replace and change the name to make it more readable to someone who wouldn't understand the naming I originally chose.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#9 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#10 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
I type it all to avoid the moment where I go 'What does this program do again?'
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|