Algorithmic Arithmetic Should be Fun

The idea of using computers in education goes back to the early 1960s, when computers cost millions of dollars and filled large rooms. Even then, it was evident that costs would fall rapidly with improvements in technology, and a growing body of pioneers experimented with using the expensive computers of the day in schools. Among them was IBM Fellow Ken Iverson, creator of APL (A Programming Language).

The original purpose of APL was for human communication about computers and mathematics, well before there was any thought of implementing such a language on computers. The usual reaction to any such attempt is that it is not for normal humans. Math is held to be inherently too hard, and for geeks and nerds only. Jason in the Foxtrot comic strip, for example. To the average mathematician, this is like saying that nobody should play music, because we cannot all be Vladimir Horowitz or Yo-yo Ma or Jimi Hendrix.

In reality, everybody except the literally tone-deaf (who can still play percussion) or completely deaf can learn to play or sing to some extent, and everybody can enjoy doing so. Similarly, if you can count you are doing math. The question is not whether you can learn more, but whether you are willing to, and whether others are willing to let you learn what is fun for you. There are several reasons for learning math.

  • You have to, in school
  • You have to, because your parents insist
  • You need math for a job
  • Math is fun

The first three reasons go together, and have traditionally been in the math-is-no-fun category for most people. This is in large part because schools have not taught math well. If we want children to be able to get right answers, we must not leave them high and dry without adequate training, practice, and tools for doing so. If we prefer to punish those who cannot get right answers with inadequate training, practice, and tools, we must not be surprised when they come to hate math, and to do everything in their power to avoid it and put it down, along with anybody who can do it. Imagine if only the perfect were allowed to play sports or music in school or out of it, how sour the grapes would be for all of the other children.

Albert Einstein (1879–1955)

  • It is almost a miracle that modern teaching methods have not yet entirely strangled the holy curiosity of inquiry; for what this delicate little plant needs more than anything, besides stimulation, is freedom.
  • Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination.

For many kinds of math, the computer is the ideal tool. This is most obvious for calculations and for carrying out algorithms of various kinds. That is, anything where we can provide a detailed, exact method for solving a problem, of the kind that can be expressed in a computer program. However, for children, the essence of math must not be drudgery, especially impossible drudgery, but freedom. Specifically, the freedom to explore and to construct one’s own understanding.

This is where Iverson came in, first with a language to make expression of math on the computer as direct as possible, and allow people to talk with each other about it naturally, as Seymour Papert suggested.

Seymour Papert (born March 1, 1928)

  • Programming a computer means nothing more or less than communicating to it in a language that it and the human user can both “understand”. And learning languages is one of the things children do best. Every normal child learns to talk. Why then should a child not learn to “talk” to a computer?
Mindstorms: Children, Computers, and Powerful Ideas

Thus, in Iverson’s last version of APL, called J:

   NB. Comment. NB. stands for the Latin "Nota bene", note well
   2+3
5
   5-2 NB. Substraction is the inverse of addition
3

Originally in APL, multiplication and division were written with × and ÷ signs, but the reaction against using math symbols more generally in programming led Iverson to restrict J to just ASCII, so that we have to write

   2*3 NB. Multiplication
6
   6%3 NB. Division is the inverse of multiplication
2

As you can see, J makes it as easy as using a calculator to do simple arithmetic. Once we get past the simplest examples, in fact, J is easier than using a calculator. For example, J has fractions, also called rational numbers, built in. For example, we can write 1/2 as 1r2, and so on.

   1r2+1r2  NB. 1/2 + 1/2
1
   1r3+1r6  NB. 1/3 + 1/6
1r2
   2r3*3r4  NB. 2/3 * 3/4
1r2

J automatically reduces fractions to lowest terms. In this and other ways J is much simpler for doing arithmetic and other calculations than other programming languages that require print statements to show results, or require loops to process lists and tables.

   i.5
0 1 2 3 4
   1+i.5
1 2 3 4 5
   a=.i.5 NB. assignment, or naming
   a+a
0 2 4 6 8
   a*a
0 1 4 9 16
   a*1r2
0 1r2 1 3r2 2
   a*/a   NB. multiplication table
0 0 0  0  0
0 1 2  3  4
0 2 4  6  8
0 3 6  9 12
0 4 8 12 16

Secondly, Iverson insisted that students must have time to explore APL or J, and math. What does |. do in J? Let us try it and find out.

   |. 0
0
   |. 1
1

Nothing? That shouldn’t be right. What about

   |. i.5
4 3 2 1 0

Aha! It doesn’t do arithmetic, it does rearranging. (The name, based on the character ‘|’, is meant to suggest a mirror.) I wonder what other ways J has for rearranging things. Hey, this is like doing science, where the real problem is not getting the right answers, but asking the right kinds of question. In fact, this is what little children do all day, that we call play. How many different things can you do with a stick? Hit things with it, poke things with it,…Hey, baseball! Hockey! Cricket! Golf! Billiards! And what can you do with numbers? Well, counting! And arithmetic, algebra…Wait, not just boring stuff, baseball statistics! And all of the other sports!

Ken Iverson’s son Eric has put Ken’s math books (Arithmetic, Algebra, Analysis) from the 1970s under Creative Commons licenses, and has put J under GPL3, so I am in the process of putting the books up on the Sugar Labs booki server as part of the Replacing Textbooks project. Feel free to create an account and take a look. I will have much more to post about this in the future, including how to learn to have fun with math, even if you were taught wrong the first time.

Advertisements

About mokurai

Generalist; End poverty at a profit for all
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s