News for hackers. Stuff that matters.
Re:Teach Yourself C in 24 Hours (1997) by fermienrico on Saturday November 04, 2017 @09:57AM (#15625017)
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) by austenallred on Saturday November 04, 2017 @03:38PM (#15626535)
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) by janekm on Saturday November 04, 2017 @07:15PM (#15627338)
Sounds like that must have been the inspiration for Swift Playground for iPad, which is also a great teaching resource though aimed at kids. It uses the very same turnRight example.
Re:Teach Yourself C in 24 Hours (1997) by ineedasername on Saturday November 04, 2017 @04:18PM (#15626704)
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) by 52-6F-62 on Saturday November 04, 2017 @10:53AM (#15625264)
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) by fermienrico on Saturday November 04, 2017 @11:11AM (#15625364)
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

Re:Teach Yourself C in 24 Hours (1997) by 52-6F-62 on Saturday November 04, 2017 @06:23PM (#15627190)
I wasn't discounting your suggestions -- don't get me wrong. They're absolutely great for somebody wanting to do a deep dive. They're not a fast introduction to writing your first program, though. The logic required to understand high-level programming can be taught without diving that deeply. If somebody needed to write some simple math functions (and theoretically for whatever crazy reason wanted to write the programs in C), they would be able to learn to do so without such a deep dive into first principles. For real understanding, the courses are an incredible resource, especially for free!
Re:Teach Yourself C in 24 Hours (1997) by hamandcheese on Saturday November 04, 2017 @12:08PM (#15625647)
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.”

Re:Teach Yourself C in 24 Hours (1997) by dwringer on Saturday November 04, 2017 @04:31PM (#15626765)
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) by fermienrico on Saturday November 04, 2017 @01:07PM (#15625911)
Yes, that's another problem with programming books and courses. Literally, few books talk about intermediate/advanced topics, whereas, these reference/glossary type books popup every week on Amazon.
Re:Teach Yourself C in 24 Hours (1997) by akashakya on Saturday November 04, 2017 @11:32AM (#15625469)
I think SICP also pretty good in this regard. Thankfully it's available online for free
Re:Teach Yourself C in 24 Hours (1997) by Sandman on Saturday November 04, 2017 @04:03PM (#15626633)
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) by pfranz on Saturday November 04, 2017 @02:11PM (#15626186)
(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.

Re:Teach Yourself C in 24 Hours (1997) by jm547ster on Saturday November 04, 2017 @06:39PM (#15627239)
Excuse my ignorance, what is HtDP?
Re:Teach Yourself C in 24 Hours (1997) by grzm on Saturday November 04, 2017 @06:50PM (#15627272)
"How to Design Programs"

http://www.htdp.org

Re:Teach Yourself C in 24 Hours (1997) by jm547ster on Saturday November 04, 2017 @06:41PM (#15627242)
Found a hard copy (preowned) for $10, I’m psyched to get started.
Re:Teach Yourself C in 24 Hours (1997) by banana_giraffe on Saturday November 04, 2017 @03:54PM (#15626590)
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) by mattfrommars on Saturday November 04, 2017 @06:02PM (#15627135)
Thanks for the resource. I'm studying programming at a university and I just feel they are teaching everything very high level. The video on the website of nand2Tetris was very fascinating. From the coding courses I've done on and off, I thought the chain ended at "Assembly Language" but in reality, the rabbit hole goes deeper! The book is available in my library and going to grab it now!

I found the Harvard CS50 really, flashy and fluff. Didn't enjoy it. I took an alternate to it, Introduction to Computer Science using Python on Edx.

Re:Teach Yourself C in 24 Hours (1997) by minikomi on Saturday November 04, 2017 @10:29AM (#15625142)
I’d throw How To Design Programs (2) in there too.
Re:Teach Yourself C in 24 Hours (1997) by fermienrico on Saturday November 04, 2017 @10:36AM (#15625174)
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) by ellius on Saturday November 04, 2017 @02:01PM (#15626143)
I’m self taught, and I would have killed to have had resources like that in early days. I always got glimpses of what I wanted to understand, but it seemed like a lot of technique and very little “why” much of the time.
Re:Teach Yourself C in 24 Hours (1997) by KGIII on Saturday November 04, 2017 @07:53PM (#15627450)
The Art of Computer Programming.

I have a boxed set sitting on my shelf, I'm told it is worth reading but I can't seem to find the time and motivation.

Re:Teach Yourself C in 24 Hours (1997) by johnsonjo on Sunday November 05, 2017 @01:14AM (#15628254)
If you want a book to help get you started with TAOCP I've heard Concrete Mathematics is good. It's the math precursor to TAOCP (so if that's what's holding you back it could be helpful.) I haven't finished concrete mathematics yet though either :P so I can't tell you if it actually helps reading TAOCP. I would recommend knowing calculus, linear algebra, and discrete math before concrete mathematics. MIT OpenCourseware should have all those courses with Mathematics for Computer Scientists working as the Discrete Mathematics supplement.

I've never taken linear algebra so that is what is holding me back right now from continuing concrete mathematics. I bought Gilbert Strangs Linear Algebra book and it seems good so far, but I am busy with schoolwork now so I'll have to get back to it after I graduate in a spring.

Re:Teach Yourself C in 24 Hours (1997) by KGIII on Sunday November 05, 2017 @11:32AM (#15630112)
Thanks. I actually have a Ph.D. in mathematics. It's just that I dislike programming. I've done it, I don't like it. When I started using computers, knowing how to program was close to mandatory.
Re:Teach Yourself C in 24 Hours (1997) by asciimo on Saturday November 04, 2017 @03:06PM (#15626402)
Thank you for the nand2tetris reference. This looks fantastic.