Other Sellers on Amazon
+ Free Shipping
+ $3.99 shipping
Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C) (Zed Shaw's Hard Way Series) 1st Edition
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
From the Publisher
About the Author
Zed Shaw is an avid guitar player, programmer, and writer whose books teach people all over the world how to write software. His books Learn Python the Hard Way and Learn Ruby the Hard Way (both now in their third editions) have been read by millions of people around the world. His software has been used by many large and small companies. His essays are often quoted and read by members of many geek communities. An entertaining and lively writer, he will keep you laughing and make you think.
- Item Weight : 1.41 pounds
- DVD-ROM : 384 pages
- ISBN-10 : 0321884922
- ISBN-13 : 978-0321884923
- Dimensions : 7 x 1 x 9.1 inches
- Publisher : Addison-Wesley Professional; 1st edition (September 4, 2015)
- Language: : English
- Best Sellers Rank: #303,451 in Books (See Top 100 in Books)
- Customer Reviews:
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I have very mixed feelings about this book. As a bit of background on me, I am a CS student who worked through most of K.N. King's "C Programming: A Modern Approach" last year as my formal introduction to both C and programming in general. So I'm not a total beginner at C, but I'm certainly not an expert, by any means.
Let me start with the good points about this book:
+ You will be exposed to a lot of code. And not just "textbook" code where everything is reduced and condensed to show off some facet of programming (e.g. "class Cat extends Animal"), but real code, the kind of thing you might see in an actual C project on Github. You will have to work through the code and understand what it does with relatively little handholding.
+ You will be exposed to a lot of data structures. Linked lists of several varieties, databases, structures, search trees, hash maps, and more are all used in various exercises.
+ You will gain insight from a very experienced programmer--the author! It's clear from reading this book that Zed Shaw has a lot of experience writing C professionally. He has a lot of pointers (heh) on writing code.
+ The videos are very good. There's an included DVD with lectures related to each exercise. They add a lot to the value of the book.
+ You will be exposed to other useful ideas: testing, defensive programming, etc. These are useful no matter what language you're writing in.
Now, the bad points:
- Poor copy editing. One example: in the writeup of exercise 17, in the "how to break it" section Zed writes, "For example, remove the check on line 160..." In the code, line 160 is a blank line.
- Vague, incomplete, or totally missing explanations. This was the worst part of the book in my opinion. If you're the kind of person who likes to more or less completely understand how some feature or mechanism of a programming language works before using it yourself, you may find this book frustrating. I was often referring back to K.N. King's book to review things that Zed Shaw was introducing in his code and then explaining in one or two sentences, if at all. Sometimes I was reading entire chapters of K.N. King's book before being able to dive back in to Learn C the Hard Way. You may often finding yourself searching online for definitions of standard library or other functions to get an idea of how they're fitting into the code examples. Which makes me wonder, if I have to read another textbook to understand Learn C the Hard Way, why don't I just stick with that other textbook?
Here's one example off the top of my head. Mr. Shaw says of the "register" keyword: "Forces the compiler to keep this variable in a register, and the compiler can just ignore you." Isn't that self-contradictory? How can the compiler ignore something it is "forced" to do? K.N. King's explanation was longer but much more explanatory, including the sentence: "Specifying the storage class of a variable to be register is a request, not a command. The compiler is free to store a register variable in memory if it chooses." Mr. Shaw's use of the word "force" is misleading and sloppy, and his explanation confused more than clarified.
If the example code in the exercises had had a few more pages of explanation each, I could probably have really enjoyed this book. As it is, I found it tedious, as I was spending most of my time with other sources just to understand what was written. For most concepts, I couldn't understand Mr. Shaw's super terse explanations until I had already understood some other source's explanations of that concept.
So, would I recommend this book? Well, it depends. If you don't anything about C, then I'd suggest K.N. King's C book, which is much more thorough and precise with explanations. If you have already studied C, then this might be useful as a review.
Zed Shaw's course is like having a mentor guide you through not just the language, but the modern C development environment. Included are
tips on what tools to use, and traps for the naive.
This book, by no means, should be your only C book. This book is for you if you have modest programming experience in a high level, garbage collected language on a Unix-like system (ie. Python, Perl, Ruby, etc.), and need to learn how to speed up parts of the program by writing in C. Given the audience it is written for, certain things are oversimplified. But that does not mean the book is bad.
On the contrary, it is likely the best introductory book for new C programmers. If you are a kernel hacker who has dreams that correctly compile, you are likely to be disappointed.
Some caution about getting a used copy: make sure you get one that has the DVD, as it has info not contained in the text. They supplement each other, and the book isn't nearly as useful without it.
Other texts worth study (after this) include: 21st Century C: C Tips from the New School and Practical C Programming: Why Does 2+2 = 5986? (Nutshell Handbooks)
Shaw is not an academic, and he has no intention to teach you C according to the standards. His teaching style is aimed at teaching you the street-smarts of C programming - things that may get you scoffed at by the grey-bearded UNIX dinosaurs of the 70's and 80's, but amount to software which is far more secure, practical, accurate, and reliable in the present age than what you can achieve by sticking to the olden C standards.
A big part of this is self-sufficiency. Shaw will explain precisely what is practical to you regarding the concepts of a language with the low-level of abstractions that C has. The rest, he wants you to learn from experience: By reading the right manpages, asking other programmers, well-phrased Google queries, and, most importantly breaking and augmenting the code samples he provides you, no training wheels. A 50-page writeup on how malloc() is implemented in the compiler may be through, but resourcefulness is a far more valuable skill for hackers to have, and Zed intends to teach you this, par excellence.
If you're a programmer wanting to learn C's secrets, this will be a great entry point. It will not be handed to you, and you will need to rely on your own cunning and resourcefulness to get the full value of the course. At the end, you'll know enough C to be dangerous, and producing code that's anything but.
Top reviews from other countries
If you want a book that's sparse on information and rich in examples, this is it. If you want to really understand the language, I recommend looking elsewhere.
I just bought the kindle edition after trying the sample. It seemed good but I noticed that this book is supposed to comes with videos, and the book tells you watching them is "essential" to the course. I could not see any links to videos in the sample, but assumed that when I purchased the full book I would find links. I DID NOT. No mention of where to find them.
It dawned on me after a few moments that the paperback might have come with a DVD and that by buying the Kindle edition I had missed out on. I tried searching the internet for online sources as an alternative. The author's own website does provide them... for customers who bought the digital edition directly from him. There were also other paid for options I found, though I did not fancy buying the book again.
Finally, I did find a solution after half a day of casual searching. The author mentions it in a footnote on his own website if you search.
You can go to "informit.com", register yourself, look up the book, and click "register a product" there. You will then need to find the 13 digit ISBN to register the book, which the webiste will tell you is on the back of the book.... no use to me and my digital kindle edition, then. However, you can also find the ISBN at location 27 in the Kindle edition. It will also ask you to provide a word from the text to prove you have a copy. Once complete it will show you a 2gb DVD file you can download.
None of the information on the store front page on amazon made any of this clear to me.
I share it here so no one else need waste their Friday afternoon.
Despite bad reviews around the Web (mostly based on Zed's encouragement of googling further information), I consider this book to be one of the best methods of learning C that I have encountered
Thank you Zed for a great and fresh method of teaching programming languages
Quite hardcore sometime
I think if you are beginner, you might need to combine it with some beginner ones