I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that <i>every</i> single course/book talks about the tools of the trade but not the art. Most books start with:<p><pre><code> - Variables
- Loops
- Functions</code></pre>
... etc.<p>In doing so, it is simply overloading the student with syntax memorization and conceptual overload. It bothers me so much that very few books (Kernighan) talk about WHY. WHY. WHY is a variable needed? WHY is a function needed? WHY do we use OOP? Every single book out there jumps straight into explaining objects, how to create them, constructors, blah blah blah. No one fricking talks about what's the point of all this?<p>Teaching syntax is like muscle memory for learning Guitar. It is trivial and simply takes time. Syntax - everyone can learn and it is only one part of learning how to code. Concepts are explained on their own without building upon it. The famous book for Python (Learn Python the Hard Way) explains Loops in its own chapter and provides examples. But, they never build up on the idea. There should never be a separate chapter for variables, loops, functions, etc. Chapters should be:<p><pre><code> Chapter 1. Setting up the problem (Goals)
Chapter 2. Defining Inputs/Ouputs (API)
Chapter 3. Automating something (Variables, loops)
Chapter 4. Abstraction of something (Functions)
Chapter 5. More automation! (Combing all)
Chapter 6. Splitting code into multiple modules (Growing the project)
Chapter 7. Objects (New type of abstraction, OOP)
Chapter 8. Reusability of Classes (Inheritance)
Chapter 9. Safety/Security (Encapsulation, tie it back to Chapter 2.)
etc...
</code></pre>
Best coding resource I've found is things like:<p><pre><code> NAND to Tetris [1]
Handmade Hero [2]
The Nature of Code [3]
Harvard CS50 [4]
How to Design Programs [5] (thx minikomi)
</code></pre>
This is learning how to produce music. Not learning the F chord. Teaching how to code is fundamentally broken and very few books/courses do it well.<p>References:<p>[1] <a href="http://nand2tetris.org/" rel="nofollow">http://nand2tetris.org/</a>
[2] <a href="https://handmadehero.org/" rel="nofollow">https://handmadehero.org/</a>
[3] <a href="http://natureofcode.com/" rel="nofollow">http://natureofcode.com/</a>
[4] <a href="https://cs50.harvard.edu/" rel="nofollow">https://cs50.harvard.edu/</a>
[5] <a href="http://www.htdp.org/" rel="nofollow">http://www.htdp.org/</a>
The "in 24 hours" part is of course just book title clickbait. I read Sams' C++ book and the 24 hours figure is making lots of assumptions such as general familiarity with programming, spending >10 times more time doing exercises and understanding the material and so on. And after all this, you will still just be a beginner since you will have no actual experience. It naturally also leaves out lots of material that isn't judged necessary to fit into the 24 hour time frame (though this may not be the case for the C book since the language is so much smaller).<p>As for this particular link, all image links in the text seem to be broken, and a pdf of the book can be found elsewhere.
I totally recommend Sam's Teach Yourself C++ in 21 days by Jesse Liberty (I found it here <a href="http://101.lv/learn/C++/" rel="nofollow">http://101.lv/learn/C++/</a>). It's a great book to learn not only the basics of C++ (which, since it is a rather old book may be not very good for this and you should probably learn C++ by using a more recent book) but, more importantly, the basics of OOP, i.e encapsulation, inheritance and polymorphism/late binding. The animal examples are excellent and I actually use them even today when I want to explain to somebody these concepts.
Wow this brings back memories. This is the book I first learned C with. Bought it at a video game store and it came with a install disk for the Borland C compiler taped to the back page.
This was one of the first books I read on C and programming I general! I remember I wasn't happy at all with it, so I gave up on it a bit after the middle. It must be pretty old.
I've been coding JavaScript and PHP for 6 years. I know the advanced topics of both languages. I'm in the office on a Saturday right now asking the question I'm always asking, "Where does this go?" I wish I knew the answer so I can go home -- the really important part of coding can't be learned in a day, a month, 12 weeks at a bootcamp, or after 6 years.
Looks to be a useful resource, but I hate the title. Why? <a href="http://www.norvig.com/21-days.html" rel="nofollow">http://www.norvig.com/21-days.html</a>
Many here will rush to trot out the usual "but, we should all be using { fashionable language of the day | Rust } instead of C". Maybe. Maybe not. But there is something of a sweet spot with C and after all these years it persists due to that sweet spot despite some of the potential downsides.
I only opened the first chapter, but I certainly won't recommend a book where things such as "There are two types of programming languages: compiled language and interpreted language." are written.
I leaned C from the Borland book that came with Turbo-C. A masterpiece of clarity and conciseness. I found K&R too low-level. I don't really want to know how they implemented strcpy().
I would prefer that someone learnt it in a few weeks using K&R followed by study of the comp.lang.c FAQ for more useful and some obscure parts of the language.