Archive for General Ramblings
08.01.07
Posted in General Ramblings, Mac at 8:33 pm by kkj
Vacation time and the weather still sucks … DMI and Accuweather both agree on this and almost with identical forecasts
. At the same time I’ve been struck by a frenzy, a crazed state of widget-mania ignited by my recent success in the field *coughs*. Talk about being stuck between a rock and a hard place …
I often travel from Ã…rhus to Copenhagen by car and whenever I remember to check the itinerary the day before and actually get up in time I choose the short cut by ferry to Zealand. This gives me an hour to doze or read while digesting the possibly most expensive breakfast in Denmark. That is, when I remember to check the schedule.
The ferry I take is operated by Molslinjen who offer up-to-date travel information in HTML and WML. I’ve bookmarked the WAP link in my cell, but thought it would be nice to have a widget that displayed the same information as well. As an added bonus that would mean having a fairly decent project on which to experiment with AJAX. Enter: The Molslinjen Widget:

The widget uses the Javascript XMLHttpRequest object to retrieve the current itinerary in WML format asynchronously whenever the Dashboard is displayed. You can switch between the different routes by clicking on the headline, and get to the not-so-informative back page by clicking on the info icon, which appears when the mouse rests over the widget.
For some reason, the WML offered by Molslinjen is not well-formed. My cell phone doesn’t seem to mind, but the XMLHttpRequest object choked on the XML and I had to perform a bit of string replacement to work around the problem. If Molslinjen ever decides to remedy this shortcoming, my widget will break.
Oh and I should mention: Molslinjen is not involved in this project. You can use the widget at your own peril as long as you leave me out of it, should you miss the ferry anyway.
Sail on by!
Permalink
07.24.07
Posted in General Ramblings, Mac at 8:33 pm by kkj
Okay, so given that we have a Paris in Denmark as well, I guess I should have expected there to be a Copenhagen in the USA also. Turns out my AccuWeather widget defaults “Copenhagen” to “Copenhagen, USA” … obviously. When you enter “Copenhagen, Denmark” you get a more accurate picture of the weather situation:

Sorry about the noise AccuWeather - maybe you should consider adding a country code to the city name as well to avoid similar situations in the future?
Permalink
07.22.07
Posted in General Ramblings, Mac at 8:24 pm by kkj
… especially of the future! This fact of life has to be a daily nuisance to meteorologists all over the planet as they struggle to interpret satellite images of the Earth’s atmosphere painted in all colors of the spectrum. Meteorology is a science of probabilities, a trade whose precision diminishes rapidly the farther into the future predictions are made. Tomorrow’s weather can almost always be predicted with certainty, but what about today’s?
InAccuWeather
The OS X Dashboard sports an “Accuweather Widget”, which, although extremely slick in its look and feel, fails miserably at displaying even the current weather situation. At least in Denmark. Today on July 22nd 2007 AD the Danish Meteorological Institute (DMI) informs anyone who shows an interest that it is raining. In fact it will rain so much here that the institute has issued a warning for “extreme weather conditions” with 17°C and yet AccuWeather thinks that we have a cloudless sunshine here and 27°C!!
Did anyone say “useless”??
What to do? I decided to ditch AccuWeather and write a widget that grabs the current 5 day forecast image from DMI. The result can be seen in the picture below with AccuWeather gleaming sunshine on a rainy Sunday:

The image caching nightmare
Writing a widget is not rocket science, and requires little more than HTML and Javascript skills in its most basic form. The Dashboard is basically a specialized web browser. Brilliant! Unfortunately this also means that widgets inherit any problems that browser applications suffer. One of these problems relate to the caching of images. In this case, the forecast, which DMI has decided to publish on the same image URL. The current 5 day forecast for Eastern Jutland, for instance, is always published on http://www.dmi.dk/dmi/200611090030_cms6dognostjylland.jpg”. Once the Dashboard has downloaded this image, it will be cached for the lifetime of the widget i.e. until it is eventually removed, and so the forecast slowly but surely becomes irrelevant.
I spent the better part of an afternoon scouring the web for solutions to this annoying problem and ran in to numerous frustrated Javascript developers. After pondering the problem some more I came up with the following possible solutions:
- Delete the widget cache. The Dashboard cache lives under ~/Library/Caches/DashboardClient and can be removed by a user with root privileges without problems. In theory this solves the problem, but alas the Dashboard will have to be restarted for the cache to be reread. No go.
- Write an applet that gets the image. I was hoping a Java or a Flash Applet could do the trick, but these are limited to their sandboxes and can generally not access the HTML DOM of their enclosing document.
- Make a server side PHP image proxy. This site, Vaportrail, has PHP support and I wrote a simple script to proxy the image from DMI. While this solution works, it means lots of irrelevant traffic on my site and hence load. Not the best solution.
- Leverage the fact that widgets have extensions for calling shell scripts. A bash script could use CURL to get the image, write it to /tmp/ with a name made unique by the current date, and the widget could load it from the local folder. Eureka!
Caveat: While my solution works, it will fill /tmp/ with images: one per day per region you choose to display. I could have implemented a cleanup facility in the shell script as well, but I am not a big fan of scripts that perform “rm” on my local folders. I leave that as an exercise for those with strong stomachs.
The widget can be downloaded from this link. Quote Apple: “Mac OS X v.10.4 Tiger is required. If you’re using Safari, click the download link. When the widget download is complete, the widget installer appears. Click Install if you want the widget installed on your Mac. If you’re using a browser other than Safari, click the download link. When the widget download is complete, unarchive and open it to show the widget installer.”
Enjoy! And have a sunny summer …
Permalink
01.26.07
Posted in General Ramblings at 8:43 pm by kkj
I went running this morning, feeling rather sporty considering that a) it is winter and b) it is therefore cold outside. My favorite track runs alongside a local lake in a wildlife preserve: it is quite close, and there are no cars around to smite the air. When I got there I turned left only to find the trail flooded and completely impassable a few hundred meters down. Turning around, I ran well about a kilometer in the other direction when again I was stopped by flooding. Close to this point there’s an expressway overpass. I got up there, ran along the road for a little while, crossed over and got onto the path again where it runs on the other side of the lake … only to find it blocked by flooding some hundred meters down.
Darn. Determined not to let this stop my exercise, I left the road, climbed a little hill, and started making my way thru an overgrown terrain, which was completely suitable as a backdrop for the place where maniacs come to dump their victims in dark crime series. Luckily I didn’t stumble across any lost limbs poking out of the ground, but somewhat scratched and dirty I finally found myself on the other side of the flooded path and started running again. Guess what. About a kilometer down, where the trail passes a road there was another flooding and nowhere to go, but follow the road home.
And what did I find when I finally got back? My friend Tommy had blog-tagged me daring me to expose 5 not-so-well-known facts about myself. What a tough morning.
If you’re still with me at this point in the post, you asked for it. Here goes:
- When I was a kid, I took piano lessons and even played in a scout-band once. Every year around x-mas I exercise that old instrument from my childhood, and according to my wife with increasingly disastrous results.
- I fence and recently switched from foil to saber. My name is pronounced and almost spelled like the Danish word for epee, leading to lots of rather awkward and generally bad jokes when the subject is brought up.
- After high school I spent a year with a couple of friends producing what must have been the most boring and least interesting computer game in history, “Shepherdâ€, about a shepherd who lived in the Faroe Islands herding sheep. Yawn. Don’t ask why we chose that topic, but thank the higher powers it was never finished.
- For a short while I was into movies, producing and costarring in a few motion pictures. Most notably of these is “Fisk”, which is remembered for being the only film in history where the director’s cut version is shorter than the original. There’s an online teaser available at the official Fisk The Movie site at your own peril. Remember to turn on sound.
- When I was young and wild I had a goatee and long hair. If you’re good you can spot the old me in the Fisk teaser.
As it is supposedly bad luck to not send a chain letter to other people, I tag the following two bloggers (sorry ladies):
- Julie Thorendal whose blog on the musical scene in Copenhagen I helped setup
- Signe Wagner who had a very lively blog on Enterprise Architecture until she graduated and became a business woman. Maybe this challenge will rekindle her writing?
Technically speaking I should have tagged 5 people to avoid bad luck, but alas the other bloggers I know have already been tagged. This is not surprising if you consider for a moment the implications of 1 person tagging 5 people who in turn tag 5 people and so on. It turns out that 5^14 equals 6.103.515.625 … so after 15 iterations (including the source) the entire planet is in the game, and following the tagging path backwards thru blogs across the world I seem to be in the 12th row along with some 50.000.000 other people … Go figure.
Permalink
07.29.06
Posted in General Ramblings at 2:04 pm by kkj
It is summer, vacation time, and unusually hot: Too hot to sleep.
Last week I got a new cell phone, the Sony Ericsson K800i, which among other nice features sports a 3.2 mega pixel camera with built-in flash. A truly cool gadget, and I confess to having sneaked away on several occasions to check it out. So it was that I discovered the concept of themes, which allow you to personalize the look-and-feel of your phone, its menus, and ringtones. My last phone, a Nokia 6230, had a silver bullet as background, and obviously my new phone had to improve on that so there simply was no away around it: had to do my own theme.
The nice folks over at Sony Ericsson have made a little tool for exactly this purpose, the Sony Ericsson Themes Creator. Armed with this utensil and Adobe Photoshop, I burned the midnight oil yesterday and came up with a western style Silverbullet theme complete with shrapnel hammered letters and a smoking gun. The background texture is an animated GIF, composed picture by picture in Photoshop and rendered via Stone GIFfun, which you can get for free as well.
The result: Judge for yourself below or go grap the western style Silverbullet theme for your own K800i. To download directly to the phone, follow these instructions:
- Open the webbrowser and navigate to http://vaportrail.dk/presentations/Silverbullet.thm
- The phone may complain that the content type is not supported. Proceed anyway.
- Once the theme has been downloaded, you will be prompted to install it. Do so.
- Enjoy

The K800i theme preview in Sony Ericsson Theme Editor
Permalink
06.25.06
Posted in General Ramblings at 2:05 pm by kkj
A poor freshman student of architecture posted a disappointed comment to my blog entry on “traits of an architect” today, and a few months ago my company Silverbullet was asked what buildings we had on reference, thank you. I guess it must be the pictures of bridges and skyscrapers that lure these unwary souls to our sites. As a quick and probably not-too-effective remedy I have renamed the blog post to “traits of a software architect”, but kept the picture of the bridge between Zealand and Funen … hope that helps a little. Passing that same bridge earlier tonight, this incident got me thinking of the extreme to which the software industry bases its terminology on a borrowed vocabulary.
I mean, last time I checked there was no engine in a Turing machine for a software engineer to lubricate, and although the concept of a dynamic link library may sound cool to the uninitiated, it doesn’t mean that you can borrow books from it. Along the same lines you don’t choose between color or black and white for an image of your harddrive, and the icons of your desktop are not wooden frames with religious pictures, stolen from some backroad in Eastern Europe and carelessly tossed on a heavy oak table, inherited from your late great-grand-uncle. And while we’re at it: Service Oriented Architecture is not a revolutionary new way of designing strip-malls that optimize the customer experience.
Computer science is a very young discipline, which has seen an explosive growth, unprecedented in any other field of technology, and I guess that is what accounts for the vast amount of borrowed terms, with which we build our word-stock: there is no time to come up with new terms, and by the way the whole concept of “building” something as ghostly as software requires a heavy use of analogies if we’re to get the message across to anyone outside the industry.
That said, the fact that we’ve fooled *real* architects twice now, shows that although it is easy to forget that there is a world outside of the computer (which by that way used to mean a person, who performed calculations until the digital revolution kicked in), it is prudent to be precise.
I for one will be prefixing architect with software from now on.
Permalink
04.30.06
Posted in General Ramblings, Mac at 8:44 pm by kkj
I am typing up this post on silver keys, a soft backdrop of pale moonlight glowing through each letter and symbol, screen dimmed to spare my eyes. In the wake of Commodore’s demise, for a decade I’ve been slugging along with Windows on bulky PCs with no elegance or style, just muscle. But no more, ’cause finally supreme and superior design go hand in hand with high-end gear: I’ve bought an Intel based MacBook Pro.
Apart from its sleek looks and raw power in the shape of a 2.2 Ghz dual core Intel chip beefed up with 2GB of memory, my MacBook sports stereo speakers, a magnetic tripsafe power cord, wide screen, light sensors, and a builtin motion sensor designed for harddrive protection, and put to more cool uses by community geeks: how about a car-like alarm, which can be armed and disarmed by the Mac’s remote control, and which will trigger if someone so much as tries to lift the machine?
And don’t get me started on the virtues of Mac OS X (”Tiger”), which is by far the most elegant version of Unix I ever worked with and years ahead of what the Redmond Empire has ever produced. I’ve spent the better part of a month now taming this truly amazing beast and while the task has been daunting at times, it has been worth the effort.

Mac os X with Windows: I named him Garfield - my pet XP
- Office Software. I use Microsoft Office and Visio - and yes, I have tried OpenOffice too, but it just can’t measure up. Now this is a problem on a Mac, for it’s Microsoft Office versions are slugging behind and the 30 days trial of Office 2004 (!) has too many issues . My company already has a Microsoft Powerpack deal going on, which gives us heavy rebates, and the Mac versions are not included. I solved the problem by installing a VM called Parallels, a truly amazing product which is very fast, and although still in beta, works well. My OS X and my VM with Windows XP now share the same files and the clipboard. I used to use Powerpoint for presentations, but after trying out iWork Keynote I switched instantly.
- Development tools. Well OS X is Unix so no need to install Cygwin or the like to get a decent set of shell commands. Intelli/J is already ported to OS X, and I used the opportunity to upgrade my license to 5.1. Works like a charm. Instead of XML Spy I got me Oxygen, which is really cool too. Most of the other tools I use are built with Java and do seem to live up to the “run anywhere” sales pitch.
- IM. I mostly use MSN Messenger these days, and like Office, the Mac version is generations behind the Windows version. Parallels to the rescue again! Yahoo messenger is up to speed though like Skype.
- Planning.My contacts are now imported into the OS X native Address Book app, and my schedule is in the native Calendar app. I synch my archaic Nokia 6230 over bluetooth with both applications using the native iSynch program. For email I setup both the native Mail application and Mozilla Thunderbird which I used on Windows too. The native Mail uses the built-in address book, and Thunderbird does not. We’ll see.
I still haven’t figured out a way to print to my wireless D-Link printserver from OS X and the manufacturer states rather explicitly that they will never support anything but Windows. Fortunately I AM running Windows (in a window) … and I CAN print from my XP VM so going via the native PDF facilities of Mac OS X, anything can still be printed.
In conclusion it is involved to make the switch from XP to OS X, but it is one well worth the effort!
Permalink
01.11.06
Posted in General Ramblings at 4:44 pm by kkj
The Corporate Website: That digital worldwide extension of business on the ubiquitous Internet, carved in bits and painted in company colors. Any respectable organization has one, sporting at the minimum information about mission, strategy, services, and contact information.
My company has had such a site for some time now, a long time in fact with no-one making any updates, and this is a common trap: To create a website from static HTML with the good intentions of updating it every so often. The problem is either that there is no news (no easy technological fix there) or that it is too cumbersome to go and add new content. The solution? Use a content management system (CMS) behind the site and tailor a minimal set of templates for the editor’s use.
Charged with the daunting task of giving the site a serious facelift, I set out to look for a cheap - as in free - CMS system which was written in Java so I could use my hard earned skills in that language. The CMS had to have a nice administrative interface with user and role management. It should be really easy to create new editors and really simple for those editors to go and edit content. At the same time I wanted flexibility. The layout and look of the site should be completely configurable, and it should not require a set of rocket scientists to figure out how. It turns out there is literally thousands of content management systems out there, open source and commercial. How do they all survive?
Anyway, after scouring, sorting, browsing, googling and using my hitherto undiscovered sleuthing abilities to their full extent, I finally found what I was looking for. I went on to hire a web designer to come up with a new look and make a few HTML based templates, then turned them into JSP files that could be used by the CMS as page templates. Finally I spent some time learning the basics of the tool and filled in content and pictures. The result can be seen at the official online corporate website of Silverbullet.
Let one thousand flowers bloom … mine is a Magnolia
Permalink
10.21.05
Posted in Conferences, General Ramblings at 5:18 am by kkj
We’re rolling out of San Diego on bus headed for Mexico and Ensenada, Cinderella of the Pacific. It is not yet 9 in the morning and it’s a warm, but hazy day. The chauffeur is cracking jokes and we’re sipping coffee as we reach the border and head into Tijuana, Mexican neighbor to San Diego, without even showing passports.
Tijuana is such a contrast to its Californian counterpart: poor, dirty, and worn, it’s suburbs and sprawl resembling a landfill rather than residential areas. In short, this is not a place I would want to visit and I am relieved that we booked the long tour and won’t be getting off until some 70 miles south of here. It gets better as we drive along the coast, the haze clearing, and the landfills less evident, when we finally reach our destination.

Ahh, Mexico!
Ensenada is actually a quite nice place. In contrast to Tijuana you’re not being constantly bugged by streetwise salespeople trying to persuade you to buy something you don’t need. They are there, but not in great numbers. The city is quite clean, and has a nice harbor and the largest flag-pole I ever saw. You can definitely shop there, but we didn’t find much worth buying and came back with little loot. Check out the gallery.
While on the trip, we evaluated Oopsla and came up with some points. On the upside:
- Wide variety of content. The conference has the usual tutorials, a peek into what the future might hold (onward!), keynotes, code camps, design fests, and more making it very versatile and wide in its scope.
- Not too big. The size is manageable, and makes it a lot easier to get actively involved rather than just being a listener.
- Generally high standard. Speakers at Oopsla come in different shapes and sizes as would be expected (and required), but they are generally dedicated professionals with varying presentation-skills.
And on the the downside:
- Poor structure. The website of the Oopsla conference is in defiance of all guidelines for structuring a website and it is really hard to get a clear overview of what goes on there. When constrasting Oopsla with JAOO, which is about the same size, I find it much easier to get a clear picture of what I want to see in the latter. There was a 30 minutes guidance for Oopsla-newbies monday evening on how to find your way around Oopsla. Well that’s fine, but it was 2 days too late and shouldn’t be necessary imho.
- Annoying payment model. At Oopsla you pre-register for tutorials, which you pay for separately. There are many tutorials and some of the ones I wanted to see ran concurrently so I had to pick. What do you do, when after 30 minutes it turns out that the next 3 hours will be a waste of time? You can leave, but you cannot go see the other tutorial instead. That sucks, and imho Oopsla should learn from JavaOne or JAOO where you can pop in and out of sessions at your leisure.
Did I learn something, get new inspiration? Yes, the trip has been rewarding and I will consider attending Oopsla again in the future.
Tomorrow I’ll get up at 4 in the morning and start my 24 hour journey home. Goodnight California. Until next time.
Permalink
10.20.05
Posted in Conferences, General Ramblings at 7:21 am by kkj
Oopsla 2005 ended today, an event I missed on purpose as my one tutorial ran from 8:30-12:00 noon and there didn’t seem to be much more for me in the afternoon. Today’s presentation was on “Models and Aspects - Handling Cross-Cutting Concerns in the Context of MDSD”.

The sun sets over San Diego harbor
I have used AOSD for some time now, leveraged both Aspect/J and AspectWerkz for handling cross-cutting concerns in enterprise applications, and even given presentations on the topic. On top of that I’ve been using code generators, notably XDoclet, to generate various infrastructure artifacts from source code, but until today I was somewhat unclear on what exactly the term “Model Driven Development” encompassed. More so, I was curious to learn how to combine the two techniques and what exactly could be learned from such an approach.
Markus Völter and Martin Lippert made a good presentation, which explained the two topics and then went on to detail various patterns in the context of AOSD combined with MDSD. The most fun part was when the discussion went into modelling and what constitutes a domain specific model as defined by its domain specific meta model, which in terms can be described by a (domain-agnostic) meta-meta model, defining a language for domain specific models. Go figure
Certainly more clear on the definitions, I took the concepts of domain specific modelling with me as being something I am already doing, but which I might take a more structured approach toward. Also, it was good to hear others echo my own reservations on AOSD as being a last resort for those issues that hard to specify otherwise. A good presentation, and cudos from me!
We left Oopsla for yet another shopping spree at the Fashion Valley Mall (phew: good thing we’re going home soon) and then strolled down to the harbor to visit the now retired aircraft carrier, The U.S.S Midway which was in service from 1945 through the first Gulf War until 1992. I got a little overboard so to speak and took quite a few pictures. The day ended with beer in the sunset along the pier, and nice californian cuisine at Tom Ham’s Lighthouse located at the beautiful point of Harbor Island. Check out the pictures, which are void of Oopsla impressions …
Permalink
« Previous entries