Software and Other Mysteries

On code and productivity with a dash of unicorn dust.

contextmenu event in Firefox

I’ve been working on a small context menu library in Javascript. Basically it lets you register a listener on a DOM element along with a flag specifying which types of clicks should render the context menu. Also, let’s save the discussion of whether creating your own custom right-click menu is a good idea or not for another time.

The menu worked fine in Chrome and Safari, but when I tried it out in Firefox there was an issue. When right-clicking, the menu would appear but when the mouse button was released, the menu disappeared again.

Spotify Apps 101

This weekend, the Way Out West festival is held in Slottsskogen in Göteborg. I had originally not planned to go, but when I heard that there was a hackathon - which in itself is a tempting prospect - where you got a free pass just for participating, my plans changed.

I teamed up with @rickard_olsson, @jensljungblad and @_sandrahansson with the goal of creating our first Spotify app. In 24 hours we did just that, and the result was a music quiz app called Quizify (the number of apps named -ify was staggering). It was a great hack and we hope to get the chance again next year!

PHP vs. JavaScript

I love the rapid development of the technological wonder that is the Internet and its standards. The early nineties brought us static HTML pages which, but as time moved on more and more processing took place at the servers with a variety of server-side languages. However during the last few years much processing has been transferred to the browser using Javascript. This has meant that the majority of all browsers have gotten along for the ride and spent a lot of time speeding up the execution of these scripts. Out of curiosity I decided to compare the time it takes to perform a few standard actions in both JS and PHP.