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

October, 2008

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Announcing Small Basic From Microsoft DevLabs


    Do you remember the old days of learning how to program with a simple, easy to use, uncomplicated version of BASIC? A lot of people including a lot of teachers (and more than a few professional developers) do. But in general companies are working on more and more powerful version with added complexity. Here now is step sideways. Not all the way batch to the command line but not so far forward that it takes a trained professional to use Small Basic is a new development tool for beginners. For over a year Small Basic was a part-time project by a software developer at Microsoft. He had a small number of people who experimented with it, tried it with their kids, and provided feedback. Today Microsoft released it into “the wild” as part of the new DevLabs portal. (Nice video there with Microsoft engineers talking about innovation and inspiration.

    A little more information from the Small Basic portal site:

    Small Basic is a project that's aimed at bringing "fun" back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming.

    • Small Basic derives its inspiration from the original BASIC programming language, and is based on the Microsoft .Net platform. It is really small with just 15 keywords and uses minimal concepts to keep the barrier to entry as low as possible.
    • The Small Basic development environment is simple, yet provides powerful modern environment features like Intellisense™ and instant context sensitive help.
    • Small Basic allows third-party libraries to be plugged in with ease, making it possible for the community to extend the experience in fun and interesting ways.

    You will find a getting started guide at the Small Basic Portal BTW. Check it out and send me you feedback or discuss it in the Small Basic forums or the Small Basic Blog hosted my the developer behind it.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    What Does This Code Do?


    “What does this code do?” is often a bit of a gotcha sort of question. OK sometimes it is a simple thing to make sure a student understands the syntax but many times it is really asking if the student understands some underlying concepts of either the programming language or how computers work. Rob Miles asked his students a question like that recently and posted it in his blog. The C# code was:

                short i;
                for (i = 0; i < 10; i--)
                    Console.WriteLine("i is: " + i);
                Console.WriteLine("i is: " + i);

    Well being the Visual Basic fan that I am I decided to write the VB version. Not so easy as it turns out. You can try a For loop and get something like this:

            Dim i As Short = 0
            For i = 0 To 10 Step -1
                Console.WriteLine("i is: " + i.ToString())
            Next i

    And it looks the same but VB is too smart to run that loop. The C# for loop in this case is really as much a While loop as what I like to think about as a For loop. So you can use a loop like this one and get the same basic result as the C# code with one exception.

            Dim i As Short = 0
            While i < 10
                i -= 1
                Console.WriteLine("i is: " + i.ToString())
            End While

    Yep, Visual Basic throws an exception – overflow!

    So now you get a really interesting discussion. The bonus question is which way of handling the overflow is “better.” Is it a good idea to take advantage of things like C# (and I believe C, C++ and Java) allowing the wrap around to happen and treating it as if that were ok? Or is it better to throw an exception on an overflow so that the program knows something is up?

    Sure the C-family way lets you do things that are cute and tricky but is that a good thing or a bad thing? How does it impact maintainability, supportability and future development? Does throwing an exception add protection or just get in the way? Feel free to discuss both sides here. Or bring it up in class and let me know what that discussion goes like. I’d be interested to here about it.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Talking Points – Information About IT Careers


    A friend forwarded the following announcement to me the other day. This is a really good resource for high school and middle school students about careers in Information Technology. It’s aimed at girls so don’t tell anyone but I am showing it to boys as well.

    Check out new Talking Points resource, a collaboration of the NCWIT K-12 Alliance and NCWIT social scientists.  The web site is the "for more information" site, while the actual resource (see the downloadable pdf on the page) is intended to be printed as a 2-sided 5.5" x 8.5" card and given to parents, counselors, teachers, Girl Scout leaders, and other adults who influence girls. The ideas and images embedded in the card are based in research about both the primary and secondary audiences (adults and girls, respectively). 

    This includes: what parents care about for their children, their possible misconceptions about IT careers, and their priorities for daughters' happiness as adults; and research on girls: their career intentions at both middle and high school ages and wisdom about what they need to do now to prepare for successful admission to a relevant program at the undergraduate level (for both middle and high schoolers).

    If nothing else, print out a couple of copies of the PDF and give them to guidance counselors. Or leave them lying around where smart students can pick them up. Go for it!

Page 2 of 8 (23 items) 12345»