玩转编程小课堂_在课堂上更好地学习编程

玩转编程小课堂

“我们从零跃升至一百,而我迷路了。” (“We jumped from zero to a hundred, and I was lost.”)

This is the common sentiment I noticed even among some of the brightest students taking their first programming course. They show up to class, but much of the material goes over their heads unless they came in with prior knowledge of programming. Staying lost means that the time they spend in lectures is not used as effectively as it could be. The students then lose excitement about learning to program.

即使在一些最聪明的学生参加了第一门编程课程之后,这也是我注意到的共同情感。 他们会出现在课堂上,但是除非有编程方面的先验知识,否则很多材料都会使他们望而却步。 迷路意味着他们花在演讲上的时间没有得到应有的利用。 然后,学生对学习编程感到兴奋。

What happened?

发生了什么?

What strategies can help people get the most out of the time they spend in programming lectures?

哪些策略可以帮助人们最大程度地利用在编程讲座上花费的时间?

There are many programming courses and tutorials out there… but can you meta-learn programming?

那里有许多编程课程和教程…… 但是您可以进行元学习编程吗?

Absolutely! Based on my experience learning to program in classes, here are some key strategies in mind as you head into lectures, whether they are in-person, remote, or within a pre-recorded course:

绝对! 根据我在课堂上编程的经验,在您上课时, 请牢记一些关键策略,无论是面对面,远程还是在预先录制的课程中:

像机器人一样思考 (Think like a robot)

A robot only does the things that it is told to do, and only in the way it is programmed. Nothing less, nothing more.

机器人仅按照被编程的方式执行被告知要做的事情。 什么都没有,仅此而已。

Similarly, if you come to class thinking like a robot, you will type in the exact commands the instructor tells you to type while they are instructing. Nothing less, nothing more.

同样,如果您像机器人一样上课思考,您将输入教师告诉您在授课键入的确切命令。 没什么,没什么了。

Programming involves logic spelled out in exact ways. While the programming languages may look somewhat like commands in English, they are written in their precise syntax. Many languages are case-sensitive and have their own conventions to them. There are often multiple ways to write algorithms that do similar things. But before you start programming creatively and with your own ideas, it is important to learn the concept at hand during class.

编程涉及以精确方式阐明的逻辑。 尽管编程语言看上去有点像英语中的命令,但它们是以其精确的语法编写的。 许多语言区分大小写,并且对它们有自己的约定。 编写具有相似功能的算法通常有多种方法。 但是,在开始创造性地使用自己的想法进行编程之前,在上课时学习手头的概念很重要。

Think like a robot to write commands in code exactly as it needs to be written in class.

像机器人一样思考,以完全按照需要在类中编写代码的方式编写命令。

注释您的代码 (Comment your code)

Comments are not commands that are executed in the code. They are solely for the benefit of the human reader or programmer of the code.

注释不是在代码中执行的命令。 它们仅是为了使代码的人类读者或程序员受益。

While it helps to write commands in the code itself exactly as the instructor does, the instructor may not be writing comments during their demonstrations. It is important for you to write comments in the script to look back at later, especially for newly-introduced comments, so that you can tell what each line of code does, even if the next time you revisit the code is years later. Comments make the code much easier to follow as it is written. It also makes the code easier to re-purpose for projects and assignments.

尽管与讲师完全一样,可以在代码本身中编写命令,但讲师在演示过程中可能不会写注释。 对您来说,在脚本中编写注释以供日后查阅非常重要,特别是对于新引入的注释,这样就可以知道每一行代码的功能,即使下次重新访问该代码是在数年之后。 注释使代码易于编写。 这也使代码更容易重新用于项目和任务。

Comment your code in class. Word your comments in a way that make sense to you. This will help your future self and others who may read your code. If you have a grader, they will probably want to see comments on assignments or exams, as well.

在课堂上注释您的代码。 用对您有意义的方式表达您的意见。 这将帮助您将来的自己和其他可能阅读您的代码的人。 如果您有一个评分者,他们可能也希望看到关于作业或考试的评论。

If you are watching a programming lecture that can be paused, using the pause button will allow you to take extra time to write comments in your code.

如果您正在观看可以暂停的编程讲座,则使用“暂停”按钮将使您花费更多时间在代码中编写注释。

像羊一样跟随 (Follow like a sheep)

Programming is different from many other courses. In many fields, a student could zone out for a couple of minutes and still be able to follow the lecture. In programming, this is not the case. Programming is an active process. Every single step needs to be followed for a favorable outcome. Skipping a step in programming is similar to forgetting to add an ingredient in a recipe. Missing a minute may mean that you are in the wrong directory, missed defining a variable, or did not input key information correctly in your script. In any of these cases, you may find yourself with errors you cannot explain to yourself.

编程与许多其他课程不同。 在许多领域,学生可以安排几分钟的时间,但仍然可以继续听课。 在编程中,情况并非如此。 编程是一个活跃的过程。 为了取得令人满意的结果,必须遵循每一个步骤。 跳过编程步骤类似于忘记在配方中添加成分。 缺少一分钟可能意味着您位于错误的目录中,缺少定义变量或未在脚本中正确输入键信息。 在这些情况下,您可能会发现自己无法解释的错误。

It is one thing to show up. It is another thing to show up.

出现是一回事。 这是另一回事露面

Show up to class with energy. Be fully present. Stay focused.

充满活力地上课。 充分存在。 保持专注。

Do not doodle or daydream.

请勿涂鸦或做白日梦。

Block out distractions during class.

上课时要避免分心。

Do not step out to use the washroom unless there is a break.

除非有休息,否则不要出门使用洗手间。

This will help you follow the lines of logic during the lecture and help you remember how processes were done.

这将帮助您在授课过程中遵循逻辑原则,并帮助您记住流程的完成方式。

Sustain your attention to show up and follow like a sheep in class.

保持注意力,出现并在课堂上像只绵羊一样跟随。

问问题 (Ask questions)

If you are lost, ask for help quickly to get back on track. This will prevent you from being lost for the rest of class. This may mean asking an instructional aide for help. This may mean asking a question in the course’s Q&A if the course is online.

如果您迷路了,请Swift寻求帮助以回到正轨。 这样可以防止您在上课剩下的时间里迷路。 这可能意味着向教学助手寻求帮助。 如果课程在线,这可能意味着要在课程的问答中提问。

If you are learning from lectures in video recordings, you can rewind to see where you got lost and follow along starting from that point or ask a question on the website of the video recording.

如果您正在从录像讲课中学习,则可以倒带看一下自己迷路的地方,然后从该点开始,或者在录像网站上提问。

There are also ways to ask questions outside of class: through forums about your programming language of interest, through talking with other programmers at local meetup groups, or through discussions with classmates.

还有一些在课外提出问题的方法:通过论坛讨论您感兴趣的编程语言,通过与当地聚会小组的其他程序员交谈,或与同学讨论。

Asking questions will help you get back on track in class. This will also help you stay motivated in the learning process.

提出问题将帮助您回到课堂上。 这也将帮助您保持学习过程中的动力。

后记: (Afterword:)

Depending on what you make of it, programming lectures can be a time of confusion, or they can be taken as a learning opportunity. In summary, the strategies to get the most out of them are:

根据您的所作所为,编程讲座可能是一个混乱的时期,也可能被视为学习的机会。 总而言之,充分利用它们的策略是:

  1. Think like a robot to write code exactly as it needs to be written.

    像机器人一样思考,以完全按照需要编写代码。

  2. Comment your code in class. This will help your future self and others who may read your code.

    在课堂上注释您的代码。 这将帮助您将来的自己和其他可能阅读您的代码的人。

  3. Sustain your attention to show up and follow like a sheep.

    保持注意力,像绵羊一样出现并跟随。

  4. Ask questions to stay on track.

    提出问题以保持正轨。

在编程课程中,您最好从零跃升至一百。 (You can better jump from zero to a hundred in your programming courses.)

The views expressed in this article are solely those of the author and do not necessarily reflect those of the OmarLab, University of Michigan, or Intvo. The photo of the spiral staircase was taken by the author during travels.

本文表达的观点仅是作者的观点,不一定反映OmarLab,密歇根大学或Intvo的观点。 螺旋楼梯的照片是作者在旅途中拍摄的。

翻译自: https://medium.com/swlh/learn-programming-better-in-classes-aabb3ac86ad7

玩转编程小课堂

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值