Thu 14 May 2009
Words Mean Things
Posted by nola under Fun
[2] Comments
I am trying to teach my husband Nick some programming. He has tried before but he always loses interest before we get more than a couple sessions. He finally found a problem he was interested in solving. He wants a program that will tell him the most efficient way to organize his vast dvd collection. Keeping series together in a binder and leaving blank spaces for DVDs yet to be acquired. Then no more shuffling will be needed later when he gets the other DVDs.
He was confuse with some of the terms I was using …
Loop
Ok so we start simple, just reading a hard coded file name and looping through and printing the csv row from the file. He was like “loop?” thinking that we were going to start at the beginning, go to end, then back to the first which didn’t make any sense! He was like why are we looping?? Oh, hmm. I guess we aren’t really looping. We are more like walking through the file and printing each row of data
Why do we use the word loop?? it not really a loop? What is a better word?
Dictionary.com says (among many defintions) :
1. a circular area at the end of a trolley line, railroad line, etc., where cars turn around.
2. an arm of a cloverleaf where traffic may turn off or onto a main road or highway.
3. Computers. the reiteration of a set of instructions in a routine or program.
Iterate
I also use the word iterate interchangable with loop. “We need to iterate though this list and find X value” Nick was saying that iterate is when you review something. What do you think?
Dictionary.com says:
1. to utter again or repeatedly.
2. to do (something) over again or repeatedly.
–verb (used without object)
3. to operate or be applied repeatedly, as a linguistic rule or mathematical formula.
Do we as programmers abuse the english language and come up with our own dialect?

May 15th, 2009 at 6:44 am
I think of the instruction pointer moving through the program, sometimes we talk about it “walking” through a section of code or a routine walking over a data structure. If you imagine its path through the program the word “loop” makes sense; it’s returning to place it was previously. It’s sort of weird to think that the concept “now” is moving through a computer program laid out before you, but it may help to explain the computer is reading it like he reads a recipe.
I use the word “iterate” a little differently than you — a loop is the whole structure, an iteration is a specific pass through the loop. Like the difference between a road and going for a drive, one is the noun and one is the verb.
I think any profession needs its own terms to reach the level of precision and shared understanding that enables complicated work.
Just wait until you get to fun concepts like instantiation, orthogonality, and idempotency.
November 12th, 2009 at 2:49 am
I haev empathy with you trying to teach some of this stuff. I tried with my wife and she kept coming up with similar sorts of comments.
I think some times programmers like to use words that seem to have meaning but are just confusing to others.
It’s almost like a secret language and we are not letting them in or maybe just a few?