如何向青少年教编程

By Sean Choi

肖恩·崔(Sean Choi)

In the past, many enthusiastic parents have approached me and asked me how I learned to code in the beginning — mainly with the interest in finding ways to help their children how to code. And every time, I didn’t have a clear answer for them, because I learned to code at a much later age than most of the children of these parents. In the interest of helping these parents, I also tried to find resources that are made to help the children learn to code.

过去,许多热情的父母与我取得联系,并问我一开始我是如何学习编码的,主要是为了寻找帮助他们的孩子如何编码的方法。 每次,我都没有一个清晰的答案,因为我学会的编码比这些父母中大多数孩子的年龄要晚得多。 为了帮助这些父母,我还试图找到可以帮助孩子学习编码的资源。

I discovered that there are a lot of resources help K-6 students learn how to code. Some examples include Scratch and the Hour of Code in Code.org which are quite useful for someone new to get acquainted with programming.

我发现有很多资源可以帮助K-6学生学习编码。 其中的一些示例包括Code.org中的 Scratch和Hour of Code,对刚接触编程的新手来说非常有用。

Through these platforms, students write simple programs that make graphical creatures move or build simple games and learn the basic tools of programming — such as loops and conditionals — while building useful problem-solving skills. The major strength of these platforms is the visual feedback from the platform, which really helps the students stay constantly engaged with the curriculum and the exercises.

通过这些平台,学生可以编写简单的程序,使图形生物移动或构建简单的游戏,并学习编程的基本工具(例如循环和条件),同时建立有用的解决问题的技能。 这些平台的主要优势是来自平台的视觉反馈,确实有助于学生不断地参与课程和练习。

However, teaching programming to teenagers over the 6th grade is a completely different beast. This article shows that over 95% of teenagers today have access to smartphones. So, the visual feedback from Scratch or Code.org no longer wows them. In fact, I discovered that the teenagers actually find them quite mundane and childish.

但是,向六年级的青少年教授编程是完全不同的野兽。 本文显示,当今超过95%的青少年可以使用智能手机。 因此,Scratch或Code.org的视觉反馈不再让他们感到惊讶。 实际上,我发现这些少年实际上发现他们相当平凡而幼稚。

Instead, teenagers want to build or do something REAL that they can showcase. Such as building and launching a real iPhone app or their own website or hacking into some system. But how can you get someone who just finished a set of Scratch exercises to building an iPhone app, while getting them constantly engaged to finish it?

取而代之的是,青少年想要构建或做一些可以展示的真实事物。 例如构建和启动一个真正的iPhone应用程序或他们自己的网站,或入侵某个系统。 但是,如何让刚完成一组Scratch练习的人来构建iPhone应用程序,同时又让他们不断地参与进来完成它呢?

So, I wanted to share my experiences in teaching programming to 4 teenagers over the course of two years. The students started out having a different range of programming skills, personalities, and expectations. Therefore, to keep everyone engaged, I had to go through various trials to find the teaching materials that worked for everyone.

因此,我想在两年的过程中向4位青少年分享我在编程教学方面的经验。 学生们开始具有不同的编程技能,个性和期望。 因此,为了使每个人都参与其中,我不得不经历各种尝试,以找到适合每个人的教材。

The main goal of this article is to share what I learned and the trials that were successful, in the hopes of helping other teenagers learn to love programming.

本文的主要目的是分享我学到的知识和成功的试验,以期帮助其他青少年学习热爱编程。

青少年寄予厚望 (Teenagers have High Expectations)

I learned that teenagers absorb new technology like dry sponges. While adults may be quite okay with being a technically bit out-of-date, teenagers bet their lives on being cool and following the latest trend out there. I found that teenagers tend to use the coolest and latest apps even before they make it to TechCrunch or CNBC headlines.

我了解到青少年吸收了像干海绵一样的新技术。 尽管成年人在技术上过时可能还可以,但青少年却将自己的生活押在凉爽上,并遵循那里的最新趋势。 我发现,即使在进入TechCrunch或CNBC头条新闻之前,青少年仍倾向于使用最酷,最新的应用程序。

In fact, it was my students who introduced me to a bunch of .io games and HQ Trivia. So, it’s important that what they learn is COOL, and something that they can share with their friends.

实际上,正是我的学生向我介绍了许多.io游戏HQ Trivia 。 因此,重要的是他们学到的是COOL ,以及可以与朋友分享的东西。

The first thing they asked when I started the programming class was “Can we Hack stuff? Like websites and iPhone APPs?”.

当我开始编程课时,他们问的第一件事是“我们可以破解东西吗? 喜欢网站和iPhone APP?”。

So, I told them we should first learn HTML and CSS to learn how to hack a website and showed them this:

因此,我告诉他们我们应该首先学习HTML和CSS以学习如何破解网站,并向他们展示了这一点:

<!DOCTYPE HTML>
<html>  
<head><title>Hello World!</title></head>  
<body><h1>Hello World!</h1></body>
</html>

I explained what each of these tags meant and how they will show up on a page. I loaded a page with this hello.html and all their expectations of seeing a cool web page went down the drain. They were immediately bored.

我解释了每个标签的含义以及它们将如何显示在页面上。 我用此hello.html加载了一个页面,他们对看到一个很酷的网页的所有期望都hello.html 。 他们立即感到无聊。

However, I continued the class to teach them more HTML, CSS and basic JavaScript. I felt that by teaching them more HTML, CSS and JavaScript and learning the techniques to build some example websites, they would feel more engaged. However, I was wrong.

但是,我继续上课,教他们更多HTML,CSS和基本JavaScript。 我觉得通过教给他们更多HTML,CSS和JavaScript并学习构建一些示例网站的技术,他们会感到更加投入。 但是,我错了。

Even after series of building simple websites and deploying them over Firebase, they kept on saying they wanted to do something more REAL and something they could show their friends.

即使在建立了简单的网站并将其部署到Firebase上之后 ,他们仍然说要做一些更真实的事情,并可以向朋友展示一些东西。

教他们做一些真正的事情 (Teaching them to do Something REAL)

I realized that there are many ways to do something real, and it was not at all creating software with cute GUI or teaching them new data structures, or getting some material from Harvard CS50 and showing them.

我意识到,有很多方法可以完成真实的工作,而根本不是用可爱的GUI创建软件,也不是教他们新的数据结构,或者从Harvard CS50获得一些资料并进行展示。

I decided it would be best to use hardware and make the students physically feel what they had coded. My two choices were Raspberry Pi and Arduino.

我认为最好使用硬件,让学生身体上感觉自己编码的东西。 我的两个选择是Raspberry PiArduino

Raspberry Pi is a miniature computer that runs its own version of Linux, and is capable of running most programming languages. You can purchase various peripherals that can be controlled via your own custom software.

Raspberry Pi是运行其自己版本的Linux的微型计算机,并且能够运行大多数编程语言。 您可以购买各种外围设备,这些外围设备可以通过自己的自定义软件进行控制。

Arduino is more involved. It is as an open-source hardware platform, and many companies build various kits, such as Smart Autonomous Car and Quadruped Robot.

Arduino参与度更高。 它是一个开放源代码的硬件平台,许多公司都构建了各种套件,例如Smart Autonomous CarQuadruped Robot

Using Raspberry Pi, we built a weather station that detects temperature and air pressure of the surrounding area and sends them to a cloud database. Then, the students were able to view the weather data through an online graphing tool. We also programmed simple utility functions, such as changing temperature units and finding min/max/average temperature, to post to the database. These exercises helped the students learn simple data structures and algorithms, such as arrays, dictionaries and sorting.

我们使用Raspberry Pi构建了一个气象站 ,该气象站可以检测周围区域的温度和气压并将其发送到云数据库。 然后,学生们可以通过在线绘图工具查看天气数据。 我们还对简单的实用程序功能进行了编程,例如更改温度单位并查找最低/最高/平均温度,以发布到数据库中。 这些练习帮助学生学习简单的数据结构和算法,例如数组,字典和排序。

After this, we moved on to building the Arduino-based autonomous car. Each student had sample code that made the cars move and detect obstacles. Then, we built a maze and gave a prize to the student who made the car that got out of the maze first.

之后,我们继续构建基于Arduino的自动驾驶汽车。 每个学生都有使汽车行驶并检测障碍物的示例代码。 然后,我们建造了一个迷宫,并将奖品授予了首先制造出从迷宫中出来的汽车的学生。

The students naturally discussed among themselves which logic would help the car move out of the maze most efficiently. And they found it pretty cool that their algorithm immediately was learned and executed by the car that they built. Most importantly, the students really enjoyed it, since it was real and tangible.

学生们自然地在他们之间讨论了哪种逻辑可以帮助汽车最有效地离开迷宫。 他们发现自己的算法立即被他们制造的汽车学习并执行,这非常酷。 最重要的是,学生们非常喜欢它,因为它是真实而有形的。

We also did some exercises in learning the basics of hacking! Similar to LeetCode, which is aimed at helping participants learn how to solve interview problems, there are many tools built to help students learn the basics of hacking. For example, HackThis is a nice website that gives you a series of challenges that you can view and solve on your browser. It requires you to use many of existing browser tools, such as Chrome dev tools, to find deficiencies that you can take advantage of to gain access into the system.

我们还在学习黑客基础知识方面做了一些练习! 与旨在帮助参与者学习如何解决面试问题的LeetCode相似,有许多工具可以帮助学生学习黑客的基础知识。 例如, HackThis是一个不错的网站,它给您带来了一系列挑战,您可以在浏览器中查看和解决这些挑战。 它要求您使用许多现有的浏览器工具(例如Chrome开发者工具)来发现缺陷,您可以利用这些缺陷来获取对系统的访问权限。

The students really loved this exercise, because solving these exercises made them feel like spies in Mission Impossible. After finishing the challenge, they actually went ahead into real websites (I made sure they didn’t do something illegal…) and tried to find loopholes that they could use.

学生们真的很喜欢这个练习,因为解决这些练习使他们感觉像“不可能完成的任务”中的间谍。 完成挑战后,他们实际上进入了真实的网站(我确保他们没有做非法的事情……),并试图寻找可以利用的漏洞。

Once they are more prepared and learn the basic Linux concepts, I am planning to teach them more advanced hacking concepts with Kali Linux, which I think will be even more exciting.

一旦他们做好了充分的准备并学习了基本的Linux概念,我计划通过Kali Linux教给他们更多高级的黑客概念,我认为这会更加令人兴奋。

竞争作为一种学习工具 (Competition as a Learning Tool)

Finally, the last thing I learned was that the teenagers are quite competitive. They like exercises that gave them immediate feedback, such as giving them a score, a badge, or placing them on a real scoreboard.

最后,我了解到的最后一件事是,这些少年很有竞争力。 他们喜欢能给他们即时反馈的练习,例如给他们打分,徽章或将其放在真实的记分板上。

The best platform I found that incentivized the students was CodingGame. They would solve each programming exercise and level up in the process. The exercises also have some nice visual components to them, enabling the students to be quite engaged to the exercises.

我发现激励学生的最佳平台是CodingGame 。 他们将解决每个编程练习并逐步升级。 练习还具有一些不错的视觉组成部分,使学生能够充分参与练习。

We would also start the day by doing a session of Clash of Code, which is a quick 5 minute live programming challenge between other online users, and the students would sometimes win against other players that had higher levels than they did! It really got them pumped up to start another day of learning to program.

我们也将通过进行“代码冲突”来开始新的一天,这是其他在线用户之间的快速5分钟实时编程挑战,而且学生有时会与水平更高的其他玩家一较高下! 确实促使他们开始了另一天的编程学习。

最后的想法 (Final Thoughts)

Teaching programming is fun and educational. Not only do you learn how to teach another person, but it also gives you a chance to be in the students’ shoes. You learn to understand how others think about a problem and realize that there are many different ways to perceive the same problem. You also learn how to describe problems in ways that the students would enjoy thinking about. Also, personally, I think teaching helps you become a more understanding and patient person.

教学编程既有趣又具有教育意义。 您不仅会学习如何教别人,而且还使您有机会成为学生。 您将学习了解其他人如何思考问题,并意识到有很多不同的方法可以感知同一问题。 您还将学习如何以学生喜欢的方式描述问题。 另外,就我个人而言,我认为教学可以帮助您变得更加理解和耐心。

I hope you can also let me know how you helped others join the world of programming. For those of you who are starting out in the journey of helping others to learn to program, I really hope that this article gave some takeaways for your own curriculum.

我希望您也可以让我知道您如何帮助其他人加入编程世界。 对于那些刚开始帮助他人学习编程的人们,我真的希望本文为您自己的课程提供一些收获。

Thank you for reading!

感谢您的阅读!

翻译自: https://www.freecodecamp.org/news/how-to-teach-programming-to-teenagers-2ecd43846f0d/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值