Ramblings of a math and CS teacher

April 28, 2005

Mathematician Birthday Calendar (.ics, iCalendar compatible)

Filed under: Uncategorized — danschellenberg @ 5:58 pm

As a mathematics teacher, I believe that incorporating some historical aspects of mathematics in my teaching is vital for students understanding of mathematics as a constantly evolving discipline. One way to do this, without too much effort, is to simply give verbal homage to a famous mathematician on occasion. While this is often done in relation to the creator of a theorem being studied, another interesting method is to celebrate a particular mathematician’s birthday.

There are a number of great mathematical history sites on the web, but the most comprehensive is the MacTutor site, hosted by the University of St. Andrews in Scotland. The MacTutor site has a great Mathematician of the Day page, which lists who was born or died on the current day, as well as a quotation of the day from one of these mathematicians. This is a great place to start if you are looking for a way to incorporate history into the math classroom.

However, I recently thought how nice it would be to have an iCal (or any iCalendar compatible application, such as Mozilla Calendar) calendar that I could view on my machine. To this end, I did a bit of Google searching, and found that Bill Bauldry, a professor at Appalachian State University had what seemed to be an iCalendar compatible file created with many famous mathematicians included. I emailed Bill, and he was happy to share the file with me. The one major feature that was missing was URL links to the biographies of the mathematicians available when their birthday is selected. To remedy this, I hacked out a quick Perl script or two to automate adding such links to the .ics file. It worked for the most part (I had to fix up about 90 links by hand, out of just over 1300 total), and so I present to you the new, improved Mathematician Birthday calendar:

If you are wondering how this calendar might be useful to you, you might want to watch this Quicktime movie (high quality for broadband users, low quality for dial-up) showing how the calendar looks and works on my Mac’s iCal. I hope you find this to be a useful resource.

Note to self — Just so that I can remember in future years how I did this:

  • run ical.pl Perl script I created that auto-generates the URL’s to the mathematician’s biographies and inserts them into the iCalendar file. This seems to work for about 90% or so of the URLs.
  • run the ical_extract.pl Perl script I created that cycles through an iCalendar file, sticking all of the URLs into an HTML page, with each link as a list item
  • use linklint or some other link validation checker to see which links were not created correctly
  • fix the incorrect links by hand

April 22, 2005

Sudoku (aka: Su Doku) Generator and Solver for Mac OS X

Filed under: Uncategorized — danschellenberg @ 12:15 am

Short version: Download Sudoku for Mac OS X (1.2 meg’s), a logical/mathematical puzzle generator and solver.

I have recently spent some time attempting some Sudoku puzzles, which are a logical/mathematical puzzle of Japanese origin. They have become popular in the last half year or so in the UK, primarily due to their inclusion in the London Times. If you like, you can download the most recent puzzles from the Times.

In search of a way to generate Sudoku puzzles on my Mac, I found a few options, one of the best of which was the Sudoku application written by David Easton. Because this application was written in Tcl/Tk, it is possible, with a bit of hassle to run it on OS X through X11. However, for the average Mac user, this is simply too much work for one small program. Therefore, I present the Mac OS X native port of David Easton’s Sudoku application.

Download Sudoku for Mac OS X now (1.2 meg’s)

Screenshot:
Sudoku screenshot

The basic rules of Sudoku are simple: every digit from 1-9 must appear in every row, column and box. For more information on Sudoku, check the Times website or the Daily Sudoku website .

April 20, 2005

Easily Post Syntax Colored Code Snippets

Filed under: Uncategorized — danschellenberg @ 2:42 pm

Although I use TextWrangler as my editor of choice on OS X, I spent a bit of time looking at the new release of SubEthaEdit, which has a few really cool features (most famously, real-time collaboration on a document). One feature of SubEthaEdit that I will undoubtedly be using in the future is the very nifty “Copy as XHTML” function in the Edit menu (or contextual menu). What this does is take the currently selected text and export it as valid XHTML with colourized syntax intact. This is going to be incredibly handy when I want to post examples of code when teaching computer science, or any other time posting code is required.

Here is a simple example using Python code:

“”"Just some random code”"”

print “hi there”
print “yet again”
x = 0
while x < 9:
    print “nothing”
    x = x+1

Although the XHTML it spits out isn’t too tidy, it works like a charm.

April 11, 2005

Piercing the peer–to–peer myths: An examination of the Canadian experience

Filed under: Uncategorized — danschellenberg @ 12:31 am

A very interesting article appeared in First Monday recently regarding the effects of online music sharing on the recording industry.

Canada is in the midst of a contentious copyright reform with advocates for stronger copyright protection maintaining that the Internet has led to widespread infringement that has harmed the economic interests of Canadian artists. The Canadian Recording Industry Association (CRIA) has emerged as the leading proponent of copyright reform, claiming that peer–to–peer file sharing has led to billions in lost sales in Canada.

This article examines CRIA’s claims by conducting an analysis of industry figures. It concludes that loss claims have been greatly exaggerated and challenges the contention that recent sales declines are primarily attributable to file–sharing activities. Moreover, the article assesses the financial impact of declining sales on Canadian artists, concluding that revenue collected through a private copying levy system already adequately compensates Canadian artists for the private copying that occurs on peer–to–peer networks.

See the full article by Michael Geist on the First Monday site.

April 7, 2005

Canadian iTunes Music Store Giving Away Free Track Each Week

Filed under: Uncategorized — danschellenberg @ 6:08 pm

Although the iTunes Music Store has been available in Canada for quite some time now, the Canadian iTMS has not given away a free song each week as it does on the U.S. store. This is the case no longer.

Head on over to the iTMS (accessible through the free iTunes application for Mac and PC) and be exposed to some new music each week.

Linking to a Specific Page of a PDF File

Filed under: Uncategorized — danschellenberg @ 2:47 pm

As I was editing a webquest that I would be interested in using with my students in Math 20, I had need to link to a specific page of a PDF document. It was a NASA document that has a section on microgravity created through specific parabolic flight paths, and was on the 21st page of a 124 page pdf document. I wanted my students to be taken directly to the relevant page, and I knew that I’d seen it done before. It turns out that it is really simple — all I had to do was append #page=21 onto the URL of the pdf file. So, the final link looked like this:

http://stargazers.gsfc.nasa.gov/resources/products/
educator_guides/science_in_a_box.pdf#page=21

Try it out. Works like a charm.

Incidentally, if you are interested in the webquest itself, it is the on quadratic functions section of Math 20, specifically on how parabolas appear in many real-world applications. Feel free to check out my edited version, or the original by Janice Cotcher.

RSS and Bloglines Tutorial

Filed under: Uncategorized — danschellenberg @ 12:15 am

Although I suspect that most folks reading this blog will already be familiar with RSS (Really Simple Syndication) and the feedreader Bloglines, I just wrote a very brief tutorial on the subject for a Computers in Education Alumni blog that I am a member of. If you don’t know what RSS or Bloglines is, feel free to check it out.

April 3, 2005

Article by Jeffrey Elkner, Open Source Teacher and Advocate

Filed under: Uncategorized — danschellenberg @ 2:56 pm

If the use of open source materials is of interest to you, I highly recommend checking out Jeff Elkner’s article in the ReHat Magazine issue of January 2005. Jeffrey is a high school computer science teacher at Yorktown High School in Arlington, VA and has been teaching computer science using open source tools (Python, GNU/Linux) for the past 5 years or so. I made reference to him in a previous post regarding teaching computer science using Python.

April 2, 2005

Where to Find Free Stock Photos

Filed under: Uncategorized — danschellenberg @ 11:17 pm

For those who need to use free photographs, whether in the classroom or elsewhere, Robin Good provides a nice overview of some of the available sites. I’ve been partial to
morgueFile for some time now, but it is always nice to have some more options…

April 1, 2005

Use Quicksilver Triggers to Control iTunes on a Remote Computer

Filed under: Uncategorized — danschellenberg @ 4:32 pm

When I am listening to music at home, I play my music with iTunes on my desktop iMac to my stereo in the living room using Airport Express. Although I could do the same thing from my laptop, I prefer not to, since my laptop is not always awake, the hard drive capacity is limited and I have found that it occasionally pauses (adds dead time to) the music for no apparent reason.

The one irritating thing with this setup is that it requires me to get up and go to the iMac whenever I want to control the music being sent to the stereo. While this isn’t a big deal, it is a tad annoying when someone else is working on the iMac, or when I’m feeling just plain lazy. In these situations, it would be really nice to be able to control the music from the living room. Enter browserTunes, a handy little application that lets you control your iTunes music remotely through a browser-based interface. It is easy enough to set up, though I switched the port it uses from 8080 to 3691 (just because 8080 was already in use on my machine). Cool. But I want more…

I’m a big fan of SizzlingKeys4iTunes, a neat application that lets you control iTunes using keyboard shortcuts.

SizzlingKeys4iTunes lets you control iTunes without leaving your current application. Control all aspects of iTunes with hot keys that are fully-customizable via an intuitive Preference Pane plug-in.

What I wanted was something that acted the same way as SizzlingKeys4iTunes, but actually controlled iTunes on my iMac. Enter Quicksilver and its great Triggers feature (customizable keyboard shortcuts for anything that Quicksilver can do — namely, anything). At first, I tried hooking some triggers to bookmarks that I had created in Safari that told my iMac to do something with iTunes. These URLs looked something like this: http://192.168.2.3:3691/next. Unfortunately, when I would access these bookmarks via Quicksilver, Safari would pop up with the browserTunes interface. This was getting closer to my goal, but I wanted it to be all taken care of in the background.

To pull this off, I created 3 one-line AppleScripts for the 3 functions that I really wanted to use (play/pause, next, previous). These AppleScripts simply use the UNIX curl downloading utility (included in OS X) to query the appropriate URL, saving the result in a small temporary file that is deleted on restart.

The “Next Song” AppleScript is simply:
do shell script "curl http://192.168.2.3:3691/next -o /tmp/bt.tmp"

The “Previous Song” AppleScript is:
do shell script "curl http://192.168.2.3:3691/prev -o /tmp/bt.tmp"

The “PlayPause Song” AppleScript is:
do shell script "curl http://192.168.2.3:3691/playpause -o /tmp/bt.tmp"

Notes: These scripts should be all on one line (in other words, there are no hard returns in the actual scripts). You will need to find out from browserTunes which IP address you should be using to connect with. Also, if you are using the 8080 port for browserTunes, you would have to replace the :3691 with :8080.

To get Quicksilver to see these AppleScripts, create them with Script Editor (should be in /Applictions/AppleScript/) and save them anywhere where Quicksilver can see them. If you want to use them right away, manually refresh Quicksilver’s catalogue from within Quicksilver preferences.

To use Quicksilver’s Triggers, you need to “enable advanced features” from within the Application tab of Quicksilver’s preferences. When you restart Quicksilver, open the preferences again and there will be a Triggers tab. To create a new trigger, click the little + button, then find whatever you want to in the normal Quicksilver way (in this case, just typing in the name you saved your AppleScript by should pull it up). Set up a keyboard shortcut and you are ready to go! You can now control a remote copy of iTunes through keyboard shortcuts a la Quicksilver.

Note: If you aren’t comfortable with Quicksilver and find these instructions confusing, you should go check out Dan Dickinson’s Quicksilver beginner or intermediate tutorials.

Blog at WordPress.com.