Cover of The C Programming Language

The C Programming Language

Brian W. Kernighan and Dennis M. Ritchie
#75
70.5 score
65 mentions
43 threads
60 commenters
Score Breakdown
Component Scores — Weighted Analysis
Sentiment
57.2
Positive
Substance
61.6
Substantive
Diversity
100.0
Extremely Diverse
Story Qual.
71.7
High-Quality
Discussions · 9 threads
keyle · hn↗

> That junior engineer possibly hasn't programmed without the tantalizing, even desperately tempting option to be assisted by an LLM. This gives me somewhat of a knee jerk reaction. When I started programming professionally in the 90s, the internet came of age and I remember being told "in my days, we had books and we remembered things" which of course is hilarious because today you can't possibly retain ALL the knowledge needed to be software engineer due to the sheer size of knowledge required today to produce a meaningful product. It's too big and it moves too fast. There was this long…

josephlord · hn↗

But you do study Philosophy, Medicine, Economics, Archaeology and Anthropology and many other subjects without having studied them before. The subjects that are not (or are rarely, or badly) taught at school often expect people with little existing knowledge but a strong interest and an enquiring mind. Computer Science falls into this category. Also if you think of Computer Science as being primarily about programming rather than the maths, theory and science of computing I don't think you fully understand computer science. I chose to do Computer Science because I wanted to properly…

gumby · hn↗

> For instance, it allows programmers to quickly create user interfaces by declaratively describing them, in a so called SCREEN SECTION. By the way if it seems odd to have I/O like this in your language:* this reflects the architecture of mainframes; because the CPU was so important, I/O was managed by external devices (typically themselves a cabinet of electronics, at a time when the CPU took up two or three cabinets itself). You'd write essentially a small program describing what IO you wanted and then let the IO channel controller be busy dealing with minutiae like dealing with the tape…

crewtide · hn↗

As someone who learned to program in my 30s (spent my 20s as a professional musician) I can't agree more. The book that was recommended to me was K&R, which I found so dry as to be impossible to read through. The first book I really used was C++ in 21 Days, which has you writing working programs from...well, from day 1. I always thought the reason for this problem in teaching programming is that what you need to know when switching to a new language is totally different from what you need to know when you don't know how to program. If you already know how to program, the first thing…

tialaramex · hn↗

> pointer provenance But what could a book last updated in the 1980s have to say about this subject? The phrase falls out of DR260 (Defect Report #260 in the ISO C standard) which wasn't even raised until this century. Here's the mention of "provenance" from what WG14 (the committee for the C standard) wrote for DR260 back in 2001: "the C Standard does not prohibit an implementation from tracking the provenance of the bit-pattern representing a value" Vague right? And it's technically true, the C standard says nothing whatsoever about this subject. Of course it also doesn't have anything…

cxr · hn↗

It's hard to take someone seriously or believe that they've even read the material when they say stuff like this. K&R (2nd ed.) is constantly calling out undefined behavior, etc. and gives you information you need to start out on a path to be a real stickler about the language. I spent time on my own learning C from K&R since the CS program at my school didn't expose anyone to C (or C++) during the first year. Later, in e.g. the computer architecture course or the data structures course when C was being used liberally (and sloppily), and as I was running across lots of C in the wild, I was…

robomartin · hn↗

> Can you give links and resources to support accomplishing the "CS curriculum" you suggested? I'd have to Google it just as you would. Here a few points. C - Well grab a copy of K&R Microcontroller: Get over to SiliconLabs (http://www.silabs.com) and grab a development board for something like their C8051C020 along with the free tools. Or you could buy a Keil compiler. Study their sample code in depth. Lots to learn here: configuring the processor, i/o ports, interrupts, timers, counters, clock frequency, serial I/O ports, etc. Make an LED blink. Then make it blink when…

SFJulie · hn↗

I love how so much person focus on the GIL and multithreading, when GIL is much more a solution to make un-threadsafe libs safe to use, and that most people don't see POSIX threads are an inherently broken abstraction. [1] http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-br... In fact it pretty much boils down to signals being broken on unices [2] https://lwn.net/Articles/683118/ Which even though I have a hatred for systemd, systemd is trying to fix by leaving the status quo. However, POSIX signals are still a problem to systemd [3]…

dontbenebby · hn↗

I would be wary of focusing on length, since longer books have useful end of chapter exercises and more explanatory text rather than (possibly dead) links. Cracking Codes with Python: An Introduction to Building and Breaking Ciphers is under five hundred pages and will make you more powerful than most American civil war era generals. Here's an online copy: https://inventwithpython.com/cracking/ Happy to help! (Previously I tried the ESR approach of starting with C, and got frustrated and gave up. Learn python, and learn the math the broken American K-12 system did not teach you in one…

andrewmcwatters · hn↗

[1]: The C Programming Language (2nd Edition) [2]: POSIX.1-2017. https://pubs.opengroup.org/onlinepubs/9699919799.2018edition... [3]: The Linux man-pages project. https://www.kernel.org/doc/man-pages/ [4]: Apple Documentation Archive. https://developer.apple.com/library/archive/navigation/ [5]: Windows API index. https://docs.microsoft.com/en-us/windows/win32/apiindex/wind... The age of the documentation has absolutely nothing to do with using the software. I highly encourage developers to get rid of this mindset. Generally it comes from younger developers who have less exposure across…

← Back to Index