Wednesday, December 31, 2008

C Book Series #0

The Internet and specially search engines changed the way programmers learn programming languages. Today many programmers learn it by reading tutorials on the web. The quality of some of this tutorials, are at least, dubious.

When I learned the C programming language, around 1998, the Internet was a "new thing", at University of Coimbra. It was barely usable and Google was a baby, so I learned the traditional way: by reading a book. (cover to cover). My first C book was:

The C. Primer (Second Edition)
by Leslie Hancock and Morris Krieger
It assumes no previous programming experience. It was published in 1982, so it's pre - ANSI. At the time I was using the Turbo C++ 3.0 for MS-DOS so, when I was writing my first programs, I had to keep in my mind the differences between the pre ANSI C and the ANSI C. For example the first program that appear on the book is:

main()
{
printf ("Hell is filled with amateur musicians.\n");
}

My first "real" C program had to deal with hardware and had to use some sort of dynamic storage allocation. Chapter 14 (Operators II) and Chapter 15 (enum, Bit Fields, and Masks) were very helpful in the "deal with the hardware thing".

Chapter 18 (The Real Thing) gave me a new insight over dynamic storage allocation (I already knew linked list).

I couldn't end without referring Chapter 16 (Pointers to functions). It shows what's the point of functions pointers.

The whole book is good but Chapters 14, 15, 16 and 18 are outstanding.




No comments:

Post a Comment