Live data from Hacker News

Teach Yourself C in 24 Hours (1997)

aelinik.free.fr

51–60 of 83 posts

Re: Teach Yourself C in 24 Hours (1997)

#52
post #15
post #12

Earlier quoted context omitted.

"ocaml does both" wfm. This is an introduction, details will be glossed over.

Sorry, I don't understand, what does "wfm" mean? > This is an introduction, details will be glossed over. Maybe, but I really don't like this. Sometimes it is necessary to simplify things (at least in the first place) to teach them, but it is very rarely the case that it is necessary to say something actually wrong. For example I think it is totally acceptable to ignore the existence of VM and JIT in this chapter, be…

> Maybe, but I really don't like this.

I think it's a useful simplification to say something like "C can be interpreted, but it's almost always compiled in practice, so we usually say that it's a compiled language". Even with that, you've got to have an explanation of "compilers" vs "interpreters", with the attendant decisions involving the balance of simplification vs pedantry that it's so easy to get mired in (this thread being an example).

A document claiming "Learn [topic] in [short amount of time]" seems likely to err on the side of simplification (the alternative being perceived by the author as over-explanation). In that position, my solution might've been to avoid the compilation vs interpretation discussion, describe a compiler as a program for converting source code into a computer-friendly format, add a footnote to something in the appendix with a deeper explanation of other methods of preparing source code to run as a program, and move on.

Re: Teach Yourself C in 24 Hours (1997)

#53

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…

Thank you for the nand2tetris reference. This looks fantastic.

Re: Teach Yourself C in 24 Hours (1997)

#54

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…

Along those lines, I think CS 106A from Stanford may be the best intro I’ve ever seen.

It uses Karel the Robot, which is a kind of pseudo-code robot written in a Java environment. So you’re trying to use code to solve problems, and use code composition techniques to make it happen.

For example, Karel can’t turn right, so you need turnLeft(); three times. But that’s a pain, so create a turnRight() method that tells Karel to turn left three times. And just like that you understand function composition and why you need functions.

Similar problems force you to use every low-level aspect of programming, including loops, variables, solving off by one errors, etc. And by the time you’re done you’re actually using classes and kind of accidentally writing Java, without fully understanding that’s what’s happening.

I consider it a work of art, and which someone would make an open source, extensible Karel environment that’s really well done and supports other languages. In fact I may just build it.

Re: Teach Yourself C in 24 Hours (1997)

#55

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…

Along the same lines, I tend to recommend people that are interested in becoming a developer check out 'Code: The Hidden Language of Computer Hardware and Software', it does a great job of explaining how computers work from first principles in an engaging way.

Re: Teach Yourself C in 24 Hours (1997)

#56

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 i…

I checked out Sam's Learn C++ in One Hour a Day from my local library and the librarian just frowned and said, "oh this looks miserable."

Re: Teach Yourself C in 24 Hours (1997)

#57

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 think SICP also pretty good in this regard. Thankfully it's available online for free

Agreed. I especially enjoyed the lectures which are, fortunately, also freely available: https://ocw.mit.edu/courses/electrical-engineering-and-compu...

Re: Teach Yourself C in 24 Hours (1997)

#58

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…

Honestly, it's like you think they want to teach coding instead of sell a book. They couldn't possibly cram a slip-shod curriculum into 24 hours if they actually wanted to do a good job teaching people to code.

It's practically right there in the title. I think this will actually evaluate true in every single programming language as well, even those yet to be written:

  char title[] = "Teach Yourself C in 24 Hours";
  char meaning[] = "Cynical money-grab from people that haven't learned there is no shortcut to learning";
  strcmp(title,meaning) == 0;

Edit: I've always been a fan of the Ritchie book.

Edit 2: The most useful courses I ever took, that taught me the mental framework for approaching code or any code-like problem (and really any problem that can be chunked down to discrete bits of work) are the following, roughly in order of importance:

  1: Assembly 
  2: Data Structures
  3: Algorithms
I won't even both telling which languages (and assembly flavors) were used-- it doesn't matter, and that's the point.

Re: Teach Yourself C in 24 Hours (1997)

#59

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…

Many people aren’t looking for a resource on how to code, just need to get informed on a new language. It’s funny, when I first started programming, I thought “why do all these resources assume I know so much?!” now I find myself thinking, “why are they assuming I know so little.”

This makes me think of the George Carlin joke: "Have you ever noticed that anybody driving slower than you is an idiot, and anyone going faster than you is a maniac?"

Re: Teach Yourself C in 24 Hours (1997)

#60

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…

Honestly, it's like you think they want to teach coding instead of sell a book. They couldn't possibly cram a slip-shod curriculum into 24 hours if they actually wanted to do a good job teaching people to code. It's practically right there in the title. I think this will actually evaluate true in every single programming language as well, even those yet to be written: char title[] = "Teach Yourself C in 24 Hours"; ch…

[deleted]
Post reply on HN