A couple of weeks ago, I ordered a book or two…or 5 from Amazon. Having heard good things about Jessica Jones I thought I should read the original comics before watching the show. Thankfully, they’re bundled up in an omnibus. Then I thought I should get hold of Gaiman’s new Sandman. And it seemed silly not to throw in a few more things.
When I unpacked all my books in the new place a year or so back, I realised I couldn’t find my old, old copy of K&R’s The C Programming Language. I had the pre ANSI (just) edition when I learnt C for Computer Science at Wollongong Uni way back in 1989. 1989 was a really bad year for me as I used to spend 2.5 hours each way commuting from Bankstown to uni. That year, there was a landslide of the railway at Coledale and the line was reduced to a single track for much of the year. My commute increased to 4 hours each way and I ended up failing most of my subjects. I like to blame the commute though part of me suspects I was still working myself out too and trying to find my direction. I eventually took a year and a half off uni, worked on a loading dock at Grace Bros (now Myer) to pay off a car and then returned to uni.
I eventually passed everything I failed that year including C. Ultimately I never quite finished my compsci degree though I did finish all the core components. I never went into programming as a profession though part of me misses the intensity of a good coding session and part of me never wants to return to that single minded focus. I’ve kept most of my programming books, along with Fortran and Pascal, and so forth. Well ok, not Forth :) However, I missed having a copy of K&R C on the shelf, moreso than the books that are there.
So I grabbed a copy…and have been dipping in already. Once I dipped, I started re-reading some of the earlier examples and all of a sudden I’d opened an editor and typed one up. Except I didn’t have a c compiler installed so I’m loading one into cygwin. Oddly, I’m not editing in vi this time and trying out Microsoft’s Visual Code Editor. It’s nice, it has a dark background which has a lot less glare. I’m also liking that the template recognises that I’m writing c and provides colouring for keywords and commands.
And it worked. I also made a couple of changes and they worked too.
NTS: shutdown cygwin while installing new software. The installation went a bit wrong so I had to uninstall cygwin altogether and re-install from scratch. However once all that was done, the c code compiled without errors and worked first go :-)