 |
|
 |
More fervor, more spice, more angst needed.
May your ears turn to ar*e holes and and sh*t all over your shoulders. May the hairs on your ar*e turn to dicks and f*** you to death.
Ok so kid sister rules really needs to kick in here but republishing these links should be punishable by something REALLY nasty.
Never underestimate the power of human stupidity RAH
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Mycroft Holmes wrote: May your ears turn to ar*e holes and and sh*t all over your shoulders. May the hairs on your ar*e turn to dicks and f*** you to death.
A wee bit on the harsh side wouldn't you say?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Oh no, if someone is going to supply links to such WAFTMs then there be no curse too hash for them.
Never underestimate the power of human stupidity RAH
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Graham Shanks wrote: May the fleas of a thousand camels nest in your genitalia!
Worth a 5, and I commiserate
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
We need to start scaring those people instead.
Step 1: find out where they live Step 2: make them aware of that Step 3: ??? Step 4: Profit!
Don't let my name fool you. That's my job.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
... 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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I just settle for calling them tmpStr tmpInt etc so I know. Tend not to use them at all unless I have to
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
KungFuCoder wrote: I just settle for calling them tmpStr tmpInt etc so I know.
It's better than nothing I suppose, unless you're using a statically typed language, in which case it's completely useless (e.g. "int tmpInt" is redundant and a waste of brain/finger time).
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In my very short scope example, most likely so, but not for the reason you say.
The fact that the compiler will catch a mistake does not make it easier to read and understand. A short scope of 10 lines or less means we don't really need to care what it is.
But if you are evaluating 20 different boolean results over the course of a 100+ line function, you might not want to spend a lot of time thinking of 20 meaningful but distinct names. tmpBool would do just fine.
Don't let my name fool you. That's my job.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Brian Hart wrote: 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.
I'll tell you what makes the code fairly hard to understand: having a single function which is thousands of lines long.
This is idiotic and completely unnecessary - we've had procedures and functions and other abstractions since before colour TV, and their main use is to prevent thousand line functions from ever existing.
IMO, tiny variable names are okay if you have quite short functions, which you really should anyway.
|
| Sign In·View Thread·PermaLink | 5.00/5 (3 votes) |
|
|
|
 |
|
 |
"I'll tell you what makes the code fairly hard to understand: having a single function which is thousands of lines long."
You can say that again!!!
If at all possible I try not to have a function that goes over the number of lines that will fit comfortably in one screen of my programming editor.
Meddle not in the affairs of dragons, For you are crunchy, and good with mustard.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
I am talking about seeing this in high performance scientfic codes where a single function can be thousands of lines long.
There is nothing wrong, IMHO, with using trivial variable names in cases where the scope of the variable is short and its meaning can be entirely gleaned from context. A classic example:
For I As Integer = 1 To 40 Item.Dat(I) = 0 Next Would using any name other than "I" make things clearer? Of how about something like:
Dim st As String st = GetSomeData(); If Not String.IsNullOrEmpty(st) Then DoSomethingWith(st) Endif Would any name other than "st" be more helpful?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
supercat9 wrote: Would any name other than "st" be more helpful?
Try 'str'.
Because I'd keep thinking "street? What's street got to do with this?"
Don't let my name fool you. That's my job.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Agreed. Certainly nothing wrong at all with "using trivial variable names in cases where the scope of the variable is short and its meaning can be entirely gleaned from context," as you say, and I quote.
Sincerely Yours, Brian Hart
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
Dave Parker wrote: 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
Now that's a master coder.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |