Learning C is difficult because you need
to know how the machine actually works. Trust me, there
are no shortcuts. The year can be 2036, learning C will
be the same.
Re:Ask HN: How to learn C in 2016?
by petr_tik on Thursday May 26, 2016 @07:04AM
(#11777019)
I am making my way through Zed Shaw’s [0] learn C the hard way [1]. I know many people won't like Zed's disregard for K&R, but the exact level of initial difficulty depends on your background. If C is your first compiled language (it is for me), you should appreciate Zed’s smooth guidance through the world of makefiles, valgrinds and necessary tooling to start learning C programming.
Another advantage of learn C the hard way is how data structure oriented it is – the exercise involve implementing BST, linked lists and other data structures, which gives you a great understanding of how basic data structures are implemented and used on hardware (sort of) level. IMO, C needs an accessible learning resource for beginners to have the high-level understanding of necessary tools and basics of compilation and all expert books like K&R are too intimidating. Zed is trying to occupy that niche, which draws a lot of fire from 20+ years of experience C hackers, who learnt it by building their own computer nand gates.
Re:Ask HN: How to learn C in 2016?
by gravypod on Wednesday May 25, 2016 @05:06PM
(#11773087)
The only way to learn a language is to start programming, fail, and fix your mistakes. Compilers like GCC and clang will provide a lot of useful debugging info.
You can also break your program into chunks, google for how to do each chunk, and work it into the program.
Try and read up on the syntax of the language, and what different symbols mean. (*, &, || and the like)
http://norvig.com/21-days.html
Learning C is difficult because you need to know how the machine actually works. Trust me, there are no shortcuts. The year can be 2036, learning C will be the same.
With that said, these books are excellent:
http://www.amazon.com/Programming-Language-Brian-W-Kernighan...
http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp...
http://www.amazon.com/Primer-Plus-6th-Developers-Library/dp/...
http://www.madar.com.pl/demo/expert.pdf
Another advantage of learn C the hard way is how data structure oriented it is – the exercise involve implementing BST, linked lists and other data structures, which gives you a great understanding of how basic data structures are implemented and used on hardware (sort of) level. IMO, C needs an accessible learning resource for beginners to have the high-level understanding of necessary tools and basics of compilation and all expert books like K&R are too intimidating. Zed is trying to occupy that niche, which draws a lot of fire from 20+ years of experience C hackers, who learnt it by building their own computer nand gates.
Hope this helps.
0 - http://c.learncodethehardway.org/book/ 1 - https://github.com/petr-tik/lcthw
You can also break your program into chunks, google for how to do each chunk, and work it into the program.
Try and read up on the syntax of the language, and what different symbols mean. (*, &, || and the like)