Page 1 of 2
Don't dismiss the spreadsheet. It not only brought programming to the masses but was an early entry into rapid application development, functional programming and an easy and natural approach to parallel programming and cellular automata.
I was asked the other day why I Programmer bothers to cover spreadsheets. It's not after all obviously anything much to do with programming? That is where you would be wrong. The spreadsheet is one of the most amazing inventions of the computer age. It not only makes programming easy for non-programmers, it also impacts on some of our most pressing problems - how to create parallel programs.
The spreadsheet isn't an obvious idea. It may seems so now because a whole generation of programmers and users have grown up knowing not only the basic idea but experiencing it first hand. When spreadsheets were first introduced they were taken up by users who had been looking for something to unlock the power of the machine that they had bought into without the need to hire a programmer or even learn a programming language. Spreadsheets met a need that few even guessed existed.
Today spreadsheets are often relegated to the task of ad-hoc data presentation by way of creating graphs and charts. Useful though this occupation is the real power of the spreadsheet lies in the two words "ad-hoc". You could say that spreadsheets were the first step towards rapid application development and perhaps even agile programming - but this might be a claim too far.
Loops and flow of control
Before the spreadsheet if you wanted to get a computer to do a simple sum you had to program it. After all the first high level programming language was called Fortran - FORmula TRANslation. You could use other tools put together by programmers to do sums - like a command line calculator - but it was the spreadsheet that first allowed innocent users to type in mathematical formulae and have the computer work it out for them.
This was good but there is more. If you needed to total a column of numbers before the spreadsheet you needed to know how to write a for loop and to work with an array. This is sophisticated stuff. But, after the spreadsheet, you could simply type in a formula that said something like Sum(A1:A10).
Now where did that for loop and the whole concept of iteration go?
The answer is that it is hidden in the range reference A1 to A10 and a functional reference applied to it. Clever stuff but at the time my guess is no one thought about it like that.
In the same way the branching if statement was replaced by a simple IF function which returned one of two possible expressions depending on the condition. This hid from view the full idea of the flow of control splitting into two possible paths at each and every if statement. However, you mustn't think that the spreadsheet version was in some way weaker because it only evaluated to one of two possible expressions. Because other cells in the spreadsheet could reference the result of an IF function it really did create a split in the flow of control. Two different chains of computation could result from each IF function.
It has to be admitted that the spreadsheet way of implementing the conditional has never been as successful as its way of dealing with the loop. Ranges and functions seem simpler but IF functions are almost as complicated as if statements and while most spreadsheet users found summing a column trivial but mastering conditional functions was more of a problem.