10 ms·
“Learn C the Hard Way” is no longer available for free
- Narann 10y agoThe one in "Stuff that should be avoided"?: http://www.iso-9899.info/wiki/Books#Stuff_that_should_be_avoided http://www.iso-9899.info/wiki/Books#Stuff_that_should_be_avo...
- alexeiz 10y agoZed Shaw's books remind me of Herbert Schildt. In fact, Schildt is also on that "to be avoided" list! Books from both authors are practical and interesting to read, but contain serious mistakes and omissions. Back in the days I learned C from one of Schildt's books, and I thought it was very useful. But now that I know better, I'd never open that or any other books he wrote. I guess, if you don't have any knowledge, such books look very appealing as a starting point. You quickly pick up some basic knowledge and practices. But later, it may actually be hard to unlearn all the wrong things that these books teach.
- miles 10y agoThanks for the heads up! http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be_avoided http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be... "Too 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."
- tptacek 10y agoBe careful taking standards group weenies too seriously.
- deleted 10y ago[deleted]
- gecko 10y agoI have to be honest: the fact this is in "things not to read" from ISO is one of the strongest endorsements I could imagine. For that to happen, it must both be successful enough to get on their radar, and also to tick them off. That said, I know why this is on the list. Zed honestly doesn't like C, by which I mean that he recommends a lot of things that are (in my opinion) genuinely best-practice, but fly in the face of either historical norms, or the techniques that the ISO C team wants to push. Depending on what you're aiming for, this might indeed make it a bad work—but it can also make it a great one. I'd liken it in some sense to DJB's projects: Zed recommends a fairly unorthodox, but (again, in my opinion) excellent way of writing C. If you need to interface with people who write C the way most people write C—you're working on an operating system, perhaps, or a legacy codebase—this may be a problem. If you're writing C because you need to write a few components of your project in C for performance or [lack of] abstraction reasons, and would prefer not to hate yourself later, it's great.
- tptacek 10y agoThe problem here is that Schildt's books really aren't good. But as far as LCTHW goes: I doubt very much its author has the same objectives for writing a book about C that the standards weenies do, and I doubt very much that they took that into account before warding people away from the book.
- generic_user 10y agoJust to be clear that website has nothing to do with the official ISO. Or the ISO C working group.
- qwertyuiop924 10y agoIt's not ISO: that's from Freenode ##c. It's likely they just hate it because Zed got a trivial detail about the C standard slightly wrong, rather than because they're trying to persecute him or something. It's more their style. Zed's the one who's more likely to be persecuting someone.
- catnaroek 10y agoCan you imagine DJB deliberately teaching how to do something wrong before teaching how to do it right, though?
- draw_down 10y agoI thought it was pretty good.
- lj3 10y agoIMHO, that's the best endorsement for the book I've ever seen. Zed had a knack for pissing off people who spent too much time in theory and too little time building things. I don't blame him for finally charging for it either. It's a good book and giving it away for free got him nothing but harassment and libel. update: Beej's Guide to C[0] is also on that list. [0]: http://beej.us/guide/bgc/output/html/singlepage/bgc.html http://beej.us/guide/bgc/output/html/singlepage/bgc.html
- qwertyuiop924 10y ago#c doesn't spend their time on theory. They spend their time genuflecting before the C standard.
- aidenn0 10y ago##c is the single most pedantic internet forum I've ever been in. Also the only time I've seen someone spell "coördinate" with the Diaeresis in chat was in that channel.
- qwertyuiop924 10y agoThat sounds like ##c.
- zouhair 10y agoThis is the reason they gave to avoid it: Too 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.[0] [0]: http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be_avoided http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be...
- qwertyuiop924 10y agoYeah, but this is ##c: when they say "factual problems," they mean that at some point Zed said that a function took an array as an argument, or that the book didn't match up to the letter of the C standard. And "doing things wrong" means not checking the return value of every single syscall you use.
- qwertyuiop924 10y agoThey said the same thing about Build Your Own Lisp In C, and many other books. These are the people who worship the C spec, and will crucify you for daring to claim that your function takes an array as an argument. I'd take anything they say with a grain of salt.
- generic_user 10y agoThat list is maintained by some of the Freenode C regulars. Anyone who has spent time on Freenode C knows to take anything they say with a grain of salt.
- qwertyuiop924 10y ago...which was my point. Freenode #c knows their stuff, more or less, but you follow the same rules you do around Erik Naggum or /g/: keep your head down, be cautious, and show no weakness.
- generic_user 10y agoThere is a significant amount of people on there that are total morons but also total assholes and stroke certain peoples egos so they get a pass.
- qwertyuiop924 10y agoAlso true. However, "idiot" is not the qualifying factor for being on ##c: the qualifying factor is "asshole".
- angersock 10y agohttp://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be_avoided http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be... The whole thing seems kinda snarfy and out-of-touch. It's basically single-sentence "Oh this is totally not worth it", which is usually a sign of people on the 'net jerking themselves off over how elite they are. It's just a bunch of folks on IRC showing off. They pan a nice book on implementing a lisp in C and a simple guide from Beej (of Beej's Guide to Network Programming).
- qwertyuiop924 10y ago"people on the 'net jerking themselves off" is a pretty good descriptiob of freenode's ##c. I'll quote Daniel Holden (the author of the book on implementing a lisp you mentioned above)'s words on the matter[1]: This channel is hardly known for being friendly. Generally anything other than K&R is regarded as Socratic corruption. And not checking the return value of malloc is on par with adultery. Nor do they have much concern for encouraging the next generation of C programmers. I remember witnessing a new C programmer ripped for several minutes on the channel for simply mentioning the heap and stack in their explanation. Instantly he was shot down with "implementation detail and not defined in the C standard" and told to ask his question in #unix. The channel is generally a great place to go if you want to be told you're an idiot. 1: http://www.theorangeduck.com/page/ready-fight http://www.theorangeduck.com/page/ready-fight
- PeCaN 10y agoIf that's from the freenode ##c wiki, you should probably take that as a ringing endorsement. ##c is laughable. I'm not sure they actually use C, or just think about the C Abstract Machine and Glorious Specification.
- qwertyuiop924 10y agoI've already quoted Daniel Holden on ##c once under GPP, but his evidence on the matter, deserves, I think, a repost here: I remember witnessing a new C programmer ripped for several minutes on the channel for simply mentioning the heap and stack in their explanation. Instantly he was shot down with "implementation detail and not defined in the C standard" and told to ask his question in #unix. You can find the whole article at http://www.theorangeduck.com/page/ready-fight http://www.theorangeduck.com/page/ready-fight.
- PeCaN 10y agoThe funniest part is that the C in K&R is not really much different, let alone better, than in any of the books they recommend against. I guarantee K&R would be on their list of books to avoid if it wasn't written by… well, K&R. I've used & contributed to Daniel's stuff (mostly mpc¹) and his code is (IMO) quite high quality. ##c is a bit deluded. ¹ https://github.com/orangeduck/mpc https://github.com/orangeduck/mpc
- qwertyuiop924 10y ago##c isn't a bit deluded. They're very deluded.
- eyezick 10y agoSame is said for his Python book as he discourages Python 3; 'Automate the Boring Stuff' is also free and superior
- satysin 10y agoI read it a while back and didn't think it was very good. I wouldn't pay $30 for it IMHO. There are better books out there.
- raindev 10y agoWhat are good modern books on C nowadays?
- satysin 10y agoPersonal opinion - (in order from beginner) * C Programming Absolute Beginner's Guide by Perry and Miller * C Programming A Modern Approach by King * Programming in C by Kochan * C Primer Plus by Prata * Head First C by Griffiths & Griffiths * 21st Century C by Klemens * Understanding and Using C Pointers by Reese * Expert C Programming - Deep C Secrets by van der Linden
- aidenn0 10y agoYou were not the first person to suggest Klemens's book to me, but after reading it, I disagree with most of it.
- awkward_yeti 10y agowhy ?
- aidenn0 10y agoIt's hard to put my finger on exactly what it is I don't like about it. After rereading the table of contents I certainly don't disagree with some things (gdb, valgrind, version control, package management, are all good things). I think my biggest beef is it seems to approach C as if it is a general purpose language, and I would argue that in the 21st century C is no longer a general purpose language. It is at its best now when used for systems programming, embedded programming, and making portable libraries (and the last is also no longer the exclusive domain of C, as besides C++ there are a couple other languages that can export C abi compatible functions and have unobtrusive runtimes). Also, Klemens seems to like autotools. I don't hate autotools as much as others, as I remember a world before autotools was ubiquitous and it truly sucked. However, the combination of compilers not sucking like they used to (if you are using C99, you have a lot more features than you did on some crappy PCC derived vendor supplied compiler, even if you stick only to pure C99, and the odds of your compiler not "just working" on the C99 code is pretty slim) means that for simple projects a makefile that respects the CFLAGS, LDFLAGS, CC &c. is sufficient; for larger programs, there are serious alternatives to autotools. Obviously none of them are as dominant as autotools, but cmake is certainly prevalent enough to be a good place to recommend people start at.
- MatekCopatek 10y agoIronically, the first customer testimonial I got on that page started with "Thanks so much for putting your book online." I generally like stuff by Zed E. Shaw, though. Is there an official statement about this? Will he be making other books unavailable too?
- AdmiralAsshat 10y agoIf memory serves, the web version was always sort of an "alpha". The book now has a physical print edition, so I guess he wants that to take priority. Kind of a bummer, but fortunately I already worked through the book when it was in alpha and saved a copy of all of my exercise solutions in case I need to refer back to them in the future. EDIT: Looking at an Archive page reinforces my view on this: http://web.archive.org/web/20150203094342/http://c.learncodethehardway.org/book http://web.archive.org/web/20150203094342/http://c.learncode... "This is the in-progress free version of Learn C the Hard Way." So my understanding is we were basically beta-testing his book for him and providing feedback in exchange for his making it free. He's finished it, smoothed it out, and finalized it with some additions and videos, so now he wants money for it. Seems fair enough to me. I've seen the physical edition at Barnes and Noble a few times. I might thumb through it one day and see if there's enough content beyond what I pulled from the alpha to be worth buying.
- kristofferR 10y agoWasn't this partially crowdsourced?
- awkward_yeti 10y agoI've seen this referenced few times as a resource for learning C beyond the basics. And my question for anyone who has gone through it, Is it worth the tag ?
- latenightcoding 10y agoI really enjoyed reading this book when I was re-learning C. I don't understand why It gets so much hate, the book gets you coding complex programs in a couple of days, unlike other C books where you have to read 300+ pages to finally start learning about pointers.
- banachtarski 10y agoWhat C book has 300+ pages before you learn about pointers?
- SyneRyder 10y agoI went and checked - the book I first learned from, "Using C" by Clint Hicks, didn't introduce pointers until page 232. Not quite 300+, but not too far off either.
- deleted 10y ago[deleted]
- segmondy 10y agohttps://github.com/davout/lcthw https://github.com/davout/lcthw it's still available for free in other locations, just search.
- icebraining 10y agoYes, you can usually find illegal copies of recent books. HN tends to frown on such links, though.
- krat0sprakhar 10y agoI just bought this book two days ago and I'm loving it so far. Apart from the last few chapters that are now complete, you also get videos of Zed discussing the code and exercises. For the insane amount of work Zed's put in the material, I consider it a very worthwhile purchase. Given the tremendous amount of value I've derived from Zed's other free books, parting away with the $30 is the least I could do to support his efforts. Thanks Zed for this excellent resource!
- jorgecastillo 10y agohttps://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html This is my favorite C related documentation online. The first book on C I read was a PDF of K&R, I liked it. I used to think the paperback was way too expensive. Instead I bought C Primer Plus, never read it. Few books capture the gist of a language as well as K&R in as little space. Though Modern Perl and Programming in Lua also come to mind. If they ever make an updated version of K&R I would definitely buy it.
- vram22 10y ago>I used to think the paperback was way too expensive. How much was it?
- jorgecastillo 10y agoAround $50 USD in Amazon, like today. I just thought it was too much for the quantity of pages. But really, few programming books are as good as K&R. I still think the editorial is particularly greedy when it comes to this book. Still I don't recommend any C book, other than K&R.
- vram22 10y ago>But really, few programming books are as good as K&R. Agreed. I asked about the price because it is, or at least used to be, a lot less expensive than that, in India, from the time when I first bought a copy (when first learning C, near the start of my career), to at least some years ago, when I bought several copies of it to give to the students of a C course I was conducting for a company. In that whole period it was just a few hundred rupees (INR) in price, which is just a few USD (under $10 or so, even with the change in exchange rate over the years). I do know that publishers have variable pricing for different countries, of course.
- a3n 10y agoDecades back when I was a competent C programmer, I liked Harbison and Steele's C: A Reference Manual. https://en.wikipedia.org/wiki/Guy_L._Steele_Jr.#Books https://en.wikipedia.org/wiki/Guy_L._Steele_Jr.#Books
- sjroot 10y agoI actually emailed the author about this. He is in the process of revising the site for C. It will be available for free, or so he told me.
- partycoder 10y agoFor C++, there is a book called Accelerated C++ by Koenig and Moo. It was very enjoyable to work through it.
- vram22 10y agoYes, I got that book a while ago, soon after it came out, and really liked the approach. A very different, and to my mind, sensible approach to teaching the language to beginners. Andrew Koenig was/is a C and C++ guru from a long time. Was at Bell Labs, IIRC, and worked with some of the original people who worked on C++, maybe, and worked on it himself. I've read part of his C Traps and Pitfalls book, too - also good.
- petercooper 10y agoTheir Ruminations on C++ book formed out of Koenig's columns is also excellent, if anyone is looking for an extra read. I have it on my desk right now :-)
- partycoder 10y agoHow would you compare it to, for instance, Meyers' series of books?
- petercooper 10y agoMeyers is undoubtedly the master. Koenig certainly gives his own slant on things though and is enjoyable to read.
- jrcii 10y agoFrom what I've seen the author sounds like an asshole that can't take criticism so I'm not sure I'd patronize his work either way.