|
Movie Quote Of The Day
Quote:
He: What's going on in your head?
She: I don't know.
He: That's like kissing someone who's drunk. Doesn't count.
Which movie?
|
|
|
|
|
Debby does the AA
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
A Day in the Life of Kelly Bundy
|
|
|
|
|
Pick up lines for drunks
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
Legally Blonde?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
|
Garfield[^]
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Transfer photos back and forth to OS X WITHOUT*... |Official Apple Support Communities[^]
Went there because I had a similar issue.
Q. How do you transfer photos from an iPhone without using their POS application?
A. Don't you own a digital camera?
And he's got sh*tloads of rep points too
The OP has got class though, see his response.
WTF do they tout their oh-so-wonderful camera on a phone that is unparalleled in the known universe for then?
|
|
|
|
|
Lol, you own an Apple? Sorry dude...
|
|
|
|
|
Looking at Marc's early work on the commodore 64 raised the following question?
Why do we seem to use i and j for loop variables?
Where did it come from I wonder.
And no I have not tried to google it!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Because there is a little bit of FORTRAN in all of us?
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
And everyone who wrote the early tutorials were probably steeped in FORTRAN conventions.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
And the professors who taught us - or those who taught our professors - have a lot more FORTRAN than us so it's a cycle. Add the fact that i and j are short and as good as any single letter...
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
I think it comes from Fortran, where, at least originally, the letter defining a variable also defined its type. Any variable starting with I,J,K,L,M, or N represented integers. i & j, being the first of these, just followed through from there.
Cheers,
Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.
|
|
|
|
|
The answer is obvious. What should be used instead?
a & b?
o & p?
We aren't barbarians are we? i & j is just being civilized.
I remember wondering about it too but didn't delve deeper than letting that thought pass.
Sometimes I use a name instead if its short and descriptive otherwise I try and comment.
|
|
|
|
|
Mycroft Holmes wrote: Why do we seem to use i and j for loop variables? From FORTRAN. Variables starting with the letters I thru N were implicit integers in FORTRAN, and were therefore used as loop counters by default.
/ravi
|
|
|
|
|
To add to what the others said about FORTRAN default variable types, variable names were limited to 6 characters as well so short variable names were a good idea. It was a convention that "generic loop counters" were I, J, and K (no lower case in those days, either!)
In addition, lines were limited to 80 characters of which the first 6 where for label numbers, used to target lines with GOTO and suchlike flow control; and the seventh was for a "Continuation character" which allowed you to use more than 72 characters in your code statement.
Short names were a good idea in those days!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Short names still are a good idea.
As a general rule, I'll use initials for temporary variables in loops etc and as the scope gets greater increase the size and detail of the name.
veni bibi saltavi
|
|
|
|
|
Especially when you had to put them on punch cards!
|
|
|
|
|
Mycroft Holmes wrote: Why do we seem to use i and j for loop variables?
In the east we traditionally used n and m. And p and q for pointers. It wouldn't surprise me if it was just to be different from the decadent west.
|
|
|
|
|
If you took the Fortran IJKLMN, are the letters in the same order when translated to eastern languages? That may explain why your typically using n/m.
|
|
|
|
|
It might have come from FORTRAN, but "i" was also used for short of "index". When using nested loops the next letter was the most obvious ("j", "k", ...)
For me personally it makes perfect sense in some way. If you see a one letter variable in code, there is almost a 100% chance that it is a loop variable. Also a one letter loop variable in an array indication (some_array[i] ) is easier readable than (some_array[index] ). (though that is perhaps personal taste)
|
|
|
|
|
V. wrote: If you see a one letter variable in code, there is almost a 100% chance that it is a loop variable.
Or you are in QA...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
V. wrote: loop variable in an array indication (some_array[i] ) is easier readable than (some_array[index] ). (though that is perhaps personal taste) It depends if that variable has other meaning / is meant to be stored but yes, I concur.
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
I was initially going to nod to the FORTRAN crowd, then I thought further back, to linear algebra. Indices in vectors and matrices were traditionally i, j, ...
My 2cents.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|