Increase Problem Solving, Reduce Coding Syntax

This semester my Programming 3 (and maybe my Programming I) kids are going to play a lot of tic-tac-toe.  Back in March Alfred Thompson wrote an article on Tic Tac Toe for Windows Phone.  Not having a Windows Phone (Saw my first one a couple of weeks ago.  Montana is like wayyy out there in the hinter lands tech wise.) I figured I would borrow this idea and the code and modify it for Corona, the language I use in my Programming classes to write Droid programs.  I thought it was fairly straight forward, I got the game working and, using my usual flawed deductive logic, I figured if I could do it, the kids could do it.  Opps.  They wanted to type code without figuring out the game.  Of course they did not want to figure out the game!  Everybody knows tic-tac-toe, it is a trivially simple game after all!  So after two days of trying to get them to stop sitting at the computer and coding on the fly I went to a different project.  It was near the end of the semester and I simply did not have time to do what I should have done in the first place, teach how to define the game and therefore the program by breaking it down into pieces to understand the logic.  I need to find a classroom without any computers to distract the kids while I am teaching computer programming.

Tic-tac-toe is far from a trivially simple game to a novice programmer.  Look at the first step – draw a 3X3 grid for the game board.  On a piece of paper there are not a lot of options, four little line segments placed about here and we are done.  On the computer it is necessary to locate the end points of the segments (not to difficult) and draw the segment in some color.  But wait.  Do we want segments defining the game board or nine boxes?  And if we use boxes how do we get the X and O to appear?  No wait.  How about three different icons, empty, X and O and we can use those to be the game board and the moves!  This cannot be figured out in front of a computer on a keyboard (even if we do it all the time).

I need to teach much more programming away from the computer.  It is very difficult to do for several reasons.  First and foremost it is really fun for both me and the kids to make visual things happen on the computer.  Secondly, all the programming texts and tutorials are coding syntax based.  A few are “Chapter 1 – Problem Solving, Chapters 2 – 13 – Syntax”.  I need “Chapters 1 – 5 – Problem Solving, Chapters 6 – 13 – Syntax”.  I believe the core of a programming course should be problem solving with coding syntax being merely a tool to teach that problem solving.  The trouble is it is so much easier to teach coding that the true objective gets lost.

A true programming course should be language independent.  I want to be able to give my students a programming problem, give them a couple weeks to diagram and pseudo-code the program, and then pick one of several languages for execution.  From there I want them to find a language reference and then learn enough code to convert their diagram to an executable program.  It is going to be difficult to not make pretty things happen on the screen for a while.

Teaching high school programming is a balancing act.  Games and pretty things on the screen attract students to the elective.  Problem solving is hard work for the average kid (and teacher) and therefore scares students away from the elective.  Finding a viable middle is not easy.

About these ads

4 Responses to “Increase Problem Solving, Reduce Coding Syntax”

  1. artscounterbalance Says:

    Garth,
    I am once again impressed with your teaching philosophy. Hang in there for the viable middle!
    Beck McLaughlin

  2. Alfred Thompson Says:

    Great post. I agree that we don’t spend enough time on the problem solving pieces. The how to I wrote was not attempting to teach the problem solving (obviously) but just to show the easy part – the code once the planning was done. Teaching the planning and designing part with the analysis of the problem is the hard part left as an exercise for the teacher. And maybe that is a problem with our textbooks as well. A lot to think about here. Thanks.

  3. Barry Brown Says:

    Have you looked at the Program by Design curriculum? Problem-solving infuses the entire sequence. Most textbooks introduce syntax, then contrive problems to use that syntax. PbD flips that over; a problem is proposed and only if it can’t be solved using techniques already learned is new syntax introduced. It may be exactly what you’re looking for. http://programbydesign.org

  4. Interesting Links 3 September 2012 - Microsoft in Education blog - Site Home - TechNet Blogs Says:

    [...] Increase Problem Solving, Reduce Coding Syntax is a  great post by Garth Flint that talks about the difficulty of teaching problem solving and how it is more important than just teaching syntax. [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: