Posted: September 10th, 2009 | Author: Carl Mathisen | Filed under: Mac | 1 Comment »
There has been alot of rumors lately about Apple releasing their own iTunes streaming service. Coupled with the slow approval process of Spotify Mobile on the App Store for the iPhone, conspiracy theories have flourished online. I, for one, think that Apple doesn’t need worry about Spotify. Here’s why.
Does anyone remember Konfabulator? Long before Apple’s widgets (introduced in Mac OS X Tiger) and Microsoft’s Gadgets (introduced in Windows Vista), Konfabulator was the leading widget application on the Mac. Although Konfabulator was a success in the Mac sphere, they were screwed as soon as Apple previewed the Dashboard feature at WWDC in June 2004. Apple’s Dashboard is largely considered to be a straight copy of Konfabulator’s interface and technical implementation.
“Awfully nice of Apple to show how much they like us. Too bad they did it by completely copying our idea.”, said Arlo Rose, one of the guys behind Konfabulator to Geekpatrol right after the expo.
The rest is history. Apple’s Dashboard passed 1000 widget submissions by the end of the first three months after Tiger was launched, while Konfabulator had around 500 widgets in their widget repository after many years in production. The Mac market was lost, and shortly after Konfabulator released a Windows version. These days, Konfabulator is known as Yahoo! Widgets.
The point I’m making is that that standards matter. The default apps, the default colours, the default features. They all matter.
When the world’s largest music retailer (claimed by Apple themselves) - iTunes Music Store - decides to launch a streaming service I have no doubt in my mind that people will adopt it. Non-tech people will normally just use what they are served.
PLEASE DIGG: http://digg.com/apple/Why_Spotify_isn_t_a_large_threat_to_Apple
Posted: September 2nd, 2009 | Author: Carl Mathisen | Filed under: Uncategorized | 3 Comments »
Fra mine tidligere dager som student, drev jeg og en kompis musikkforretningen Rekyl Vinyl. Butikken vår var veldig idealistisk - vi solgte skiver til innkjøpspris og tok inn alt mulig av elektroniske- og rockeutgivelser som vi selv kunne digge. Vi koste oss også glugg ihjel der vi trillet hundrevis av kilo med vinyl gjennom Bergen sentrum i all slags vær på vei til en konsert for å selge vinyl og merch bakerst i de svette lokalene. Rekyl Vinyl er mitt beste minne fra studietiden.
“Hva har denne tårevåte historietimen med asyl.no å gjøre?” tenker du kanskje.
I tillegg til Rekyl Vinyl hadde vi også et sideprosjekt med det passende navnet navnet Asyl Vinyl. Dette var vår etikett, hvor vi ønsket å være med på å trykke og distribuere vinylversjonen av ulike artisters utgivelser. Vi kom ikke så veldig langt før studietiden var over og hverdagen satte en stopper for drømmene, men vi fikk i det minste gitt ut én utgivelse; Hardcore-bandet I.O.U med albumet I Owe You. Denne ble trykket i samarbeid med Analemma Records, Kontrabande Records og Black Soul Family. Du kan fortsatt plukke opp et eksemplar hos Nakkeskudd Plater i Oslo.
Vi kom aldri så langt som å lage en nettside for etiketten vår, men rakk å registrere det ledige domenet asyl.no (utrolig, men sant). I løpet av disse fem årene har jeg fått utallige kjøpsforespørsler fra ulike politiske partier og organisasjoner. Alle har selvfølgelig et ønske om å dele sitt standpunkt på dette viktige emnet. Jeg tror ikke at jeg vil selge domenet til en politisk organisasjon, uansett om jeg er enig eller uenig i et partis standpunkt. En veldedig organisasjon av et slag høres riktigere ut. Jeg ønsker derimot å være sikker på at domenet havner i riktige hender, så:
Hvem mener dere fortjener domenet asyl.no?
Posted: July 14th, 2009 | Author: Carl Mathisen | Filed under: Code, Mac, PHP | No Comments »
Recently, I took the time to upgrade my development environment from PHP 5.2.6 to 5.3.0. I’ll quickly show you how I did it and which issues I encountered afterwards.
MacPorts
I’m using MacPorts as my software management system. The port command allows me to easily upgrade or reinstall my packages.
At first I tried to upgrade my existing php5 package. Running this command, MacPorts will upgrade the main package and all dependencies.
$ sudo port upgrade php5
The compiling went well, but I received the following error message when MacPorts tried to activate the package:
Error: Target org.macports.activate returned: Image error: /opt/local/lib/php/.registry/xml_util.reg already exists and does not belong to a registered port. Unable to activate port php5.
Not being in the mood to argue, I promptly uninstalled my existing package and then installed 5.3.0 with my preferred dependencies.
$ sudo port uninstall php5 @5.2.6_1+apache2+imap+macosx+mysql5+pear+postgresql83+snmp+sqlite
$ sudo port install php5 @5.3.0_0+apache2+imap+macosx+mysql5+pear+postgresql83+snmp+sqlite
If your installation went well, remember to generate the new libphp5.so file to enable PHP in Apache.
$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
$ apachectl graceful
Restart Apache and you should be good to go.
Upgrading issues
I’m not a PHP 5.3 veteran as of yet - the version has only been installed on my system for a couple of days. Although there are a lot of changes from 5.2.x to 5.3, my [company's] software seems to have migrated perfectly. Since I’m on vacation, our 5.3 compatibility will remain largely unexplored for a couple of days more. For now, I’ve found only two minor speed bumps:
Deprecated functions
We hit a snag with the split() function. As of PHP 5.3.0 the regex extension is deprecated, calling this function will issue an E_DEPRECATED notice.
PHP Deprecated: Function split() is deprecated
If you don’t require the power of regular expressions, it is faster to use explode(), which doesn’t incur the overhead of the regular expression engine.
If you want the easy way out, you can ignore these warnings by putting the following line in php.ini:
error_reporting = E_ALL & ~E_DEPRECATED
It will show all errors except for the deprecated warnings. Of course, I recommend you fix the deprecated function calls instead.
Date/Time
With a clean install, I even received this error by running phpinfo():

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
This is easily fixed by setting the date.timezone property in php.ini. In my case, it looks like this:
date.timezone = Europe/Oslo
With runtime errors out of the way, I can now focus on the new cool features in PHP 5.3!
Posted: June 1st, 2009 | Author: Carl Mathisen | Filed under: Web | No Comments »
Most likely, you’ve encountered the internet meme of rickrolling, where you get fooled into viewing the music video for the Rick Astley song “Never Gonna Give You Up”. It seems like the developers at Verdens Gang, Norway’s largest newpaper, has taken a liking to this meme by putting the song in their header response:

Thanks to my friends: Lasse Lambrechts for pointing this out to me, and to Vidar Løkken for writing about this six months earlier.
Posted: May 4th, 2009 | Author: Carl Mathisen | Filed under: Other, Web | 6 Comments »
If you haven’t been living under a rock for the last 6 months, you’ve undoubtedly heard of Spotify. Wimp is a new challenger in the music streaming world. From the Norwegian company Aspiro, it is currently under development with a private beta period. I was lucky enough to receive one of these invites. Here are my initial thoughts. Naturally, most of my observations will be compared against Spotify’s features.
The application
Wimp is a music service that gives full access to a library of several million tracks. You are free to play any music whenever you like, create your own playlists and build your own music library. You are also able to share your playlists with your friends.
Wimp is developed on top of the Adobe Air platform. This makes Wimp easily deployable on the three major platforms (Windows, Mac, Linux). While this a great plus, the interface feels a bit sluggish compared to a native application. I guess this is the downside of using the Flex/Air platform. The app is currently only available in Norwegian.
Registration
The registration process was fairly easy and fool-proof. Instead of verifying the account through email, I received a confirmation code on my cell phone. You log in with your cell phone number and password. I cannot say for sure, but I’m guessing the cell phone verification as of now limits Wimp’s user database to people with Norwegian phone numbers.
Home Screen
Wimp has a complete home screen with three album ads, and newest/top albums and tracks. I’ve utilized this home screen more often than the home screen of Spotify. I guess this is because everything is directly available in Wimp, as where in Spotify, you would have to click the alternative tab view on the home screen to view the top lists.

Recommended
Wimp has a left column that stays the same where ever you navigate, just like iTunes Music Store or Spotify. What I like with Wimp, though, is the editorial playlist selection at the top, called “Vi anbefaler (We recommend)”. Here, you will find gems such as “Klassiske rockealbum (Classic Rock Albums)” or “Hip-Hop 101″. The playlists are of high quality, and I’m looking forward to more recommendations in the future.

Artist/Album
I like the album screen. In addition to a standard artist biography and image, it supplies us with external links to Last.fm and YouTube. The YouTube link is strictly a normal band name search on YouTube.
I really enjoy the tab view below the artist information. Here, you can filter the music with categories such as Albums, Collectors Edition, Singles or Most Popular Songs.

The album screen is identical to most other apps, like iTMS or Spotify. If you find the song you are after, you can click on it and it will play instantly. I am having trouble with the track seeking, though. If I want to jump to the middle of the song, the seeker bar would jump right back to its original position, ignoring my wish. I’ve encountered this problem a couple of times in Flash development myself, therefore I’m guessing this is a Flash issue. I’m not sure of the track bitrate, but as far as I can tell, there is no difference from Spotify’s track quality.

Search
The search results are displayed in a normal playlist. Above the list, an extra grid displays the results as artists and albums. I love this quick overview, as it is much faster and easier to navigate than a long playlist. Hopefully, the search mechanism will be more versatile in the final version, as creative searches and spelling errors rarely give you what you’re looking for. For instance, “lizzy jailbrak” in Spotify would give me the results I’m after, but Wimp returns with no hits.

Playlists
Playlists are easily maintained, and works as expected, like iTMS and Spotify. Wimp also has shared playlists, and I was lucky enough to encounter a shared one on Twitter:

After pressing the link, Wimp opens with the playlist loaded on the screen. It is not automatically saved under “Spillelister (Playlists)” to the left. I have to press “Lagre (Save)” first. One thing we realised, is that the shared playlists aren’t collaborative. If I add Kjartan’s playlist to my Wimp account, I basically save a copy of his list. The changes I make are only visible to me. Aspiro has told us this feature will be addressed in the future.

Aspiro is hard at work with this beta, as their status screen in Wimp states, working on improvements on playlists and navigations. Planned features are integrated buy-and-download as well as mobile services. I’m not sure how they plan on making a profit, but rumor has it they will only offer subscriber accounts, and avoid free advertisement-based accounts.
After a couple hours of testing, I’m sure Wimp will be a worthy competitor of Spotify. The fact that Wimp is available on many platforms and has a mobile version on the roadmap, makes me think this application is here to stay.
Posted: April 14th, 2009 | Author: Carl Mathisen | Filed under: Mac, Web | 3 Comments »
Have you ever wanted to take a screenshot of an entire web site? Most likely, the site in question will have a vertical scroll, where you would have to take several screenshots and merge them together in Photoshop later on. It can be a lot of trouble.
Trouble solved
Paparazzi! is a small utility for Mac OS X that makes screenshots of web pages. More precisely, a screenshot of the entire web page, not just the part you can view with your screen resolution. To illustrate, here is a screenshot of my blog post Building Cappuccino 0.7b from source.

Screenshot of blog post
Posted: April 7th, 2009 | Author: Carl Mathisen | Filed under: Cappuccino, Code, Mac, Web | No Comments »
Playing with bleeding edge tools and libraries is always fun, and now I’m trying to merge my still-under-development apps from Cappuccino 0.6 to 0.7.
Cappuccino, you say?
From Cappuccino.org: Cappuccino is an open source application framework for developing applications that look and feel like the desktop software users are familiar with.
Cappuccino is built on top of a new language called Objective-J. Obj-J implements a lot of the syntax from Objective-C and APIs from GNUstep, as a subset language in JavaScript. Cappuccino gets a lot of inspiration from Apple’s Cocoa frameworks, and in the latest release (0.7b) they even provide a tool called nib2cib, which basically converts interface layouts from Apple’s Interface Builder to be used in Cappuccino. Obj-J and Cappuccino is released under the LGPL.
Building from source
Cappuccino has its own build system. In previous versions it uses the steam command, which is based on their own build application and ant. The new build system uses rake. According to 280north, rake is definately a better choice because of the dependency implementation and scripting abilities. At any rate, both steam and capp works as expected. I encountered a problem while moving from steam to capp, though, which is the reason I’m writing this blog post.
Setting up Cappuccino 0.7b
Thomas Balthazar has already done numerous screencasts on Cappuccino. One of his latest contributions is #5 - Playing with Cappuccino, where he explains how to install 0.7b. After following Thomas’ great how-to, I received the following error while trying to create a new application.
$ capp MyApplication
Exception in thread "main" java.lang.NoClassDefFoundError: objj
My build seemed to be missing important files like objj, objjc and cputil (in ~/objj_build/Release/env/bin/). The documentation on capp is still a little scarce as 0.7 is in early beta, but I gathered that I need the following libraries installed to build Cappuccino properly: Java 1.5, gcc, rubygems with the gems “plist” and “rake”. I had all of these installed, save “plist” which doesn’t ship as default with Mac OS X.
After upgrading every dependency in Mac OS X, I realised it was the default rake library that needed to be bumped up to version 1.8.4. The following command installs/upgrades rake:
$ sudo gem install rake
Remember to clean your repository before rebuilding the Cappuccino release, or else the build will fail and end up with the previous result.
~/your_cappuccino_git_folder $ rake clean
~/your_cappuccino_git_folder $ rake release
Check your ~/objj_build/Release/env/bin folder. bake, blend, capp, cputil, nib2cib, objj, objjc and press should all be present. You are now ready to build your first Cappuccino 0.7b application.
The following command will create a “Hello World!” application in a new “MyApplication” directory, and you’re good to go
$ capp MyApplication
Screenshot:

MyApplication - Hello World!
Posted: February 28th, 2009 | Author: Carl Mathisen | Filed under: Other | 2 Comments »
Around new years I wrote myself a couple of new year’s resolutions. Since I didn’t have a blog then, I’ll post them now with a status update to see if I’ve been faithful to my list.
- Spend more time with friends. Too much work and traveling the last two months to make a difference.
- Work out at at least three times a week. I’m at between 2-3 times a week so far.
- Go on mountain walks more often. Still winter outside, but I’ve had a couple of walks.
- Read a book a month. Check. Read two books so far in ‘09.
- Drink more water and less coffee. Still too much coffee. I can’t help it!
- Learn Objective-J and Objective-C. Check! The biggest adjustment is the message-passing style. I like the languages so far.
- Pick up diving again I’m going on a diving weekend next week with the local diving club.
- Start a blog. You’re reading it…
Not too shabby
Posted: February 25th, 2009 | Author: Carl Mathisen | Filed under: Code, PHP | No Comments »
Have you ever wondered when your developers commit code? Or how much they commit? Or who has worked on what, and when? Then StatSVN might be the tool for you.
StatSVN
StatSVN retrieves information from a Subversion repository and generates various tables and charts describing the project development, e.g.
The current version generates a static suite of HTML documents containing tables and chart images. StatSVN is open source software, released under the terms of the LGPL, based on StatCVS.
It can, however, be tedious work to generate an SVN log file and run StatSVN with various option properties every time you want the latest digits. Phing solves this easily.
Phing, you say?
Phing is a project build system based on other projects like Apache Ant, make or Maven. Compile and build processes are not tasks we PHP developers are faced with on a daily basis. Phing intends to help us with testing, deploying, packaging or any other repetative procedure in our applications. Phing provides a large number of out-of-the-box tasks, and can easily be extended with your own custom tasks.
The integration
I’m not going into detail on how to set up Phing or StatSVN. You can set up Phing with PEAR, and put statsvn.jar within PATH on your computer.
Hooking StatSVN into Phing
To be able to run StatSVN in Phing, we simply need to define the StatSVN commands in a target configuration within build.xml.
<?xml version="1.0"?>
<project name="example" default="stat" basedir=".">
<property name="build.stat.dir" value="build/stat" />
<property name="build.src.dir" value="src" />
<property name="statsvn.command" value="statsvn.jar" />
<target name="stat">
<echo>Creating folder...</echo>
<delete dir="${build.stat.dir}" />
<mkdir dir="${build.stat.dir}" />
<echo>Creating SVN log file...</echo>
<exec dir="${build.src.dir}" command="svn log -v --xml > ${build.stat.dir}/logfile.log" />
<echo>Generating stat report...</echo>
<exec dir="." command="java -jar ${statsvn.command} -output-dir ${build.stat.dir} ${build.stat.dir}/logfile.log ${build.src.dir}" />
</target>
</project>
This snippet above will create a log file from your current repository checkout, and generate statistics based on it.
Running the task
$ phing stat
Now you have a web page in the folder build/stat containing a lot of statistics on your SVN project, including this:

Check out my other article on Phing, and how to use it in harmony with Eclipse.
Posted: February 19th, 2009 | Author: Carl Mathisen | Filed under: Code | No Comments »
IE6 Campaign
It is nice to see that measures have been taken here in Norway to help bring the percentage down of IE6 users in the world. Many of the large web corporations in Norway has taken action and placed a notice at the top of their front page, reminding people to upgrade to IE7 or switch browsers.
- Current Web sites in Norway warning against Internet Explorer 6
Draft
I accidently published a Draft of my two part series called “Introduction to AMF with ActionScript 3.0″. Sorry about that, I am still learning Wordpress. Part 1 will be up next week.
RSS
I switched from the default Wordpress RSS feed to Feedburner. I am impressed with the service. It took me about 2 minutes to sign up and add the feed to this blog.