The example you give is hopefully not a typical example of you code! ;-) |
Of course not =]
However it was pointing to a difference in out preference for sure, I dislike having my variables so spaced out, because it seems unnecessary, and I'm "lazy" (I'm really not, but in this instance it's the best fitting word)
I generally like to use more descriptive names for code, and current convention appears to be to avoid abbreviations. Do you use short variable names yourself? |
Oh come on, now you're just busting my chops =]
No one I know would actually use "a" as a variable that they intend to use for something useful!
(Another strict rule: no abbreviations. In this case, exceptions are made, but only for variable names which are clear in context). |
I use abbreviations in variable names if I deem it necessary in the situation. There are times when I'll be using a variable tons of times, and I don't want to sit there typing customerName, where I could be typing cmName.
When I read you list I see a Customer and Warranty class, as well as a Job (which I take your class to be?) |
You could certainly separate the classes. I would, in fact, prefer to have a separate warranty class. However in this instance there are other things preventing me from ripping them apart (using someone else's file system, as well as some other situation specific issues) and yes, I would, in my personal programming keep things spaced out more, however this is an example (however poor)
Another difference! I know plenty of people who agree with you, but I find the decadently spaced version easier to read! |
And there's the issue, it's just not readable to me. I can navigate my code more quickly, and create code more efficiently if it's grouped closer. I can read the information faster and I don't have to take the time to extract the necessary information if it's concise. (but that's just me)