Monday, May 23, 2011

Teaching Myself C.




Once upon a time, near a clothing drop box in a place far far away, I found an orphaned book, sitting lonely atop a stack of sad faced abandoned clothes and whatnot.
It's Title: Teach Yourself C: Second Edition
Awesome!!
It was, apparently abandoned from some hapless former student's appartment, maybe a roomate had the decency to take the student's clothes/material possessions to a donation box, as opposed to merely throwing them into the garbage. For what I know, a sad mother may have dropped off her child's things after an untimely death. However it got to being there, in a box by a clothing donation drop off, I took it up, and looked it over. A smile graced my face.

I avoided The C Programming Language in Highschool. The closest I came to ever messing with it was with a one week crash course in tcsh in a systems administration class. I thought that C was too much for me. It was for the real 1337 haxx0rs. I'm just an idiot who loves Jesus, making omelettes, and (although not then) coding in Ruby...
I picked the book up even though at the time, i had no way of even compiling any code I would write. I thought to myself "Surely there is something open source for C on Windows XP" I hadn't had my 'I see the light' moment with operating systems. That was about 6 months away. At that time, my mind was absorbing a vast array of everything going on in the world. I was becoming a father soon. I still felt newly married. I had just sold my favorite radio in preparation for paying bills. My inner nerd needed a challenge. Time for me to program once again!

I never did find an open source C compiler that I liked for windows XP at that time... It did however, get me searching for something else, a way to hack around using SOMETHING, ANYTHING, which lead to me discovering "Learning to Program" by Chris Pine, and began a long love affair with ruby. Ruby lead me back to Linux, and Linux has given me the tools I need to create/compile C code.
Back to Teaching Myself C!
I've made several starts at learning what's in this book, but various things (including a class in C++ that I didn't want to get sideways in in the nuance differences between the languages) always kept me from getting past the first chapter. Well, I finally started learning it forealz, and am on Chapter 2.
Hot Dawg!
I'm having a lot of fun with this book, partly because it's old, the second edition has a copyright of 1994, and partly because programming has changed so much since Herbert Schildt first wrote this. I'll try to keep you posted on my C-Adventures, and I leave you with the following quote from the preface:

C is the most popular computer programming language in the world. The reason for this is simple: programmers like it. Once a person learns to program in C it is very uncommon for him or her to switch to another language (except, of course, by moving on to C++, C's object-oriented relative). C combines subtlety and elegance with raw power and flexibility. It is a structure language that does not confine. C also is a language that puts you, the programmer, firmly in charge. C was also created by a programmer for programmers. It is not the contrived product of a committee, bur rather the outcome of programmers seeking a better programming language.

No comments: