News for hackers. Stuff that matters.
Re:Learn C in Y Minutes by j-james on Tuesday April 13, 2021 @08:14AM (#26791136)
For someone planning on learning C in the next couple of months (through K&R), do you have any advice on where to learn best modern practices afterwards?
Re:Learn C in Y Minutes by rseacord on Tuesday April 13, 2021 @08:27AM (#26791260)
I like Effective C: An Introduction to Professional C Programming https://nostarch.com/Effective_C but I would since I wrote it.
Re:Learn C in Y Minutes by blindluke on Tuesday April 13, 2021 @09:11AM (#26791678)
I like it too, very much so, to the point where I recommend it to people that find K. N. King's "C Programming: A Lengthy Approach" too intimidating. And I had nothing to do with writing it, as you obviously know.

My sincere thanks for the book.

Re:Learn C in Y Minutes by baybal2 on Tuesday April 13, 2021 @08:19AM (#26791181)
Unfortunately not, and I see it as a big downside of C where you can only learn about important corner cases with your own bitter experience, direct instruction.

Advanced C usage remaining a black magic is not strength, it's weakness. This assures that attackers will always have a significantly stronger upper hand against industry's salaryman developers.

Re:Learn C in Y Minutes by junon on Tuesday April 13, 2021 @10:11AM (#26792370)
"Advanced C usage" can you explain this, please? What in C is so "advanced" that it's more black magic than C++ or Rust or any other high level language?

With C, what you see is what you get. I don't see how that can possibly be black magic.

Re:Learn C in Y Minutes by baybal2 on Tuesday April 13, 2021 @10:23AM (#26792526)
The problem is that you don't see that much.

Compiler these days optimise the code beyond human comprehension. Memory management libs, and what hardware does with your physical memory layout is inscrutable.

Register level vulnerabilities are very much black magic for anybody, but silicon maker itself.

Memory management libs used by any big C program add to complexity.

Fancy runtime pointer, and ROP sanitation libs fix some types of vulnerabilities, and add another.

And so, and so, and so.

I am a big proponent of C, but will not hide that C needs substantial education beyond just programming to use properly, and safely.