Re:21 Nested Callbacks
by JamesAcorn on Friday March 29, 2013 @06:29AM
(#5460026)
Supposing you could travel back in time and give your earlier self a book (or at least, a few sheets of paper) that described 'good programming' (e.g. using GOSUB, in this context) - would you do it?
Would you have been better off 'doing things right' from day one, versus experimenting and muddling through?
My brother and I learned to program in BASIC on an Apple IIe when we were kids. At the time, we were also into making little movies with our family's VHS camcorder. You could draw graphics in BASIC, so we thought it would be radical to write a program that would draw a cool logo animation for our movies.
We got a big sheet of graph paper and hand-drew the intended pixel art for our logo. Then started writing code to draw it one line at a time. We put a delay between each line so that it would do an animated wipe. We knew how to pause by doing a busy loop:
What we didn't know was how to define reusable procedures (GOSUB). So between each of the hundred lines of pixel art, I typed in that loop. And I mean that literally: this was a line editor. No copy and paste. I wrote it out each time.Now I just lament having the much free time and focus to be able to do that...