最初的问题
我目前正在教我弟弟编程。他完全是个初学者,但很聪明。(他真的很想学)。我注意到我们的一些会议陷入了一些小细节,我觉得我不是很有条理。(但这篇文章的答案有很大帮助。)
我怎样才能更好地有效地教他?是否有一个逻辑顺序,我可以用一个概念一个概念地运行?是否有什么复杂的问题我应该在以后再讨论?
我们正在使用的语言是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是个好主意。我会给他一些基本的任务让他自己去做,并告诉他,他遇到的任何死胡同都可以通过谷歌来解决。至少对我来说,自己解决问题总比别人告诉我解决方案更好。
一些可能的项目(排名不分先后):
Coin flip simulator. Let the user input a desired number of trials for the coin flipping. Execute it and display the results along with the percentage for heads or tails.
Make a temperature converter with a menu that takes user input to choose which kind of conversion the user wants to do. After choosing the conversion and doing it, it should return to the main menu.
Here's an example of an extended converter with the same idea: http://pastebin.org/6541
Make a program that takes a numeric input and displays the letter grade it would translate to. It'll end up evaluating the input against if and elif statements to find where it fits.
Make a simple quiz that goes through several multiple choice or fill in the blank questions. At the end it will display how the user did. He can pick any questions he wants.
Take an input of some (presumably large) number of pennies and convert it into bigger denominations. For example, 149 pennies = 1 dollar, 1 quarter, 2 dimes, and 4 pennies.
Create a simple list manager. Be able to add/delete lists and add/delete entries in those lists. Here's an example of a christmas list manager: http://pastebin.org/6543
Create a program that will build and then test whether entered numbers form a magic square (with a 2D array). Here's some sample code, but it should really print out the square at each step in order to show where the user is in terms of buliding the square: http://pastebin.org/6544
我还建议用xTurtle或其他图形模块做一些事情,把事情混合起来,让他不会感到无聊。当然,这是非常多的实践编程,而不是很多人真正使用python的脚本,但我给出的例子几乎直接取自我通过python学习的时候,它对我来说非常有用。好运!
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.
从那里开始,天空就是极限!
我建议采用类似于《加速c++》这本书的方法,在这本书中,它们涵盖了c++中通常对编写简单程序有用的部分。对于编程新手来说,我认为花点功夫就能展示一些东西是保持他们兴趣的好方法。一旦你掌握了Python的基础知识,那么你就应该坐下来,让他来实验这门语言。
在我这学期的一门大学课程中,他们采用了一种名为“基于问题的学习”(PBL)的方法,即通过讲座来激励学生使用不同的方法来解决问题。既然你哥哥很热心,你也应该采取类似的方法。让他做一些小项目,让他自己想办法。一旦他完成了,你可以通过他的方法,并与不同的方法进行比较和对比。
如果你能给他适当的帮助,引导他在正确的方向,那么他应该没事。为他提供一些好的网站和书籍也是一个好主意。
我还建议在开始阶段远离IDE。使用命令行和文本编辑器将使他更好地理解编译/汇编代码所涉及的过程。
希望我能帮上忙。:)