Archive for August, 2012

Increase Problem Solving, Reduce Coding Syntax

August 29, 2012

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.

Advertisements

Khan Academy and learning programming

August 17, 2012

I had to go look at the new Khan Academy Computer Science lessons. As expected they are not Computer Science, but Programming.  The interactive IDE was really cool but overall I was very unimpressed.  Do not get me wrong, I love KA.  When my high school students come into my math class with chemistry or physics homework and ask questions I can refresh myself on how to do whatever it is they are doing.  I tell my math kids to use it as a reference or reinforcement.  These programming videos I put in the “cute but not really useful” category.  They are not good for reference (which one do I look at?), the narrator talks at warp 9, and many of the explanations are in the categories of “huh?”, “what did she say?” and “that makes no sense”.  I know how to program at this level so everything makes sense to me.  For a new student or someone trying to learn programming on their own I think this would be a disaster.  With a teacher discussing and supervising as the lessons are being done I think these would be cool.  The teacher can point out the object of the lesson, discuss alternative code or methods and teach trouble shooting/problem solving.  But then you have lost the whole point of KA lessons.  In Programming I basically teach the same material as the KA programming lessons using Small Basic, Scratch and Corona.  A lot more fun, a lot more versatile and a lot more exploratory.

Teaching programming is more than teaching code.  It has to include IDE management, file management, experiencing multiple environments, program planning, problem dissection, top down and bottom up planning, and most importantly, problem solving.  In my (very humble) opinion learning to type code and language syntax is one of the least important aspects of programming.  Admittedly you cannot program without it but it is still trivial compared to the importance of learning to problem solve.  Learning to type code is job training, and low income job training at that.  Learning to problem solve has to be the focus of teaching programming.  Problem solving and coding need to be blended together in such a way the problem is the focus and the code is just one method of solving it.

These KA programming lessons are not a step in the right direction.

I really do like the interactive code and drawing window thing though.  I could really do something with that.

“How does this transfer to other subjects?”

August 9, 2012

In the session “Teaching Cell Phone Programming Using Corona and MIT App Inventor (with some odds and ends thrown in)” I presented yesterday there was only one person with a CS background.  He had a Masters in CS but he taught math.  I have to get the word out to get more CS oriented sessions presented and attract the other four CS teachers in Montana to this event.

The eight attendees were very interested and had excellent questions and comments.  By far the best question was “How does this transfer to other subjects?”  I love this question because I do not have to think for the answer.  My answer seems the easy way out, it is not original, but it is the best answer ever thought of for this question.  My answer?  Problem solving.  I review my answer to this question regularly to make sure I do not need to do an update.  I review the literature regularly looking to see if a better answer has been found.  I talk to instructors at my local university to ensure this is what they see incoming freshmen needing.  This answer is by far the prize winner.

I look at the math classes I teach and analyze what I want my students to receive in the way of knowledge from my classes.  After careful and deep consideration I really could give a diddly squat if they memorize most of the stuff I throw at them.  90% of the average math course is absolutely worthless in the real world.  Outside of a classroom when is the last time you rationalized a denominator?  What I want to target is problem solving.  I want to be able to throw a problem at them and then stand back.  They would have to look at their resources and then work with what they have available.  With math the rather undependable brain is resource number one.  It should always be number one and that is why I throw that 90% at them.  But gathering and evaluating resources, be they from the brain, internet, text or neighbor, is a critical skill in life.  Math teaches problem solving but it usually gets lost in the minutia of memorizing all the math.  Math tests are usually based on pure memorization, the brain is the only resource.  This testing strategy does not test problem solving.

Programming, on the other hand, a least in the manner in which I teach it, allows, and in fact requires, the student to use all sorts of resources.  Programming is the ultimate problem solving skill, especially when taught without a hand-holding textbook.  The questions (problems/projects) are usually very open ended with multiple solutions and routes to solutions.  Once the kids start a project they keep wanting to build refinements, especially if they are building a game.  More problem solving required.  Programming does require some memorization but it seems like 90% of it is “how do I do this and where do I find out how to do this” type thinking.  Now that is a life skill.

Got to Kinect

August 8, 2012

I just survived my two session presentations for our local Educational Technology Conference sponsored by Blackfoot Telephone here at the University of Montana.  I did “Affordable Wireless for Your School” and “Teaching Cell Phone Programming Using Corona and MIT App Inventor (with some odds and ends thrown in)”.

Only three attendees for the Wireless but still worthwhile.  I had two reps from UniVision, a local Ruckus wireless system vendor talk about Ruckus.  They did an excellent job.  I was tired of vendors proposing $20,000 to $30,000 wireless solutions for a small school.  There are solutions from $600 than can satisfy the needs of a small school if compromises are accepted.

The cell phone programming presentation was my biggest interest and my biggest “crowd”, eight attendees.  Considering most of the conference attendees are app users (and as far as I know there were no programming teachers in attendance), eight really was not too bad.  To give an idea of the type of conference population at this event, the “30 iPad apps for teachers” was probably fifty-plus attendees.  It was the wrong conference with the wrong population for a presentation of this type but it was the only show in town.  The “odds and ends” were Windows Phone SDK, XCode and Kinect.  I cannot do much with either Windows Phone or XCode other then explain what they are.  As expected the discussion brought in Kodu and Scratch.  The group was very interested in the Kinect programming possibilities.

One of my goals for this summer was to work on the Kinect programming. I did not get a chance to touch it.  It is important to have goals so there is a measuring stick to use to show what did not get done.  I had planned to not do the Kinect programming with the kids until I had a chance to learn it myself and write some high school level material.  Hopefully by Spring semester I will have something ready to go.  No matter what, I will get this batch of kids doing something with that Kinect this year.  It is too cool to have them miss.

Alfred Thompson had his very own slide in the presentation and I think his blog has at least two more regular readers.