Live data from Hacker News

Teaching how to code is broken

neil.computer

51–60 of 258 posts

Re: Teaching how to code is broken

#51
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 never met a programmer I respected skill-wise that wouldn't randomly spend a weekend locked in a room solving an esoteric problem they felt they had to solve (for no reason). Over the Christmas holidays everyone at my company writes PoCs or hobby projects, being glad to have some free time away from paid programming in order to enjoy recreational programming.

What I'm trying to get at is software engineering is an easy career if you're literally obsessed with it, and most software engineers are, or at least were at some point (it goes in cycles).

If you're not gonna do that, you simply can't assimilate the huge amount of knowledge needed to truly excel in even one facet of programming.

Re: Teaching how to code is broken

#52

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

One way I've found is to dig into C/C++ extensions to Python. The Python C API reference is very helpful: https://docs.python.org/3/c-api/index.html

It can be quite fun to implement a simple data structure (tree, queue, etc.). in C and bind it to Python.

Otherwise, you can get a lot of dirty details by reading the source to complicated/magical libraries (e.g. pickle).

Re: Teaching how to code is broken

#54
I agree there are so many issues with coding education, (full disclosure, that's why I'm building Qvault.io) but I don't think the big problems are the ones presented here.

I see the following as the biggest unsolved problems:

1. Online learning rarely teaches you what you should be learning. Resources are useless if you don't know which subject matter is right for you yet. 2. Platforms don't give you a feel for "completion", e g. when and how should I start job searching. 3. You don't get personal mentorship or cohort support like you would at school 4. Too many videos, not enough code. Almost all learning when it comes to coding should include writing code. 5. Healthy mix of guided and unguided learning. Courses are great for abstract concepts, projects need to follow so that you can apply what you learn on your own

Re: Teaching how to code is broken

#55
Exactly this! To quote myself from a couple of years ago:

I wish the style of teaching complex programming topics walked me through the pain of making something work, exploring a few alternative solutions, showing the tradeoffs, and then after the pain has been experienced by the learner, a proper solution is finally introduced and recommended. IMO it's a much more powerful technique for teaching if you walk the learner through the pains first, then arrive at a solution, and tell them that "you've just [discovered how ownership works in rust]"; i.e. the concept is given a name at the _very end_, not defined at the beginning as a solution to a pain the learner never experienced. Unfortunately very few books/tutorials take this approach.

Re: Teaching how to code is broken

#56
I feel like the average person already knows why. They know what they want and they just want the info on how to do it.

I don’t think the order of teaching presented in the article as bad actually is bad. What I think the problem I and others had is learning from a book to start with is really hard. Stuff doesn’t get retained well or make sense.

Programming finally clicked for me when I did the codeacademy class for JavaScript in 2012. What helped was it wasn’t just shoving walls or text at me. It was “here is a very tiny concept, go try it. Now here is another tiny concept, try this”

Re: Teaching how to code is broken

#57
Interestingly related to the author's point of teaching using cards.

When I used to give coding interviews one of my favorite tasks was to implement the scoring rules of poker[1]. People would often ask "why ask them about poker?" and I'd show them that there is a ton of skill coverage

1. Decomposition of requirements into sub problems

2. pattern matching for code reuse and composition

3. seeing if they can come up with a decent algorithm to communicate to and from sub functions the results

4. seeing if they can come up with an ordering mechanism for cards

5. seeing if they can come up with a for loop that counts if there are 5 of something

6. String parsing to their own intermediate representation of cards

All these skills are used basically daily (at least in my workplace)

[1]: a good description of the rules, sample IOs, and myself as an oracle (ask me anything, no expectation of knowing poker itself) served to help keep "poker" from being the subject matter tested

Re: Teaching how to code is broken

#58
I don't know of any of my peers that took a course that heavily relied on a textbook; it feels like most university intro CS courses spend most of the time commitment in lectures and problem sets. I think many would agree that you learn the most doing homework.

It's been common for a decade now to recommend beginners on the internet looking for an intro to CS the course Harvard CS50. The course has attracted criticism for be overwhelming for a single semester, as it requires submitting assignments in Scratch, C, Python, SQL, and HTML/JS. However, I think it, like other well-acclaimed intro to CS courses do teach problem solving in via hand-held labs and problem sets. Perhaps its prevalence suggests the course is influential in the way CS is taught, but outside of Yale copying the course, I'm not sure.

I think the problem sets in CS 50 are effective for teaching problem solving. Looking at examples of problem sets for the most recent semester (I did the Fall 2012, so it's changed a bit) there is...

- making an animation or game in Scratch which must have have a loop, condition, and variable - printing pyramids of # characters - caesar encryption - ballot counting - implementing bitmap image filters - a spell checker - writing SQL queries against a database of movies - writing the frontend of a website - writing a basic full-stack web app

I guess the main difference between the course and the post's proposal is that it doesn't follow a single narrative, so when you apply concepts in your head is only after the first introduction.

Looking on other resources I encountered at Georgia Tech, I remember both the intro to CS class I saw others take and the cool, interactive intro to CS textbook Mark Guzdial showed my class How to Think Like a Computer Scientist [1]. They both start with python turtle graphics towards the beginning to teach variables and loops before venturing off into other concepts. I think the first half of Automate the Boring stuff with Python actually faces the issues the author cites before diving into common applications in the second half; I do wonder now many working professionals learned from this text which I've generally liked at a glance. I suppose the most influential intro to CS materials are for AP CS A, although I'm not familiar with the course.

[1] https://runestone.academy/ns/books/published//thinkcspy/inde...

Re: Teaching how to code is broken

#59
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 is especially important in CS especially when boys are encouraged from a young age to do "techy" and "geeky" things in ways that girls usually aren't.

Just be aware that this is not everyones experience.

Many places boys are held back and girls are pushed forward.

And then afterwards boys gets told they are somehow "privileged" and would never be were they are if it wasn't for "male privilege".

Obviously this goes both ways, but there is at least some focus on it when it hurts girls.

If you try to mention the problems young innocent boys have, be prepared to get laughed out.

(I'm halfway expecting that even on HN too.)

Re: Teaching how to code is broken

#60
This reminds me of when I took Java in college. One of the prerequisites was Introduction to Computer Programming 1 & 2 (101 and 102).

1 was along the lines of what was on the top of this article: Chapter 1: Types Chapter 2: Variables Chapter 3: Operators/Math Chapter 4: Control structures Chapter 5: Arrays Chapter 6: Functions Chapter 7: Structs Chapter 8: Classes and Objects Chapter 9: Methods Chapter 10: Inheritance and Polymorphism

And 2 was algorithms (sorts, etc)

Then the Java class was: Chapter 1: Types Chapter 2: Variables Chapter 3: Operators/Math Chapter 4: Control structures Chapter 5: Arrays Chapter 6: Functions Chapter 7: Structs Chapter 8: Classes and Objects Chapter 9: Methods Chapter 10: Inheritance and Polymorphism

But not much about what you can do in Java specifically.

I understand going over these concepts briefly and how to do them specifically in that class, but to have the whole class focus on them was not very useful. Again, 101 was a PREREQUISITE! So there shouldn't be anyone in the class who hasn't taken it!

Post reply on HN