Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Developer's Reading List

, May 22, 2012 The most interesting books of the last month, selected and reviewed by Dr. Dobb's editors.
  • E-mail
  • Print

Head First C

David Griffiths & Dawn Griffiths

This C tutorial is the most recent title in the quirky "Head First" series from O'Reilly. If you're not familiar with this series, the books have a fun and informal way of passing along information that includes games, pop quizzes, cartoon characters, and humorous commentary. The books are eminently approachable and make even difficult topics enjoyable. (Probably the best book in the series, in my opinion, is the one mentioned specifically by Ward Cunningham in last week's interview: the book on design patterns.)

The challenge for this particular book is that C is just not that hard to learn. It's a small language and once you've gotten past how pointers work and the subtleties of function declaration, there is just not that much to say. This book expands on that small target area by covering various libraries, such as the UNIX networking library. It also includes an Arduino project, including all the hardware details and instructions. In this way, readers gain knowledge both of the language and how to apply it in a variety of settings. Generally, things are well explained; however, every once in a while, the hiness of the presentation gets ahead of clear explanations. For example, in a sidebar explaining position-independent code, the authors write, "Some operating systems use a technique called memory mapping when loading dynamic libraries, which means all code is effectively position independent." This is an exact inversion of the reality: Only because code is position-independent can OSs use memory mapping. In that sidebar, there is no explanation as to why anyone would use position-dependent code — making the whole digression rather pointless.

I also found the heavily Linux flavor of the book to be a limitation. Everything is presented using Linux and UNIX conventions. They're back ported to Windows by the recommended use of MinGW, with occasional references to the actual Windows correspondences. But there is no explanation of how to use Visual C++.

A C tutorial is invariably a dicey undertaking, as it will have to live and hope for success in the long shadow of K&R. While this book takes a radically different approach and thereby avoids comparisons, I'm not convinced of the value it ultimately delivers.


Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.