share
Stack OverflowBest ways to teach a beginner to program?
[+324] [86] Justin Standard
[2008-08-06 05:01:16]
[ python language-agnostic ]
[ https://stackoverflow.com/questions/3088/best-ways-to-teach-a-beginner-to-program ]

Original Question

I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (But the answers to this post have helped a lot.)

What can I do better to teach him effectively? Is there a logical order that I can use to run through concept by concept? Are there complexities I should avoid till later?

The language we are working with is Python [1], but advice in any language is welcome.


How to Help

If you have good ones please add the following in your answer:

Please describe the resource with a link to it so I can take a look. I want everyone to know that I have definitely been using some of these ideas. Your submissions will be aggregated in this post.


Online Resources for teaching beginners:


Recommended Print Books for teaching beginners

I don't understand why this should be closed. At least 295 users have found this question (and the 92 answers) to be helpful enough to up-vote it, with 290 going so far as to consider it one of their favorites. The question resulted in a very useful aggregation of teaching resources. It hasn't really resulted in 'arguments' or 'debates', but really a lot of great advice about how to address one of the difficult 'human factors' in programming. I think closing a question like this is draconian and detrimental to the StackOverflow community. - Justin Standard
@JustinStandard Have you considered converting your edits to several of the answers to comments? E.g. here, here, and here - Jason Plank
[+118] [2008-08-06 06:00:28] Eric Haskins

I've had to work with several beginner (never wrote a line of code) programmers, and I'll be doing an after school workshop with high school students this fall. This is the closest thing I've got to documentation. It's still a work in progress, but I hope it helps.

1) FizzBuzz. Start with command line programs. You can write some fun games, or tools, very quickly, and you learn all of the language features very quickly without having to learn the GUI tools first. These early apps should be simple enough that you won't need to use any real debugging tools to make them work.

If nothing else things like FizzBuzz are good projects. Your first few apps should not have to deal with DBs, file system, configuration, ect. These are concepts which just confuse most people, and when you're just learning the syntax and basic framework features you really don't need more complexity.

Some projects:

  • Hello World!
  • Take the year of my birth, and calculate my age (just (now - then) no month corrections). (simple math, input, output)
  • Ask for a direction(Up, down, left, right), then tell the user their fate (fall in a hole, find a cake, ect). (Boolean logic)
  • FizzBuzz, but count once every second. (Loops, timers, and more logic)
  • Depending on their age some really like an app which calls the users a random insult at some interval. (Loops, arrays, timers, and random if you make the interval random)

2) Simple Project Once they have a good grasp of language features, you can start a project(simple, fun games work good.). You should try to have the first project be able to be completed within 6-12 hours. Don't spend time to architect it early. Let them design it even if it sucks. If it falls apart, talk about what happened and why it failed, then pick another topic and start again.

This is where you start introducing the debugging capabilities of your tools. Even if you can see the problem by reading the code you should teach them how to use the tools, and then show them how you could see it. That serves the dual purpose of teaching the debugging tools and teaching how to ID errors without tools.

Once, or if, the project gets functional you can use it to introduce refactoring tools. Its good if you can then expand the project with some simple features which you never planned for. This usually means refactoring and significant debugging, since very few people write even half decent code their first time.

Some projects:

3) Real Project Start a real project which may take some time. Use proper source control, and make a point to have a schedule. Run this project like a real project, if nothing else its good experience having to deal with the tools.

Obviously you need to adjust this for each person. The most important thing I've found is to make even the first simple apps apply to what the person is interested in.

Some projects:

  • Tetris
  • Text file based blog engine
  • More advanced robotics work
[1] http://www.vexlabs.com
[2] http://mindstorms.lego.com

This is a great guide. Personally, I cannot code my way out of a paper bag (I'd like to see someone do that in real life, actually), so this looks like a good guide for teaching myself too. - keyofnight
This is a very good answer. My only objection is that Tetris not a good choice for a first or second game. At that level, the collision detection can be a hard problem - it's great if they can solve it. - phkahler
@phkahler I see your point, but I believe Tetris is interesting because there are so many OSS/demo implementation you can analize before and after writing your code. - Eric Haskins
1
[+30] [2008-08-06 05:29:49] Jason Pratt

You could try using Alice [1]. It's a 3D program designed for use in introductory programming classes.

The two biggest obstacles for new programmers are often:

  • syntax errors
  • motivation (writing something meaningful and fun rather than contrived)

Alice uses a drag and drop interface for constructing programs, avoiding the possibility of syntax errors. Alice lets you construct 3D worlds and have your code control (simple) 3D characters and animation, which is usually a lot more interesting than implementing linked lists.

Experienced programmers may look down at Alice as a toy and scoff at dragging and dropping lines of code, but research [2] shows that this approach works.

Disclaimer: I worked on Alice.

[1] http://www.alice.org/
[2] http://www.alice.org/index.php?page=publications/publications

I came to know of it through Randy Pausch's last lecture. The reasoning behind this project blew my mind. - Jesvin Jose
2
[+28] [2008-08-20 21:09:00] Magus

I recommend Logo (aka the turtle) to get the basic concepts down. It provides a good sandbox with immediate graphical feedback, and you can demostrate loops, variables, functions, conditionals, etc. This page [1] provides an excellent tutorial.

After Logo, move to Python or Ruby. I recommend Python, as it's based on ABC, which was invented for the purpose of teaching programming.

When teaching programming, I must second EHaskins's suggestion of simple projects and then complex projects. The best way to learn is to start with a definite outcome and a measurable milestone. It keeps the lessons focused, allows the student to build skills and then build on those skills, and gives the student something to show off to friends. Don't underestimate the power of having something to show for one's work.

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 [2] describes Python's power a little better: "You&squot;re flying! How?" "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.

[1] http://mckoss.com/logo/
[2] http://xkcd.com/353/

Actually, you don't fully manage the memory in C. You get to have malloc, etc, and free manage it for you. You just have to tell the system when you want more memory and when you're done with memory that you've been using. - compman
3
[+15] [2008-08-06 05:47:05] Mark Harrison

A good python course is MIT's A Gentle Introduction to Programming Using Python [1]. It's all free online, and you don't have to be an MIT uberstudent to understand it.

Edit [ Justin Standard [2]]

This course uses this free online book: How To Think Like a Computer Scientist [3]
I'm definitely finding it quite useful.

[1] http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-189January--IAP--2008/CourseHome/
[2] https://stackoverflow.com/users/92/justin-standard
[3] http://www.openbookproject.net/thinkcs/python/english2e/index.xhtml

4
[+12] [2008-09-08 18:26:28] jfs

Python package VPython [1] -- 3D Programming for Ordinary Mortal ( video tutorial [2]).

Code example: [3]

from visual import *

floor = box (pos=(0,0,0), length=4, height=0.5, width=4, color=color.blue)
ball = sphere (pos=(0,4,0), radius=1, color=color.red)
ball.velocity = vector(0,-1,0)
dt = 0.01

while 1:
    rate (100)
    ball.pos = ball.pos + ball.velocity*dt
    if ball.y < ball.radius:
        ball.velocity.y = -ball.velocity.y
    else:
        ball.velocity.y = ball.velocity.y - 9.8*dt

VPython bouncing ball http://vpython.org/bounce.gif [4]

[1] http://vpython.org
[2] http://showmedo.com/videos/video?name=pythonThompsonVPython1&fromSeriesID=30
[3] http://vpython.org/vpythonprog.htm
[4] http://vpython.org/bounce.gif

Good for just after they've learned the basic concepts. Creating visuals is a great way to motivate people to learn programming. - phkahler
5
[+12] [2009-02-25 21:00:08] dyoung

Begin with Turtle graphics in Python.

I would use the turtle graphics which comes standard with Python. It is visual, simple and you could use this environment to introduce many programming concepts like iteration and procedure calls before getting too far into syntax. Consider the following interactive session in python:

>>> from turtle import *
>>> setup()
>>> title("turtle test")
>>> clear()
>>>
>>> #DRAW A SQUARE
>>> down()        #pen down
>>> forward(50)   #move forward 50 units
>>> right(90)     #turn right 90 degrees
>>> forward(50)
>>> right(90)
>>> forward(50)
>>> right(90)
>>> forward(50)
>>>
>>> #INTRODUCE ITERATION TO SIMPLIFY SQUARE CODE
>>> clear()
>>> for i in range(4):
        forward(50)
        right(90)
>>>
>>> #INTRODUCE PROCEDURES   
>>> def square(length):
        down()
        for i in range(4):
            forward(length)
            right(90)
>>>
>>> #HAVE STUDENTS PREDICT WHAT THIS WILL DRAW
>>> for i in range(50):
        up()
        left(90)
        forward(25)
        square(i)
>>>
>>> #NOW HAVE THE STUDENTS WRITE CODE TO DRAW
>>> #A SQUARE 'TUNNEL' (I.E. CONCENTRIC SQUARES
>>> #GETTING SMALLER AND SMALLER).
>>>
>>> #AFTER THAT, MAKE THE TUNNEL ROTATE BY HAVING
>>> #EACH SUCCESSIVE SQUARE TILTED

In trying to accomplish the last two assignments, they will have many failed attempts, but the failures will be visually interesting and they'll learn quickly as they try to figure out why it didn't draw what they expected.


6
[+11] [2008-08-22 10:35:35] DrPizza

The key thing is that the person in question needs to have some problem that they want solving. If you don't have a program that you want to write (and something sensible and well-defined, not "I want to write the next Quake!") then you can't learn to program, because you have nothing to motivate you. I mean, you could read a book and have a rough understanding of a language's syntax and semantics, but until you have a program that you want written you'll never grasp the nettle.

If that impetus exists then everything else is just minor details.


The best way to learn any technical subject, I think, is by learning to solve small, incremental problems. - cbednarski
7
[+8] [2010-10-19 00:42:21] inspectorG4dget

I don't know if anyone has mentioned this here, yet, but You might want to check out Zed Shaw [1]'s Learn Python the Hard Way [2]

Hope this Helps

[1] http://www.zedshaw.com/
[2] http://www.learnpythonthehardway.com

8
[+7] [2008-08-06 16:37:38] CodingWithoutComments

http://tryruby.hobix.com/">Try Ruby (In Your Browser)


Nice! It seems easy and powerful to use Ruby - Luc M
9
[+7] [2008-08-07 10:04:27] grom

How to Design Programs [1]

Structure and Interpretation of Computer Programs [2] . Videos lectures at http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman-lectures/

[1] http://www.htdp.org/
[2] http://mitpress.mit.edu/sicp/full-text/book/book.html

10
[+5] [2008-08-07 05:33:05] Jarin Udom

This is a fantastic book which my little brothers used to learn:

http://pine.fm/LearnToProgram/

Of course, the most important thing is to start on a real, useful program of some kind IMMEDIATELY after finishing the book.


11
[+4] [2008-08-06 05:08:37] jj33

If he's interested, aren't the minor details the good parts? Using python, you've already cut the GUI off of it so that confusion is gone. Why not pick a project, a game or something, and implement it. The classic hi-lo number guessing game can be simply implemented from the command line in 20-30 lines of code (depending on language of course) and gives you variables, conditions, loops, and user input.


W.r.t. hi-lo: stackoverflow.com/questions/811074/… - Stephan202
12
[+4] [2008-08-09 01:37:07] Esteban Araya

I'd just let him write tons of code. Let him drive in everything you guys do, and just be available to answer questions.

Believe it or not, after a few months of writings tons of crappy code, he'll start to get the idea and start writing better programs. At that point, you can get bogged down in details (memory, etc), and also talk about general design principles.

I've heard that what separates the great artists from the mediocre ones, is that every time they practice, they improve on something, no matter how small. Let your brother practice, and he'll improve every time he sits down at the keyboard.

Edit: [Justin Standard]

Esteban, this reminds me of a recent coding horror post [1], and I do think you are right. But I think its still worthwhile to find methods to guide his practice. No question, I want him writing as much code as he knows how to do. Thats one reason I'm asking for sample projects.

[1] http://www.codinghorror.com/blog/archives/001160.html

Yes, I know which post you're talking about Justin. Reading it reminded me how most of the things I've learned have come from trying and learning from my own mistakes. I really can't emphasize enought the importance of learning by doing! - Esteban Araya
13
[+2] [2008-08-06 05:13:15] Brandon Wood

First of all, start out like everyone else does: with a Hello World [1] program. It's simple, and it gives them a basic feel for the layout of a program. Try and remember back to when you were first programming, and how difficult some of the concepts were - start simple.

After Hello World, move on to creating some basic variables, arithmetic, then onto boolean logic and if/else statements. If you've got one of your old programming textbooks, check out some of the early examples and have him run through those. Just don't try to introduce too much all at once, or it will be overwhelming and confusing.

[1] http://en.wikipedia.org/wiki/Hello_world

14
[+2] [2008-08-06 05:18:46] Anton

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.


15
[+2] [2008-08-06 06:07:51] sparkes

I used to teach programming and your brother has one main advantage over most of my students he wants to learn :)

If you decide to go with C a friend has a site [1] that has the sort of programs those of use from older generations remember as basic type-ins. The more complex of them use ncurses which sort of negates their use as a teaching aid somewhat but some of them are tiny little things and you can learn loads without being taught to.

Personally I think Python and Ruby would make great first languages.

EDIT: list of beginner programming assignments [2] appeared overnight might be just what you are looking for.

[1] http://cymonsgames.retroremakes.com/
[2] http://cymonsgames.retroremakes.com/beginners-programming-homework/

16
[+2] [2008-08-06 10:44:54] CAD bloke

It really depends on your brother's learning style. Many people learn faster by getting their hands dirty & just getting into it, crystallising the concepts and the big picture as they progress and build their knowledge.

Me, I prefer to start with the big picture and drill down into the nitty-gritty. The first thing I wanted to know was how it all fits together then all that Object-oriented gobbledygook, then about classes & instances and so-on. I like to know the underlying concepts and a bit of theory before I learn the syntax. I had a bit of an advantage because I wrote some games in BASIC 20 years ago but nothing much since.

Perhaps it is useful to shadow a production process by starting with an overall mission statement, then a plan and/or flowchart, then elaborate into some pseudo code (leaning towards the syntax you will ultimately use) before actually writing the code.

The golden rule here is to suss out your student's leaning style.


17
[+2] [2008-08-20 21:54:17] CodeCurious

If your brother has access to iTunes, he can download video lectures of an introductory computer science course given by Richard Buckland at the University of New South Wales. He's an engaging instructor and covers fundamentals of computing and the C language. If nothing else, tell your brother to play the vids in the background and some concepts might sink in through osmosis. :)

COMP1917 Higher Computing - 2008 Session 1 http://deimos3.apple.com/WebObjects/Core.woa/Browse/unsw.edu.au.1504975442.01504975444

If the link doesn't work, here's a path:

Home -> iTunes U --> Engineering --> COMP1917 Higher Computing - 2008 Session 1


18
[+2] [2008-08-26 03:39:08] Jiaaro

there's a wikibook that is pretty good for learning python [1].

I don't know how the wikibooks are for other languages, but I personally learned python from the wikibook as it was in Feb 2007

ps - if you're unfamiliar with wikibooks [2], it's basically the wikipedia version of book authoring. it's sort of hard to describe, but if you check out a few of the books on there you'll see how it works

[1] http://en.wikibooks.org/wiki/Programming:Python
[2] http://en.wikibooks.org/wiki/Main_Page

19
[+2] [2008-09-08 17:55:47] jfs

Python Programming for the absolute beginner [1]

Python Programming for the absolute beginner cover http://safari.oreilly.com/images/1592000738/1592000738_xs.jpg [2]

[1] http://safari.oreilly.com/1592000738
[2] http://safari.oreilly.com/images/1592000738/1592000738_xs.jpg

20
[+2] [2009-08-04 22:20:23] Sean

I think Python is a great idea. I would give him a few basic assignments to do on his own and tell him that any dead ends he hits can probably be resolved by a trip to google. For me, at least, solving a problem on my own always made it stick better than someone telling me the solution.

Some possible projects (in no particular order):

  • 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

I would also suggest doing some stuff with xTurtle or another graphics module to mix things up and keep him from getting boring. Of course, this is very much practice programming and not the scripting that a lot of people would really be using python for, but the examples I gave are pretty much directly taken from when I was learning via python and it worked out great for me. Good luck!


21
[+2] [2010-03-19 13:44:53] Łukasz Lew

Just make it fun !

Amazingly Scala might be the easiest if you try Kojo [1]

[1] http://www.kogics.net/sf:kojo

22
[+2] [2010-04-07 00:35:21] Jacinda

If your brother likes puzzles, I would recommend Python Challenge [1]. I wouldn't use it as a formal teaching tool in a 1 on 1 tutorial, but it's something he can do when you're not together to challenge himself and have some fun.

[1] http://www.pythonchallenge.com

23
[+2] [2010-12-08 16:58:37] Steve V.

Python Challenge [1]

[1] http://www.pythonchallenge.com/

24
[+2] [2011-01-03 01:54:43] chrisfs

After going through a few free e-books, I found the best book for learning to program was Head First Programming published by O'Reily Press. It uses Python as the language and gives you programs to work on from the very start. They are all more interesting that 'Hello World'. It's well worth the money I spent on it, and since it's been out for a bit you may be able to find a cheaper used copy on Ebay or Amazon.


25
[+1] [2008-08-06 07:15:53] Lea Cohen

If you want to teach the basics of programming, without being language specific, there is an application called Scratch [1] that was created in MIT. It's designed to help people develop programming skills. As users create Scratch projects, they learn to create conditions, loops, etc. There is a also a community of scratch projects, form which projects can be downloaded - that way you can explore other people's programs and see how they were built.

[1] http://scratch.mit.edu/

26
[+1] [2008-08-07 22:12:54] DanV

I think that once he has the basics (variables, loops, etc) down you should try to help him find something specific that he is interested in and help him learn the necessities to make it happen. I know that I am much more inclined and motivated to do something if it's of interest to me. Also, make sure to let him struggle though some of the tougher problems, nothing is more satisfying than the moment you figure it out on your own.


27
[+1] [2008-08-09 02:23:54] bruceatk

I was taught by learning how to solve problems in a language agnostic way using flowcharts and PDL [1] (Program Design Language). After a couple weeks of that, I learned to convert the PDL I had written to a language. I am glad I learned that way because I have spent the majority of my years programming, solving problems without being tied to a language. What language I use has always been an implementation detail and not part of the design.

Having to solve the problem by breaking it down into it's basic steps is a key skill. I think it is one of the things that separates those that can program from those that can't.

As far as how you tackle the order of concepts of a language I believe the easiest way is to decide that is to have a project in mind and tackle the concepts as they are needed. This lets you apply them as they are needed on something that you are interested in doing. When learning a language it is good to have several simple projects in mind and a few with progressive complexity. Deciding on those will help you map out the concepts that are needed and their order.

[1] http://en.wikipedia.org/wiki/Program_Design_Language

28
[+1] [2008-08-09 08:17:05] martinsb

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.


29
[+1] [2008-08-09 16:28:05] David

Robert Read wrote a useful guide, How to be a Programmer [1], which covers a wide area of programming issues that a beginner would find helpful.

[1] http://samizdat.mines.edu/howto/HowToBeAProgrammer.html

30
[+1] [2008-08-11 04:30:31] Nick Mabry

There have already been a bunch of great answers, but for an absolute beginner, I would wholeheartedly recommend Hackety Hack [1]. It was created by the unreasonably prolific why_the_lucky_stiff [2] 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!

[1] http://hacketyhack.net/
[2] http://whytheluckystiff.net/

31
[+1] [2008-08-11 12:23:24] Mark Ingram

Copy some simple code line by line and get them to read and interpret it as they go along. They will soon work it out. I started programming on an Acorn Electron with snippets of code from Acorn magazines. I had no idea about programming when I was 6, I used to copy the text, but gradually I learnt what the different words meant.


32
[+1] [2008-08-13 06:10:25] Andrew Grant

This may sound dumb, but why are YOU trying to teach your brother to program?

Often the best learning environment consists of an goal that can be achieved by a keen beginner (a sample program), an ample supply of resources (google/tutorials/books), and a knowledgeable source of advice that can provide guidance when needed.

You can definitely help with suggestions for the first two, but the last is your primary role.


33
[+1] [2008-08-13 09:29:29] Nexus

I'd suggest taking an approach similiar to that of the book, Accelerated C++ [1] in which they cover parts of C++ that are generally useful for making simple programs. For anyone new to programming I think having something to show for a little amount of effort is a good way to keep them interested. Once you have covered the fundamentals of Python then you should sit back and let him experiement with the language.

In one of my University subjects for this semester they have taken an approach called Problem Based Learning(PBL) in which they use lectures to stimulate students about different approaches to problems. Since your brother is keen you should take a similiar approach. Set him small projects to work on and let him figure it out for himself. Then once he is finished you can go through his approach and compare and contrast with different methods.

If you can give him just the right amount of help to steer him in the right direction then he should be fine. Providng him with some good websites and books would also be a good idea.

I'd also recommend sticking away from IDE's at the starting stages. Using the command line and a text editor will give him a greater understanding of the processes involved in compiling/assembling code.

I hope I've been of some help. :)

[1] http://www.acceleratedcpp.com/

34
[+1] [2008-08-16 00:46:31] Wing

Plenty of things tripped me up in the beginning, but none more than simple mechanics. Concepts, I took to immediately. But miss a closing brace? Easy to do, and often hard to debug, in a non-trivial program.

So, my humble advice is: don't understimate the basics (like good typing). It sounds remedial, and even silly, but it saved me so much grief early in my learning process when I stumbled upon the simple technique of typing the complete "skeleton" of a code structure and then just filling it in.

For an "if" statement in Python, start with:

if  :

In C/C++/C#/Java:

if () 
{

}

In Pascal/Delphi:

If () Then
Begin

End

Then, type between the opening and closing tokens. Once this becomes a solid habit, so you do it without thinking, more of the brain is freed up to do the fun stuff. Not a very flashy bit of advice to post, I admit, but one that I have personally seen do a lot of good!

Edit: [ Justin Standard [1]]

Thanks for your contribution, Wing. Related to what you said, one of the things I've tried to help my brother remember the syntax for python scoping, is that every time there's a colon, he needs to indent the next line, and any time he thinks he should indent, there better be a colon ending the previous line.

[1] https://stackoverflow.com/users/92/justin-standard

35
[+1] [2008-08-18 15:24:16] Peter Stuifzand

How about this: Spawning the next generation of hackers [1] by Nat Torkington.

[1] http://vodpod.com/watch/914464-inspirational-oscon-keynote

36
[+1] [2008-08-19 14:52:48] kemiller2002

There is a book called Code. I can't remember who wrote it, but it goes through the basics of a lot of stuff that we (programmers) know and take for granted that people we talk to know also. Everything from how do you count binary to how processors work. It doesn't have anything dealing with programming languages in it (well from what I remember), but it is a pretty good primer. I will admit that I am also of the school that believes you have to know how the computer works to be able to effectively program things for it.


(1) Guess it is the Charles Petzold Book is.gd/3oes - rshimoda
37
[+1] [2008-08-22 14:09:28] Acuminate

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 [1] 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.

[1] http://diveintopython.net/

38
[+1] [2008-08-22 20:27:05] Jared Updike

Project Euler [1] has a number of interesting mathematics problems that could provide great material for a beginning programmer to cut her teeth on. The problems begin easy and increase in difficulty and the web is full of sample solutions in various programming languages [2].

[1] http://projecteuler.net/
[2] http://www.google.com/search?hl=en&lr=&safe=active&q=project+euler+solutions&btnG=Search

39
[+1] [2008-08-23 18:14:19] Jonathan Webb

I'd recommend Charles Petzold's book Code - The Hidden Langauge of Computer Hardware and Software [1] as an excellent general introduction to how computers work.

There's a lot of information in the book (382 pages) and it may take an absolute beginner some time to read but it's well worth it. Petzold manages to explain many of the core concepts of computers and programming from simple codes, relays, memory, CPUs to operating systems & GUIs in a very clear and enjoyable way. It will provide any reader with a good sense of what's actually happening behind the scenes when they write code.

I certainly wish it was around when I was first learning to program!

[1] http://books.google.com/books?id=l4gpAAAACAAJ&dq=petzold+code&ei=2U-wSL_hNoLmygSxpcmoDQ

40
[+1] [2008-08-26 19:12:37] dwestbrook

I don't know for sure what will be the best for your brother, but I know I started with python. I've been playing various games from a very early age and wanted to make my own, so my uncle introduced me to python with the pygame [1] library. It has many tutorials and makes it all easy (WAY easier than openGL in my opinion). It is limited to 2d, but you should be starting out simple anyway.

My uncle recommended python because he was interested in it at the time, but I recommend it, now fairly knowledgeable, because it's easy to learn, intuitive (or as intuitive as a programming language can get), and simple (but certainly not simplistic).

I personally found basic programming simply to learn programming obscenely boring at the time, but picked up considerable enthusiasm as I went. I really wanted to be learning in order to build something, not just to learn it.

[1] http://www.pygame.org/

41
[+1] [2008-08-28 23:59:23] joel.neely

Begin by asking him this question: "What kinds of things do you want to do with your computer?"

Then choose a set of activities that fit his answer, and choose a language that allows those things to be done. All the better if it's a simple (or simplifiable) scripting environment (e.g. Applescript, Ruby, any shell (Ksh, Bash, or even .bat files).

The reasons are:

  1. If he's interested in the results, he'll probably be more motivated than if you're having him count Fibonacci's rabbits.
  2. If he's getting results he likes, he'll probably think up variations on the activities you create.
  3. If you're teaching him, he's not pursuing a serious career (yet); there's always time to switch to "industrial strength" languages later.

42
[+1] [2008-09-01 13:21:44] Martin Salias

A good resource to teach young people is the free eBook "Invent your own games with Python":

http://pythonbook.coffeeghost.net/book1/IYOCGwP_book1.pdf


43
[+1] [2008-09-08 17:40:52] Jake Hackl

If he is interested than I wouldn't worry about focusing on games or whatnot. I'd just grab that beginners 'teach yourself x' book you were about to throw and give it him and let him struggle through it. Maybe talk about it after and then do another and another. After then I'd pair program with him so he could learn how shallow and lame those books he read were. Then I'd start having him code something for himself. A website to track softball stats or whatever would engage him. For me it was a database for wine back in the day.

After that I would start in on the real books, domain design, etc.


44
[+1] [2008-09-10 00:29:18] Gürkan Yeniçeri

I skimmed through the comments and looks like nobody mentioned Foundations of Programming [1] from www.CodeBetter.com [2]. Although it requires a bit of foundation, it can certainly be a next step in the learning process.

[1] http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming-ebook.aspx
[2] http://www.CodeBetter.com

45
[+1] [2008-09-19 11:43:53] Federico A. Ramponi

Once he has the basics, I suggest the Tower of Hanoi [1] as a good exercise. I recommend beginning with the wooden toy if you have one; let him try to solve the problem by himself and describe his method in a systematic way. Show him where recursion comes into play. Explain him how the number of moves depends on the number of disks. Then let him write a program to print the sequence of moves, in your language of choice.

[1] http://en.wikipedia.org/wiki/Tower_of_Hanoi

46
[+1] [2008-09-20 22:23:18] Gu1234

Very good video introduction course by Stanford university (no prior knowledge required):

Programming Methodology [1]

Will teach you good "methodologies" every programmer should know and some Java programming.

[1] http://see.stanford.edu/see/lecturelist.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111

47
[+1] [2009-02-14 13:47:20] Esko Luontola

Book: Java Programming for Kids, Parents and Grandparents [1] (PDF)

I don't have personal experience about learning using that book, but it appears to be nice because it quickly goes into producing something visible, and not spending too much time with the syntactic itty bitty details. Has someone here tried using that book?

[1] http://myflex.org/yf/JavaKid811.pdf

48
[+1] [2009-03-18 14:51:51] jbdavid

once you've taught them how to program, they might want to learn how to develop software.. for that I think Greg Wilson's Software Carpentry [1] course is great.. it also uses Python as the student's language.

[1] http://www.swc.scipy.org/

49
[+1] [2009-07-08 09:57:21] bastianneu

I think Python is a really great Language to start with: :-)

I suggest you to try http://www.pythonchallenge.com/

It is build like a small Adventure and every Solutions links you to a new nice Problem.

After soluting the Problem you get access to a nice Forum to talk about your Code and get to see what other people created.


50
[+1] [2009-08-04 21:42:17] Ram Rachum

I can recommend my project, PythonTurtle [1].

Summary:

PythonTurtle strives to provide the lowest-threshold way to learn Python. Students command an interactive Python shell (similar to the IDLE development environment) and use Python functions to move a turtle displayed on the screen. An illustrated help screen introduces the student to the basics of Python programming while demonstrating how to move the turtle.

It looks like this:

alt text http://www.pythonturtle.com/screenshot.gif [2]

[1] http://pythonturtle.com
[2] http://www.pythonturtle.com/screenshot.gif

51
[+1] [2009-08-26 15:22:35] Rob Sobers

Try to find a copy of Why's (Poignant) Guide to Ruby [1] online. The original site is offline but I'm sure there are a few mirrors out there. It's not your typical programming guide; it puts a unique (and funny) spin on learning a new language that might suit your friend. Not to mention, Ruby is a great language to learn with.

[1] http://en.wikipedia.org/wiki/Why's_(poignant)_Guide_to_Ruby

52
[+1] [2010-04-17 12:33:32] Mithrill

Academic Earth [1] offers links to free Computer Science courses from top universities. They have a section geared towards Beginning Computer Science. The languages taught in the beginning courses vary:

  • MIT - Introduction to Computer Science and Programming - Python
  • Stanford - Computer Science I: Programming Methodology - Java
  • Harvard - Introduction to Computer Science I - C (main focus), with a few others sprinkled in for good measure (e.g., SQL, PHP, LISP, Assembler, etc.)
  • Berkeley - a dialect of the LISP language
[1] http://academicearth.org/subjects/computer-science/category:14

53
[0] [2008-08-06 05:16:25] Mike Stone

I would actually argue to pick a simpler language with fewer instructions. I personally learned on BASIC at home, as did Jeff [1]. This way, you don't have to delve into more complicated issues like object oriented programming, or even procedures if you don't want to. Once he can handle simple control flow, then move on to something a little more complicated, but only simple features.

Maybe start with very simple programs that just add 2 numbers, and then grow to something that might require a branch, then maybe reading input and responding to it, then some kind of loop, and start combining them all together. Just start little and work your way up. Don't do any big projects until he can grasp the fundamentals (otherwise it may very well be too daunting and he could give up midway). Once he's mastered BASIC or whatever you choose, move on to something more complicated.

Just my $0.02

[1] http://www.codinghorror.com/blog/archives/001104.html

54
[0] [2008-08-06 06:20:28] Jon Limjap

I think the "wisdom of crowds" work here. How did most people learn how to program? Many claim that they did so by copying programs of others, usually games they wanted to play in BASIC.

Maybe that route will work with him too?


55
[0] [2008-08-06 17:32:33] Kevin

I agree with Leac. I actually play with Scratch [1] sometimes if I'm bored. It's a pretty fun visual way of looking at code.

How it works is, they give you a bunch of "blocks" (these look like legos) which you can stack. And by stacking these blocks, and interacting with the canvas (where you put your sprites, graphics), you can create games, movies, slideshows... it's really interesting.

When it's complete you can upload it right to the Scratch websites, which is a youtube-ish portal for Scratch applications. Not only that, but you can download any submission on the website, and learn from or extend other Scratch applications.

[1] http://scratch.mit.edu/

56
[0] [2008-08-07 05:35:26] Ed.

I recommend starting them off with C/C++. I find that it is a good foundation for just about every other language. Also, the different versions of BASIC can be pretty dodgy, at best, and have no real correlation to actual programming.


57
[0] [2008-08-07 07:47:41] Polsonby

I think learning to program because you want to learn to program will never be as good as learning to program because you want to DO something. If you can find something that your brother is interested in making work because he wants to make it work, you can just leave him with Google and he'll do it. And he'll have you around to check he's going along the right path.

I think one of the biggest problems with teaching programming in the abstract is that it's not got a real-world context that the learner can get emotionally invested in. Programming is hard, and there has to be some real payoff to make it worth the effort of doing it. In my case, I'd done computer science at uni, learned Pascal and COBOL there, and learned BASIC at home before that, but I never really got anywhere with it until I became a self-employed web designer back in the 90s and my clients needed functionality on their web sites, and were willing to pay about 10x more for functionality than for design. Putting food on the table is a hell of a motivator!

So I learned Perl, then ASP/VBScript, then JavaScript, then Flash/ActionScript then PHP - all in order to make the stuff I wanted to happen.


58
[0] [2008-08-09 06:52:29] Rob Cooper

First off, I think there has already been some great answers, so I will try not to dupe too much.

  • Get them to write lots of code, keep them asking questions to keep the brain juices flowing.
  • I would say dont get bogged down with the really detailed information until they either run in to the implications of them, or they ask.

I think one of the biggest points I would ensure is that they understand the core concepts of a framework. I know you are working in Python (which I have no clue about) but for example, with ASP.NET getting people to understand the page/code behind model can be a real challenge, but its critical that they understand it. As an example, I recently had a question on a forum about "where do I put my data-access code, in the 'cs' file or the 'aspx' file".

So I would say, for the most part, let them guide the way, just be there to support them where needed, and prompt more questions to maintain interest. Just ensure they have the fundamentals down, and dont let them run before they can walk.

Good Luck!


59
[0] [2008-08-11 12:30:33] Tanerax

I would recommend in first teaching the very basics that are used in almost every language, but doing so without a language. Outline all the basic concepts If-Else If-Else, Loops, Classes, Variable Types, Structures, etc. Everything that is the foundation of most languages. Then move onto really understanding Boolean, comparisons and complex AND OR statements, to get the feeling on what the outcomes are for more complex statements.

By doing it this way he will understand the concepts of programming and have a much easier time stepping into languages, from there its just learning the intricate details of the languages, its functions, and syntax.


60
[0] [2008-08-11 12:59:16] BlaM

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).

I'd suggest that you use Microsoft's XNA [1] to start. In my experience starting to program is much more fun if you can see something on your screen, and XNA makes it really easy to get something moving on the screen. It's quite easy to do little changes and get another look, e.g. by changing colors, so he can see that his actions have an effect -> Impression of success. Success is fun, which is a great motivation to keep on learning.

[1] http://creators.xna.com/

61
[0] [2008-08-14 01:30:02] qwertyuu

This thread is very useful to me as a beginner (>100 lines of code) programmer.

Based on what I have been through, once I finished with the "Hello World" and move to variables and "if/else" statement, I got zapped with too much syntax; not knowing what to do with them.

So with an interesting simple project, I might get my interest up again. There are quite alot of project suggestions here.

Can I ask a questions here?

Is it better to learn a scripting language like Autohotkey [1] first?

Edit: [Justin Standard]

I think learning something macro-based like Autohotkey will only help minimally. Try learning a "real" programming language first. The easiest to get started with (according to most people) are python [2] and ruby [3]. I favor python, but both are pretty simple. There is also a full stackoverflow post [4] that answers the question of which language to start with.

[1] http://www.autohotkey.com/
[2] http://www.python.org
[3] http://www.ruby-lang.org/en/
[4] https://stackoverflow.com/questions/4769/easiest-language-to-start-with#4856

62
[0] [2008-08-14 16:23:14] Brad Gilbert

At first I was interested in how different programs worked, so I started by looking at the source code. Then when I began to understand how the program worked, I would change certain parameters to see what would happen. So basically I learned how to read before I learned how to write. Which coincidently is how most people learn English.

So if I was trying to teach someone how to program I would give them a small program to try to read and understand how it works, and have them just just play around with the source code.

Only then would I give them "assignments" to try to accomplish.

Now if they had a particular reason for wanting to learn how to program, it would certainly be a good idea to start with something along the lines of what they want to accomplish. For example if they wanted to be proficient in an application like blender [1], it would definably be a good idea to start with Alice [2].

I would absolutely recommend sticking with a language that has garbage collection, like D [3], Perl [4], or some interpreted language like javascript. It might be a good idea to stay away from Perl until Perl 6 [5] is closer to completion, because it fixes some of the difficulties of reading and understanding Perl.

[1] http://www.blender.org/
[2] http://www.alice.org/
[3] http://www.digitalmars.com/d/
[4] http://www.perl.org/
[5] http://www.perlfoundation.org/perl6

63
[0] [2008-08-16 15:56:38] samiq

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.

Back to my first CS 101, I started with notions of what an algorithm was by building a Tequila Sunrise (a step by step process that could be repeated at any time with the right ingredients, that will result in the same output), from there we move on to basic math functions using Scheme (like EHaskins was saying... start small and then build up), and from there to notions of loops, Boolean logic, structures and then building into concepts of objects and some simulation executions...

One of the good things about this approach is that language was not a goal but just a tool in the process of learning the concepts and basics of programming (just like operators, functions and else are in mathematics).

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.

From there on the sky is the limit!


64
[0] [2008-08-19 08:37:58] Imran

In my biased opinion, C is the best point to start. The language is small, it's high level features are ubiquitous and the low level features let you learn the machine.

I found the C Primer Plus, 5th Edition [1] very helpful as a beginning programmer with almost no programming experience. It assumes no prior programming experience, fun to read and covers C in depth (including the latest C99 standard).

[1] https://rads.stackoverflow.com/amzn/click/com/0672326973

65
[0] [2008-08-22 10:32:23] pkchukiss

For me, exploring and experimenting within the IDE itself helped me to learn Java and Visual Basic, but I learnt the basics of programming the hard way: Perl 5. There wasn't a free IDE back then, so it meant typing codes into Notepad, saving it, and then run the perl interpreter.

I'd say that IDEs make learning the basics of programming easier. Try playing around with control structures and variables first. Say in Java:

int a = 5;

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

Basically, simply learning the control structures and variables would allow a beginner to start coding fun stuff already.


66
[0] [2008-08-27 15:25:04] David Basarab

The best way to learn anything is to start with the basic. You can find any good text book to explain what programming is, memory, algorithms.

The next step select the language which it just depends on what the teacher knows or why the student wants to learn.

Then it is just code, code, code. Code every example right from the book. Then change it slightly to do another action. Learning to program is an active process not a passive one. You can't just read C++ How to Program by Dietal and then expect to code C++ without having actively done it while reading.

Even if you are an experienced coder it helps to write the code in the book to learn something new.


67
[0] [2008-09-04 20:23:36] Ja7on

Something to consider ... not everyone is capable of programming:

Some people just cannot get past things like:

A = 1

B = 2

A = B

(these people will still think A = 1)

Jeff has talked about this too. [1] In fact, my example is in the link (and explained, to boot).

[1] http://www.codinghorror.com/blog/archives/000635.html

68
[0] [2008-09-05 02:20:10] deadbug

It may seem weird, but I got started writing code by automating the tasks and data analysis at my former job. This was accomplished by recording then studying the code an Excel macro generated. Of course this approach assumes you can learn via VB.


69
[0] [2008-09-06 15:30:16] Luther Baker

Some additional information that someone could attach to Jason Pratt's earlier post on Alice [1] ... specifically, a Storytelling Alice [2] variant.

Although the study presented targets middle school girls, you may find the white paper [3] written by Caitlin Kelleher [4] interesting.

[1] http://www.alice.org/
[2] http://www.alice.org/kelleher/storytelling/
[3] http://www.cse.wustl.edu/~ckelleher/kelleherThesis_CSD.pdf
[4] http://www.cse.wustl.edu/~ckelleher/

70
[0] [2008-09-06 16:42:22] GrizzlyGuru

One I used with my kids is CEEBot [1]. It's not python, but it teaches C / Java style programming in a fun, robot-programming kind of game. It is aimed at 10-15 year olds, but it is a really good one.

[1] http://www.ceebot.com/ceebot/index-e.php

71
[0] [2008-09-07 20:25:02] David Lambert

Having small, obtainable goals is one of the greatest ways to learn any skill. Programming is no different. Python is a great language to start with because it is easy to learn, clean and can still do advanced things. Python is only limited by your imagination.

One way to really get someone interested is to give them small projects that they can do in an hour or so. When I originally started learning python I playing Code Golf [1]. They have many small challenges that will help teach the basics of programming. I would recommend just trying to solve one of the challenges a day and then playing with the concepts learned. You've got to make learning to program fun or the interest will be lost very quickly.

[1] http://www.codegolf.com

72
[0] [2008-09-12 20:51:18] BrewinBombers

As a non-programmer myself, I found the book "How to Program" from Pragmatic Programmers very helpful from a rudimentary standpoint. It's approachable and easy to read for a beginner. It won't take you from beginner to expert, but it will prepare you for what to do once you pick a language and pick up your first "Learn to Program in (language here)" book.


73
[0] [2008-09-16 06:51:29] leeborkman

A couple of other starting platforms:

  • A good programmable calculator (that's what I learnt on back in the 70s), and HP25 then HP41, now TI69, etc.
  • Interactive Fiction platforms, like "Inform 7" provide another angle on the whole thing
  • Flash/ActionScript

All of these are different and engaging, and any one of these might spark the kind of interest that is required to get a beginner of and running.

LBB


74
[0] [2008-09-16 10:31:42] user11495

I'd recommend Think Python [1].

[1] http://www.greenteapress.com/thinkpython/thinkpython.html

75
[0] [2008-09-19 12:08:42] J S

Your question quite depends on age and education of your brother, but if he is a child/teenager, I would recommend to do some GUI programming or graphic programming first (with Canvas etc.). It looks good, and you have immediate results. Algorithms are boring, and too abstract for young people (before say 15 years old).

When I started programming on ZX Spectrum (I was like 12 years old), I liked to draw various things on the screen, and it was still interesting. I didn't learn about real algorithmic techniques until I was maybe 18. Don't be mislead that such "simple" programming is a wrong start; the interest of the person learning it is the most important part of it.

So, I would look into PyKDE, PyGTK, PyQt or Python + OpenGL (there are certainly some tutorials on the net, I know of some Czech ones but that won't help you :)).

Of course, if your brother is older and has education close to mathematics, you can head directly to algorithms and such.


76
[0] [2008-09-21 22:27:48] Seth Morris

Whatever language and environment you choose, if the student wants to learn for professional reasons or to do "real" programming (whatever that is), have them start by writing their starter programs1 on paper and taking them away to run. Come back with the output and/or error results and have them fix things on paper.

This isn't especially harder at first than doing it on-screen and hitting run, but it will make things much easier when they start to discover the wonderful world of bugs.

1) short, "Hello, World!"-type programs that still have some logic and/or calculations, do this up to a few programs that can have bugs


77
[0] [2008-09-21 22:30:01] Seth Morris

Whatever they write, have them step through it in a debugger line-by-line on the first run. Let them see for themselves what the computer is doing. This takes a lot of mystery out of things, reduces intimidation ("oh, each line really is that simple!"), and helps them learn debugging skills and recognize why common errors are common (and why they're errors)


78
[0] [2008-10-03 11:38:45] Glitch

+1 to Stanford university lectures. http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111

They're simple, of high quality and I can vouch for their ability to teach beginners(me being one of them).


79
[0] [2008-10-11 23:32:32] Sergey Kivanov

I suggest " Computer Science Unplugged [1]" as a complementary didactical material.

[1] http://www.csunplugged.com

80
[0] [2008-10-30 04:38:26] Tim

"Who's Afraid of C++" By Heller

Might be worth a shot


careful - that 'shot' might blow your leg off, according to Stroustrup! - DaveDev
I actually meant that as a joke, but for reference: "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off" www2.research.att.com/~bs/bs_faq.html#really-say-that - DaveDev
Oh, I thought you meant he said something specific about that book. - Tim
81
[0] [2008-11-18 01:40:35] PoppaVein

Microsoft Small Basic [1] is a free .NET based programming environment aimed to be a "fun" learning environment for beginners. The language is a subset of VB.NET and even contains a "Turtle" object familiar from the Logo language. The website contains a step-by-step tutorial.

[1] http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

82
[0] [2008-11-18 02:06:58] Mike Dunlavey

I agree with superjoe30 above, but I don't have enough reputation yet to leave a comment.

I was a C.S. professor for 4 years. The languages were Basic, and then Pascal, but it doesn't really matter what the language is.

The biggest lesson I learned as a new prof was, no matter how simple I thought a concept was, it is not simple to a newbie. Never go any faster than your student can go. I can't emphasize that enough. Go really, really slow.

I would start with very simple stuff, read and print, maybe a simple calculation, just to get the student used to putting something in and getting something out. Then IF statements. Then really simple FOR loops, always in terms of something the student could write and have some fun with.

Then I would spend about 3 weeks teaching a very simple sort of machine language for a phony decimal machine called SIMPL, that you could single-step. The reason for doing this so the student could see where the "rubber meets the road", that computers do things step-by-step, and it makes a difference what order things happen in. Without that, students tend to think the computer can sort of read their mind and do everything all at once.

Then back to Basic. A couple weeks on arrays, because that is a big speed bump. Then sequential files, which is another speed bump. What I mean by "speed bump" is the student can be sailing along feeling quite confident, and then you hit them with a concept like arrays, and they are totally lost again, until you ease them through it.

Then, with those skills under their belts, I would have them pick a term project, because that is what makes programming interesting. Without a use for it, it's really boring. I would suggest a variety of projects, such as games, accounting programs, science programs, etc. It's really great to see them get turned on. Often they would ask me for help, and that's great, because you know they're learning.

While they were doing their projects, we would continue to cover more advanced programming techniques - searching, sorting, merging, how to make a simple database, etc.

Good luck. Teaching is hard work but satisfying when you see students grow.


83
[0] [2009-12-18 14:59:54] Rajavanya Subramaniyan

Use real world analogy and imaginary characters to teach them programming. Like when I teach people about variables and control statements etc.

Usually I start with calculator example. I say imagine u have a box for every variable and u have 10 card boards with numbers 0 - 9 printed on them. Say that the box can hold one cardboard at a time and similar ways to explain how programming elements work

And emphasis on how every operator works.. like the simple '=' operator always computes the right hand side first into one value. and put that value into box named "num_1" (which is variable name)

This has been very very effective, as they are able to imagine the flow very quickly.


84
[0] [2011-05-12 13:28:55] Andrew

Ask your brother if there's something he'd like to make a program do or invent a project for him that you think would interest him.

Something where he can know what the output is supposed to be and point him to the materials(on-line or in print) pertinent to the project. If he's coming into python or programming 'cold' be patient as he works his way through understanding the basics such as syntax, errors, scoping and be prepared to step aside and let him run and make his own mistakes when you start to see the light bulb go on over his head.


85
[0] [2011-05-29 03:05:52] user753986

I highly recommend Python Programming: An Introduction to Computer Science 2nd Edition [1] by John Zelle [2]. It is geared towards beginners, and deals with the semantics of programming. After reading you will be able to pick up other languages much faster because of Zelle's semantic vs. syntactic approach. Check it out!

[1] https://rads.stackoverflow.com/amzn/click/com/1590282418
[2] http://mcsp.wartburg.edu/zelle/

86