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

April, 2009

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Programming Languages Side By Side

    • 13 Comments

    I’ve been thinking about a parallel programming language textbook for a while now. Not for parallel programming but I’m not sure how to phrase it. What? OK let me explain. One of the popular Bible study tools is a parallel Bible where several translations are printed side by side with each other. That way someone can easily compare how different interpretation teams have looked at the same Bible verses. What I have been thinking about for some time is a textbook of sorts that covers multiple programming languages in a similar parallel fashion. Each concept would show side by side examples in multiple languages. This way students would see different implementations – different syntax – for the same concepts. In theory (completely untested so far) this would build both a greater understanding of the concepts and make it easier for students to transition from one programming language to another.

    From there is gets complicated. What languages and how many languages? Handling C++, C# and Visual Basic seems like a logical easy combination since all three languages are built into the Visual Studio IDE. Is there enough of a difference in early stages between C++ and C# though? Certainly in some areas like class creation and OOP concepts. Should Java be included realizing that a second IDE would be required? How about something like Small Basic which is largely a subset of Visual Basic?

    How about completely different paradigms? F# will be in the next version of Visual Studio so would permit the easy (ok relatively speaking) inclusion of a functional programming language. That might over complicate the book though. I need input on that one. Is it worth trying? Similarly how about a graphic beginners language like Scratch or Alice? Some concepts would not translate at all but some of the early ones would fit in nicely.

    How about some historic languages like FORTRAN (still often used in scientific programming) or COBOL (still used for many legacy applications with believe it or not some new development still taking place)? Not sure about the development environments for those though.

    Help me brainstorm on this a bit please. Are you interested in seeing something like this? What would it include to make it useful?

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Thoughts from a workshop

    • 2 Comments

    For most of this week I have been in Toronto presenting a two day workshop for teachers who will be teaching Visual Basic next school year. I presented the workshop twice – for two groups of teachers from the Toronto Catholic District School Board. It was an absolutely wonderful week, in spite of Seattle Washington style weather, because of the teachers and staff at TCDSB. But as I was presenting a couple of things occurred to me. One was about how we now use “exception” where we used to use the word “error.” The other is how the concept of a fully qualified name has both software and real-world application.

    Let’s take “exception” first. Older versions of BASIC, like many programming languages, would do error handling. Today we do exception handling. Why the change? At first I was thinking maybe it was just political correctness gone wild. After all error has a pejorative connotation while exception doesn’t. But the more I thought about that the more I thought that was too simplistic an answer. What we are dealing with in many cases could easily be described as an error, a mistake or something gone wrong. But really there is more to it than that. This line from the Wikipedia explanation of Exception handling (as viewed April 24 2009 at 11AM EST) “special conditions that change the normal flow of execution” is a good perspective. Of course we could get into all sorts of discussion of the word “special” as well but let us save that for another time. An exception is really some case that comes up that is different from what the program wants to handle normally. It may show up as a result of an error but in most cases it is an error only because it is being done at the wrong time – an unexpected time or just an undesirable time. Or just data in a way that we are not quite set up to handle. Picture a user entering “one” where “1” is desired.

    Perhaps “error” would still be correct and I’m probably going to talk about ‘error handling” as well as “exception handling” from time to time. If you search for “error handling” on Wikipedia you will wind up at “exception handling” for what it is worth. What do you think? Am I over thinking this?

    The next concept that I found myself thinking a lot about was that of a “fully qualified name.” I was asked to explain the difference between “MessageBox.Show” and “System.Windows.Forms.MessageBox.Show” In most programs I write “MessageBox” is pretty unambiguous so it is enough to specify that. But of course in other cases we can have objects/classes that really need more information. This is one of those things where context is ever so important. We have the same thing with addresses though. One example I can think about is USF when referring to a university. Here on the east coast of the US that usually means the University of Southern Florida. however on the west coast of the US it means the University of San Francisco. So it’s more than a bit ambiguous in many conversations. The same with street addresses and city/town names. I live in one of several towns and cities named “Danville” in the US. Without a state notation on the address where would one be? There is also a “Rome” in New York state but I hear there is a “Rome” in Europe somewhere as well. :-) What is the fully qualified address in that context.

    So I think I will be using locations in the real world to talk about fully qualified names in the future. It seems to work as an explanation for me. How do you talk about it when teaching? Do you have another analogy? I’d love to hear about it if you do.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    FDG 2009 Day Three

    • 2 Comments

    Greetings from the Disney Wonder at sea somewhere in the Bahamas Bank. One of the key take aways from today was the idea of students wanting to see serious (i.e. professional) quality graphics in their projects. This was a major point that Matthew MacLaurin from the Kodu team talked about during his morning keynote talk. I heard the same thought expressed by some university faculty after Matt’s talk.

    A lot of us learned to program in the DOS days. Being able to create ASCII text graphics was exciting for us because that was the state of the art. We can’t expect today’s students to be happy with that. They are used to very high level graphics. Often when we talk about helping them to create games they get disappointed with what results they get. This leads to boredom and frustration and students leaving the program.

    What is the answer? Well Kodu is one possible answer for young students. XNA is a possible answer for very advanced students. So are other game engines like TorqueX and some other game development tools like GameMaker. And of course tools like Alice and Scratch. I’ve long believed that Windows Forms programming using languages like Visual Basic and C# is also a great tool. These tools allow students to create programs that look like and really are “real” Windows Programs.

    At least there are some options. There is some resistance to using them in some quarters. In some places there is an idea that students get too distracted by the graphics and creating user interface and miss out on the “really important concepts.” A reasonable fear I guess but I see that as a manageable situation. One can present students with pre-built UI modules or highly specific designs for the UI. One can also make it clear that the code behind is what the grade is based on and hold to it.

    These days we need to get kids interested and get them through the first or second computer science course. We don’t need or want “gate keeper” courses that “weed out the weak.” We need to encourage students and build them up to be ready for more. Good graphics can, in my opinion, help quite a bit. What do you think?

    Technorati Tags: ,,
Page 1 of 8 (22 items) 12345»