Hacker News new | ask | show | jobs
by _osorin_ 1348 days ago
I would like to take it a step further and ask a question that has been bothering me a while. On my time in the academy I studied the following two books (regarding C):

[1] Advanced Programming in the UNIX Environment https://www.amazon.com/Advanced-Programming-UNIX-Environment...

[2] C Programming Language https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...

In combination with other classes (and books) on networking, operation systems, data structures we covered a big variance of use cases with C. My question is: How do I take this to the next level? For example I feel I never missed a concept from those classes but when I see C code posted on a thread here it's probably something completely unreadable and complex. Can anyone provide resources to advance a little? What should I study if my goal is to make good and useful modern C software?

I feel like my typing is a bit abstract but I will be happy to clarify.

PS Yes, I've heard of C++ and Rust ;P

2 comments

Start by reading Redis code, slowly take notes on paper, try to make your version changing small bits at a time.

https://github.com/redis/redis/tree/unstable/src

Entry point here at line 6816: https://github.com/redis/redis/blob/unstable/src/server.c

Also "Code Reading" will be useful. - https://www.amazon.com/Code-Reading-Open-Source-Perspective/...

"Code Reading" tends to be criticized, but I think mostly unfairly.

Thanks a lot for the recommendation.
[1] is a very good book - it's not really one for learning C though, it's more for when you know C and you need to use it in - well - an advanced unix environment. Sort of like you shouldn't be learning how to use a scalpel in an operating theatre :)
I got it for our operating systems class, it's not aimed to teach C from scratch. My bad for not clarifying.