-
Website
http://adam.blinkinblogs.net/ -
Original page
http://adam.blinkinblogs.net/post/57791370 -
Subscribe
All Comments -
Community
-
Top Commenters
-
Eric
45 comments · 1 points
-
Adam Blinkinsop
48 comments · 1 points
-
firewallender
1 comment · 4 points
-
sydthekid
2 comments · 1 points
-
-
Popular Threads
As to the series of languages, what about SICP?
Basically, I don't want to dive straight into deeper things like data structures and Big-O notation. I want a quick and dirty way to get your hands dirty. I'm remembering how I learned to program (and I think you followed a similar path). I started by typing random stuff into QBasic until it finally capitalized one of the words, meaning I'd guessed a key word. From then on, I read a bunch of the help files and started writing my own text-based Final Fantasy clones. Eventually I also started hacking Nibbles and Gorillas and stuff like that, and finally this evolved into Space Wars. and on into binary trees, object oriented programming, 3d graphics, etc.
Anyway, I've decided I completely reject the idea that you need to dive first into Java and Object Oriented programming. Not even seasoned software engineers care about UML diagrams, let alone someone who's never written a line of code in their life. I think a good place to start is something where you start typing instructions into computers and in 20 seconds you can say "Look at what I made the computer do!" In other words, if "Hello, World!" takes more than one line of code, the language isn't a good teaching language. I think this rules out most things, except for QBasic, Python, Ruby, and Perl. I like Python, since it's a clean language with low initial overhead, but it also scales up to object oriented and functional programming too. Ruby probably does about the same, but I haven't gotten around to becoming fluent in Ruby yet.
I think a good test for an initial programming exercise is the wife/four year old test. After our first lesson, will my friend be able to take something home to his wife or four year old (who has played WoW since he was three...) and have them be excited about what he's learned how to do.
I'm thinking Turtle graphics is a good starting point. I really want to pull in recursion and fractals, but I think that should wait a while.
Perhaps it's not so bad, but Pygame and Pyglet take way too much work, imho.
I was thinking about this a while ago, how now there is Visual Studio Express and all kinds of awesome development tools available for free, which seems like if I were growing up again I'd be able to program a lot bigger things on my own. The thing is, the overhead to start hacking is a lot higher now. In a way, it sort of feels like I grew up with the development tools.
Anyway, Python has a built in turtle graphics module, so I think I'll probably start with that. Maybe start with Hello World, then do some cool turtle designs. I'll probably introduce os.system fairly early too. He says he wants to learn programming, but the applications he has in mind are things like scripting system admin tasks and building dynamic web pages.
What do you think would be a good set of topics, in what order, and some good exercises to practice each topic?
That's my thought: find a simple web app, work with him to implement it with a framework. (Perhaps even App Engine -- sign-ups are free now.) The important part here is to teach good project management principles; unit testing, source control, automation, etc. Build things from the bottom-up, learning as you go.
Does that sound like it would be good?
We had our first meeting tonight, and it seems like it went pretty well. He was sort of getting sucked into what he was working on, and he sounded genuinely excited, which I think is important. I covered os.system, so he can now write all the .BAT files he's ever written in Python instead. Then we got into turtle graphics. He started trying to write a program that would draw his son's name. I think it will take him a while (he got the first two out of five letter done tonight). His son's name is Corbin, so he drew a C, and then started working on the o. The o was basically a rectangle, so I showed him how to make a for loop, which made the rectangle take three lines of code instead of 8. Finally, we briefly covered variables, the input function, and how to concatenate strings. We spent only a couple minutes on it. I meant for it more as a "If you get bored of forward, left, right, backwards, pen up, pen down, you can start playing with this." I also showed him a Koch snowflake script I wrote and a script that prompts for a number, n, and then draws a regular n-gon. Anyway, we briefly covered enough that he could write a regular n-gon program if he wanted, though it will probably still take a lot of work for him the figure it out.
He looked pretty excited about everything. Even though turtle graphics are pretty basic, it gives you probably the most bang for the buck as far as quickly giving someone a set of blocks to play with and experiment with. He seems pretty excited about figuring out what pictures he can draw, and it's good practice for decomposing big problems (How do I draw a C?) into manageable parts (Go up, up, right, down, up, left, down, down, down, down, right, up). I'm excited to see what he comes up with before next time.
I'm kind of thinking a good next step will be mad libs. Start out by writing a program to prompt the user for each word ("Verb? Verb? Noun? Adjective? Plural noun?"), and then substitute those into the write part of the mad lib. Eventually you could build up to making a simple markup language ("The $(adjective) $(animal) jumped over the $(adjective) $(animal)."), writing a program to parse the strings out, prompt the user for the correct blanks, and then performing the appropriate substitutions. Eventually, you could make this a dynamic web page that builds a form that asks for all the information, then renders a mad lib for you.
Anyway, we're definitely starting from pretty much 0 at this point. He has written a couple of .BAT files, but they usually just do something like mapping a network drive. His HTML experience consists of "Save as HTML" in Microsoft Word. From my experience working on my church's web site, and mentoring a newbie developer there who even had some Java, C#, HTML, and CSS experience, a full blown web framework and source control can be a lot to take in at once. I definitely like the idea of building from the bottom up, but we need to start with smaller blocks in this case.