Coding with Tobacco

Back in the mid-70s when I started learning Assembler, Fortran, and Cobol in school in Eastern Europe, programming was a different game entirely.

Every semester we had to write something that will compile and run with observable correct results. We worked in very small teams and came up with a project. It had to have at least some practical application, sometimes went a bit beyond that if the scope required it — one colleague wrote a compiler as his thesis project, so we were not just reversing strings. We wrote the logic diagrams on paper, we analyzed it in peer review, then wrote the code on squared paper, two characters per square (yes, coding standards were alive back then).

Our Fortran teacher was a reformed industry programmer, not really a trained educator. He managed to make impressive inroads in Artificial Intelligence later down the road, but when we met him, he had some simple advice for us:

- Programming is 1% inspiration and 99% perspiration

- Find bugs early, because compiling is expensive, running it even more so

- When everything is working from the first go, you might still have bugs but you don’t see them. Don’t declare victory, test your code until you covered all possible scenarios.

Of course, many other gems were passed on to us that were re-invented and re-worded as time went by, and as the coding landscape changed over the years.

Why was compiling expensive?

Once we had the program we wrote “working on paper” — it was literally us pouring over every single line of code, compare it with the logic diagrams, talk to each-other in the group to reach consensus — this all took time, and we were just kids, so the pressure was on.

Once we were satisfied with the program, it had to be transferred on paper punch-cards, then we went to line up at the data center where the wait time for one single pass of compiling your school project would be anywhere between a week and two, and that was just compiling it. To run it, we had to do the same process with a sampling of the data and wait again; if errors were found, we would get in line yet again. There was no way to finish a project if you had to go back to fix things too often.

Corruption ran rampant, and we adapted. In the search for the proper currency, we realized that we could get our code compiled and run overnight for the price of one pack of western cigarettes: Kent or Marlboro were very popular. For two packs they would even do some light debugging and offer advice.

Those that were really clueless could get away with not doing anything at all and get everything done for a 10 pack, no question asked, professional delivery and guaranteed to work.

Later in my career I spent some years on the other side of the fence and made a very decent living doing the thesis work of mentally less fortunate students, whether it was programming, electronics, mechanics, chemistry, even medicine.

After a while my health started to decline, so I quit smoking.