
Teach Yourself C in 24 Hours (1997) - rayascott
http://aelinik.free.fr/c/index.html
======
fermienrico
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/](http://nand2tetris.org/) [2]
[https://handmadehero.org/](https://handmadehero.org/) [3]
[http://natureofcode.com/](http://natureofcode.com/) [4]
[https://cs50.harvard.edu/](https://cs50.harvard.edu/) [5]
[http://www.htdp.org/](http://www.htdp.org/)

~~~
akashakya
I think SICP also pretty good in this regard. Thankfully it's available online
for free

~~~
pfranz
(I haven't gone through both) but I think HtDP and SICP are interchangeable-
ish.

From the wikipedia page: HtDP was designed as a textbook to address certain
issues that some students and teachers had with SICP.

~~~
jm547ster
Excuse my ignorance, what is HtDP?

~~~
grzm
"How to Design Programs"

[http://www.htdp.org](http://www.htdp.org)

------
lancebeet
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).

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.

~~~
ukyrgf
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."

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

------
throwaway2016a
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.

------
sirodoht
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.

~~~
ci5er
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?

~~~
bluedino
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 output and loops, and the worst explanation of pointers you
can think of.

You can’t do anything in the base language, but that’s just the way C works,
you need a platform specific book to learn to do anything worthwhile. This is
why the 80’s assembler books were so useful and inspiring.

For what you end up learning in the book you could have actually spent the 24
hours (or less) using something like Python, where you’d be way more
productive and hundred times less confused. Actually doing work instead of
messing with pointers and fscanf().

~~~
ci5er
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?

------
zappo2938
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.

------
vesche
Looks to be a useful resource, but I hate the title. Why?
[http://www.norvig.com/21-days.html](http://www.norvig.com/21-days.html)

~~~
krylon
Thank you, I was thinking the same thing. ;-)

------
codewardenh
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.

~~~
crispinb
> "we should all be using"

Anyone capable of thinking that thought (about any programming language) is so
divorced from the vast range of pragmatic contexts within which programming
happens, they might as well be shipped off to a monastery to live out their
days.

------
p4bl0
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.

~~~
agumonkey
It stings but you can't get pedantic into these sorts of tutorials. Maybe he
could [*] warning: crude classifaction, more to learn in these books

~~~
p4bl0
Yes that would ne better.

My point wasn't to get pedantic nor to criticize this particular sentence
alone. I'm essentially saying that beginners' material could often be as
easily comprehensible without the sort of "simplification" that actually says
something wrong.

------
rosenbus
Unfortunately I only have 20 hours to learn C.

~~~
basicplus2
Why would anyone vote this down?

~~~
jwilk
From the HN guidelines:

 _Please don 't comment about the voting on comments. It never does any good,
and it makes boring reading._

------
GnarfGnarf
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().

~~~
pjmlp
Borland manuals were great!

------
cup-of-tea
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.

------
chmaynard
Better yet, teach yourself how to write clickbait headlines by submitting to
Hacker News every web page you can find during a 24-hour period!

------
m3kw9
I can yeah you C in 24 seconds, but how much you learn would be limited to 24
seconds of material

