Live data from Hacker News

Teaching how to code is broken

neil.computer

41–50 of 258 posts

Re: Teaching how to code is broken

#41
post #23
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've attempted to teach multiple family members/friends over the years "how to code", and they give up almost immediately. They "just don't get it", and I'd argue one needs to seriously find enjoyment in building things, and knowing how long things can take, to get started.

> one needs to seriously find enjoyment in building things

I would say you have to also be happy with/enjoy confusion and frustration.

Re: Teaching how to code is broken

#42

(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 programming in python but admittedly do not know much about the internals so my mental model is pretty weak!

[1]: https://justjavascript.com/ [2]: https://css-for-js.dev/

Re: Teaching how to code is broken

#43

Teaching everyone the same way is wrong. Everyone has different learning styles, education and life experience. If there is a large enough market share for a topic grouping like learners together can be very efficient. Creating a one sized fits most solution is the default setting for many educators and yields an "okay" result. Allowing learning at your own pace, with community support and many styles of consumable c…

"Everyone has different learning styles" is a common misconception.

Re: Teaching how to code is broken

#44
I've been thinking about this topic for a long time. I was a secondary math and science teacher for 25 years, and I taught intro programming classes whenever I could. Later I wrote Python Crash Course, which was largely informed by my experiences working with students - my direct classroom teaching, and my attempts to find resources for students who were capable of independent learning. I've looked critically at many learning resources over the years.

I certainly agree with the author's main point. Giving people a series of dry lectures or chapters that focus on syntax, without any intentional narrative about what it all means or why we should learn it is not particularly effective.

I'll make a brief comparison to the math materials I've reviewed for secondary education. There are many curriculum resources that are really well structured mathematically - all the math is correct, and each new topic builds on previous topics coherently, and leads somewhere specific in the end. But most of these kinds of resources are fairly dry to students who are not intrinsically motivated to learn math. Then there are many resources that present things in a fun or interesting way, but lack a coherent structure to the math that's presented. These are better at catching students' interest, but they still don't bring students to a place where they understand math well enough to use it effectively in their own lives. There are few curriculum resources that truly do a good job of hitting both of these goals - well structured mathematically, and with compelling topics. It's difficult because the people creating the resources need a really strong pedagogical background and a really strong mathematical background. People often tend to focus on one or the other of these areas.

I see the same issue in how learning resources are developed for programming. There are probably thousands of books that have a table of contents similar to what the author presents here, without a coherent narrative to motivate people through all those topics. Many of these books are technically sound, but they don't carry people through all the topics because there's too little tying all the topics together. Then there are a whole bunch of resources that use a specific compelling topic to grab people's attention; the author uses the example of card games. There are a couple limitations here: if you pick an interesting context, you only appeal to the people who like that subject. Also, you then have to stretch the context to cover concepts that aren't specifically needed for that context. That is, building a card game project brings up many topics and ties them together. But what do you do with important topics that weren't needed? Do you leave them out? Do you present them separately? Do you force them into the context?

One of my big frustrations with learning resources, especially k-12, is that they do a great job of grabbing kids' attention. We've kind of solved that problem - young people are plenty interested in learning to code. But to really gain the ability to build out your own ideas, you need to work through the list of topics that the author of this article presents.

What's the conclusion? There's no one way to teach people to code. We need a variety of resources that address all of these issues in ways that meet the needs of a variety of learners. People who are designing these resources, whether they're developing a book, video course, online tutorial, etc, need to think through these issues and have a clear and intentional approach to how their resource is structured.

Re: Teaching how to code is broken

#45
post #36

(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…

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)?

Re: Teaching how to code is broken

#46

Teaching everyone the same way is wrong. Everyone has different learning styles, education and life experience. If there is a large enough market share for a topic grouping like learners together can be very efficient. Creating a one sized fits most solution is the default setting for many educators and yields an "okay" result. Allowing learning at your own pace, with community support and many styles of consumable c…

"Everyone has different learning styles" is a common misconception.

> "Everyone has different learning styles" is a common misconception

The myth of different sensory orientations to learning is definitely, well, a myth; it is probably not justified to go beyond that and say everyone learns best with the same pacing and other details of approach.

Re: Teaching how to code is broken

#47

(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…

Any teaching, training, has to hook with the experience of students. Otherwise, it will lead to cramming, etc; that's what we see in grade-driven teaching. You are doing a great service by using the client data to solve "mini-problems" of your students.

Re: Teaching how to code is broken

#48
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 it's more effective to use 1 great example per chapter, than shoe-horn 1 monolitic project as an example for 13 chapters. And the three CS 101 books I've read do have good examples or interesting problems to solve. If I remember correctly the Harvard 101 book does use cards for objects.

One problem that the Ruby on Rails tutorial has as a CS 101 book is that there is so much boiler-plate stuff needed to have a functioning monolithic example. To do "hello world", need Database -> Code -> Template... when you can do: print("hello world"), then move on to next chapter.

The article is much-ado about nothing.

Re: Teaching how to code is broken

#49

Teaching everyone the same way is wrong. Everyone has different learning styles, education and life experience. If there is a large enough market share for a topic grouping like learners together can be very efficient. Creating a one sized fits most solution is the default setting for many educators and yields an "okay" result. Allowing learning at your own pace, with community support and many styles of consumable c…

I thought "learning styles" were largely debunked as a myth now?

The linked article describes the structure of a reference book, identifies it as a structure suitable for a reference and those with significant experience, and then decries it as a tutorial for newbies. It seems rather obvious - I wouldn't try learning a new language by reading a dictionary either. It doesn't support the hyperbole in the title. There are many good tutorials for learning to code in different programming languages, sometimes it's hard to pick them out though.

What works for me, and pretty much everybody I've watched try to learn anything, is a simple loop. Conceptual explanations (whether written, verbal, or visual), applying the concepts with exercises / practice / work with examples to follow, digging into the details using a reference, and then broadening to the next set of concepts. Eventually the pattern recognition kicks in and people can see the connections and predict the rest.

Re: Teaching how to code is broken

#50
post #13
post #5

I have opinions™, but mostly agree with this article. Most intro coding classes and course materials read more like a glossary than a lesson. This contributes (rather directly) to the failure to retain a diverse student base in intro CS program. We've gotten a lot better at recruiting CS students from underrepresented groups (women and BIPOC chiefly), but numbers drop off quickly[1]. Studies in math education have sh…

This comment covered several hot topics. 1. Girls in STEM: society needs to quit telling people "math is hard, tee hee" and quit shopping in the Pink Aisle at the toy store and reinforcing that culture. Buy your kids Lego and Raspberry Pi circuit kits and see what happens. 2. CS is part coding, part science of algorithms, and part software engineering. We have to quit intertwingling all terms into the catchall "CS" b…

RE: 2: I think I agree. There are lots of "CS" programs targeted towards high-school students which I have mixed feelings about. The goal shouldn't be to turn every student that walks through the door into a SWE (there's somewhat of a conflict of interest here considering most programs are sponsored by big tech companies who are desperate for talent – Microsoft does a lot in this space). Instead, I think it should serve a few roles: expose students to new opportunities (learn if you do want to be a SWE); give students the skills to understand that computers and algorithms are not magic (important from a public awareness perspective); and also to teach enough "deep" technical skills to prepare them for a world dominated by software (e.g., learning how to query databases, write small automations, etc.).

But I think most important is that intro courses need to serve as jumping off points (i.e., they should be INTRO courses). Give students a taste and let them decide if they like it and want to take another bite.

Post reply on HN