Live data from Hacker News

Ask HN: How to Teach Coding?

news.ycombinator.com

21–30 of 126 posts

Re: Ask HN: How to Teach Coding?

#22
There's the entire field of CS Education, besides all the initiatives outside of that. There are also off-the-shelf intro textbooks, such as: https://htdp.org/

If you have a trainee in a work context, where they're expected to soon be productive in the particular tools your company uses... get them started with those tools, point them to good instructional material, give them appropriate work assignments, and give them lots of mentoring (talk with them at beginning/milestones/end of each assignment, walk them through things they need to know that aren't in the materials, find the right balance of being available for questions but also getting them comfortable finding answers, etc.), and also get them started familiarizing with your organization's stuff and examples of good practices (e.g., reading select internal docs/code, monitoring Git commits, etc.). You'll also notice things they're doing or not doing, that you didn't think to mention before, so you can give tips as you see them. And it's important to be encouraging, not discouraging, even if you're encouraging them to work harder/smarter at something.

Re: Ask HN: How to Teach Coding?

#23
I'll refer to the talk [0] from last congress about the german sibling of the high-school version of MIT's How to Design Programms [1]. It's about teaching a functional-first style of abstraction with a _very_ rigorous structured approach to writing the design. I wish I'd started with HtDP instead of Pascal/Delphi (later Java), but it's the best approach I see if one wants to quickly be able to start a project of non-trivial complexity without it ending in a horror show of technical debt and/or frustrating bugs one doesn't even know how to analyze/tackle. If a slightly above average (1-2 sigma IQ, aka 120+-10) 6th grader isn't scared of the complexity, it should be possible to rely on the urge of curiosity to get said child to continue being teached by oneself. While I applaud the use of Racket for this teaching, it unfortunately scares off many who believe that companies prefer code-monkeys who can hack stuff together within Python's ecosystem. I know that, with some connections, it's easy to start with these functional skills in a company that has tasks that are suited for this approach, as well as senior engineers with some functional skills (enough to grasp what the new hire created). A good manager can let someone with no industry experience work on a well-defined component that takes 1~3 weeks to design and implement, with next to no micro-management. It only works though if the new hire is skilled in designing software, which HtDP has as it's main goal (it's even in the title). I'd hire a newbie self-taught with HtDP after testing stochastically to verify that he/she actually worked and understood all of it with just one 1~4 day in-office real-world task to test if the learned things compose into actual wholesome software design skills. I'd not like one who learned Python on his/her own and now has 1.5 years full-time experience designing&coding Python. Not without some specific testing to judge the quality of their design skills, which btw. is a far harder test than randomly sampling concepts of HtDP with short excercises similar to those in the book itself, followed by the mentioned few-day practice test. HtDP gives me the confidence to assume these few-day results scale to projects that take months, after just about .5~1 year of experience with projects that take a few days to weeks each.

[0] https://media.ccc.de/v/35c3-9800-how_to_teach_programming_to... [1] https://htdp.org

Re: Ask HN: How to Teach Coding?

#24
I am of the opinion that you don't teach anything, it's the person that learns something.

So, I'd go for what others have already mentioned. Learn about the person, how they are, how they learn better, what are their interests.

Find something they like and enjoy, so they are motivated in learning.

Be ready and available to answer questions and adapt to their rhythm and needs.

Prepare materials and different options so they can chose their path as they go.

Facilitate them changing their mind, going back and forth, making their own mistakes.

In my case, for example, I learn by doing, and pair programing with somebody helps me a lot, but other people might prefer having a theoretical background first and will want to read a book before diving into coding.

EDIT: adding paragraphs for clarity

Re: Ask HN: How to Teach Coding?

#25
I am trying to self-learn to code from a quite some time now, couple of years to be exact.

Can't really tell objectively how is my process going because my end goal is to be able to sit down imagine a thing a code it, not even close.

I get some concepts a lot better because I am constantly going back to the basics and start over, but still I struggle on low-level real world examples or mid-level problems from websites like codewars and etc.

Here is my advice to you. Make real world examples. What I mean by that, don't make a tutorial how to do a calculator or a weather app or something like that.

Instead, after each new concept or lesson that you make introducing something new about coding, create real life scenario examples with a minimum of 10 examples that your students needs to code. For example make them write 10 different functions that do something in different situations, and niches - business related function, pet related function, vegetables related function, cars related function, water related function and so on.

Why? It is very hard for a new person to grasp the concept of coding, most of the courses and tutorials do that - this is a function, they give you an example with function a + b that returns the sum and that's it. So when you are a complete beginner then you struggle to figure out a function that can applied in complete different situation like a function to sort a music playlist.

By proving different scenarios from the real world for your students and break it into small chunks after each new concept and lesson, it will be easier for them to understand better how you can use this skill in the real world. By making them repeat it with different examples will help them memorize it faster, and recall the solutions when they see something similar that they need to do.

Why this works in my opinion? I live in a small country and in high school I had to learn English. The teacher made us write every single new word that we were introduced to in our notebooks, like minimum of 30 times. Not only that helped to memorize the words and their right way of syntax but then you get to start using them in a more complicated sentences.

My English is far from perfect but I haven't taken any addition classes and it helped me a lot so far.

After all you are also teaching a language, with which you communicate with the computer, I think you can take a look at different disciplines and apply some really good practices to make you a better code teacher.

This of course is from my personal perspective like a super beginner that try to do that in his free time online.

Best of luck to you.

Re: Ask HN: How to Teach Coding?

#26
post #13

Real teaching is exploring, discovering, inspiring, reminding and pointing in the right direction. Not so much imposing a ready-made system of thought on others. It takes experience, and discipline to get to the point where this is possible without egos crashing the party one way or the other. Someone said that finding good teachers is difficult, and that's true from my experience; but it 's a Sunday walk in the park…

True, he have to learn himself. But giving that directions and insights is something that makes me happy.

Well after reading your message, i just hope to stick in the "good teacher" category soon.

My feelings say i found a good student who wants to learn, so i have a rock solid base here.

Re: Ask HN: How to Teach Coding?

#28
I'm not able to answer all your comments right now. But i want to let you know, that i read all of them and i love your feedback.

Up to this moment i learned that going with real world examples is the way to go. Since i work in a software department of a real world company and mainly code Inhouse solutions, i am sure that i can provide a lot of them.

Beeing available for Questions and Feedback and provide Learning Material and doing sessions about technology and patterns, before they are needed to solve a problem is the next thing i noted down in my plannings.

I am very thankful for all the Feedback and can't wait to get more!

Re: Ask HN: How to Teach Coding?

#29
Although there is a significant number of Negative Nancies here I believe it can be teached but, even though I know it won't be a popular outlook, I see it like learning/teaching blacksmithy. Sure there is a theory, like which metal to choose, which degree to cook and which hammer to build but theory gets you so far. You need to show how a sword is actually done.

The concepts of programming can be learned from the noosphere easily, the resources are there to learn but good practices are not. A teacher should pass these as well, in addition to "what is a variable" etc. stuff. And like any course, if the student doesn't actually work on the stuff on his free time it is worthless - another analogy can be a guitar course here. No matter who your teacher is, if you don't play it at home willingly... you won't be able to learn how to play guitar.

My 2 cents...

Post reply on HN