Friday, March 31, 2006

How to begin programming

I just finished converting Reading Pen Pals-a web site I made 4 years ago as a class project (my first!)-into a database web site using PHP/MySQL. It felt like a huge project but went much faster than I thought it would, only a few days. I learned a few things along the way that seem like good lessons for teaching programming to children. I'm not a programmer by training, so I figured my way through the problems I encountered in this project without having much understanding of why the problems existed. So as I reflect on what helped me out, some key points that might help kids come to mind:
  1. Most importantly, look for patterns. I often didn't understand how the syntax worked from the tutorials I used, but seeing similarities in different tutorials allowed me to make good guesses.
  2. Make it work, then make it look nice. Actually, I already tell this to my students, whenever I get a chance. It was really helpful to set up a very small-scale version of what I wanted at each step and make sure it worked, then add features one at a time and only in the end did I make it look the way I wanted. That helped me avoid having to re-do a lot of work unnecessarily.
  3. Patience. This is the hardest thing for kids to maintain. Encountering problems is frustrating and even systematically doing the second point takes lots of patience and restraint. In many cases the problems are interesting and some even teach you something about how computers and the internet work, so if you can enjoy that along the way you're benefitting in more ways than you expect. One problem I havent' yet solved about this project was getting the PHP mail function to stop escaping quotes in the email messages. This gave me a window into the nature of information transmission on the internet and how protocols are set up, though it was just a starting point for learning a lot more.

1 comment :

John K said...

Hi, Erik,

Is this the right place to get in touch with you? I'm a 7th grade Computer teacher in New Jersey, who was very interested in your Thursday, April 27, 2006, column, "The Right Balance." I also have a limited time to try to teach MicroWorlds EX and EX Robotics, and found some of your time-saving strategies helpful. I'm also looking for some examples of basic procedures for sending commands to a simple robot, using the Logo language in MW EX. Any suggestions?

John