I had a Commodore VIC20, cheaper than the BBC Micro, more classy and substantial looking than the Sinclair ZX81, available slightly before the ZX Spectrum. All of these lovely old machines available for your viewing pleasure at Centre for Computing History, along with many others. Look around the internet and you can also find all manner of emulators and manuals for these early machines. We wrote our own programs, or we typed in games from magazines - this was often a rather lengthy process and a bit prone to error.
I found the "VIC20 Programmers Reference Guide" here re-typed by Asbjorn Djupdal. Here's snippet: a program which allows you to enter the scores in each quarter for an American football game and then prints them out on screen in a table:
100 DIM S(1,5), T$(1)Oh, this brings back memories!
110 INPUT "TEAM NAMES";T$(0),T$(1)
120 FOR Q = 1 TO 5
130 FOR T = 0 TO 1
140 PRINT T$(T),"SCORE IN QUARTER" Q
150 INPUT S(T,Q)
160 S(T,Q) = S(T,0) + S(T,Q)
170 NEXT T,Q
180 PRINT CHR$(147) "SCOREBOARD"
190 PRINT "QUARTER";
200 FOR Q = 1 TO 5
210 PRINT TAB(Q*2 + 9)Q;
220 NEXT
230 PRINT TAB(15)"TOTAL"
240 FOR T = 0 TO 1
250 PRINT T$(T)
260 FOR Q = 1 TO 5
270 PRINT TAB(Q*2 + 9) S(T,Q);
280 NEXT
290 PRINT TAB(15) S(T,0)
300 NEXT
To me programming and science (or at least physics) are intimately linked, almost the first programming I ever did was to visualise beat frequencies. To this day, if I want to really understand a scientific paper I'll implement the equations in a program, as often as not a few typos in the equations are revealed in this way and I'll have learnt exactly what the paper was on about. Teaching a student is a fantastic why to learn something, teaching a computer is almost as good.
Most the programming I do is of a workmanlike nature, it drives machines for measurements; it processes data; it analyses results; it computes equations, but there is scope in programming for a deep elegance, a pared down beauty which is difficult to describe - it's like finding the answer to a cryptic crossword clue - perhaps for an artist it's like finding just the right line to give a character personality. It's an algorithm that does what it has to do with the least effort required. I still program a lot for my work (relatively small stuff that only I will use), and it's not unknown for me to waste an hour doing something elegantly rather use the quick, dirty and obvious approach.
Programming is in my genes, in two ways really - my parents were both programmers from the sixties. We once found a leaflet advertising the Elliot 503 in our loft, 400sq ft of '60s computer with substantially less processor power than the most lowly of today's devices - this is the computer on which my mum learnt to program. Dad started on an early Ferranti of some description in the late 50's.
Earlier programming for me pretty much amounted to shouting verbs at things, possibly because I used FORTRAN which at the time was ALL IN CAPITALS. Programming today feels very different, it's more like visiting a library to get a book of spells to cast or the singing of a choir. I still enjoy doing it, in fact I'm writing a twitter client in C# just so see how to do it.
You might get the impression from all of this that programming is for the mathematically minded, but it isn't - it's really for the logically minded, for some mathematical applications maths is required but otherwise it isn't.
I taught the basics of programming to first year physics students a few years ago, and the thing that really shocked me was that, out of a class of fifty, only one had any real programming experience. There is hope though, I suspect programming still holds a fascination - my single data point: father and son sitting down to program the BBC Micro on Electric Dreams.
Checked with dad - his first programming was on a Ferranti Mercury: http://en.wikipedia.org/wiki/Ferranti_Mercury
ReplyDelete