最初的问题

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

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

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


当前回答

There have already been a bunch of great answers, but for an absolute beginner, I would wholeheartedly recommend Hackety Hack. It was created by the unreasonably prolific why_the_lucky_stiff specifically to provide a BASIC/LOGO/Pascal-like environment for new programmers to experiment in. It's essentially a slick Ruby IDE with some great libraries (flash video, IM, web server) and interactive lessons. It makes a good pitch for programming, as it chose lessons that do fun, useful things. "Hello, world" may not impress right off the bat, but creating a custom IM client in 20 minutes can inspire someone to keep learning. Have fun!

其他回答

有一本维基百科非常适合学习python。

我不知道其他语言的维基百科是怎样的,但我个人是从2007年2月的维基百科上学习python的

Ps -如果你不熟悉维基书,它基本上是维基百科版本的书籍创作。这有点难以描述,但如果你看了几本书你就会明白它是如何工作的

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

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

只有我的0.02美元

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.

我建议首先教授几乎所有语言都使用的基本知识,但不需要语言。概述所有的基本概念If-Else If-Else,循环,类,变量类型,结构等。这是大多数语言的基础。然后转向真正理解布尔、比较和复杂的and或语句,以了解更复杂语句的结果。

通过这样做,他将理解编程的概念,并更容易地进入语言,从那里它只是学习语言的复杂细节,它的功能和语法。

我通过学习如何使用流程图和PDL(程序设计语言)以语言无关的方式解决问题。几周之后,我学会了把我写的PDL转换成一种语言。我很高兴我学会了这种方法,因为我大部分时间都在编程,解决问题,而不依赖于语言。我使用什么语言一直是实现细节,而不是设计的一部分。

通过将问题分解为基本步骤来解决问题是一项关键技能。我认为这是区分那些会编程和不会编程的人的一个因素。

至于如何处理语言概念的顺序,我认为最简单的方法是在脑海中有一个项目,并根据需要处理这些概念。这让你可以在你感兴趣的事情上应用它们。在学习一门语言的时候,最好在脑海中有几个简单的计划,还有几个逐步复杂的计划。决定这些将帮助你规划出需要的概念和它们的顺序。