最初的问题

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

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

我们正在使用的语言是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编程:计算机科学介绍第二版


当前回答

Python is easy for new developers to learn. You don't get tangled up in the specifics of memory management and type definition. Dive Into Python is a good beginners guide to python programming. When my sister wanted to learn programing I pointed her to the "Head Start" line of books which she found very easy to read and understand. I find it's hard to just start teaching someone because you don't have a lexicon to use with them. First have him read a few books or tutorials and ask you for questions. From there you can assign projects and grade them. I find it hard to teach programming because I learned it over nearly 15 years of tinkering around.

其他回答

我不知道怎样对你弟弟最好,但我知道我是从蟒蛇开始的。我从很小的时候就开始玩各种各样的游戏,并想要制作自己的游戏,所以我的叔叔用pygame库向我介绍了python。它有很多教程,让一切都很简单(在我看来比openGL简单多了)。 它仅限于2d,但你应该从简单开始。

我的叔叔推荐python,因为他当时对它很感兴趣,但我推荐它,现在已经相当有知识了,因为它很容易学,直观(或像编程语言一样直观),而且简单(但肯定不简单)。

当时我个人觉得简单地学习编程非常无聊,但随着学习的深入,我又有了相当大的热情。我真的很想学习是为了创造一些东西,而不仅仅是学习。

I would recommend also watching some screencasts - they are generally created in context of a specific technology not a language, though if there's Python code displayed, that'll do :). The point is - they're created by some good programmers and watching how good programmers program is a good thing. You and your brother could do some peer programming as well, that might be an even better idea. Just don't forget to explain WHY you do something this way and not that way. I think the best way to learn programming is from good examples and try not to even see the bad ones.

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美元

起初,我对不同的程序是如何工作的很感兴趣,所以我从查看源代码开始。然后,当我开始了解程序的工作原理时,我会改变某些参数,看看会发生什么。所以基本上我在学会写字之前就学会了阅读。巧合的是,大多数人都是这样学英语的。

所以如果我想教别人如何编程,我会给他们一个小程序,让他们试着阅读和理解它是如何工作的,让他们只是玩玩源代码。

只有这样,我才会给他们布置“任务”去完成。

现在,如果他们有一个特别的原因想要学习如何编程,那么从他们想要完成的事情开始肯定是一个好主意。例如,如果他们想精通blender这样的应用程序,从Alice开始肯定是个好主意。

我绝对推荐使用具有垃圾收集功能的语言,如D、Perl或一些解释性语言,如javascript。在Perl 6接近完成之前远离Perl可能是一个好主意,因为它解决了阅读和理解Perl的一些困难。