TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Teach Yourself C in 24 Hours (1997)

172 pointsby rayascottover 7 years ago

14 comments

fermienricoover 7 years ago
I think there is a fundamental problem that isn&#x27;t addressed in teaching people how to code. The problem is that <i>every</i> single course&#x2F;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&#x27;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&#x2F;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&#x2F;Security (Encapsulation, tie it back to Chapter 2.) etc... </code></pre> Best coding resource I&#x27;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&#x2F;courses do it well.<p>References:<p>[1] <a href="http:&#x2F;&#x2F;nand2tetris.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;nand2tetris.org&#x2F;</a> [2] <a href="https:&#x2F;&#x2F;handmadehero.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;handmadehero.org&#x2F;</a> [3] <a href="http:&#x2F;&#x2F;natureofcode.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;natureofcode.com&#x2F;</a> [4] <a href="https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cs50.harvard.edu&#x2F;</a> [5] <a href="http:&#x2F;&#x2F;www.htdp.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.htdp.org&#x2F;</a>
评论 #15626535 未加载
评论 #15626704 未加载
评论 #15625264 未加载
评论 #15625647 未加载
评论 #15625469 未加载
评论 #15626590 未加载
评论 #15627135 未加载
评论 #15625142 未加载
评论 #15626143 未加载
评论 #15627450 未加载
评论 #15626402 未加载
lancebeetover 7 years ago
The &quot;in 24 hours&quot; part is of course just book title clickbait. I read Sams&#x27; C++ book and the 24 hours figure is making lots of assumptions such as general familiarity with programming, spending &gt;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&#x27;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.
评论 #15626625 未加载
spapas82over 7 years ago
I totally recommend Sam&#x27;s Teach Yourself C++ in 21 days by Jesse Liberty (I found it here <a href="http:&#x2F;&#x2F;101.lv&#x2F;learn&#x2F;C++&#x2F;" rel="nofollow">http:&#x2F;&#x2F;101.lv&#x2F;learn&#x2F;C++&#x2F;</a>). It&#x27;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&#x2F;late binding. The animal examples are excellent and I actually use them even today when I want to explain to somebody these concepts.
throwaway2016aover 7 years ago
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.
sirodohtover 7 years ago
This was one of the first books I read on C and programming I general! I remember I wasn&#x27;t happy at all with it, so I gave up on it a bit after the middle. It must be pretty old.
评论 #15624691 未加载
zappo2938over 7 years ago
I&#x27;ve been coding JavaScript and PHP for 6 years. I know the advanced topics of both languages. I&#x27;m in the office on a Saturday right now asking the question I&#x27;m always asking, &quot;Where does this go?&quot; I wish I knew the answer so I can go home -- the really important part of coding can&#x27;t be learned in a day, a month, 12 weeks at a bootcamp, or after 6 years.
vescheover 7 years ago
Looks to be a useful resource, but I hate the title. Why? <a href="http:&#x2F;&#x2F;www.norvig.com&#x2F;21-days.html" rel="nofollow">http:&#x2F;&#x2F;www.norvig.com&#x2F;21-days.html</a>
评论 #15626202 未加载
codewardenhover 7 years ago
Many here will rush to trot out the usual &quot;but, we should all be using { fashionable language of the day | Rust } instead of C&quot;. 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.
评论 #15626983 未加载
p4bl0over 7 years ago
I only opened the first chapter, but I certainly won&#x27;t recommend a book where things such as &quot;There are two types of programming languages: compiled language and interpreted language.&quot; are written.
评论 #15625927 未加载
评论 #15628179 未加载
评论 #15624590 未加载
rosenbusover 7 years ago
Unfortunately I only have 20 hours to learn C.
评论 #15624626 未加载
评论 #15624633 未加载
评论 #15624607 未加载
GnarfGnarfover 7 years ago
I leaned C from the Borland book that came with Turbo-C. A masterpiece of clarity and conciseness. I found K&amp;R too low-level. I don&#x27;t really want to know how they implemented strcpy().
评论 #15630669 未加载
cup-of-teaover 7 years ago
I would prefer that someone learnt it in a few weeks using K&amp;R followed by study of the comp.lang.c FAQ for more useful and some obscure parts of the language.
chmaynardover 7 years ago
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!
m3kw9over 7 years ago
I can yeah you C in 24 seconds, but how much you learn would be limited to 24 seconds of material