最初的问题
我目前正在教我弟弟编程。他完全是个初学者,但很聪明。(他真的很想学)。我注意到我们的一些会议陷入了一些小细节,我觉得我不是很有条理。(但这篇文章的答案有很大帮助。)
我怎样才能更好地有效地教他?是否有一个逻辑顺序,我可以用一个概念一个概念地运行?是否有什么复杂的问题我应该在以后再讨论?
我们正在使用的语言是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编程:计算机科学介绍第二版
你的问题取决于你兄弟的年龄和教育程度,但如果他是一个孩子/青少年,我建议你先做一些GUI编程或图形编程(使用Canvas等)。看起来不错,而且效果立竿见影。算法很无聊,对年轻人(比如说15岁之前)来说太抽象了。
当我开始在ZX Spectrum上编程时(我大概12岁),我喜欢在屏幕上画各种各样的东西,这仍然很有趣。我直到18岁才真正了解算法技术。不要被这种“简单”的编程是错误的开始所误导;学习它的人的兴趣是它最重要的部分。
所以,我会研究PyKDE, PyGTK, PyQt或Python + OpenGL(网上当然有一些教程,我知道一些捷克语,但这对你没有帮助:))。
当然,如果你的哥哥比你大,并且接受过数学方面的教育,你可以直接学习算法等。
My personal experience started back in elementary using Logo Writer (which in a way has evolved into Scratch), granted I was a little kid and computers where not as awesome as they are nowadays, but for the time being it took me places I hadn't been before... I think that's how I got hooked in the business... I could say that it was these first impressions based on such simplicity and coolness that made the goods that stick into my head for life. That's how basics in teaching programming should be taught... a simple process that yearns magic.
回到我的第一个CS 101,我从构建Tequila Sunrise(一个可以在任何时候使用正确的成分重复的一步一步的过程,将产生相同的输出)开始,从那里我们转向使用Scheme的基本数学函数(就像EHaskins说的那样……)从小的开始,然后逐渐增加),然后是循环、布尔逻辑、结构的概念,然后是对象的概念和一些模拟执行……
这种方法的一个好处是,在学习编程概念和基础知识的过程中,语言不是一个目标,而只是一个工具(就像运算符、函数和其他东西在数学中的作用一样)。
IMHO learning the basics of programming and creating a foundation is probably the best thing you could teach your brother, once the goal is covered then u can move on into a more general use language like python and teach them higher concepts like architecture and design patterns (make them natural in the process so he will get use to good practices from early stages and will see them as part of the process)... we are far from reinventing the warm water, but we always have to start by creating fire.
从那里开始,天空就是极限!
我推荐Logo(又名乌龟)来了解基本概念。它提供了一个具有即时图形反馈的良好沙盒,您可以演示循环、变量、函数、条件等等。这个页面提供了一个很好的教程。
在Logo之后,移动到Python或Ruby。我推荐Python,因为它基于ABC,而ABC是为了教授编程而发明的。
在教授编程时,我必须赞同EHaskins关于先简单项目再复杂项目的建议。最好的学习方法是从一个明确的结果和一个可衡量的里程碑开始。它使课程集中,允许学生建立技能,然后在这些技能的基础上继续发展,并给学生一些可以向朋友炫耀的东西。不要低估工作成果的力量。
Theoretically, you can stick with Python, as Python can do almost anything. It's a good vehicle to teach object-oriented programming and (most) algorithms. You can run Python in interactive mode like a command line to get a feel for how it works, or run whole scripts at once. You can run your scripts interpreted on the fly, or compile them into binaries. There are thousands of modules to extend the functionality. You can make a graphical calculator like the one bundled with Windows, or you can make an IRC client, or anything else.
XKCD更好地描述了Python的强大功能:
You can move to C# or Java after that, though they don't offer much that Python doesn't already have. The benefit of these is that they use C-style syntax, which many (dare I say most?) languages use. You don't need to worry about memory management yet, but you can get used to having a bit more freedom and less handholding from the language interpreter. Python enforces whitespace and indenting, which is nice most of the time but not always. C# and Java let you manage your own whitespace while remaining strongly-typed.
From there, the standard is C or C++. The freedom in these languages is almost existential. You are now in charge of your own memory management. There is no garbage collection to help you. This is where you teach the really advanced algorithms (like mergesort and quicksort). This is where you learn why "segmentation fault" is a curse word. This is where you download the source code of the Linux kernel and gaze into the Abyss. Start by writing a circular buffer and a stack for string manipulation. Then work your way up.