The incredible generosity of Microsoft

Today we received the following email

Congratulations to Yose Widjaja on winning the inaugural Microsoft 1st
Place Performance Award and Alexander Kuptsov on winning the 2nd Place
Performance Award.  Yose receives Windows Vista Ultimate and the
Wireless Laser Desktop 6000 valued at RRP $968 and Alexander receives
a copy of Office Ultimate RRP $868.

Thank you to the Microsoft Australia (www.microsoft.com.au) for
providing these new awards!

The Microsoft Performance Awards will be annually awarded to the first
and second place winners of the CSE 3rd year Performance Awards.

The awards will be presented at the annual CSE Prizes Reception on
Friday April 20th.

Of course, well done to the students on their performance. But their prizes seem a little shallow, considering that the first prize winner could legally obtain Windows Vista Business Edition via the CSE MSDN Academic program completely free of charge, and Microsoft themselves are selling Office Ultimate to students for $75 on their itsnotcheating.com.au website.

I am glad to also be announcing the inaugural Open Source prize, which consists of a Debian install CD and a copy of Open Office. Prizes can be collected from me at any time!

Update: Luckily I was informed that this blog post was eligible for the Microsoft "Golden Blog" award, because it mentions the word "Office" and links to the get-office-cheap website. Here's hoping I can also win a copy of Vista ULTIMATE!

tinymap.net - now with embedded maps

tinymap.net just got another thing ticked off its to-do list, as it now supports embedding maps in an iframe on your website.

Coming up with an interface to do this was a bit of a pain, but you can see it in action here (or click on the "embed this map" link on every public map). I think there's still update bugs with the Google map inside a re-sizable panel, and every browser wants to layout the panels slightly differently.

But, all going well, you should be able to see a small embedded map just below!

Simple accordion style menu with YUI

I couldn't find a simple reference for the popular "accordion" style fold out menus with the YUI animation libraries (maybe because it is so easy!). Only traps are setting the overflow properties of the fold-out div, and the various DOM height elements.

<script src="http://yui.yahooapis.com/2.2.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script src="http://yui.yahooapis.com/2.2.0/build/animation/animation-min.js"></script>

<script type="text/javascript">

function swap_div(div_name) {
 var div = document.getElementById(div_name);
 var to_height = (div.offsetHeight == 0) ? div.scrollHeight : 0;
 var from_height = (div.offsetHeight == 0) ? 0 : div.scrollHeight;
 var ease_type = (from_height == 0) ? YAHOO.util.Easing.easeOut : YAHOO.util.Easing.easeIn;
 var new_status = (from_height == 0) ? "collapse" : "expand";
 var anim = new YAHOO.util.Anim(div_name, { height: {to: to_height, from: from_height} }, 0.5, ease_type);

 anim.animate();

 document.getElementById(div_name+"_status").innerHTML = new_status;
}

</script>

<div id="status">
  <a id="expand_me_status" href="#" onclick="javascript:swap_div('expand_me');return false">expand</a>
</div>

<div id="expand_me" style="overflow:hidden; height: 0px; background:#eee">
  <p>Hello, this is some text to be expanded out!</p>
</div>

And here's the example in action

expand

Hello, this is some text to be expanded out!

A more advanced version might use the callbacks to regulate the swapping of the expand link, but with short swipe times (as one would want from a UI perspective) this isn't really an issue.

In related news, tinymap.net has had a bit of an overhaul (and includes expanding menus).

tinymap again

tinymap.net appears to have found a small niche, and is getting a lot more hits than I expected. Over a few nights it has gained

  • Passwords for viewing/deleting
  • Changable waypoint color line
  • Export to KML
  • YUI served directly from Yahoo (hopefully faster)
  • Images served directly from Amazon S3 (hopefully faster)
  • Hopefully a slowly improving UI

It is kind of strange and cool that the whole thing hangs together with a mash-up of Google, Yahoo and Amazon services. I considered using Amazon S3 to actually store the map database, but it isn't big enough yet, and I think latency would be an issue.

I have sitemaps that point to KML for public maps, and I was hoping that by pinging Google with the address they would index the KML with the page, and Adsense would serve more relevant, localised ads. So far, despite my pings, Google has not gone for any of the sitemaps -- I think you need to have them under your "webmaster tools" or something. If any Googlers are listening integrating Adsense with KML is going to be a killer app.

Some highlight links

I still have some more ideas, but I don't want to clutter it and loose the KISS approach I desired from the start. It sure is a lot of fun, even if Javascript is the most un-debuggable language ever invented.

tinymap.net

Recently I've had some fun building tinymap.net which is best described as tinyurl for Google maps. You scribble on the map, and then you get a short URL to it. For example, to see my average trip to work go to http://www.tinymap.net/MkJVFx77KSX/.

I of course did no market research or planning and simply started coding, and have since found a few other similar (and fairly cool) sites such as Quikmaps and wayfaring. My site certainly has them beat in the KISS stakes, although it does involve a mashup, some AJAX and has been tagged a lot on del.icio.us so I'm claiming it is Web 2.0!

Easy geotagging

I love the idea of image metadata, but don't like the idea that if I invest the time in adding it to my photos and Flickr disappears then I've lost it all.

I wrote a Python wrapper for libiptcdata (coming to Debian if the NEW queue ever moves) and some tools to add titles, keywords and comments to IPTC data (embedded in the JPEG), which fixes one part of my problem.

Although one day I might have a camera that has a built-in GPS, until that day the next best thing is Google Maps. Since they added Australian street data, I can pretty much pin-point wherever I was in a matter of seconds with a place name search. Using their API I hacked up a latitude and longitude finder page which can search by address, and pops up information in a format suitable for pasting directly to the exiv2 command line to embed the location in the EXIF data. You can also click anywhere to add a mark and then click on it to get its location information.

The only problem was that EXIF expects locations with degrees, minutes and seconds rather than the more modern decimal points, which makes ye feel a bit like a scurvy old sea dog, ahhrrr.

Flickr can also apparently take geographic information from tags, if you paste them in and know the secret page to import it. However, when uploading with EXIF GPS data I found that it placed things on the map straight away and doesn't pollute your existing tags. Yahoo maps are however, at this point, unfortunately a fairly mediocre imitation of Google maps.

Yay Web 2.0!

Review of Brother HL-2040

Dick Smith are selling the Brother HL-2040 laser printer for what seems like a very cheap price of $89. It even says on the box it comes with a toner good for 2500 pages, so it doesn't seem to be the usual trick of a cartridge just full enough to print a test page before requiring an expensive purchase.

I fully expected to have to learn how CUPS worked, since previously I'd only ever printed to already setup printers. However, all I had to do was install the Debian packages for the LPR and CUPS drivers from the support page and plug it in (via USB) and, somehow, it magically worked. Big marks for shipping working packages for a range of distributions.

However, a big negative is that the LPR bit is proprietary. Unsurprising, since I assume the printer has almost no in-bulit logic, but disappointing none the less. Thus you of course can't use it on anything but your standard 32bit x86, which probably sucks if you want to hook it up to a printer sharing box or something (of course CUPS can network share it). And although it works now, there is always the chance it will break horribly in the future.

I think it is fairly low resolution compared with more expensive models, but it looks fine to me. The only annoyance is that the paper comes out extremely curled. This has a number of disadvantages; firstly your output doesn't sit right, secondly you need to keep a careful eye on the output tray because eventually pages will go everywhere and thirdly, I would be very worried about running it back through a second time to print on the back, since it looks like it would jam it up easily.

For someone on a budget who occasionally prints out a few things from their x86 Linux box, this printer is fine. If you were using it on a daily basis I think it would get very annoying, and I'd probably look for a more expensive model that doesn't curl the pages as much and has less chance of breaking in the future due to software bit-rot. Also, don't forget that printers don't come with a cable. I would highly recommend one such as pictured below, which as you can see has the "Proprietary look and feel of unsurpassed quality"!

Proprietary look and feel of unsurpassed quality