最初的问题

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

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

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


当前回答

My favourite "start learning to code" project is the Game Snakes or Tron because it allows you to start slow (variables to store the current "worm position", arrays to store the worm positions if the worm is longer than one "piece", loops to make the worm move, if/switch to allow the user to change the worm's direction, ...). It also allows to include more and more stuff into the project in the long run, e.g. object oriented programming (one worm is one object with the chance to have two worms at the same time) with inheritance (go from "Snakes" to "Tron" or the other way around, where the worm slightly changes behavior).

我建议您从微软的XNA开始。根据我的经验,如果你能在屏幕上看到一些东西,开始编程就会有趣得多,而XNA使得在屏幕上移动一些东西变得非常容易。做一些小的改变并获得另一种看法是很容易的,例如通过改变颜色,这样他就可以看到他的行动有效果->成功的印象。成功是有趣的,这是不断学习的巨大动力。

其他回答

这个线程是非常有用的我作为一个初学者(>100行代码)程序员。

基于我所经历的,一旦我完成了“Hello World”,并移动到变量和“if/else”语句,我得到了太多的语法;不知道该拿他们怎么办。

因此,通过一个有趣的简单项目,我可能会重新燃起我的兴趣。这里有很多项目建议。

我能问个问题吗?

先学习像Autohotkey这样的脚本语言会更好吗?

编辑:[Justin Standard] 我认为学习一些基于宏的东西,比如Autohotkey,只会有最低限度的帮助。试着先学习一门“真正的”编程语言。最简单的入门(根据大多数人的说法)是python和ruby。我更喜欢python,但两者都很简单。 还有一个完整的stackoverflow帖子回答了从哪种语言开始的问题。

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

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

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!

如果你的兄弟有iTunes,他可以下载新南威尔士大学理查德·巴克兰教授的计算机科学入门课程的视频。他是一个有吸引力的讲师,涵盖了计算和C语言的基础知识。如果不出意外的话,让你的兄弟把视频作为背景播放,一些概念可能会通过潜移默化的作用慢慢地吸收进去。:)

COMP1917高等计算- 2008年会议1 http://deimos3.apple.com/WebObjects/Core.woa/Browse/unsw.edu.au.1504975442.01504975444

如果链接不起作用,这里有一个路径:

Home -> iTunes U ->工程-> COMP1917高级计算- 2008会话1

对我来说,在IDE中探索和实验帮助我学习了Java和Visual Basic,但我学习编程的基础是艰苦的:Perl 5。那时候还没有一个免费的IDE,所以这意味着在记事本中输入代码,保存它,然后运行perl解释器。

我想说ide使学习编程基础更容易。先试试控制结构和变量。用Java说:

int a = 5;

for (int i = 0; i < a; i++) {
     System.out.println("i is now " + i);
}

基本上,简单地学习控制结构和变量就可以让初学者开始编写有趣的东西。