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.
Your 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.
Do 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.
> 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.
For 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:
Such 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.
Always 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.
Excellent. 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).
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.
This 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!
I 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"
[+] [-] sivers|12 years ago|reply
[+] [-] DonGateley|12 years ago|reply
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.
[+] [-] rhizome31|12 years ago|reply
[+] [-] nzp|12 years ago|reply
[+] [-] DonGateley|12 years ago|reply
[+] [-] ryanobjc|12 years ago|reply
On the flip side, I wonder how people deal with 'programming in the large' with C - other than 'just be really really careful'
[+] [-] ninjin|12 years ago|reply
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=mark...
[2]: http://en.wikipedia.org/wiki/Red%E2%80%93black_tree
[3]: https://github.com/attractivechaos/klib
[+] [-] shadowmint|12 years ago|reply
http://c.learncodethehardway.org/book/
[+] [-] ProAm|12 years ago|reply
[+] [-] ldonley|12 years ago|reply
[+] [-] chatmasta|12 years ago|reply
[+] [-] doktrin|12 years ago|reply
[+] [-] donatzsky|12 years ago|reply
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.
[+] [-] rquantz|12 years ago|reply
[+] [-] lobo_tuerto|12 years ago|reply
[+] [-] alexpopescu|12 years ago|reply
thanks
[+] [-] cenhyperion|12 years ago|reply
I learned to write python (and program) through Learn Python the Hard Way.
[+] [-] akulbe|12 years ago|reply