教初学者编程的最佳方法? [英] Best ways to teach a beginner to program?

查看:68
本文介绍了教初学者编程的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原始问题

我目前正在教我的兄弟编程.他是一个初学者,但非常聪明. (他实际上想学习).我注意到我们的某些会议在次要细节上陷入了停滞,而且我感觉自己组织得不够好. (但是这篇文章的答案很有帮助.)

I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (But the answers to this post have helped a lot.)

要有效地教他,我还能做些什么?我可以使用逻辑顺序来逐个概念地进行研究吗?我应该避免复杂到以后吗?

What can I do better to teach him effectively? Is there a logical order that I can use to run through concept by concept? Are there complexities I should avoid till later?

我们使用的语言是 Python ,但是欢迎使用任何语言的建议.

The language we are working with is Python, but advice in any language is welcome.

如何提供帮助

如果您有好的,请在答案中添加以下内容:

If you have good ones please add the following in your answer:

  • 初学者练习和项目构想
  • 教学初学者的资源
  • 截屏视频/博客文章/免费电子书
  • 打印适合初学者的书

请描述资源及其链接,这样我就可以看看.我希望每个人都知道我肯定已经使用了其中一些想法.您的意见将汇总在这篇文章中.

Please describe the resource with a link to it so I can take a look. I want everyone to know that I have definitely been using some of these ideas. Your submissions will be aggregated in this post.

在线资源(针对教学初学者):

Online Resources for teaching beginners:

  • A Gentle Introduction to Programming Using Python
  • How to Think Like a Computer Scientist
  • Alice: a 3d program for beginners
  • Scratch (A system to develop programming skills)
  • How To Design Programs
  • Structure and Interpretation of Computer Programs
  • Learn To Program
  • Robert Read's How To Be a Programmer
  • Microsoft XNA
  • Spawning the Next Generation of Hackers
  • COMP1917 Higher Computing lectures by Richard Buckland (requires iTunes)
  • Dive into Python
  • Python Wikibook
  • Project Euler - sample problems (mostly mathematical)
  • pygame - an easy python library for creating games
  • Invent Your Own Computer Games With Python
  • Foundations of Programming for a next step beyond basics.
  • Squeak by Example
  • Snake Wrangling For Kids (It's not just for kids!)

推荐给初学者的印刷书籍

  • Accelerated C++
  • Python Programming for the Absolute Beginner
  • Code by Charles Petzold
  • Python Programming: An Introduction to Computer Science 2nd Edition

推荐答案

我不得不和几位初学者(从未写过任何代码)程序员一起工作,我将与高中生一起参加课后工作坊这个秋天.这是我最接近文档的内容.这项工作仍在进行中,但希望对您有所帮助.

I've had to work with several beginner (never wrote a line of code) programmers, and I'll be doing an after school workshop with high school students this fall. This is the closest thing I've got to documentation. It's still a work in progress, but I hope it helps.

1) FizzBu​​zz.从命令行程序开始.您可以非常快速地编写一些有趣的游戏或工具,并且无需首先学习GUI工具即可非常快速地学习所有语言功能.这些早期的应用程序应该足够简单,以至于您无需使用任何真正的调试工具即可使它们运行.

1) FizzBuzz. Start with command line programs. You can write some fun games, or tools, very quickly, and you learn all of the language features very quickly without having to learn the GUI tools first. These early apps should be simple enough that you won't need to use any real debugging tools to make them work.

如果没有别的,像FizzBu​​zz这样的项目就是好项目.您的前几个应用程序不必处理数据库,文件系统,配置等.这些概念只会让大多数人感到困惑,而当您仅学习语法和基本框架功能时,您实际上并不需要更多的复杂性.

If nothing else things like FizzBuzz are good projects. Your first few apps should not have to deal with DBs, file system, configuration, ect. These are concepts which just confuse most people, and when you're just learning the syntax and basic framework features you really don't need more complexity.

一些项目:

  • Hello World!
  • 以我的出生年份为基础,并计算出我的年龄(只是(现在-然后是)没有月份修正). (简单的数学,输入,输出)
  • 询问方向(上,下,左,右),然后告诉用户他们的命运(掉进洞里,找到蛋糕,等等). (布尔逻辑)
  • FizzBu​​zz,但每秒计数一次. (循环,计时器和更多逻辑)
  • 取决于他们的年龄,有些人真的很喜欢应用程序,该应用程序会在一定间隔内对用户进行随机侮辱. (如果将间隔设为随机,则循环,数组,计时器和随机)
  • Hello World!
  • Take the year of my birth, and calculate my age (just (now - then) no month corrections). (simple math, input, output)
  • Ask for a direction(Up, down, left, right), then tell the user their fate (fall in a hole, find a cake, ect). (Boolean logic)
  • FizzBuzz, but count once every second. (Loops, timers, and more logic)
  • Depending on their age some really like an app which calls the users a random insult at some interval. (Loops, arrays, timers, and random if you make the interval random)

2)简单项目一旦他们掌握了语言功能,就可以启动一个项目(简单,有趣的游戏效果很好.).您应该尝试使第一个项目能够在6到12个小时内完成.不要花时间来架构它.让他们设计它,即使它很烂.如果失败了,请谈论发生的事情以及失败的原因,然后选择另一个主题,然后重新开始.

2) Simple Project Once they have a good grasp of language features, you can start a project(simple, fun games work good.). You should try to have the first project be able to be completed within 6-12 hours. Don't spend time to architect it early. Let them design it even if it sucks. If it falls apart, talk about what happened and why it failed, then pick another topic and start again.

从这里开始介绍工具的调试功能.即使您通过阅读代码可以看到问题,也应该教他们如何使用工具,然后向他们展示如何看到它.这具有教学调试工具和教学如何在没有工具的情况下识别错误的双重目的.

This is where you start introducing the debugging capabilities of your tools. Even if you can see the problem by reading the code you should teach them how to use the tools, and then show them how you could see it. That serves the dual purpose of teaching the debugging tools and teaching how to ID errors without tools.

一旦该项目开始运行,或者您可以使用它来引入重构工具.如果您随后可以使用一些您从未计划过的简单功能来扩展项目,那就很好了.这通常意味着重构和大量的调试,因为很少有人会第一次编写甚至一半的体面代码.

Once, or if, the project gets functional you can use it to introduce refactoring tools. Its good if you can then expand the project with some simple features which you never planned for. This usually means refactoring and significant debugging, since very few people write even half decent code their first time.

一些项目:

  • Hangman game
  • Experimenting with robotics(Vex and Mindstorms are options)

3)真实项目开始一个真实项目可能需要一些时间.使用适当的源代码控制,并制定时间表.像真正的项目一样运行此项目,如果没有其他必要的经验,那么必须使用这些工具.

3) Real Project Start a real project which may take some time. Use proper source control, and make a point to have a schedule. Run this project like a real project, if nothing else its good experience having to deal with the tools.

显然,您需要针对每个人进行调整.我发现的最重要的事情是,即使第一个简单的应用程序也可以应用于人们感兴趣的内容.

Obviously you need to adjust this for each person. The most important thing I've found is to make even the first simple apps apply to what the person is interested in.

一些项目:

  • 俄罗斯方块
  • 基于文本文件的博客引擎
  • 更先进的机器人技术

这篇关于教初学者编程的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆