Live data from Hacker News

Teach Yourself C in 24 Hours (1997)

aelinik.free.fr

21–30 of 83 posts

Re: Teach Yourself C in 24 Hours (1997)

#21
post #17

Earlier quoted context omitted.

I've never understood why anyone (in the day) would read anything other than K&R (or ANSI 89). Were those not good enough to learn C?

When I was a kid you had maybe 2-3 books on C at the local bookstore, and they were all terrible. But sometimes they came with a (crippled or obsolete) compiler, so that was a huge plus. The book I learned from was C in 12 lessons by Greg Perry, which I found is still on the shelves to this day, 25 years later. Terrible book. The bad part is you don’t learn how to do anything other than little bit of simple input and…

Hmmm.

Thank you for your response. At this point, I think that I must say that your brain and my brain must operate very differently. To me, messing with pointers is the beauty of all that - and it so easily translates to the assembler-lang-brain.

EDIT: Did you not find the K&R explanation of pointers sufficient?

Re: Teach Yourself C in 24 Hours (1997)

#22
I totally recommend Sam's Teach Yourself C++ in 21 days by Jesse Liberty (I found it here http://101.lv/learn/C++/). 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.

Re: Teach Yourself C in 24 Hours (1997)

#24
I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with:

  - Variables
  - Loops
  - Functions
... etc.

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?

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:

  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...
Best coding resource I've found is things like:

  NAND to Tetris [1]
  Handmade Hero [2]
  The Nature of Code [3]
  Harvard CS50 [4]
  How to Design Programs [5] (thx minikomi)
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.

References:

[1] http://nand2tetris.org/ [2] https://handmadehero.org/ [3] http://natureofcode.com/ [4] https://cs50.harvard.edu/ [5] http://www.htdp.org/

Re: Teach Yourself C in 24 Hours (1997)

#25

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. 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 WH…

I’d throw How To Design Programs (2) in there too.

Re: Teach Yourself C in 24 Hours (1997)

#27

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. 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 WH…

I’d throw How To Design Programs (2) in there too.

Thanks. Edited and added links. If anyone else has suggestions, please reply as it is very hard to find these resources!

Re: Teach Yourself C in 24 Hours (1997)

#28

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. 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 WH…

Thanks for the list. I've worked my way through part of NAND to Tetris so far. NAND to Tetris is a little more than just a coding resource. It covers first principles of computing, through to programming. The lessons also come in the form of a book listed at the top of the page The Elements of Computing Systems for anybody who doesn't want the Coursera version.

CS50 is great for core principles, but you need to go into that course with some kind of knowledge/experience working with a programming language of some kind. I found it just kind of dropped you into your first algorithm problem without teaching anything practical about implementation except for how to compile a C program. Regardless, it's a great course.

I'll definitely be having a look at the others you/others listed. I like to run through these things to fill out my core understanding or to refresh it. And still need to finish NAND To Tetris when I free up more time I can commit to it.

Re: Teach Yourself C in 24 Hours (1997)

#30

I think there is a fundamental problem that isn't addressed in teaching people how to code. The problem is that every single course/book talks about the tools of the trade but not the art. Most books start with: - Variables - Loops - Functions ... etc. 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 WH…

Thanks for the list. I've worked my way through part of NAND to Tetris so far. NAND to Tetris is a little more than just a coding resource. It covers first principles of computing, through to programming. The lessons also come in the form of a book listed at the top of the page The Elements of Computing Systems for anybody who doesn't want the Coursera version. CS50 is great for core principles, but you need to go in…

NAND to Tetris - yea it is a little more than just a programming course but that's exactly the kind of teaching we need to do. I took CS1371 at Georgia Tech back in 2004 and it was completely and utterly useless. How does a multi-million dollar college screw up teaching how to code so badly? I wish NAND to Tetris was around.

CS50 - Just watch week 0[1] and it literally starts with a survey of 73% that have never taken anything computer programming course or know anything about programming. The course starts with the absolute fundamentals - decimal system to binary, power cord of the computer where electrons go in and then builds slowly into introducing C.

[1] https://www.youtube.com/watch?v=o4SGkB_8fFs

Post reply on HN