2
$\begingroup$

I'm not a CS teacher, but I answer lots of questions from novices on StackOverflow, so I often feel like one. And of course we see lots of repeats of the same beginner mistakes (e.g. initializing a variable that's supposed to accumulate results each time through a loop rather than before the loop). I wish I understood why these happen, what's going through their minds when they write this and why the correct solution isn't obvious to them. It's not really about the teaching process, but I expect that teachers who work closely with students would have some insight (I've occasionally tried asking the person who posted the question, they can never explain their thinking, it's always "I'm a beginner, I don't know what I'm doing.").

So would a question about that, just to learn something from experienced educators, be acceptable at the main site?

I've posted my sample question in the Sandbox

$\endgroup$
  • $\begingroup$ Usually they are. We often refer to them as cognitive traps. $\endgroup$ – Ben I. Jul 5 '18 at 20:59
  • $\begingroup$ When I was in school I often unwittingly came up with new kinds of mistakes. No one had any empathy for me, I just seemed like a freak. $\endgroup$ – Scott Rowe Jul 6 '18 at 22:21
  • $\begingroup$ @ScottRowe I would love it if these posters would come up with new mistakes. But they're always just the same old ones. $\endgroup$ – Barmar Jul 6 '18 at 22:27
  • $\begingroup$ Maybe we should create a language that makes those kinds of mistakes impossible? Like how Lego snaps together: most configurations just can't happen. I used to create DSLs and simple languages for projects, it eliminated vast categories of errors, allowing only things people might want. Of course, to do that, you need to determine what people might want. It is the difference between giving someone a bunch of those word-magnets, and giving them a pencil and paper. Most computer stuff is outrageously too complicated and powerful for our needs. "Never give a sword to a man who can't dance." $\endgroup$ – Scott Rowe Jul 7 '18 at 12:50
  • $\begingroup$ @ScottRowe The problem is that if you use a tool that limits what you can do, you're limited in what you can create with it. You can't create a Starship Enterprise if you buy the Lego Millenium Falcon kit. The value of real programming languages is their flexibility, but that comes with complexity. There are services like wix.com that provide templates for common website functions, but if you need something they don't provide you have to learn to program. $\endgroup$ – Barmar Jul 7 '18 at 15:33
  • $\begingroup$ Very few people need a Starship Enterprise, and a vastly smaller number could design one. All children need to play. Putting an arc welder in front of a child is not a good plan though, and will probably not result naturally in a master welder being developed. Even with good training, few people learn to weld well, no matter how many you teach. Why do we think that everyone is equally capable at everything? This is a very damaging idea. People need to figure out what they can be best at, not what is in demand or pays the best. $\endgroup$ – Scott Rowe Jul 7 '18 at 15:59
  • $\begingroup$ @ScottRowe That's the root problem: everyone thinks they should program their website themselves. They wouldn't try to do their own building wiring, they hire an electrician (there are building codes prohibiting it). $\endgroup$ – Barmar Jul 7 '18 at 16:06
  • $\begingroup$ Right. How many people know beans about car maintenance, even though we all drive them? How many know a single thing about electronics and radio, even though we all rely totally on them for everything, including food? These are old, well integrated technologies. Not one person says that they are 'literacy' despite being even more vital to our individual and collective survival than reading. If computer stuff is in any way Engineering, that by definition means: specialist field requiring lots of education. Having a computer makes me a programmer like having a car makes me a race driver. $\endgroup$ – Scott Rowe Jul 8 '18 at 13:08
1
$\begingroup$

Your question would depend on how it is stated. We like to teach students to program correctly, which implies avoiding such errors. Questions that explore how to teach such skills would certainly be welcome.

Likewise, questions that get at how to teach students to avoid repeating mistakes would be welcome.

However, questions about human psychology that leads most people to repeat errors starts to get near the edge of the charter here.

However, We also have a Sandbox "question" in this meta in which you can post any question at all. It will show up in our chat room and likely generate discussion there. The idea is that you can then use the discussion to improve your question before posting it to the main question page.

Add your question as an "answer" here:The Question Sandbox

$\endgroup$
  • $\begingroup$ It's not about repeating errors, it's about why so many different programmers make the same errors. I also suspect that many of these programmers are self-taught, so the question isn't about how to teach them better. $\endgroup$ – Barmar Jul 5 '18 at 16:45
  • $\begingroup$ But I'll give the sandbox a try, thanks for the pointer. $\endgroup$ – Barmar Jul 5 '18 at 16:46
  • $\begingroup$ My guess is that so many new programmers independently make the same mistakes for the same reason that so many new bakers ruin souffles, or so many pitchers throw the ball wildly: because mistakes are far more numerous than ways to succeed, and Babe Ruth struck out far more times than he got on base. Because to err is human, perhaps most of the definition. I don't think that we can educate away basic errors. $\endgroup$ – Scott Rowe Aug 6 '18 at 23:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .