Best Programming Advice Ever.
-
It is scary the number of people that don't take that advice.
* Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
that has been the advice since I was a sysop in the early 80's!
------------------------------------ "The greatest tragedy in mankind's entire history may be the hijacking of morality by religion" Arthur C Clarke
-
That's really in VC6?
John
-
that has been the advice since I was a sysop in the early 80's!
------------------------------------ "The greatest tragedy in mankind's entire history may be the hijacking of morality by religion" Arthur C Clarke
Yeah right like anybody does that LOL I have seen some doozies in my time. My favorite is one-letter variable names! Like
StringArray a = new StringArray();
Sincerely Yours, Brian Hart
-
That's really in VC6?
John
John M. Drescher wrote:
That's really in VC6?
Heh, that was my first reaction, too.
-
John M. Drescher wrote:
That's really in VC6?
Heh, that was my first reaction, too.
He added this to the "msdev.tip" file which is a plain text file. :-D
-
He added this to the "msdev.tip" file which is a plain text file. :-D
Oooh, you can do that?
-
Actually the person maintaining my code is me -- a serial killer that knows where I live.
-
IList newList = new List(); //I eat serial killers for breakfast newList.Add("word"); //You think you can take me? Think again a*shole
-
Yeah right like anybody does that LOL I have seen some doozies in my time. My favorite is one-letter variable names! Like
StringArray a = new StringArray();
Sincerely Yours, Brian Hart
-
It is scary the number of people that don't take that advice.
* Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
-
... in the right circumstances. Pretty much being that the variable is in a very short scope and is basically a tmp variable, where the name is not important.
Don't let my name fool you. That's my job.
That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.
Sincerely Yours, Brian Hart
-
That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.
Sincerely Yours, Brian Hart
I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to
-
That point is irrelevant. I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long. Makes the code fairly hard to understand if all the tmp variables happen to be one letter, trust me.
Sincerely Yours, Brian Hart
That point is irrelevant. Typical phud, discrediting anything that disagrees. Heh. :) The point was absolutely relevant since you did not specify any conditions. In your new revision, I certainly agree - in fact, my original point already acknowledged that and more. I was just pointing out that your absolute statement was, with even a single counter-example, therefore absolutely wrong. As a programmer you gotta be careful with those corner cases.
Don't let my name fool you. That's my job.
-
I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to
My first thought was putting that in context with the idea of a 1000+ line function and thinking: well that's just gonna piss him off all over again. Might as well just call it thisVariableHasMoreThan1Letter or singleLetterVariablesSuck. But as a response to my point it does make sense. I do that, too, in most such situations. But not all.
-
Just do what apple do. Create a platform...IPOD/IPHONE They only change 3 things every 6 months..(Email forwarding (cmon we all know that took a day to write))..have a big macworld announcement and the starving clients will praise you forever. :) 6 bugs /year...think thats a programmers best average? :)
-
... in the right circumstances. Pretty much being that the variable is in a very short scope and is basically a tmp variable, where the name is not important.
Don't let my name fool you. That's my job.
At the place where I used to work the guy who was there before me made *every* variable a global (this is in VB6) and would start with the name AAA and work his way upwards :-s
-
At the place where I used to work the guy who was there before me made *every* variable a global (this is in VB6) and would start with the name AAA and work his way upwards :-s