最初的问题

我目前正在教我弟弟编程。他完全是个初学者,但很聪明。(他真的很想学)。我注意到我们的一些会议陷入了一些小细节,我觉得我不是很有条理。(但这篇文章的答案有很大帮助。)

我怎样才能更好地有效地教他?是否有一个逻辑顺序,我可以用一个概念一个概念地运行?是否有什么复杂的问题我应该在以后再讨论?

我们正在使用的语言是Python,但任何语言的建议都是受欢迎的。


如何提供帮助

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

初级练习和项目想法 初学者教学资源 屏幕视频/博客文章/免费电子书 印刷适合初学者的书籍

请用链接描述资源,以便我可以看一看。我想让每个人都知道,我确实在使用其中的一些想法。你提交的内容将在这篇文章中汇总。


初学者在线教学资源:

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!)


推荐印刷书籍的教学初学者

加速c++ Python编程绝对初学者 Charles Petzold编写的代码 Python编程:计算机科学介绍第二版


当前回答

If he is interested than I wouldn't worry about focusing on games or whatnot. I'd just grab that beginners 'teach yourself x' book you were about to throw and give it him and let him struggle through it. Maybe talk about it after and then do another and another. After then I'd pair program with him so he could learn how shallow and lame those books he read were. Then I'd start having him code something for himself. A website to track softball stats or whatever would engage him. For me it was a database for wine back in the day.

在那之后,我会开始真正的书籍,领域设计等。

其他回答

让它变得有趣就好!

令人惊讶的是,如果您尝试Kojo, Scala可能是最简单的

Something you should be very mindful of while teaching your brother to program is for him not to rely too heavily on you. Often when I find myself helping others they will begin to think of me as answer book to all of their questions and instead of experimenting to find an answer they simply ask me. Often the best teacher is experimentation and every time your brother has a question like "What will happen if I add 2 to a string?" you should tell him to try it out and see for himself. Also I have noticed that when I cannot get a concept through to someone, it helps to see some sample code where we can look at each segment individually and explain it piece by piece. As a side note people new to programming often have trouble with the idea of object oriented programming, they will say they understand it when you teach it to them but will not get a clear concept of it until actually implementing it.

实际上,我认为应该选择一种指令更少、更简单的语言。我自己在家学习BASIC语言,杰夫也是。这样,您就不必深入研究更复杂的问题,如面向对象编程,甚至如果您不想深入研究过程的话。一旦他能够处理简单的控制流,就可以转向一些更复杂的东西,但只有简单的功能。

也许从两个数字相加的简单程序开始,然后发展到可能需要一个分支的程序,然后可能读取输入并对其做出响应,然后是某种循环,并开始将它们组合在一起。只要从小事开始,然后慢慢做。不要做任何大的项目,直到他掌握了基本知识(否则它可能太令人生畏,他可能会中途放弃)。一旦他掌握了BASIC或者你选择的任何东西,就转向更复杂的东西。

只有我的0.02美元

There is a book called Code. I can't remember who wrote it, but it goes through the basics of a lot of stuff that we (programmers) know and take for granted that people we talk to know also. Everything from how do you count binary to how processors work. It doesn't have anything dealing with programming languages in it (well from what I remember), but it is a pretty good primer. I will admit that I am also of the school that believes you have to know how the computer works to be able to effectively program things for it.

我不得不与几个初学者(从未写过一行代码)程序员一起工作,今年秋天我将与高中生一起参加一个课后研讨会。这是我找到的最接近文件的东西了。这项工作仍在进行中,但我希望它能有所帮助。

1) FizzBuzz。从命令行程序开始。你可以很快地编写一些有趣的游戏或工具,而且你可以很快地学习所有的语言特性,而不必先学习GUI工具。这些早期的应用程序应该足够简单,你不需要使用任何真正的调试工具来让它们工作。

至少像FizzBuzz这样的项目都是很好的项目。最初的几个应用程序不应该处理db、文件系统、配置等。这些概念只是让大多数人感到困惑,当你只是学习语法和基本的框架特性时,你真的不需要更多的复杂性。

一些项目:

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)

一旦他们很好地掌握了语言功能,你就可以开始一个项目(简单、有趣的游戏就可以了。)你应该尽量让第一个项目能够在6-12小时内完成。不要过早地花时间去构建它。让他们去设计,即使它很糟糕。如果它失败了,谈谈发生了什么,为什么失败,然后选择另一个话题,重新开始。

从这里开始介绍工具的调试功能。即使你可以通过阅读代码来发现问题,你也应该教他们如何使用工具,然后向他们展示你是如何发现问题的。这有双重目的:教授调试工具和如何在没有工具的情况下识别错误。

一旦项目开始运作,您就可以使用它来引入重构工具。如果你能用一些你从未计划过的简单功能扩展项目,那就太好了。这通常意味着重构和重要的调试,因为很少有人第一次就能写出像样的代码。

一些项目:

刽子手的游戏 尝试机器人(Vex和Mindstorms都是选择)

开始一个真正的项目,可能需要一些时间。使用适当的源代码控制,并强调有一个时间表。像真正的项目一样运行这个项目,如果没有其他的话,它是处理工具的很好的经验。

显然,你需要为每个人调整这一点。我发现最重要的一点是,即使是第一个简单的应用程序也要适用于用户感兴趣的内容。

一些项目:

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