Live data from Hacker News

Ask HN: How to Teach Coding?

news.ycombinator.com

71–80 of 126 posts

Re: Ask HN: How to Teach Coding?

#71

I try to get people to understand that coding is writing logic. That is actually two separate skills: writing and logic. Many people want programming to be something that it isn't, possibly something glorified by games or media. That said you can generally detect potentially great future programmers without talking about any code or coding experience. When teaching people to write code I try to get them to practice t…

1000% this. Just because LEGO pieces fit together doesn’t mean they take the form of a cohesive argument. It’s actually concerning to me that there is too much focus on practical coding skills in e.g. high school, to the detriment of essay-writing and critical thinking in non-technical domains. The “five paragraph essay” is actually fantastic preparation for “defensive coding” - if you can write good counterarguments, you can write error handling code.

Re: Ask HN: How to Teach Coding?

#72

Yes! I've found the most valuable thing is often good, uncluttered examples. Docs are often focused entirely on the API's but don't have enough to show you how to use them, and Google/SO can be a rabbit hole of examples that are overcomplicated or misleading. "Try something like this" (with comments) goes a long way. So much of being a beginner is not having been exposed to patterns and techniques. They need to fill…

Wow, thanks for your answer.

Point 3 is something I haven't thought of yet. During reviews I pointed on some issues, not every. But that was never something I had a specific reason for, I was just focused on what we want to learn in this lesson.

I will keep that even more in mind now.

Re: Ask HN: How to Teach Coding?

#73
The lessons should be straight forward tutorials that builds something relatively functional. This builds practical knowledge of capabilities and motivation. Then you teach theory to some of the basics as the practical knowledge grows. Then more complicated abstract theory as they progress.

As a teacher, you minimize roadblock time. Not eliminate, minimize. Let a student flop around like a fish to debug for a while and before they suffocate, you point out the problem. Also, answer questions or provide different strategies with their pros and cons.

If I can teach a crayon munching marine to dev this way, I’m pretty sure 99% of the human population that wants to dev can learn that way too.

Re: Ask HN: How to Teach Coding?

#74
Three years is a long time. I've taught bootcamps where I had to do it in 4, 6 or 12 weeks. Three years is luxurious.

Here are my initial thoughts:

- For a timeframe this long it's less "let me teach you" but more "let me guide you in your own learning." If you view this as only imparting knowledge I think you will burn yourself out.

- I would help them formulate a curriculum, keep them on track and make them push themselves. Anyone can learn a lot in three years, but with your guidance they hopefully learn 2x, 3x, 5x or even 10x what they would have learned alone. Ask yourself this every time you check in with them "How can I speed them up? What can I teach them now that will save them time?"

- I would periodically check in and asses what's been learned and what's left to learn. I would also reassess if the curriculum is working or needs tweaking. I would be open to changing things up periodically. Maybe one year is project based work, maybe another focuses on reading classic texts. Three years is a long time to do one thing.

This sounds really fun, good luck and have fun!

Re: Ask HN: How to Teach Coding?

#75

How much experience does your PFY (trainee) have ? and are they doing an Aprentiship?

Yeah, it is a 3 years apprenticeship.

He already has some knowledge because he visited an IT focused school here in Germany and his father is a coder too.

So I don't need to explain loops, or if statements and can go a bit further in logic and processes

Re: Ask HN: How to Teach Coding?

#76

1. Tell them what to do but do not tell them how to do it. (Just give a few pointers otherwise they'll be lost.) 2. Give them a playground to fail - Offload any non-business critical tasks and let them make mistakes. No one I know ever learnt programming without making any mistakes. Immediately tell them about best practices and how to avoid such mistakes in future. 3. Show them the impact of their work - There's not…

I have never liked the “make a sandwich” task. It sets people up for failure, because the teacher can always take things literally enough to make the student wrong. (For example, when given the instructions: "Take out two slices of bread", the teacher can rip open the side of the plastic bag rather than use the opening.) Some students end up with the feeling of “If I can’t even explain how to make a sandwich, how will I ever be able to tell a computer to do anything?”

Here’s an exercise (not sure where I discovered it) that I use at the community college level: https://www.youtube.com/watch?v=meSK1rn2VbA It has the same elements of analyzing a problem, breaking it into steps, and making sure they’re in the right order; but it’s set up for students to succeed.

This exercise is very effective when you put the students in groups of two or three to work on it.

Re: Ask HN: How to Teach Coding?

#77
post #51

Teaching is about learning together. Once you start teaching it opens up a whole other dimensions, where you look at problems from the other persons perspective, and you really need to have in depths knowledge in order to explain something simply. So don't think of it in terms of you teaching him, it's more like him teaching you how to become a better developer.

Awesome, I already thought about that this will be a task I can learn a lot from too.

Thanks for your answer

Re: Ask HN: How to Teach Coding?

#78
Critically, think about what actually worked for you in your learning. And help your trainee have the same experiences.

I have found that many new teachers to get things across by sharing insights they had only after they understood a subject. But that high level understanding is the result not the cause of mastery.

Re: Ask HN: How to Teach Coding?

#79
Figure out something (meaningful?) they could build in that time frame, but make sure that project entails as many "basic concepts" as possible. Something where one concept / piece builds upon the next and there's a defined end goal that they can see / imagine.

No one wants to hear "Ok. Now delete that folder and let's start over on this other concept" especially when that new concept is likely using the old one, etc. That type of (online) training annoys me.

I would think there's got to be a good book(s) on basic CS / programming concepts. Get them that book, as something they can reference / explore when you're not available. Having a mentor is great but being self-sufficient (and having your self-esteem crushed) is also an important skill.

True story. In college my advanced calc (?) prof walked in on the first day and (more of less) said, "I'm not going to teach you. There's the book. I and TA's will be here to answer questions, etc." We (i.e., the students) left that class swearing up a storm. What's he getting paid for?!?!? etc.

Long to short, it was one of the best things that ever happened to me. Up until that point all my STEM learning was taught to me. I had never imagined I could read those bloated text books and teach myself. Let's just say that for the remainder of my college career my attendance rate for my STEM related classes was cut in half, sometimes even lower. I didn't need to go to class. I could teach myself.

It might a common HN trait, but I don't think it's true for a lot of people.

Re: Ask HN: How to Teach Coding?

#80

To teach programming is to take on the following roles: 1) Information provider - search for suitable materials. For example, if the student finds the materials not engaging, it would be your role to find different material that suits the needs of the student better 2) Problem provider - this is extremely important. It is difficult, for example, to care about loops when all the textbooks show only that--loops in isol…

This is very good advice, especially number 2. Teaching programming, especially to a trainee, is a great opportunity for project-based learning approaches. Give your person problems and tasks that are difficult enough that they have to learn something to do it, but not so difficult that they'll just bounce off of it. Much of being a good teacher is learning to quickly calibrate tasks like this.

Provide help when they need it (critically, also teach them to recognize when they need help, most novices are pretty bad at this), but don't over support (if the student isn't reaching, they probably aren't learning).

Pair programming can also be a great tool in general for learning (with you playing the role of metacognition [1] for the trainee, which again is notoriously difficult for all novices - even experts in other fields have a hard time being metacognitive in new ones). The key there is again: don't prevent all of your trainee's mistakes as they happen, but try to guide them toward noticing them and repairing them before they get too stuck. The other part of teaching that's a learned skill is determining how much struggle / wheel-spinning is productive for your particular student.

All of this is with the caveat that YMMV - people learn best in different ways, but productive struggle and real tasks are really good starting points for most (and way better than lecturing).

Post reply on HN