Hacker News new | ask | show | jobs
by wes-exp 3851 days ago
The ill-conceived notion that parents giving children procedural instructions is somehow like programming brings me to a question for you as a teacher.

I've noticed that the industry really prides itself on algorithms and this is commonly reflected in interviews.

However, it seems to me that merely discussing algorithms, however clever they might be, is actually an intuitive human activity not unlike the example of the parent verbalizing procedural instructions to their child. Therefore, I would argue that algorithm design, though clearly an intellectual challenge in its own right, does not target the essential part that makes programming hard and inaccessible to so many people. (Disclaimer: a high-level algorithm discussion is usually followed by whiteboard coding, which I'm ignoring in this critique as a separate kind of activity).

Do you agree with this claim that algorithm design is not actually the thing that makes programming so difficult for laypeople? Can you give your take on what does make programming hard or what students struggle with the most?

1 comments

I think algorithm design is hard. Most students/people can't break down a problem into small enough steps for the computer to do them.

Are you familiar with the concept of "chunking" in memory research? Well, computers don't chunk but humans do. Humans tend to think about their algorithms in terms of the chunks they already know, but for computers sometimes each chunk has to be broken down into much smaller sub-steps.

And that's non-intuitive and hard. When explaining stuff to a human you get immediate non-verbal or sometimes verbal feedback if they don't understand the chunks, but computers just give a syntax error.

SECONDLY. Students have trouble making an accurate mental model of what the computer is doing at each step, so they can't trace through the code, much less create new code.

Those are the two biggies, in my experience.

It sounds like what you're describing is not figuring out at a high level what to do, but formalizing that into low-level instructions for a computer. This goes exactly to my point. What I meant by "algorithm design" is strategy selection, which I want to be careful to separate from strategy formalization for a computer. It is the latter that I think laypeople struggle with the most, however, the fascination with algorithms often drives attention to the former. For example, it's easy to be impressed by the cleverness of binary search, but it's actually relatively straightforward to understand as a high-level concept. The harder thing for a layperson is to formalize binary search into a working set of computer steps. I think there is a certain cognitive bias at play, where the formality of fine detail seems lowly and menial, so we want to skip over it, in spite of the fact that it's actually the biggest hurdle for most people to overcome.