6 ms·
Learn C the Hard Way: A Clear and Direct Intro To Modern C Programming
- lobo_tuerto 13y agoHope he publishes somewhere an .epub version of them (all his books).
- rquantz 13y agoThis is exciting. I've been waiting to see how he filled out the later chapters for a while now, and presumably this means they're done, or at least will be by May. I want to see that tiny virtual machine get built!
- sivers 13y agoFull-view (non-mobile) Amazon link: http://www.amazon.com/dp/0321884922 http://www.amazon.com/dp/0321884922
- doktrin 13y agoExcellent. There are relatively few books I'm tempted to pick up in paperback, but this would be on my short list (despite having worked through most of the material available online ~6 months ago).
- shadowmint 13y agoFor better or worse an alpha copy of the sort of content for the book is here, for people who might want to find out a bit more about what the style/content/etc. is like, before getting the final book: http://c.learncodethehardway.org/book/ http://c.learncodethehardway.org/book/
- ProAm 13y agoSuch a good read, I wish he'd use line numbers in his code syntax blocks. Its so hard to read and re-reference without them. For those who cant see well it helps a lot, and most modern IDEs/text editors line number for you as well.
- saraid216 13y agoThat's odd, since in Learn Python, he pretty specifically goes out of his way to make sure the student enables line numbers... specifically for these reasons.
- ldonley 13y agoAlways happy to see another Zed Shaw book, especially after seeing how nice and helpful he is to others on HN. If this is anything like Learn Python the Hard Way then you should definitely check it out if you are trying to learn C.
- chatmasta 13y agoFunny how his timing works...
- lampington 13y agoOh come on, seriously? He's a fantastic coder, a great educator and a decent guy in what he does. Sure, he's abrasive and runs people up the wrong way. But let's not read stuff into timing.
- akulbe 13y agoOrdered. Looking forward to this.
- ryanobjc 13y agoI find the C backlash to the excesses of C++ fascinating. On the flip side, I wonder how people deal with 'programming in the large' with C - other than 'just be really really careful'
- ninjin 13y ago> I find the C backlash to the excesses of C++ fascinating. I whole-heartedly agree. Something that blew my mind back in undergraduate school was tree.h by Niels Provos, [1] which is a complete key/value-type agnostic Red-black Tree [2] in a single header file. Just recently when re-learning C I stumbled upon klib [3] which has a similar take on generic programming by "abusing" the preprocessor. If I am allowed to side-track, I found "C The Hard Way" to be a good resource when re-learning C. I also had a lot of fun with "Expert C Programming", although it is a bit dated. I highly recommend it once you have a grasp of the language basics. I have heard good things about "21st Century C", but I am still wondering what other good resources there are out there. [1]: http://svnweb.freebsd.org/base/head/sys/sys/tree.h?view=markup http://svnweb.freebsd.org/base/head/sys/sys/tree.h?view=mark... [2]: http://en.wikipedia.org/wiki/Red%E2%80%93black_tree http://en.wikipedia.org/wiki/Red%E2%80%93black_tree [3]: https://github.com/attractivechaos/klib https://github.com/attractivechaos/klib
- noselasd 13y agoYou don't always need preprocessor tricks to generate a special purpose red-black tree, you can use an intrusive variant like this: http://cgit.osmocom.org/libosmocore/tree/include/osmocom/core/linuxrbtree.h http://cgit.osmocom.org/libosmocore/tree/include/osmocom/cor.... This works together with the container_of macro: http://stackoverflow.com/questions/15832301/understanding-container-of-macro-in-linux-kernel http://stackoverflow.com/questions/15832301/understanding-co... In similar spirit, the linked list variant: http://cgit.osmocom.org/libosmocore/tree/include/osmocom/core/linuxlist.h http://cgit.osmocom.org/libosmocore/tree/include/osmocom/cor..., though the macros in sys/queue.h are also useful for linked lists.
- deleted 13y ago[deleted]
- DonGateley 13y agoAll you need is K&R, honest. C is a very simple language. I learned it from K&R in the '80s in an office in a building in a corn field on a back road halfway between Rockford, Il and Belvidire, Il. I went on to hire and assist eight others in acquiring it and then employed them to write, along with myself, a successful machine tool controller of serious sophistication employing a three way tightly coupled Mot 68010 MP system (using bus fault recovery to resolve address collisions) of my design. Not bragging, really, just being dramatic about what you can accomplish starting with just K&R.
- DonGateley 13y agoI'd like to add that this was not only before the public Internet but almost before the PC. :-)
- rhizome31 13y agoYour statement assumes that one already has access to a copy of K&R. For those who don't, there's no reason not to start with a cheaper, more recent book.
- danieldk 13y agoExcept that there are so many K&R copies floating around that it's easy to get a cheap second-hand copy. E.g. my local Amazon (.de) sells copies starting at 15 Euro. K&R is really the definitive C book.
- nzp 13y agoDo note that Zed actually discusses in this book (at least in the online version) why it might not be the best idea to learn C from K&R today. His basic argument, IIRC, is that the examples in K&R are very bad when it comes to writing modern C. Sure, you'll learn the language in a formal sense, but K&R is hardly going to prepare you for the reality of C programming.
- DonGateley 13y agoI'm curious what reality he considers missing from K&R.
- alexpopescu 13y agoI haven't read any of Zed's book and Amazon doesn't have a decent number of reviews, so I was wondering if someone could provide the shortest "why should I get this book" thanks
- cenhyperion 13y agoread the version he provides freely online and see if you like it: http://c.learncodethehardway.org/book/ http://c.learncodethehardway.org/book/ I learned to write python (and program) through Learn Python the Hard Way.
- donatzsky 13y agoSlightly OT: Can anyone recommend something similar for Java (Android specifically)? The tutorials I have found so far seem to assume I'm either a complete imbecile or have a CS degree.