Zuckerberg To Teach 10 Million Kids 0-Based Counting
theodp writes "'Why do programmers start counting at zero?' wondered Mike Hoye, questioning the conventional programming wisdom. Code.org will soon introduce the practice to a hoped-for audience of 10 million schoolchildren as part of Computer Science Education Week's Hour of Code. In a tutorial created by engineers from Microsoft, Google, Twitter and Facebook that's intended to introduce programming to kids as young as six years old, an otherwise breezy lesson featuring look-ma-no-typing Blockly and characters out of Angry Birds and Plants vs. Zombies, a Mark Zuckerberg video introducing the concept of Repeat Loops includes an out-of-place JavaScript example that shows kids it's as easy as 0-1-2-3 to generate 4 lines of lyrics from Happy Birthday to You by using zero-based numbering with a For-loop and ternary If statement. Accompanying videos by Bill Gates on If Statements and basketball star Chris Bosh on Repeat Until Blocks show the Code.org tutorial is still a work-in-progress. That's no big deal, since CSEdWeek has pushed back the delivery date for final Hour of Code tutorials from its prior little-time-for-testing due date to Dec. 9th, the first day of a five-day period during which teachers are expected to deliver the lessons to 10 million students."
Why do programmers start counting at zero?
We don't. We start indexing at zero (in some languages), because that's usually the offset of the first useful location in an array (ie, addr + 0).
Careful there, Z -- that might count as a "public performance" of Happy Birthday. I know you're rich, but the payment for and audience of 10 million might be kinda high.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
The biggest mistake in teaching mathematics is learning to start counting at one. That's fine if the only math ever learned is basic arithmetic; but higher order concepts including fractions, algebra, and number sets beyond whole numbers become much more difficult as a result. Why do we start counting at zero? Because zero is "Origin". When we count, what we are actually doing is this: I have zero. Adding one, I have one. Adding one, I have two. Adding one, I have three. Etc. By using zero as our origin, we can teach arithmetic using the integer set, rather than the whole number set. We can teach that the minus sign just means a change of direction, and that addition and subtraction are actually the same thing. So addition/subtraction is nothing more than repeated counting - a shortcut. Multiplication and division are repeated addition. Fractions are just another way of expressing division. Exponents/roots are repeated multiplication. "If you can count, you can do math. Everything else is a shortcut." Counting from zero allows us to teach euclidean coordinates / geometry as an extension of what students already are familiar with, rather than something new. Why do we start counting at zero? Because zero is "Origin".
Even well into adulthood, people are still confused by, e.g., the difference between "the early 1700s" and "the early 17th century" (which is actually the 1600s). Turns out, whether you like it or not, the first place value of 10^2, 10^3, 10^4, etc. you count through is always the 0th one. It's only in the very specific circumstance of counting the 10^1 place and when all the other 10^x place values are zero that the 0 gets skipped. Why not be consistent?
Besides being more consistent, I also think it is more intuitive (barring the fact that we are culturally inducted into thinking that it isn't). If you were counting *backwards,* say, starting with ten cookies and removing one cookie off a plate each time, it would be perfectly intuitive to you that you should count down to zero cookies, taking the very last cookie off the plate. The zero cookie limit is enforced by physical reality, while the one cookie limit is enforced by your arbitrary decision to interrupt your process of removing cookies and leave one cookie on the plate. Likewise, in the reverse process, you should also start your counting at an empty plate.
When things get complex, multiply by the complex conjugate.
We don't start counting at 0. Our compilers do.