Live data from Hacker News

Learning C in 2023

news.ycombinator.com

11–15 of 15 posts

Re: Learning C in 2023

#11

Learning C is about learning how the OS works. The C syntax is quite simple. Complexities come when dealing with the OS through system calls. Threads, sockets, memory, etc. Most other languages are about learning the language features. The languages you have mentioned and C++ are like this. People tend to get bogged down in trying to get the language feature to work for their problem. I have avoided this as much as p…

> Learning C is about learning how the OS works. If I just want to write a C program I don’t understand how this is true, can you elaborate?

I don't necessarily agree with OP. I would point to compiler / toolchain first. Not every program will have syscalls, threads, signals, etc, etc

I will say that a huge subset of C programs involve low level interactions. I know some talented developers that feel disagree, but I wouldn't use C otherwise (though there are probably other use cases). ie. basically never

In which case you are somewhat of a hardware / kernal / OS programmer. The lower layers will matter. In the PC world this might be abstracted away. I haven't heard of many developers diving into eg. a modern Intel x86, at a hardware level (but perhaps write some ASM).

C also works well for embedded systems. In which case you likely have a compiler and have to interact with low level hardware and peripherals.

So I will say in the long run you will need to learn these things. My education in C involved writing code for linux system; that's how it's taught to CS/SWE people.

On the computer / electric front, you would work with an embedded platform. In either case you'll learn useful things and will be able to jump back and forth... but there will be some substantial differences in your specialized knowledge.

Re: Learning C in 2023

#13
A nice beginners book in French is "Le livre du C premier langage" by Claude Delannoy. The same author has a serie of books that are nice, but this one is the best to begin with.

My 8yo did managed to learn programming on his own with it, as he doesn't read English fluently enough yet. He now uses the French k&r as reference. But learning from it, he was struggling.

So not for you, but leaving here as a reference.

Re: Learning C in 2023

#14
post #9

For the base language (as you'll see repeatedly), "The C Programming Language". For the standard library (POSIX), I don't have a good catch all source but you'll want one here. For networking (which tells more than just networking), "Beej's Guide to Networking". That's a fantastic book (online free from the author). Hilarious and informative. I liked writing existing unix utilities myself and I found that a helpful s…

I would say Beej's Guide to C Programming is also excellent. Unpopular opinion, I think "The C Programming Language" feels a bit dated these days

Re: Learning C in 2023

#15
C itself is trivial. But useless. Learning C is like learning to use a scalpel. C is useful in a situation, and what you really need to learn is that situation. Is it microcontrollers? Learn some basic EE, and to read datasheets and to not trust them. Is it low level programming in an OS? Learn about system calls and interfaces offered by the OS. Is it to make an OS? Learn some assembly and hardware insides.
Post reply on HN