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

September, 2008

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Alfred VS Clint: C# versus VB debate

    • 7 Comments

    Clint Rutkas (who is better than everyone) Twittered his distaste for Visual Basic and preference for C# today. Now C# is a great language and I really do think that the features they borrowed from Visual Basic (properties for example) make it the best of the C family of languages. Visual Basic also had edit and continue for years and years before C# developers were able to convince the Visual Studio that they wanted it too. But to me C# not as clean as Visual Basic. So of course I responded right away. This lead to an Instant Message conversation and discussion of a nerd off. So here now is my defense of Visual Basic. Clint’s opening statements are on his blog here.

    I have never been a fan of C style languages. To me the use of the semi-colon and curly braces are crutches for the compiler writers and hindrances for programmers. If we were going to go that way we could have stayed with APL – a very powerful language but confusing for programmers. And they are ugly and confusing too!

    The required semi colon is particularly a problem. How many times have programmers, especially but not exclusively beginners, terminated a loop accidentally by placing an extra, and hard to see, semi-colon at the end of a line? And a missing or misplaced closing brace is a lot harder to find than a missing End If. Contrary to Clint’s claims I maintain that the code samples he shows prove that VB is easier to read.

    And then these is white space. In Visual Basic white space means something and enforces some organization of statements. You don’t see contests to see who can write the least understandable Visual Basic code as you do for C (and could do in C#). Just because it was hard to write doesn’t mean it should be hard to understand.

    Oh and did I mention the My classes? Not strictly a language feature but they do make it very easy to do some powerful tasks in Visual Basic programs.

    Note: See also Line Continuation and Visual Basic – More on C# vs. Visual Basic and Visual Basic .NET and C# Side By Side

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Binary Number Game

    • 5 Comments

    I love binary numbers. I was first taught about different number systems in grade school and was fascinated with them immediately. I used to convert decimal numbers into different base numbers just for the fun of it.  So I guess it is not surprising that I love computer projects that involve binary, hex, and octal numbers.

    I recently found this binary teaching game on a Cisco web site. The music is annoying but that could be my age. If you use it you may want to make sure the students turn off the music or your lab will be really noisy.

    But while playing games is fun I’m a “let me make my own game” sort of guy. So when I saw this program my first thought was how can I make that into a project. So while sitting through a conference call I started playing. I came up with the following (in Visual Basic .NET FWIW but I’m not sure language choice is a big deal here.):

    BinaryButtons

    The way it works is that by clicking on a button one toggles the zero and one values and changes the decimal value that is displayed. It’s a pretty simple program. One could add some complexity by allowing a user to enter a decimal value and have the buttons change to represent the binary equivalent. One could also modify this to handle other number bases. One could either have multiple clicks of a button increment (and wrap) the value displayed or one could use text boxes to allow a user to enter a value. There are pros and cons to either option.

    The button option forces students to understand the counting in different number bases which is valuable. The text box option forces a student to do data validation and error checking. That’s a whole different but potentially more valuable lesson. It all depends on the goal of the project.

    What do you think? Will these ideas work in the classroom? How would you change them?

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    NSF and the Birth of the Internet

    • 1 Comments

    One of the reasons I really believe that teachers should blog and otherwise participate more activity on the Internet is so that they can share resources. In the Internet age news of new resources for education should fly around the world and into use right away. Teachers sharing good finds is part of why I follow every high school computer science teacher blog I can find. Case in point Leigh Ann Sudol (currently a full-time graduate student but one of the best HS CS teachers ever) who is always turning up good things.

    Recently she blogged about a site from the National Science Foundation that hosts a multi-media history of the development of the Internet and NSF’s role in it. There is a time line, pictures, video interviews and lots of good stuff there. The site is here and Leigh Ann highlights some ways it can be used in class. Use the videos as a warm up in class or for on going research projects. I can see assigning viewing different videos and summarizing them as a lesson plan for substitutes too but then I always was evil. :-)

Page 5 of 8 (22 items) «34567»