Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

October, 2011

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Conversations in Kodu


    Recently the Kodu team announced a new version of Kodu and a new Kodu Community Website. You can read a lot of the details at Announcing the Kodu v1.2 and the Kodu Community Website The expanded community web site is pretty cool.

    imageWhat's the Kodu Community Website?

    Also new in this release is the Kodu Community Website (including the discussion forum you are reading now!) This gives Kodu users the opportunity to share more easily, with a broader community, and to exchange ideas and feedback on the Web. The forums alone are going to be a life saver for me I am sure!

    As before, anyone can share a game world they have made from within Kodu, or download and play game worlds others have made. If users log in, they can then comment on each other's games, and they get a true "identity" on the Community site (the site will keep track of all games uploaded by a particular user, for example, to make it easy to find other great games by an author you like, for example).

    One thing I especially like with this new release is that you can really create  conversations where one object responds to another. You can of course have an object say a bunch of things such as in the example below. These lines can be “said” randomly or sequentially – note the option and the bottom. Just timing the second object to respond at the right time and in the right order could be tricky though.


    Your first option, new in this version, is to have an object listen for specific words or parts of words. For example in the image below an object is programmed to respond to different things that it “hears.” Now this could be music as well as specific words. In this example though we want to hear some an object “says.”


    In the example below we are setting the object up to hear some other object say “Hola.”


    Now as it turns out there is more than one way to greet someone. “Hola”, “Aloha”, and apparently “Hello” all work among many more possibilities. It would be nice to be able to respond to any greeting at all no matter what language it is expressed. This is were tags come into play. We can tag what we say as being a type. For example a greeting as in this example where I have tagged the word “Hola” as a greeting.


    On the “Hear” side I can listen for anything tagged “Greeting” and it will match. Like so:


    Anything tagged as a greeting will match. I could use a whole bunch of these sorts of tags, you can make up any tags that you want, to have your characters respond in any number of ways. Just think of the possibilities. OK I’m going back to playing. More later!

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Quality of Testing and Quality of Code


    I see a good number of Tweets in my Twitter stream that just flash by without leaving any impression. Chatty comments between people I barely know (if at all), links to things that don’t really interest me, and other items that really don’t have a lifetime beyond a few minutes after they are sent. But enough them really do make me think or take action that it makes Twitter  pretty useful for me. Recently I saw the following Tweet from Eugene Wallingford.


    Student developers do “interesting” things. For example many of them try to write the whole project before starting to test. Oh they may run the compile to check for syntax errors – as if a program that compiles cleanly will automatically work correctly. And then they start to test. This seldom goes well because there is just much too much to test all at once. Especially for a beginner finding logic errors in a (theoretically) complete program is just too complicated. What makes it worse than just the quantity of code (which let’s face it is not all that much compared to a professional program) but the number of code paths (i.e.. places for things to go wrong) that is just more than a beginner can trace in their heads. Yes, in fact, a beginner writing code this way means that the quality of the code may just not be good enough for easy testing. The result is a long and painful testing process.

    Experienced programmers test small pieces of code. The fewer code paths the easier it is to design a set of test data to test them all. This, test design, is not something we tend to spend much time on in introductory courses. Or perhaps in anything other than a software engineering course which is a shame. I think we could save a lot of students a lot of heartache and perhaps reduce attrition (theory of mine) if we taught them how to test earlier.

    We ask students to do a number of things when creating their own software. I tend to start with three large items:

    1. Understand the problem
    2. Design a solution (algorithm)
    3. Code up the solution

    Many start the testing thinking during (or worse after) the code up the solution part. Not a good idea. At the latest we need to start thinking about testing no later than design a solution. In fact if we understand the problem we should already have a handle of testing. At that point we should know  - what is the right answer for various inputs? What values should be outside the range of what we want to handle and how should we deal with them? In short, testing data is all part of understanding the problem. This understanding should directly lead to test data. Much of this test data would should manually run through our algorithm before we code solutions. When we test our data with the code the results we achieved during manual testing of the algorithm should match.

    Reducing the pain of testing requires several things of which having good code is just one. It’s one important piece of course but not the whole piece. Having good, solid testing data with known expectations of results is a piece. So is testing small pieces of code so that fewer things can go wrong. The fewer the places for things to go badly the easier it is to find and repair them. By coincidence (not) breaking ones code into smaller, more manageable and testable pieces almost invariably results in better code. Sections of code that are too long and that try to do too many things in one module are the huge run-on sentences of programming. In natural language writing run-on sentences are a “bad thing” and make understanding difficult for the reader. Modules of code with too many lines make testing and understanding difficult. They also make modification, expansion, reuse, maintenance and all sorts of other things difficult if not impossible.

    The first programming course is a difficult course to design. Students have to learn a whole new way of thinking as well as a new language in which to express their ideas. That alone makes it difficult. And then there are so many things that we could make an argument belong in the first course. I could see a first course that is four years long if we tried to get it all in. So by necessity things get left out. I am thinking, at this point in my life, that testing is not one of those things we can afford to leave out though. Not that we spend forever on it of course.  I also don’t think it is a separate unit either. Rather I think it is something we talk about as we talk about other things. Include it is the discussion of understanding the problem. Include it with designing algorithms. And include it when we talk about writing the code as something more than just having the compiler check the syntax. It it means that something else waits until a second or third course so be it. On the other hand I wonder if doing better testing and including testing thinking in the whole process might just reduce the amount of time student projects take to complete. It’s a theory. What do you think?

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Interesting Links 3 October 2011


    What a week. Not as much blogging from me because things were a little crazy. I try not to post just for the sake of posting so without the time to do it right I went a couple of days without posting at all. I have some things in the pipeline for this week that I hope you will find interesting and useful though. Of course even though I was busy doing other things doesn’t mean the flow of other interesting things coming through my email inbox and twitter feed slowed down. So I have some links to things from people more interesting than myself. Hope you find some of these useful. Oh but first a joke. A geeky joke of course. Found on Facebook

    What part of 1 + 1 = 10 don't you understand?

    Last week was NBC’s Education Nation series of events. Several people I know where there and have blogged about the experience. Lee Kolbert had her post on her blog and on the Huffington Post. Cameron Evans had two posts on his blog:

    One Education Nation had a panel that included Pat Yongpradit @MrYongpradit on it. In fact Pat was asked the very first question. You can watch the Pat Yongpradit on MSNBC video Great that they included a classroom teacher in the discussion.

    image The Microsoft Unlimited Potential blog ran a series in September called the Heroes of STEMtember to highlight Science, Engineering, Technology and Math teachers who are doing great things. I’d like to highlight a couple of those posts myself.

    Supporting America's Teachers is a post from last week’s Microsoft in Education blog. Worth a read.

    The September Tech Student of the Month - Ramsey Khadder is a high school student. Ramsey is doing some very interesting things in and out of class – including entering the Imagine Cup and competing with university students.

    Randy Guthrie had a great post last week called Imagine a World Where You Win a Free Trip to Australia with some great advice for students thinking about entering this year’s Imagine Cup.

    I posted a whole list of Windows Phone training events on the east coast a bit ago. If you are in the Chicago area, you can learn to develop for (the new) Windows Phone 7.5 at a free Chicago training. On 10/11 5:30 - 7:30 PM

    Ever thought of telling stories with Kodu - now you can – The latest version includes tools for creating conversations. Speaking of Kodu George Palaigeorgiou (gpalegeo1) and his students have developed  an open book about Microsoft Kodu in Greek at

    Helping teens (and adults) become better online citizens

    Chris Bowen @ChrisBowen Tells me that New England Code Camp 16 (10/29, Waltham, MA) registration is now open. Code Camps are an interesting form on unconference and you can learn all sorts of interesting things at them. And meet interesting people as well.


Page 6 of 6 (18 items) «23456