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

March, 2010

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Interesting Links 15 March 2010

    • 0 Comments

    I know I’m running late this week. The weekend was crazy. You don’t want to know about my troubles getting home from SIGCSE over the weekend. On the fun side, yesterday was Pi day (3.14) so don’t forget that a pizza of radius "z" and of thickness "a" has volume = pi*z*z*a You can groan now. Here now a few links to get your week started

    @anitaborg_org reminds us that SF Bay Area young women grades 9-12 NCWIT Award for Aspirations in Computing applications due April 2. Also in Portland OR. There is a similar program in the Denver area with a later deadline. More information about NCWIT Award for Aspirations in Computing at their web site.

    From @scottlum Calling student photographers: Enter the Bing Earth Day Photo Contest https://www.earthdayphotocontest.com/

    Proof that Microsoft hires some smart people, Chuck Thacher with Microsoft Research is awarded the 2009 Turning Award. Chuck Thacher bio.

    From @TeachTec: Forget dioramas in an old shoebox. Students can create a digital slide show using Microsoft Photo Story.

    Yeah, not a lot this week. But I have ideas for a bunch of posts based on things I heard at SIGCSE so the rest of the week should be more interesting.

     

     



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Turning on a Paradigm

    • 0 Comments

    I’m in Milwaukee for SIGCSE this week. I love this conference most for the informal conversations that take place. having been coming to SIGCSE for at least 10 years now I have a lot of friends who I often see only once a year at this conference. We talk a lot of small talk of course but as you might expect when you get a bunch of computer science researchers, faculty and industry people the talk gets to computer science pretty quickly and pretty often. A lot of it may not sound all that exciting to outsiders but for those of us really interested in computer science and especially computer science education it can be fascinating. One conversation I had with two people from Microsoft Research (both former university faculty members) really got me thinking.

    It started when one of them reminisced about their first course they too in LISP. The instructor asked people if they knew other programming languages. To the person who answered “none” he replied that they could learn LISP in three days. To the person who said they were an experienced FORTRAN programmer (this was a while ago :-)) he said it would take them several weeks. Sometimes it takes longer to unlearn things so that you can learn a new paradigm.

    I learned how to program about 38 years ago and the big new thing was called “Structured Programming.” Experienced programmers were saying it was too hard, too complicated and just not something they wanted to learn. To me as a raw beginner being taught this way it seemed easy and logical. No big deal. OF course later when I had to learn object oriented programming I started to really understand what learning structured programming must have been like way back when.

    And I admit that making the transition from Visual Basic 6.0 to Visual Basic .NET was a bit of a struggle for me as well. I hear from a lot of teachers and a lot of professional developers that it is hard for them as well. On the other hand the students I and others I know who taught Visual Basic .NET generally found that VB .NET was as easy for them to learn as VB 6.0 had been for previous years students. Not really a surprise when you think about it. It’s the unlearning or relearning that many of us struggle with.

    One of the things I suggested in the conversation was that to really learn a new paradigm or a new way of programming is that you need a project that requires the new way of doing things. Or at least where the difference between old and new ways of doing things is significant. The killer app that helped me to “get” object oriented program was a game called Simon.

    This game consisted of four colored buttons that lit up and beeped in random order. The object of the game was to learn the order and press the buttons in the correct sequence. After each round the device would replay the sounds and add a new button press to the sequence. One day I decided to write a program version of this in Visual Basic .NET.

    The first problem was how to make the buttons appear to press in time with the beeps. The solution was to have two images for each button. One would represent the button up and the other would represent the button down. Using a procedural programming method one would have to keep track of both images for each button. The program would then have to load the appropriate image into the button object at the correct time. Complicated. A pain in the neck. And then it hit me – create a button class and let each button object keep track of things. Instantly things got easier and I finally felt like I understood the value of objects.

    Since then I have always looked for projects that we less forced and more specifically requiring a feature, a function or a different paradigm. It seems to work.

    BTW if you are interested in learning more about my Simon project you can read my write up about it on my personal web page here.



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Arrays of Controls

    • 1 Comments

    Over the weekend for the second time in about three weeks a teacher asked my about creating arrays of controls in Visual basic .NET. Interestingly enough both teachers were interested in doing this to create a Jeopardy style game program.  And why not? Clearly an array is the way to go. Now in Visual Basic 6.0 and earlier this was ridiculously easy to set up. In fact as a teacher teaching VB 6 I had  students creating control arrays accidently at all the wrong times. With the advent of the .NET platform and the changes that went into making Visual Basic .NET a real honest to goodness object oriented programming language some of this ease of creation went away. Bummer.

    Now it turns out that having control arrays (or more correctly arrays of controls) is not that difficult in Visual Basic .NET or even in C# for that matter. You do have to think about what you are doing though. On the plus side I see this different way of doing things as offering more opportunities for teaching and learning. No really. This can be a good thing. But of course the first thing I had to do was to figure things out myself. Fortunately for me I had access to the development team while VB .NET was still in beta. They were quite patient in explaining things to me that in hind sight I could have (perhaps should have) figured out myself. I’m grateful for their help. Does that help others? Not so much. On the other hand I did write up what I learned so I could share it with others. First with my students and these days with teachers.

    I posted an article on creating control arrays using Visual Basic .NET and C# on my personal web site. If you are interested in learning how to do this for yourself I invite you to check out the article. It focuses more on implementation than going deeply into the concepts. As I read it today I realize that I should really add some more details to that document. If you have suggestions on what I should include please leave them in the comments here.

    Oh and if you are interested in combining arrays of controls and creating custom controls check out Simon - An OOP Project for Visual Basic .NET And if you build a Jeopardy style game program let me know. I’d love to see it.



Page 5 of 8 (22 items) «34567»