I snuck into programming through the back door. At first I wanted to be an architect, but I
went to school in the days before CAD and, well, India Ink and I didn’t get
along. You could easily spend hours/days
on a drawing and if, at the end, you made one little botch you had to start
over. I think I wanted refactoring before I even knew what it was.
After architecture, I started taking math classes and I considered
majoring in math, but it felt a bit selfish to me. I didn’t think that I could feel useful plugging
away at theorems. Also, I wasn’t sure I
really had the aptitude. I liked math but proof was harder than I expected.
How did I convince myself? I decided that I would teach myself C. I’d read that C was the hardest programming
language out there, so I figured that, hey, if I could learn C as a first language, by myself, programming might be thing that I should throw myself into. I started writing little graphics programs,
displaying the results of formulas I’d read about from chaos theory. It was exasperating but fun. I stayed after work, exploring all of the
nuances of C compiler command line. I
stumbled through pointers and indirection, manual memory management, and printf
debugging. It was hard slogging through
alone, but I did it. I convinced myself
that I could program.
It was hard for me to know what was really happening behind the scenes, and I was a bit shaken by the experience. But, nonetheless, I thrived. I took more courses and I dutifully went to the computer lab every afternoon and logged onto the VAX/VMS operating system(!) and went about my work – until – one day late in the term – I looked at the terminal of the woman next to me and I saw something strange. It was an array subscript out of bounds error.
I’d never seen one before.
After a bit of reflection, I understood why. When you are programming in C, nothing is going to save you. After you spend hours debugging an errant pointer dancing over memory, you just learn not to do that.
These days, I have a greater appreciation for Niklaus Wirth's work (although I don't really have fond memories of Pascal) and I do appreciate it when a language's runtime or static checker lets me know when I've flubbed up in a particularly grievous yet stupid way. But, after all is said and done, I'm glad that C taught me that lesson.
Safety is good, but so is the possibility of danger. It keeps us thinking rigorously, and there's value in that.
This blog was inspired by Reginald Braithwaite's Three blog posts I'd love to read (and one that I wouldn't)
Great post, thank you!
Posted by: Reg Braithwaite | October 09, 2007 at 08:58 AM
"Safety is good, but so is the possibility of danger. It keeps us thinking rigorously, and there's value in that."
that's a very good point. Nicely articulated.
Posted by: chan kok leong | October 09, 2007 at 10:03 AM
In these times, a higher level language is needed.
C will still be at the core.
Posted by: she | October 09, 2007 at 11:50 AM
Pascal was a teaching language, never really intended for production, so it had lots of hand-holding. The Modula languages that it inspired were consistently better than the C equivalents at the time but, as Gabriel pointed out, they lost in the market. I don't have the reference, but I remember some research showing that it was cheaper to develop in Modula-2 than C because there were fewer mistakes. Great days. Sigh.
S.
Posted by: Steve Freeman | October 22, 2007 at 01:49 AM