Help a gerbil teach programming!

From Visual Basic to GNU C, this is the place to talk programming.

Moderators: SecretSquirrel, just brew it!

Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 7:11 am

I happen to know a undergrad girl studying humanities. She is curious about programming and wants to learn some so I will be giving her a crash course in programming. Some notes:

1. This is mostly for fun and intellectual curiosity, and not for professional use or resume building.

2. I am looking for ways to introduce her to programming in way that is fun for her. She has an ok background in highschool maths, is an awesome artist and likes to draw and paint, and has very good intuition in geometry. Also, she is a gamer and frags like nobody's business :D

3. She tried reading a book on Java once and hated it, which is not very surprising given the formal looking syntax and the things you need to know before even writing Hello World in Java.

Given all of this, I am thinking of going with Python and perhaps introduce her to some procedural art and maybe an introduction to Pygame to build some simple game.
How would you approach this? Do you know of any resources that I can use?
Any thoughts and comments welcome.
codedivine
Gerbil Elite
Silver subscriber
 
 
Posts: 705
Joined: Sat Jan 24, 2009 8:13 am

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 8:29 am

Python would be a good place to start. [url]Dive into Python[/url] and [url]Python the Hard Way[/url] are good books, and they are free.

Another option is Microsoft Small Basic, which is designed as an introduction to programming and could eventually lead into using Microsoft XNA. Microsoft has a really extensive collection of documentation and tutorials to go with both of them.

Ruby gets a lot of mentions as being a good introductory programming language, and they do have good documentation for getting started, like Ruby in Twenty Minutes and Try Ruby! (in your browser).

Repl.it is a website that hosts javascript based shells for different programming languages, which is nice because you won't have to setup a programming environment. At least until she decides if she likes it.
Flatland_Spider
Gerbil Elite
 
Posts: 852
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 9:24 am

Thanks! Those are helpful. Running stuff in the browser without installing anything would certainly be great for the first few days!
Will look into MS Small Basic. I don't have any experience with XNA but can look into it.
codedivine
Gerbil Elite
Silver subscriber
 
 
Posts: 705
Joined: Sat Jan 24, 2009 8:13 am

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 12:05 pm

Python + some sort of graphics toolkit.

FWIW one of my old blog posts here on TR was about writing a Spirograph simulator in Python.

I've also been meaning to put together a post about my Python-based Mandelbrot rendering application, but never quite seem to get around to it. I can send it to you if there's interest.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37705
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 12:30 pm

Check out Alice if you haven't already. Your friend sounds like the ideal candidate for it.
Zoomastigophora
Gerbil Elite
 
Posts: 613
Joined: Tue Nov 11, 2008 7:10 pm

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 1:55 pm

Zoomastigophora wrote:Check out Alice if you haven't already. Your friend sounds like the ideal candidate for it.


That looks pretty good! I watched one of the demos and definitely looks good.

just brew it! wrote:Python + some sort of graphics toolkit.
FWIW one of my old blog posts here on TR was about writing a Spirograph simulator in Python.
I've also been meaning to put together a post about my Python-based Mandelbrot rendering application, but never quite seem to get around to it. I can send it to you if there's interest.


Downloaded the code from your post! Looks interesting, you should write more often :)
I have previously written a Mandelbrot application as well :)
I think I just wrote it to a bmp file and displayed it using Python imaging library. Otherwise I can use some of the canvas code from the file you posted.
Fractals and other kinds of "programmed art" are definitely fun and interesting, and align well with some of her interests in art.
Also, anyone have any experience with Processing? http://www.processing.org/

Ok, so I think I will show her some things first (including Alice) and get a better idea of how and what she wants to learn.
codedivine
Gerbil Elite
Silver subscriber
 
 
Posts: 705
Joined: Sat Jan 24, 2009 8:13 am

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 9:55 pm

Another alternative would be something microcontroller based like the Arduino stuff.

Programming seems so much more real to me and gives me so much more of a kick when it is something other than just changing pixels on a screen. Come up with a project like making a turtle robot follow a flashlight and build an Arduino with a motor shield and light sensors.
notfred
Grand Gerbil Poohbah
 
Posts: 3736
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 10:09 pm

Processing would probably be up your friend's alley as well since it's a simplified Java focused on programmatically drawing stuff. I've used it before, but it was kind of pointless for me since I can actually programming and no one's going to write a wireframe rasterizer in Processing =_=.
Zoomastigophora
Gerbil Elite
 
Posts: 613
Joined: Tue Nov 11, 2008 7:10 pm

Re: Help a gerbil teach programming!

Postposted on Thu Oct 27, 2011 10:18 pm

I don't think a microcontroller based project would be ideal - might be best to leverage her interest in art and knowledge of geometry.
Unless of course you want to come up with some kind of installation art piece using microcontrollers, which could be cool :-)
Turkina
Gerbil Elite
 
Posts: 600
Joined: Mon Apr 21, 2003 10:02 pm
Location: The tundra

Re: Help a gerbil teach programming!

Postposted on Fri Oct 28, 2011 6:37 am

codedivine wrote:I have previously written a Mandelbrot application as well :)
I think I just wrote it to a bmp file and displayed it using Python imaging library. Otherwise I can use some of the canvas code from the file you posted.
Fractals and other kinds of "programmed art" are definitely fun and interesting, and align well with some of her interests in art.

I'll try and get my Mandelbrot code cleaned up. There are a couple of features I've been meaning to add, and other annoying "features" I'd like to fix. :wink: The UI is written in Python, but the calculation grunt work is done in C to take advantage of the full speed of the CPU and use all available cores (Mandelbrot rendering is a very good candidate for multi-threading, since the calculation at each point is independent). It does both Mandelbort and the corresponding Julia sets, and you can navigate around the sets by clicking with the mouse...
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37705
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Help a gerbil teach programming!

Postposted on Fri Oct 28, 2011 8:38 am

What about javascript? I know it's a bit of a toy language, is ugly and perhaps a bit counter intuitive and really requires learning a bit of HTML too but it would allow her do dive right in to writing something that looks like something she might encounter in day to day life. This also has the advantage that she only needs a text editor and a web browser.

You could write a very basic html file that loads her JS and provides her with a couple of objects to output to like a div and a canvas so she can do text based stuff like "hello world" or graphics/animation stuff on the canvas.

This said if her only previous programming experience is 5 minutes with a book on Java you might want to do the absolute basics in python or something similar. You can't do much until you've got stuff like variables, loops, conditions and function calls covered.

EDIT:
I'm not saying JS is a good first language to learn just that it's a language that's easy to do something "fun" in.
Fernando!
Your mother ate my dog!
cheesyking
Minister of Gerbil Affairs
 
Posts: 2267
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)

Re: Help a gerbil teach programming!

Postposted on Fri Oct 28, 2011 6:22 pm

So the question is "Why is she interested?"

Unless you are a hardcore nerd, the language is simply a means to an end, a way to make a computer do something. What is she interested in making the computer do? Or, is it the thought of bending a computer to her will and making it do anything?

One of the problems with teaching programming is it is boring unless you are wired a certain way. Think back to high school English (for those in the English speaking world) and diagramming sentences. Learning the semantics of english grammar is about a boring as learning the semantics of Java, unless you are wired to find such an activity interesting.

If she wants to do something mathematical, the fractals are an interesting topic. Mandelbrot is obviously one of the most common, but pick a family and study the math, then figure out how to turn the math into a picture using a computer. The language semantics come along for the ride. When she says "if it is this way then I need to make calculation one but if it is this other then I make a different calculation.", then you study logical constructs and if() statements. When she realizes that she has to do the same thing over and over, you talk about looping constructs. When she finds herself writing the same lines of code over and over, you talk about function calls.

If the artistic side of her is stronger, then I actually would recommend a micro-controller based project. They are by far the easiest to interface with the real world and you can do interesting things with light very easy. An Arduino and an RGB led or two can provide lots of entertainment. The computer executing the program is also much simpler so a lot of that "extra stuff" you need to know in, Java for example, just to write "Hello World!" isn't needed for a microcontroller.

Regardless, it has to be an means to an end that interests her, or it doesn't matter the language.

--SS
SecretSquirrel
Gerbil Jedi
Gold subscriber
 
 
Posts: 1716
Joined: Tue Jan 01, 2002 7:00 pm
Location: The Colony, TX (Dallas suburb)

Re: Help a gerbil teach programming!

Postposted on Sun Oct 30, 2011 10:23 am

Am currently using PYTHON FOR SOFTWARE DESIGN - How to Think Like a Computer Scientist by Allen Downey to learn basic Python. Chapter 4 focuses on a turtle type drawing program that's downloadable to teach function interface design. The whole focus of the book is about how to solve problems in a structured fashion rather than use neat new programming features so it may suit your needs a bit more than the typical source.
irvinenomore
Gerbil
 
Posts: 44
Joined: Sat May 29, 2010 6:52 am
Location: A Marriott somewhere

Re: Help a gerbil teach programming!

Postposted on Sun Oct 30, 2011 4:34 pm

just brew it! wrote:I'll try and get my Mandelbrot code cleaned up. There are a couple of features I've been meaning to add, and other annoying "features" I'd like to fix. :wink: The UI is written in Python, but the calculation grunt work is done in C to take advantage of the full speed of the CPU and use all available cores (Mandelbrot rendering is a very good candidate for multi-threading, since the calculation at each point is independent). It does both Mandelbort and the corresponding Julia sets, and you can navigate around the sets by clicking with the mouse...


That sounds great! Let me know when you get the time to clean it up :)

irvinenomore wrote:Am currently using PYTHON FOR SOFTWARE DESIGN - How to Think Like a Computer Scientist by Allen Downey to learn basic Python. Chapter 4 focuses on a turtle type drawing program that's downloadable to teach function interface design. The whole focus of the book is about how to solve problems in a structured fashion rather than use neat new programming features so it may suit your needs a bit more than the typical source.


Thanks! I have heard good things about this book before! Will look into it.

SecretSquirrel wrote:So the question is "Why is she interested?"

Unless you are a hardcore nerd, the language is simply a means to an end, a way to make a computer do something. What is she interested in making the computer do? Or, is it the thought of bending a computer to her will and making it do anything?


In her case, she is mostly interested in the computer as a creative medium. Fractals definitely draw her interest. Partly its also just curiosity.
Certainly, I will try and clarify this a bit more and might need to experiment a bit.
Not sure she knows herself what exactly she is interested in :P
Arduino I am not too sure about right now as I am sort of out-of-cash to buy stuff right now (underpaid grad student here) so trying to keep it to things I already have or to free software and books from the library :(

cheesyking wrote:What about javascript? I know it's a bit of a toy language, is ugly and perhaps a bit counter intuitive and really requires learning a bit of HTML too but it would allow her do dive right in to writing something that looks like something she might encounter in day to day life. This also has the advantage that she only needs a text editor and a web browser.


Well, unfortunately my knowledge of HTML and JS is a bit underwhelming. Will look into it though. As for installation, I can just install stuff myself on her laptop, so that is not a problem as long as it is easy to use after installation.
codedivine
Gerbil Elite
Silver subscriber
 
 
Posts: 705
Joined: Sat Jan 24, 2009 8:13 am

Re: Help a gerbil teach programming!

Postposted on Sun Oct 30, 2011 4:52 pm

LOGO is an old classic learning language. The idea is that you've got a "turtle" that will follow your commands for drawing things on screen.

http://en.wikipedia.org/wiki/Logo_(programming_language)

Also: http://en.wikipedia.org/wiki/Etoys_(pro ... g_language)
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3167
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Help a gerbil teach programming!

Postposted on Sun Oct 30, 2011 6:06 pm

:lol:
Long ago, I paced off the front lawn, sidewalks and flower beds and used LOGO (or Turtle BASIC) on my C64 to plot the coverage of each of the in-ground sprinklers so that I only had to dig them up and relocate them one time. Up until that point, my father assumed that my computer was nothing more than a time-wasting toy.
JustAnEngineer
Gerbil God
Gold subscriber
 
 
Posts: 15426
Joined: Sat Jan 26, 2002 7:00 pm
Location: The Heart of Dixie


Return to Developer's Den

Who is online

Users browsing this forum: No registered users and 0 guests