Thursday, April 11, 2013
21st Century C - Book Review
In few words this book is a collection of brief introductions of all the aspects regarding programming in C using methods and tools gained probably from the author experience with open or closed source projects. First, this is not a book about C programming language. It is a book for people who start to program in C and want to learn how to start using it in a proper and efficient way to create something more than programming exercises. The main idea that the author want to tell is that C is not only a system level programming language and can be used for other general purpose applications. The book is splitted in 2 main parts: the former talks about setting a C environment that automates most of the tasks as compiling, documenting, testing, releasing, source control and process flow. The latter is about tips of the C language that can be usefull to speed up the work.
The first part is the more detailed and covers most of the aspects of compiling C programs
- Chapter 1: Set yourself for compilation
- Chapter 2: Debug, test, Document
- Chapter 3: Packaging your project
- Chapter 4: Version Control
- Chapter 5: Playing nice with others
Those chapter titles explain most of the content of this first part of the book. They try to guide the reader to have a functional environment that covers all the
steps of the software development.
The tools briefly descripted in this chapter are:
- compilers for different OSes.
- GDB for debugging
- Valgrind for memory problems checking
- Doxygen and CWEB for automated documentation
- Shell, make and Autotools for automatic and easy compiling
- Git for source control
- Tips for write understandable and clean code
The second part of the book is about bits and pieces of the C language:
- Chapter 6: Your Pal pointer
- Chapter 7: C syntax you can ignore
- Chapter 8: Obstacles and opportunities
- Chapter 9: Text
- Chapter 10: Better structures
- Chapter 11: Object-oriented C
- Chapter 12: Libraries
This chapter contains mostly some tips about pointers, string, sintax and data-structure management. It covers some high-level stuff like databases and network connection but really briefly.
In my opinion the author tries to explaino too many things in one single book. He wants to give to C more visibility to the Application Engineers that typically use high abstraction. At the same time he wants to give guidelines about the environment and give hint on some pieces of the language. Except for the first part that covers enough the argument proposed in the chapter title, the second part seems to be a collection of blog tips glued together chosing within the most strange aspects and missing of C. I think as a programmer but even more as bad DIY mechanic that the tool is the most important part of the job. It's fine to use C if you really need to use the performance and the feature it only has, if you don't need those simply don't use it. Java, C#, Python and so on are more easy to use for some applications and should be used instead. Probably application engineers can benefit from this book to have some idea or have a start with C. Newstarters in C and programming can found it useful but they will need to integrate with other resources all the brief description given for some tools (I suggest to read Pragmatic Programmer)