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

November, 2006

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Creating A Splash Screen in 60 Seconds or Less


    I haven't written a short hint or trick fro Visual Studio in a while but I ran into one tonight that I just had to share. Traditionally creating a splash screen has been a good bit of work, even in Visual Basic. First one had to create the form which while not difficult could be tedious. Then one had to create a startup module that would load and later unload the splash screen with appropriate timing. The startup module would then make sure the main or real startup form was loaded. Yuck.

    Ah but with Visual Studio 2005 or Visual Basic Express 2005 all this has changed. First off there is a splash screen form already defined. So step one is select the Project menu and pick Add New Window. There you will see and select the Splash Screen template. Give it a useful name and click Add. Once the form opens you can easily change the text properties for the display text and change the Image in the background panel.

    Next step and the final step is to right click on the project in the Solution Explorer (or open the Project menu) and select Properties. Near the bottom of the window that opens there is an drop down list that lets you select a form to be used as a splash screen. Choose the form you want and you are all done. Build and run the program to see your splash screen in action.

    That's it. No writing of code is required. No special code only modules. No tricking timing issues to manual work out. The IDE does the hard stuff for you. Unless you want to get fancy with the contents of the splash screen you can probably get it all running in well under a minute. You'll probably spend more time making the screen look pretty than anything else.

    With it this easy I would be tempted to require a splash screen that identifies the student author on student projects. It would be nice to have that quick reminder of whose program I was grading.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Recursion - See Recursion


    It's nice to see Dave Jacobus blogging about his programming courses again. Looks like all of his classes (IB CS, AP CS and Visual Basic) are all learning about recursion lately. Recursion is a really cool concept. I have to admit though that it took me a while to get the hang of. That may be because not to many programming languages really supported recursion back in the old days when I was first learning to program.

    Recursion is one of those interesting things that when it is good is really good but when it goes wrong can go horribly wrong. Accidental recursion often leads to the discovery of the stack overflow. I had a student writing one of his first C++ programs have main call itself. You can imagine the result. It allowed for a great class discussion - talk about a teachable moment.

    Recursion at its most simple can be little different from any regular iterative routine. In my opinion that is an interesting use for recursion but in some ways it is a waste of its potential. The most interesting uses of recursion are those uses that make it possible or even easy to do things that are otherwise difficult or impossible.

    One of my favorite recursive projects was a version of Minesweeper. In Minesweeper when you hit clear locations (a square that doesn't hold or neighbor a mine)  the program opens spaces until it locates spaces that do neighbor mines. Checking for those locations iteratively is pretty complex. There may be a good iterative way to do it but I haven't figured out. Doing it recursively though is pretty spiffy.

    There are other good recursive projects - traversing a directory structures or similar tree structures, Towers of Hanoi - of course but some of them seem to get old. So I'm always looking for new and interesting recursive projects. Anyone have any to suggest?


    Technorati tags: ,
  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Top 10 Girl Geeks?


    OK this list is a little controversial and rightly so. Including Lisa Simpson and Paris Hilton on a list that includes such people as Grace Hopper (my personal hero) and Marie Curie (two time winner of the Nobel Prize) is really insulting. Oh sure Lisa is a geek but she is a cartoon character. Some might suggest that Paris Hilton is as well. There are clearly other more worthy candidates for this list.

    The media loves to add characters from popular culture to attract attention to what they are doing. That's a large part of why some people are finding the media to be less than reliable.

    I think the list is a good place to begin a conversation though. Who are the impressive female scientists and thought leaders in technology? Who else belongs on that list? I imagine that there are a lot of much better candidates people can suggest. Who do your students know about?

    BTW Microsoft's Channel 9 has a series called WM_IN (Women in Technology) that highlights talented women at Microsoft. I highly recommend it.

    [Thanks to a link from Jeff Sandquist]


    Technorati tags: ,
Page 1 of 7 (20 items) 12345»