Page 2 of 2

Posted: Wed Oct 04, 2006 10:44 am
by pickle
I use them because that's the only place I get to use variables who's purpose isn't immediately obvious by reading the variable name.

Guilty pleasure :twisted:

Posted: Wed Oct 04, 2006 11:03 am
by Luke
see, this is why I love this forum so much... we have some smart mofos here. Thanks guys. :D

Posted: Wed Oct 04, 2006 11:23 am
by Christopher
Maugrim_The_Reaper wrote:So which mathematician do we blame, arborint?
It goes back at least to the 17th Century because I believe Newton and Leibnitz used in their work on calculus (Newtons integral symbol is an S for "sum"). That's also the century of Decartes, Euler, Pascal, et al. so a lot of the mathematical notion we use comes from that era. Any mathematicians in the group who know history trivia?

Posted: Wed Oct 04, 2006 8:22 pm
by alex.barylski
I asked this question I swear I did, although I cannot find it here, I posted the results of that disscussion on another web site and the general census appears to be in agreement with Arborint...although I thought it was timvw that answered me originally, perhaps it was arborint.

One thing worth noting...

I know many of those who replied on the "other" website and I am aware some of them are mathematicians by trade or at least in background.

Those who had a background in math, typically agreed that "i" transcended into programming from FORTRAN as computers were originally only a tool for mathematicians, etc...

Whereas developers who had extensive backgrounds in programming in assembler...argued it was used to simply represent the Index register...which is what I've always assumed, having zero background in math, but moderate, working knowledge of assembler...

So really, I think this is debatable to the nines...as either party could be right, although the math argument does have history behind it, assembler developers have much more influence on us as developers in general than any math focused FORTRAN developer may have had...

Either way, I don't really care...after reading this book on XP I'm gonna break with tradition in the name of common sense and start using $a through $z so I can quickly determine the nesting level of the given index...also leaving nothing to guess and making a more strict convention.

Did I mention that book on XP was quite an inspirational read, 200 pages went by like there was no tomorrow...I read it all in one sitting I found it so captivating :P

Last time I read a book front to cover in one sitting, was

1) April Raintree
2) Catcher in the Rye

Sorry, I'm done plugging the whole XP thing :P

Posted: Wed Oct 04, 2006 8:58 pm
by julian_lp
nice question, specially beacause it is a thing which I've asked myself so many times. :)

BTW: I find using both $i and $j an open door to make mistakes, I use $i and $k every time I've to write a nested loop...

Posted: Wed Oct 04, 2006 10:59 pm
by alex.barylski
I have never really had a problem with using any convention, but when I've got into 3-4 levels of nested for loops I have occasionally used a $j twice (using it inside a for and then again 2 levels deeper simply because I lost count of what letter came next).

I figure it's easier for most people (like it is myself) to know exactly what comes after b than it does to know what comes after s...

personally I find myself having to quickly repeat the preceeding 3-4 letters before I can continue with the trailing letters....whereas ABCDEFG I have no problems at any point...

meh...whatever floats your boat I guess :P

Posted: Thu Oct 05, 2006 12:31 am
by timvw
arborint wrote:
Maugrim_The_Reaper wrote:So which mathematician do we blame, arborint?
It goes back at least to the 17th Century because I believe Newton and Leibnitz used in their work on calculus (Newtons integral symbol is an S for "sum"). That's also the century of Decartes, Euler, Pascal, et al. so a lot of the mathematical notion we use comes from that era. Any mathematicians in the group who know history trivia?
According to http://members.aol.com/jeff570/operation.html our friend Euler was the first to use the sigma symbol for summation in 1755.

Posted: Thu Oct 05, 2006 12:59 am
by Oren
arborint wrote:Newtons integral symbol is an S for "sum"
Not exactly. It is an S, but it's for "Surface" not "Sum".

Posted: Thu Oct 05, 2006 2:46 am
by Christopher
timvw wrote:According to http://members.aol.com/jeff570/operation.html our friend Euler was the first to use the sigma symbol for summation in 1755.
As ever Tim, thanks ... great page.

I think it is pretty safe to say that most of early computerdom had a solid foundation in classical mathematics -- both hardware and software people. That and the fact that early computers were much more "computators" than machines today, hence the math focus.