I was on the train recently and saw something that to anyone competent at using a computer is a bit like the sound of nails on a chalkboard.
Across the aisle from me was a man with a MacBook Pro. He had open Numbers, Apple’s spreadsheet software.
He had a list of figures in the spreadsheet. He wanted to do some arithmetic on the same column in each row and have the resulting value fill the column directly to the right of it.
He had found a method for doing this.
For each value in the spreadsheet, he looked at it, stored the value in his brain, hit the button on his keyboard (F4) to open the Dashboard (OS X’s gallery of helpful widgets), manually clicked the number into the calculator Dashboard widget using the trackpad, stored the resulting value in his brain, hit F4 to close the Dashboard, then typed said value into the spreadsheet.
I’ve seen people pull out a calculator to crank numbers while sitting in front of a computer, but I don’t think I’ve ever seen anyone doing anything quite so elaborately strange with a computer for quite some time.
I sat there wanting to say “you know, you could just write an expression in the first row, then use fill down, that way if one of the values changes, the calculated value will also change”. But I didn’t.
Someone once said that Excel was the world’s most widely used functional programming language. I’m so glad to see that both functional programming and cargo-cult programming have reached mainstream acceptance.
Bad code: it’s everywhere.