The worst way to name a variable
-
Lol, I wrote this a few years ago for a school project... I think I wrote it on Monday at lunchtime.
function randomNumber(){
var lunchtimeMondayReturn=0;
while(true){
var lunchtimeMonday=Math.random();
if(!((lunchtimeMonday+'').split('')[2]>3)){
lunchtimeMondayReturn=(lunchtimeMonday+'').split('')[2];
break;
}
}
return lunchtimeMondayReturn;
} -
Lol, I wrote this a few years ago for a school project... I think I wrote it on Monday at lunchtime.
function randomNumber(){
var lunchtimeMondayReturn=0;
while(true){
var lunchtimeMonday=Math.random();
if(!((lunchtimeMonday+'').split('')[2]>3)){
lunchtimeMondayReturn=(lunchtimeMonday+'').split('')[2];
break;
}
}
return lunchtimeMondayReturn;
}In a Pascal class in college I used all nonsense words. QUAMPANI, BELABA, DEFALA, TANEKABI, etc.)
-
In a Pascal class in college I used all nonsense words. QUAMPANI, BELABA, DEFALA, TANEKABI, etc.)
PIEBALDconsult wrote:
TANEKABI
That's somewhat close to Tenkaichi.
-
In a Pascal class in college I used all nonsense words. QUAMPANI, BELABA, DEFALA, TANEKABI, etc.)
-
PIEBALDconsult wrote:
TANEKABI
That's somewhat close to Tenkaichi.
I rather like Vegeta[^], although it's a character name rather than a series
Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
-
Lol, I wrote this a few years ago for a school project... I think I wrote it on Monday at lunchtime.
function randomNumber(){
var lunchtimeMondayReturn=0;
while(true){
var lunchtimeMonday=Math.random();
if(!((lunchtimeMonday+'').split('')[2]>3)){
lunchtimeMondayReturn=(lunchtimeMonday+'').split('')[2];
break;
}
}
return lunchtimeMondayReturn;
}If that were Java, you could put it in a class and use some accessors in a really nice way:
isLunchTimeMonday()
getLunchTimeMonday()
Although properties in .NET make a really nice way too:var whatTimeIsIt = HungryClass.LunchTimeMonday
Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
-
Lol, I wrote this a few years ago for a school project... I think I wrote it on Monday at lunchtime.
function randomNumber(){
var lunchtimeMondayReturn=0;
while(true){
var lunchtimeMonday=Math.random();
if(!((lunchtimeMonday+'').split('')[2]>3)){
lunchtimeMondayReturn=(lunchtimeMonday+'').split('')[2];
break;
}
}
return lunchtimeMondayReturn;
} -
Lol, I wrote this a few years ago for a school project... I think I wrote it on Monday at lunchtime.
function randomNumber(){
var lunchtimeMondayReturn=0;
while(true){
var lunchtimeMonday=Math.random();
if(!((lunchtimeMonday+'').split('')[2]>3)){
lunchtimeMondayReturn=(lunchtimeMonday+'').split('')[2];
break;
}
}
return lunchtimeMondayReturn;
}I know a kid who names his variables x, xx, xxx, xxxx, and so on and so forth. His methods have names like "JDOEHSNFD" (Note all caps). The professor was not very happy when trying to read (and grade) his code. The student also did things like 'String xxx = "879374930";' and then the next line would be 'int xxxx = Integer.parse(xxx).intValue();' The string variable would not be referenced AT ALL after that! Is it any wonder he failed?
Bill Gates is a very rich man today... and do you want to know why? The answer is one word: versions. Dave Barry Read more at [BrainyQuote](http://www.brainyquote.com/quotes/topics topic_technology.html#yAfSEbrfumitrteO.99)[^]