5 ms·
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 o
by fermienrico 9y ago
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/
- minikomi 9y agoI’d throw How To Design Programs (2) in there too.
- fermienrico 9y agoThanks. Edited and added links. If anyone else has suggestions, please reply as it is very hard to find these resources!
- 52-6F-62 9y agoThanks 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.
- fermienrico 9y agoNAND 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 https://www.youtube.com/watch?v=o4SGkB_8fFs
- 52-6F-62 9y agoI 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!
- akashakya 9y agoI think SICP also pretty good in this regard. Thankfully it's available online for free
- pfranz 9y ago(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.
- Sandman 9y agoAgreed. I especially enjoyed the lectures which are, fortunately, also freely available: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/ https://ocw.mit.edu/courses/electrical-engineering-and-compu...
- jm547ster 9y agoFound a hard copy (preowned) for $10, I’m psyched to get started.
- asciimo 9y agoThank you for the nand2tetris reference. This looks fantastic.
- hamandcheese 9y agoMany 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.”
- fermienrico 9y agoYes, 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.
- dwringer 9y agoThis 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?"
- ellius 9y agoI’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.
- austenallred 9y agoAlong 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.
- janekm 9y agoSounds 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.
- banana_giraffe 9y agoAlong 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.
- ineedasername 9y agoHonestly, 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.
- deleted 9y ago[deleted]
- mattfrommars 9y agoThanks 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.
- KGIII 9y agoThe 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.
- johnsonjo 9y agoIf 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.
- KGIII 9y agoThanks. 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.