Live data from Hacker News

Teaching how to code is broken

neil.computer

61–70 of 258 posts

Re: Teaching how to code is broken

#61
I still don't any see initial introduction to the art of problem decomposition.

We want to do X ... what are the parts of X? How might we accomplish them? For each of them, what are their parts? How do we take a complex task and break into pieces that we know how to do and then compose them back together to meet the goal? What kinds of decomposition can we do? What kinds of decomposition work well?

Until you understand this high-level sense of what you're trying to, type list container map iterate immutable functional lambda coroutines are just noise.

Re: Teaching how to code is broken

#63

Tutorials do exist for absolute beginners. Seems like the author is implying they rarely exist which is incorrect. "Hello world" is a tutorial/real world example. I learnt the how to code through the "Ruby on Rails Tutorial" by Michael Hartl. The tutorial market is different than the computer science 101 crowd, so you have tutorials for one, textbooks for the other. The issue with using tutorials in textbooks is that…

I was going to make a comment very similar to yours- there's been plenty of programming 101 books, though maybe more so in previous decades starting in the '90s, which has the author present a project or a series of projects and each chapter involves building out the project while introducing concepts. While those books tend to be about teaching how to use a specific framework, SDK, or language rather than programming in general, that project-based method of pedagogy is common.

What's annoying about those books is that sometimes you don't care to go through the entire project, you just want to jump to a specific topic, but you're forced be part of a continuous narrative. Though in modern times where every technical book has a corresponding repository somewhere with code samples, you can at least use that code rather than starting chapter one.

Whether you want to learn from how-to projects, or from abstract first principles, there's resources out there for both. Teaching how to code is not broken at all. Maybe teaching data structures and algorithms could use more work- but that's the subject for a different article.

Re: Teaching how to code is broken

#65
IMHO it should start with some tools, so that changing the code is not too cumbersome. How git works, how the IDE works, how some basic OS commands work. Everyone starts with a different base but often it's the people who messed around with a computer a lot who know some shortcuts that to most coders are obvious.

The less pain you have with changing the code, the more code you can try.

Re: Teaching how to code is broken

#66
post #25

Earlier quoted context omitted.

This is unironically a good idea. The main stumbling block isn't programming per se, it's breaking down a conceptual, informal idea of what you have to do in a formal language. It matters very little whether it's linear programs, ASM instructions, LISP forms or C++ classes.

On the other hand, our University course started with half-baked explanation of what "public static void main" means (Java entry point) on the first day. It was horrible and no one understand anything until a few classes later we go to the meat of making/building stuff.

Yeah, I probably already commented on this some time ago, but I think Java is really, really bad as a teaching language. The language itself is just fine and much better than most people give it credit for, if you are a professional developer. As a teaching language is full of cerimony and it forces upon you an object model that you can't fully understand until much later. It's too much "in the weeds", if that makes sense.

Re: Teaching how to code is broken

#67
post #17

I have always struggled with how to advise my friends & family on this path of learning. It seems like everyone wants to be a WFH developer these days, but I don't know how to enable them to succeed on that path. "Go build something you want to build!" is something I keep reiterating (as does this article). But most don't seem to be interested in that for whatever reason (presumably because its fucking hard). Maybe I…

> I have always struggled with how to advise my friends & family on this path of learning. It seems like everyone wants to be a WFH developer these days, but I don't know how to enable them to succeed on that path.

The best advice is to get a proper CS or Engineering degree honnestly.

Re: Teaching how to code is broken

#68

(Disclosure: I do corporate training (Python and Data Science) for a living.) I generally don't teach coding to newbies, so a lot of the coding I teach is correcting poor mental models and teaching features (somewhat) unique (or different) in Python. My best Pandas courses have been when the client opts to use their data for the course (instead of my canned data). The students are already subject matter experts with…

Having a good mental model of a language seems like one of the fastest ways to be more productive in that language. Do you have any recommended resources for developing a strong mental model of python? For reference, Dan Abramov’s course JustJavascript [1] provides an amazing mental model of JavaScript, and Josh Comeau’s css for js developers [2] course provides an amazing model for understanding css. I have 5+ years…

Have you tried Fluent Python? It really helped to level up my knowledge of the language.

Re: Teaching how to code is broken

#69
personally i've always thought the best way to teach is with already working code. given a reference (the internet will do these days), some well written working code with examples of all constructs and idioms in it for a lesson, and possibly a sequence of prompts to change what it does with increasing difficulty, seems the best way.

most importantly, it must do something that the learner at least has some remote interest in and for best results the activity should be creative and constructive.

Re: Teaching how to code is broken

#70
post #36

Earlier quoted context omitted.

I always thought the best way to learn programming is to find a program you want to create, and then figure out how to make that happen. This is still how i learn (most effectively) today. If i want to learn a new language or something, i write something that i always wanted to write in it anyways. That way it doesn't get boring. I think what you're describing might be similar in that canned-data is not interesting.

Yes, learning is much easier if you have motivation. How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)?

> How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)?

Do such kids need to start with regular programming languages? Wouldn't visual languages be a simpler starting point for them to get motivated?

Post reply on HN