<story><title>Ask HN: How to Teach Coding?</title><text>I finally did it and I get my first Trainee.&lt;p&gt;I already teached coding to internships for a few weeks. But this time I have three years to share my knowledge and grow with him.&lt;p&gt;I already checked methods and stuff online like pair programming, visualization of data flows ect.&lt;p&gt;But what I would love to know is, what has worked for you guys on both sides. Sharing knowledge and get trained.&lt;p&gt;I want to be the best mentor I can be and I want to proof that this is a thing I can do good and continue doing it the next years of my career.&lt;p&gt;So, what helped you to train others or receiving knowledge?</text></story><parent_chain><item><author>srirangr</author><text>1. Tell them what to do but do not tell them how to do it. (Just give a few pointers otherwise they&amp;#x27;ll be lost.)&lt;p&gt;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.&lt;p&gt;3. Show them the impact of their work - There&amp;#x27;s nothing more motivating than seeing the impact of one&amp;#x27;s work.&lt;p&gt;4. Build curiosity - Answer as many questions as you can answer. Admit when you don&amp;#x27;t know any answers and start looking it up on the web right in front of them. People pick habits by looking at their superiors.&lt;p&gt;If it&amp;#x27;s absolute beginning to programming, this video is a great way to show how difficult it is to teach a machine to do something and how clear instructions can help get things done: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=cDA3_5982h8&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=cDA3_5982h8&lt;/a&gt;</text></item></parent_chain><comment><author>jdeisenberg</author><text>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: &amp;quot;Take out two slices of bread&amp;quot;, 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?”&lt;p&gt;Here’s an exercise (not sure where I discovered it) that I use at the community college level: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=meSK1rn2VbA&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=meSK1rn2VbA&lt;/a&gt; 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.&lt;p&gt;This exercise is very effective when you put the students in groups of two or three to work on it.</text></comment>
<story><title>Ask HN: How to Teach Coding?</title><text>I finally did it and I get my first Trainee.&lt;p&gt;I already teached coding to internships for a few weeks. But this time I have three years to share my knowledge and grow with him.&lt;p&gt;I already checked methods and stuff online like pair programming, visualization of data flows ect.&lt;p&gt;But what I would love to know is, what has worked for you guys on both sides. Sharing knowledge and get trained.&lt;p&gt;I want to be the best mentor I can be and I want to proof that this is a thing I can do good and continue doing it the next years of my career.&lt;p&gt;So, what helped you to train others or receiving knowledge?</text></story><parent_chain><item><author>srirangr</author><text>1. Tell them what to do but do not tell them how to do it. (Just give a few pointers otherwise they&amp;#x27;ll be lost.)&lt;p&gt;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.&lt;p&gt;3. Show them the impact of their work - There&amp;#x27;s nothing more motivating than seeing the impact of one&amp;#x27;s work.&lt;p&gt;4. Build curiosity - Answer as many questions as you can answer. Admit when you don&amp;#x27;t know any answers and start looking it up on the web right in front of them. People pick habits by looking at their superiors.&lt;p&gt;If it&amp;#x27;s absolute beginning to programming, this video is a great way to show how difficult it is to teach a machine to do something and how clear instructions can help get things done: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=cDA3_5982h8&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=cDA3_5982h8&lt;/a&gt;</text></item></parent_chain><comment><author>GlennS</author><text>I actually think step (1) isn&amp;#x27;t a good way to start unless the pupil has some prior knowledge.&lt;p&gt;Many (most?) people don&amp;#x27;t have know how to take a big problem and turn it into something they can make progress on.&lt;p&gt;You give them the lego bricks and say &amp;#x27;make me a windmill&amp;#x27; and they don&amp;#x27;t have the first clue where to start. They may not even understand that programming is lego.&lt;p&gt;So, you either have to teach that first. Or, if you want to teach it later, start with a sequence of problems that have one obvious step each.&lt;p&gt;Some good approaches to attacking a problem too big to be obvious:&lt;p&gt;1. Break it into smaller and smaller pieces, then implement those pieces.&lt;p&gt;2. Bite off a small piece that you think you can do, then grow that.&lt;p&gt;3. Write down everything about it then think very hard about what are the essential characteristics of a solution.</text></comment>