Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How to teach basic programming
7 points by ejanus on Oct 1, 2016 | hide | past | favorite | 6 comments
I would be teaching junior craft school basic programming. My students have good knowledge of discrete electronics components like transistors, diodes, and others. I see this as a great advantage. But they have not been exposed to programming in any form. I would be working as a volunteer and my intention is to introduce them to basic structure of programming without spending too much time on any particular language idioms. I would run them through Javascript and Python. And I also have in mind to introduce them to Arduino ecosystem towards the end of the program . So, my question is how best could I introduce basic concepts like function, statements and expressions without leaning too much on any particular language ? What would be ideal programming assignments? Should I build web pages for them?


What's "junior craft school"? What age group are we talking about?

In teaching programming, I've found that often the hardest thing to learn is how to break down problems logically, not how to write code. For example, if I assign students to write a function that takes an average (mean) of a series of numbers, very few will fail because of syntax errors. Many more will fail because they've never thought about how to take an average!

Therefore, my latest thinking is that the first few programming lessons should be about basic mathematical problem solving. How to compute an average. How to estimate a square root. That sort of thing in a "math" class is assumed given. To a mathematician, the square root of two is "the square root of two" and no computation is necessary. I want to convey to my students that computers have to be taught a process, not an answer.

I'll find out next semester if that's a better approach. I hope you find it helpful or at least interesting.


Thanks so much! My target students should be between 11 and 14 years. I will try out Maths option you mentioned. Frankly speaking I faced the same problem when I started programming.


I taught Processing (a Java library w/ its own IDE) to some middle- and high-school students for a week, and everyone had lots of fun from day one. It is extremely visual and has lots of great documentation + easy examples online. All I did was show them the basics, then every now and then went up to the board to introduce a new fun thing. We had some really, really great final projects. Everything from intricate interactive/animated scenes to complete games.

Something else I loved was that many students got to apply their math knowledge naturally and in a fun way, e.g. shooting bullets at angles, rotating turrets, following parabolic paths, and even a ray caster. (As an added bonus, Processing uses a very similar IDE to Arduino.)

I happened to teach another group of kids Arduino, which was fun but frustrating to some. Our final project of the week was very complicated, and only a few students finished it. I also unfortunately had many students fry parts and boards, which was frustrating when I gave so many reminders how to avoid it. (Though, young students are not exactly careful about double-checking their wiring.)

My recommendation to you for middle schoolers (ages 11-14) is to use Lego Mindstorms. Largely, the middle schoolers in my class were not patient/meticulous enough yet to effectively wire, write software, and most importantly debug when something goes wrong. (After all, it could be the software, wiring, OR a bad part.)


Thanks. I will Lego mindstorms and Processing.


Maybe get them started with Rasbperry Pi? https://www.raspberrypi.org/resources/ You can teach them Python with it and even make projects using the components they're familiar with along with Python, and display the results on a webpage?


Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: