4 ms·
This was one of the first books I read on C and programming I general! I remember I wasn't happy at all with it, so I gave up on it a bit after the middle. It m
by sirodoht 9y ago
This was one of the first books I read on C and programming I general! I remember I wasn't happy at all with it, so I gave up on it a bit after the middle. It must be pretty old.
- ci5er 9y agoI've never understood why anyone (in the day) would read anything other than K&R (or ANSI 89). Were those not good enough to learn C?
- bluedino 9y agoWhen I was a kid you had maybe 2-3 books on C at the local bookstore, and they were all terrible. But sometimes they came with a (crippled or obsolete) compiler, so that was a huge plus. The book I learned from was C in 12 lessons by Greg Perry, which I found is still on the shelves to this day, 25 years later. Terrible book. The bad part is you don’t learn how to do anything other than little bit of simple input and output and loops, and the worst explanation of pointers you can think of. You can’t do anything in the base language, but that’s just the way C works, you need a platform specific book to learn to do anything worthwhile. This is why the 80’s assembler books were so useful and inspiring. For what you end up learning in the book you could have actually spent the 24 hours (or less) using something like Python, where you’d be way more productive and hundred times less confused. Actually doing work instead of messing with pointers and fscanf().
- ci5er 9y agoHmmm. Thank you for your response. At this point, I think that I must say that your brain and my brain must operate very differently. To me, messing with pointers is the beauty of all that - and it so easily translates to the assembler-lang-brain. EDIT: Did you not find the K&R explanation of pointers sufficient?
- spc476 9y agoBack in the 80s, "Program in BASIC" didn't exist (well, maybe). You had "Program BASIC for the Atari 400/800" or "Learn BASIC for the Commodore-64". I even remember books to learn C for specific platforms like the PC or Amiga. Today, a generic book on <programming language> will have to spend a significant portion of time explaining platform specifics. Granted, this is really only three platforms these days (Windows, Mac and Linux) but they are significantly different to be a pain to have to explain in a general purpose book.
- kensai 9y agoI really want to see K&R Third Edition which is written as perfectly as the original but updated to C11. Just to have the textbook with the modern ISO specification and latest introductions.
- ansgri 9y agoIs C11 a plus though? It has features strongly diverging from C++ (e.g. struct initializers), and may only add confusion.
- bstamour 9y agoThe languages, idioms, and ecosystems are different enough that I don't see that as a problem. They should be treated like two different languages. You wouldn't read a C book and expect to understand the conventions of C#. Neither should you for C++.
- ansgri 9y agoThe problem is, C-only codebases are pretty rare, even established ones adopt C++ (e.g. Darktable, which has a rather advanced C-only object system for UI and plugins). Especially in 'hot' topics like AI, where there may be place for pure C, but actually you'd more often use some low-level subset, like C with templates (very useful in writing image processing libraries). And no, I don't think it's reasonable to learn the modern C++ straight away, skipping C part: its abstractions are very leaky, you need to understand underlying resource management and type system. If you don't plan to learn C++ later, okay, do use a modern version, but if this is a possibility, better start either in completely different language with more clear semantics (pascal was great, maybe some Go or Rust are good now), or the pure subset, which wouldn't add to later confusion but would allow to use more advanced abstractions as needed. From my experience teaching software engineering to high school students which already passes their algorithms & programming courses, small differences in practices and/or semantics (svn commit vs git commit) is what kills learning progress.
- gdwatson 9y agoFlexible array members, designated initializers, compound literals, anonymous structs and unions, and many of the library features are pretty great. They more than pull their weight. I am glad the C11 committee put more weight on implementibility for C++ compilers than C99 did. Variable-length arrays in particular feel like the C99 committee decided to poke the C++ committee in the eye with a stick. (Given how the C++ world treated C at the time, though, I understand the temptation.) That said, if being compilable as C++ were a hard requirement for C features the world would be a poorer place.
- icedchai 9y agoI read K&R when I was 15. It was definitely good enough. Platform specific books also helped a ton. I was into the Amiga at the time - '90 or '91 or so - and you really needed extra info to do anything interesting.
- ci5er 9y agoSassenrath was not a Posix guy, for sure. But the Amiga was not a common platform.
- pjmlp 9y agoIt was quite common in many European countries.
- squarefoot 9y agoSame here, I was lucky enough to have a friend visiting the US just when I realized I needed the RKM books and got 3 of them (there was no Amazon, Ebay etc). They were absolutely fantastic!
- sirodoht 9y agoThe reason for me was that I didn't know of its existence. I just though I want to learn C, so I'll just google "learn c free online book". With no mentors or peers, it's more difficult to find the way. Of course, after some time I thought of googling "best book on c lang", and then I discovered K&R.
- ci5er 9y agoThat's funny! Back in the day we only had k&r and man pages...