Wednesday, June 13, 2007

Becoming an good C programmer

C is quirky, flawed and an enormous success - Dennis Ritchie

C is one of the most successful programming languages of all time. Even though C is very popular, C (sea) has its own murky waters. To be a good C programmer it takes a lot of time, practice and patience. Even though there are several books on C programming, these are few of the books I consider worthy of mention and I believe would help you become a better C programmer.

C Programming - A Modern Approach by K. N. King
I have never read this book completely but I have read excerpts and comments about this book. Overall this is a good book for beginners and there is new a edition of this book due for release in 2007. Check out K. N. King site for more info. One thing I noticed about this book is that, this has operator precedence table which shows postfix increment (++) and postfix decrement operator (--) having an higher precedence than prefix increment and decrement operator. This is true, if you read the ANSI standard. Some old operator precedence table have both postfix and prefix increment / decrement operator together with other unary operators which can confuse few programmers who are new to the language while evaluating a simple expression like *p++.

The C Puzzle Book - Alan R Feuer
Now that you have read beginners book on C programming lets put your knowledge and understanding to test. C puzzle book, is a very nice book just for that. I own this book and is one of the nicest books to test someone's understanding of the C language. Good puzzles and excellent explanation. It was out of print but I managed to excavate it from an old books shop.


The C Programming Language - Brian W Kernighan, Dennis M Ritchie
The C Answer Book - Clovis Tondo, Scott Gimpel

Now that you have read books from people who have used the language, it's time now for you, to learn it from its creators. K&R the bible of C programming. Must have in your book shelf if you are a serious C programmer. The C answer book is also good choice to learn C programming by reading good code.


The C Programming FAQs - Steve Summit
As the name says it contains some of the most Frequently Asked Questions related to C programming. Even though, you can get the latest C-FAQs for download, some times the book comes in handy. I would recommend a print out of latest FAQs than buying the book. The questions contained in it strike the mind of all newbie C programmer and it is a good reference for experienced C programmers. Highly recommended reference which every C programmer must read and have.


Expert C Programming - Peter Van Der Linden (PVLD)
This is one of my favorite books. IIRC, the book is around 300 pages and I managed to read it in 10 days. The book is written by a seasoned programmer (Solaris kernel developer) and contains good explanation and provides lot of tips. The book also has a nice column called 'software dogma' which details software failures, fun facts, etc. Thoroughly, enjoyable book on C programming which takes you around the murky waters of C without giving you a feeling of being lost or confused. Reading this book won't make you an expert programmer (its not kryptonite!!) but it is certainly a step in the right direction.


C Unleashed - Richard Heathfield, Lawrence Kirby
I normally don't recommend or buy 'Unleashed' series of books, but this book is certainly an exception. Written by experts Richard Heathfield, Lawrence Kirby, et. al this book is a great book on C programming. This book also covers a wide variety of topics which are not usually covered in many books on C programming. If you are not convinced by my review, read the replies to questions in comp.lang.c by Richard Heathfield, to know more about the authors knowledge of the subject. I was pointed to this book by richard himself while i was discussing some stupid 'C' interview questions which I had to answer in an interview. Thanks Richard for the book, fish and everything ;-)


C Traps and Pit falls - Andrew Koenig
This book is based on a paper circulated inside AT&T during the beginning days of C language. This book helps you identify some of the most common mistakes which most of the C programmers make during their initial days. Short and sweet book, just around 140 pages. Read it and remember it, it will help you avoid the traps and pitfalls.


C A Reference Manual - Harbison and Steele
This is an excellent reference book on C language ( C language ! = C programming). You should seriously consider buying this book if you are working on embedded systems and using different compilers. This book explains what is ratified in the ANSI standard and provides details about which are compiler dependent, etc. You will most likely see this book with a 'language lawyer' in your organization than with a programmer.


The Standard C Library - P.J.Plauger
I haven't read this book, but from the reviews and various resources in the Internet, this book is an excellent resource for learning about standard C libraries.





Some final words, even though reading the above books can help you, only patience and practice can help you become a good programmer. So write lot of code, initially you may write bad code but as you read learn from the books mentioned above, you will improve. Adios, Happy programming :-)

2 comments:

mormor said...

nice post.......
thankx

V.N.Raju said...

Imho, another book that I would like to add to this list is
C Interfaces and Implementations.
by David R Hanson.

thanks,
V.N.Raju