Why a Beginner Programmer Should Learn C
medium.com
medium.com
2- if you have time, learn the assembler of a real processor (my favorite is 680x0 but nowadays that would rather be x86-64 or ARM), and write an application in assembler.
3- if you are short on time or have a practical need for it, like a C job, or you want to maintain some C software (eg. the Linux kernel, Xorg X11 server or something like that), then go ahead learning C.
Otherwise, learning assembler (and never again writing another assembler program) would be a better learning experience thant learning C. I've known numerous programmers having learned C who were still confused, but never an assembler programmer being still confused.
C, however, has a lot of traps and pitfalls that can be confusing or discouraging to a beginner. I think there are lot of people out there who gave up on programming because their first experience was in C. Weird operator precedence, automatic type conversions, the c preprocessor, differences between pointers and arrays (especially in regards to multidimensional arrays), the #include guard dance around header files, the way #include and header files works in general... There's just a lot of cruft and things about C that complicate the language beyond the inherent complexity of the machine itself. It can also be difficult to learn how to get the whole environment set up, learning about the process of compiling, linking, make, libraries, etc.
I don't think that C is the best first choice of a language for a beginner. Instead I would recommend a language that encourages algorithmic problem solving and computational thinking, something that is a further abstraction from the machine. Then after the student is comfortable with abstract problem solving, and "thinking like a programmer", you can introduce her to see what goes on "under the hood", so to speak, and delve into the lower levels. I would recommend C more as a good second language.
I like the title... Why C Should Be The Second Language You Learn.
Pick a sane and relatively painless language like python or ruby. Once you've become earnestly proficient in one of those AND some of their tool chains and frameworks then you can get froggy.
Some people simply don't understand that C is actually everywhere around them. They don't understand that either the language they use is built in C, or the language THAT was built on was built in / on C, etc etc. Simply the importance of the language in history may just be a powerful point on its own. If someone knows quite a few languages and doesn't yet know C, I kind of don't understand why - they do not yet understand the importance of lower level operations, like the functioning of a garbage collector or why their pre-mature optimizations shouldn't even be attempted.
Great article, over all - I really liked it.
C just opened my eyes to a lot of things. I kept having the feeling of 'how do I not already know this'. And it really clicked when I had to learn PHP and was like 'oh, so this is just a cleaner version of C'.
Anyways, thanks again!
High level languages like python hide this complexity from you (e.g. python dictionaries / arrays / string manipulations). They make life easier, but in a isolated-from-the-machine-in-plastic-wrap kind of way, whereas C makes me feel I'm touching the CPU.