Live data from Hacker News

Ask HN: How to Teach Coding?

news.ycombinator.com

111–120 of 126 posts

Re: Ask HN: How to Teach Coding?

#111
1. Know your skill tree and teach using it.

2. Start small.

3. Allow plenty of mistakes.

4. Resist the temptation of always showing a better way, best practices, or rewriting the trainee code.

5. If you use magic, explain it without magic first.

6. Setup tooling yourself, even on the trainee's machine. No time to waste with that. This must include a good IDE, with a good linter.

7. Auto format all code, no time to waste on style linting and formatting advises.

8. Git is hard. Don't forget to explain it again and again in details, dev is just not code.

9. Testing is hard for the beginners. Write the tests for a while. Nobody can learn it all at once. Forget TDD for 2 years, this requires a lot of experiences.

10. Force regular feedback. They won't come to you. Don't ask what's wrong. Go to see. And be nice.

Re: Ask HN: How to Teach Coding?

#112

I teach coding. Here are some of my insights: — Remove the instrumental barriers first. I start with teaching the basics of UNIX shell, navigating the file system, processes, editing files etc. Students will move much faster if they do not stumble on basics. — Continue with the notion of system libraries, dependencies and teach how to use system package managers to install stuff. — Explain what APIs are and teach how…

It's definitely good when you can make the time and space to build up all the concepts from scratch. In retrospect, I should have done this with my last trainee. Smart person, fast learner, but so many pieces were missing. The worst thing was being deeply hesitant to do anything at a command prompt. There's only so far you can get if everything you do is mediated by a GUI. If I had it to do over, I would have forbidd…

Yes, that’s what I do — forbid the use of IDEs (they only become indispensable for large projects, and we don’t do anything large-scale yet).

This is an excellent gamified CTF to learn the ins and outs of UNIX command line: http://overthewire.org/wargames/bandit/ . I usually require my students to reach at least level 10 to pass, and everybody liked it so far.

Re: Ask HN: How to Teach Coding?

#113
post #66

I teach coding. Here are some of my insights: — Remove the instrumental barriers first. I start with teaching the basics of UNIX shell, navigating the file system, processes, editing files etc. Students will move much faster if they do not stumble on basics. — Continue with the notion of system libraries, dependencies and teach how to use system package managers to install stuff. — Explain what APIs are and teach how…

Interestingly, I learned to program in a completely different way. When I started in 1979, the computer terminal where I learned could only run BASIC. There were no directories, just BASIC. We had one book that could teach you most of the commands, IF--THEN GOTO, SET, PRINT, FOR, NEXT, GOSUB. There was no WHILE statement. I think I spent months playing with those before learning about arrays. The biggest breakthrough…

So did I, but we live in 2019 now. The optimal path for productive coding looks different these days.

Re: Ask HN: How to Teach Coding?

#115

Earlier quoted context omitted.

It's definitely good when you can make the time and space to build up all the concepts from scratch. In retrospect, I should have done this with my last trainee. Smart person, fast learner, but so many pieces were missing. The worst thing was being deeply hesitant to do anything at a command prompt. There's only so far you can get if everything you do is mediated by a GUI. If I had it to do over, I would have forbidd…

Yes, that’s what I do — forbid the use of IDEs (they only become indispensable for large projects, and we don’t do anything large-scale yet). This is an excellent gamified CTF to learn the ins and outs of UNIX command line: http://overthewire.org/wargames/bandit/ . I usually require my students to reach at least level 10 to pass, and everybody liked it so far.

That looks fun! I'll run through it myself and see what it covers.

Re: Ask HN: How to Teach Coding?

#116

I also just had my first intern. But I also taught at the college level and have had a few employees. A few suggestions to add to the already good lists here. 1. Tell them _why_ you do something. This helps with cognitive load while learning, and helps them overcome some mental stress when investing in new techniques/methods. 2. Provide real code examples that work, and demonstrate them. This is analogous to hearing…

Nice additions.

I am self-tought and i made the experience that being wrong helped me to evolve. I guess i grinded the gears of many people in bulletin boards or irc channels in the moment i came by with my naive solutions.

But getting corrections and new insights helped me to grow. This is something i want to transfer to my trainee aswell.

I'm thankful for your thoughts :)

Re: Ask HN: How to Teach Coding?

#117
Long time ago at uni I used to give paid coding sessions to fellow students from IT facoulty (I myself could not make it to study on IT as I was not super star in math/physics which is requirement where I live, but I was passionate about coding and self thought and playing with code since 13). They was coming to me with their assignments in various levels of advancement so we was going through whatever they already had, salvaged whatever made sense and explained why other parts was of no use. Then we completed assignment together with proper explanation where things come from. I often heard this: 'you just start writing' and my answer would often be 'data structure is the fundation, I want to test different ideas so I can land at the best of my ability as soon as I can'... This was nice time in my life where I had no clue about maintainability and quality of code :)

On another note I remember watching video on youtube where someone said that for them programming is solving a puzzle. This resonates with me as solving puzzles is something you enjoy, programming should be something you enjoy and not just use to make your living...

Re: Ask HN: How to Teach Coding?

#118

Earlier quoted context omitted.

It's definitely good when you can make the time and space to build up all the concepts from scratch. In retrospect, I should have done this with my last trainee. Smart person, fast learner, but so many pieces were missing. The worst thing was being deeply hesitant to do anything at a command prompt. There's only so far you can get if everything you do is mediated by a GUI. If I had it to do over, I would have forbidd…

Yes, that’s what I do — forbid the use of IDEs (they only become indispensable for large projects, and we don’t do anything large-scale yet). This is an excellent gamified CTF to learn the ins and outs of UNIX command line: http://overthewire.org/wargames/bandit/ . I usually require my students to reach at least level 10 to pass, and everybody liked it so far.

Nice, i got hooked up the same second i started and needed to force me stopping.

Good Link.

Re: Ask HN: How to Teach Coding?

#119
post #116

I also just had my first intern. But I also taught at the college level and have had a few employees. A few suggestions to add to the already good lists here. 1. Tell them _why_ you do something. This helps with cognitive load while learning, and helps them overcome some mental stress when investing in new techniques/methods. 2. Provide real code examples that work, and demonstrate them. This is analogous to hearing…

Nice additions. I am self-tought and i made the experience that being wrong helped me to evolve. I guess i grinded the gears of many people in bulletin boards or irc channels in the moment i came by with my naive solutions. But getting corrections and new insights helped me to grow. This is something i want to transfer to my trainee aswell. I'm thankful for your thoughts :)

I would also add that it's important to learn that what you are teaching now may be considered an anti-pattern down the road. Or that the framework de jour is going to become tech debt in 5 years.

So it's really important to distinguish between long term viable fundamental skills/techniques from current best practices.

A specific example of this is I started using javascript a lot, then Prototype.js then jQuery came out (which did not litter the core objects with protoype inheritances, which is better...) and now back to vanilla js now that the browser incompatibilities are minimal. The only long term viable skill here is coding in general, and vanilla js, everything else was a fad of sorts.

Have fun teaching, I really enjoy this part of my work.

Re: Ask HN: How to Teach Coding?

#120

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…

That is a funny yet really good video.

Reminds me of a blog post I wrote a few years ago on how breaking down problems is the most important skill you can ever learn as a developer.

I had a similar example where I talked about tying your shoes. What seems so trivial can easily end up being hundreds of steps without even delving into really low level details like controlling individual muscles of a specific part of your body.

Post reply on HN