Hentenaar
hentenaar.com · Personal blog · on HN since 2015
Hentenaar's personal site, with a critique of Zed Shaw's Learn C the Hard Way and a post on an official GameBoy dev cartridge.
What HN saysHN links it as a critique of Zed Shaw's C book, which commenters treat as a reason to avoid it, with one remaining wary of the book.
16HN people shared it
12linked it in comments
4stories submitted
153story points
5 years agolast shared
2015people per year2026
Most-shared posts
- 1Don't Learn C the Wrong Way15 people · 77 points · first shared 2015 · 50 comments on HN
- 2Inside an Official GameBoy Dev Cartridge1 people · 76 points · first shared 2015 · 8 comments on HN
What HN people wrote when they linked it
hackcrafter · 2016-11-28
Learn C the Hard Way was Zed Shaw's aspiration of a K&R Replacement[1].
If you like it, great, if you don't, you have company[2]
[0] https://learncodethehardway.org/c/
[1] https://web.archive.org/web/20141205223016/http://c.learncodethehardwa…
[2] http://hentenaar.com/dont-learn-c-the-wrong-way
lifthrasiir · 2021-06-23
Unfortunately, there are not a single but a multitude of cultures within the C programming community that compete with others, most of them claiming they are safer than others.
The aforementioned list for example has Jed Shaw's Learn C The Hard Way as having "[t]oo many factual problems and a presentation that gets you to do things wrongly before being shown how to do it correctly, and not even always then". This is an opinion held by the ##c channel, not necessarily every (competent) C programmer. LCTHW itself did a great service by introducing valgrind very early, and most criticisms [1] seem to be presentation issues that might be partly necessary for beginners and partly a matter of taste. (I personally think LCTHW was in particular unfairly attacked because of its merciless treatment of K&R. It's a shame that Jed Shaw gave up then.) To this date I don't have any good beginner-level C book to recommend, including K&R.
[1] as judged by famous Don't Learn C the Wrong Way essay by Tim Hentenaar: http://hentenaar.com/dont-learn-c-the-wrong-way
rhexs · 2016-05-19
Low level languages are tough. Gaining a mastery of C does require knowing quite a few strange rules and quirks and it's certainly a bit harder than learning Python. The C FAQ does a good job of illustrating some of the more confusing parts. Sure, I wish I could write Go instead, but that isn't going to happen on the many embedded systems I work on.
This is a rather strange and insulting article. I'm not sure why Zed can't help "old programmers" nor do I understand why he's angered that individuals know about undefined behavior in C. Is there any background to this or did he have the misfortune of being insulted on IRC?
Edit -- I googled for a bit and discovered this was in response to someone doing a pretty good job technically reviewing the book for free! http://hentenaar.com/dont-learn-c-the-wrong-way Perhaps the title was a bit inflammatory.
Zed's rebuttal is at https://zedshaw.com/2015/09/28/taking-down-tim-hentenaar/ and is a great example of how not to react to constructive criticism. My favorite part is his safercopy function and the lack of size_t.
And finally, to leave us all with a quote from Zed's rebuttal:
"Over this next week I’m going to systematically take down more of my detractors as I’ve collected a large amount of information on them, their actual skill levels, and how they treat beginners. Stay tuned for more."
Wow.
ggreer · 2015-09-02
I'm the author of The Silver Searcher (aka ag)[1]. I wrote my first C program almost 20 years ago, and I have some not-very-nice things to say about this guide. I hope the author won't take it personally.
First, Zed Shaw's Learn C the Hard Way is not worth reading. I agree with most of Tim Hentenaar's criticisms.[2] It's confusing, incomplete, and overly opinionated. If you want to get started with C, read the K&R book. It's not perfect, but it's better than anything else I know of.
As for the guide itself, the quality of its advice varies greatly. Some bits are great. Some are good. Some are controversial. Some are dangerously double-edged. And some are Not Even Wrong. It would take too long to go into detail, so I'll just say: Please don't blindly follow this guide. Explore other codebases (including the ones the author linked to). Talk to other programmers. Write your own projects, and get feedback from those who are more knowledgable.
You might notice that this advice generalizes to every language. That's because C isn't special. If anything, the language itself is simpler than most. C has just had more time to accumulate cruft, both technical and cultural. So don't feel intimidated. Once you learn those bits of historical trivia, you'll be fine.
1. https://github.com/ggreer/the_silver_searcher
2. http://hentenaar.com/dont-learn-c-the-wrong-way
tom_mellior · 2019-09-19
Here's an old critique, but based on everything I've ever read from or about Zed Shaw, I trust that it's still valid: http://hentenaar.com/dont-learn-c-the-wrong-way
14113 · 2015-06-01
I think it might not cover them, going by this: http://hentenaar.com/dont-learn-c-the-wrong-way
sciurus · 2015-04-23
They are quoting from http://hentenaar.com/dont-learn-c-the-wrong-way
citrin_ru · 2015-04-07
There was a very good critique of "earn C the Hard Way":
http://hentenaar.com/dont-learn-c-the-wrong-way
swah · 2015-02-09
I enjoyed "Learn C the hard way" by Zed Shaw, but http://hentenaar.com/dont-learn-c-the-wrong-way kinda opened my eyes for some issues, and Zed seems to aggree (https://twitter.com/zedshaw/status/562535244713058304) that the material needs a rewrite.
alexbock · 2016-05-29
I'm not sure how much someone who wasn't already familiar with vectors could get out of this. This seems to be a common issue with informal lessons like this[1].
The article starts seemingly assuming you have no idea what a vector is, but after showing a few graphs opines "As you can see, a vector by itself is just a set of numbers". I don't think someone who didn't already know what a vector was and how to recognize a vector on a graph would see that. Reading the next sentence about coordinate pairs and referring back to the graph might get you somewhere I guess. It doesn't seem to know who the target audience is supposed to be.
Trying to teach people things that you use every day and have throughly internalized can be an eye-opening experience. If you're trying to teach someone how to count in other bases and discover that they never learned about exponentiation, you're not going to get away with just saying "it's repeated multiplication and the top number is how many times you do it; oh also anything to the zero power is one (except zero itself...), and also negative numbers do this... and fractional exponents do that...". They're not going to suddenly "get" exponentiation the way you do from years of experience from three minutes of offhand remarks.
[1] http://hentenaar.com/dont-learn-c-the-wrong-way (parts 3, 4, and 5 in particular have similar complaints)