APRIL 09, 2015

Releasing Bed & Breakfast websites

This week, me and Ted Valentin released a couple of new websites for finding nice Bed & Breakfasts.

We currently have websites that covers B&Bs in cities like Amsterdam, Cape town, Dublin, Gotland, New York, Brighton, London, and Paris. We're planning to release more places in the future.

Ted has written more about the sites, in swedish, on his blog.


DECEMBER 15, 2014

Get personalised event recommendations using Heyevent.com

Recently I released Hejevent.se, a swedish website for finding local events, which I also blogged about.

Today, I'm very happy to announce that I'm releasing two new websites. First, Heyevent.com which is now available for anyone in the whole world who wants to get recommendations on interesting local events. I'm also releasing Heyevent.de, which should be the ultimate event guide for Germany.

As I wrote in my previous blog post, I use collaborative filtering to calculate recommendations based on events that the user has attended before. Here's an overview of the features that Heyevent provide:


At the core of the service are personalised recommendations. Heyevent is using a collaborative filtering algorithm to calculate recommendations based on the events a user has attended before.

Weekly e-mail updates

A user can subscribe to get weekly updates with personal recommendations of the most interesting events in the upcoming week.

Find out what's happening in your city or neighbourhood

Anyone (both members and non-members) can check out everything that's happening in a certain place. For example, check out upcoming events in Stockholm, New York, London, Oslo, Brooklyn or perhaps Mitte, Berlin.

Similar events

In addition to provide recommendations, for each event, my recommendation algorithm also calculates events that are similar. The similar events are shown on each event page below the description, and it's actually a quite nice way to discover interesting events as well (in addition to the recommendations).

Liking events

Users can "Like" events on Heyevent in order to teach the system what stuff they're into, in order to further improve the recommendations. Events that are liked are also collected under the "My Events" page.

Search for events

Heyevent also provides the ability to search for upcoming, as well as past, events. One can search in both titles and description texts.

Please go ahead and try out the service :). I'd love to hear what you think!


DECEMBER 02, 2014

Hejevent.se - New website for finding events (in Swedish)

About a week ago, I released a new website called Hejevent.se. It's a website that helps you discover events.

Hejevent builds on top of Facebook events, which is nice since so many public events already exist on Facebook, it means that I already have the most comprehensive guide to events in Sweden.

However, the real power from basing the site on top of Facebook data comes from the ability to recommend events in the future, based on what events you have been to in the past. I've spent a large part of the development time to program and fine-tune a recommendation algorithm, using collaborative filtering, to calculate great personal event recommendations for Hejevent's users. I'm very pleased with the high quality of the recommendations, which actually turned out even better than I thought from the beginning.

The site is built using Python, Django and Celery. As data store I use PostgreSQL, Redis as Celery backend, and Memcached for caching.

For my swedish readers, I encourage you to go to Hejevent.se and sign in using Facebook to see your recommendations (or if you don't use Facebook you could also check out the public pages for evenemang Stockholm, evenemang Göteborg, evenemang Malmö, evenemang Uppsala or some other city).

For non swedish readers, I hope to be able to release an international version (in english) of the site before the end of the year!


MAY 28, 2014

Speed read things with Heyread.it

TLDR: Speed read this

Last month, I was at Hackaway #1 - an amazing Hackathon at a secret location, which ended up being a lovely island in the Stockholm archipelago.

At this hackathon, I built Heyread.it - a tool for speed reading. It works by displaying the words serially, one word at a time, at the same position. When reading a text normally, for every word, there's a short moment when your eyes are seeking for a certain position, while your brain is not processing words from the sentence. The technique Heyread.it uses removes this overhead.

At the moment, Heyread.it is a Bookmarklet, as well as a button plugin that let's you add Speed read buttons to your own website, like the one you see at the top of this post.

Heyread.it should work well on any modern device.


FEBRUARY 13, 2014

My year in review 2013

Unfortunately I don't blog every time I release a new website or open source project, even though I should. I'm going to try to be better at that, and also I thought I'd do a late new year's recap of (computer related) things I did in 2013.


What is my ZIP

In the beginning of last year I released What is my ZIP? - a small hack for displaying the ZIP/postal code of your current location. Later in May, I also added functionality for finding the ZIP codes for arbitrary addresses.


During 2012 I had been working extremely hard on our previous startup, Tripbirds. Therefore, when Robert asked me if I wanted to make an iPhone game with him and Niclas, it felt like a nice relief to work on something just for the fun of it. Our only goal was to make a game that would be fun, and that we would enjoy to play ourselves.

The result was Roni. A swedish word game which we released in March. In terms of users (~1800) or income it hasn't been very successful (it has barely covered Apple's developer license fee). However, our goal wasn't to make money, but to create a fun game, and I really think we've succeeded with that. As evidence to that, almost 100k game rounds has been played. That's >50 game rounds per user!

While talking about apps, I want to mention Appmagasinet. A weekly newsletter (in swedish) about apps by TDH.


In July I released Longitude.me. It's a website for sharing your current position with others live on a map. The typical use-case is if you're meeting someone down town and want to share your position with her or him (or them). Then you just create a new Longitude.me link, and send them the URL. Another use-case could be if you are going on a road trip with multiple cars, and want to keep track where the others are. One of the big USPs with Longitude.me, is that it works for anyone with a smartphone, with no need to install some app.


During the summer and beginning of the autumn, I developed and designed Boutiquehotel.me together with Ted, which we released in October. It's a website for people who want to find the best boutique hotels in the world. For example, check out New York boutique hotels, Stockholm boutique hotels, Berlin boutique hotels, Cape Town boutique hotels or Paris boutique hotels.


At the end of summer I released a swedish version of What is my ZIP called Postnummer.me. It has the same functionality, but it's in swedish and has another (perhaps better looking?) design. While I was at it, I also made a site for seeing your current altitude as well as a ZIP code site for Canada postal codes :).


I participated in the awesome art hackathon, Art Hack Day Stockholm, where me and Emil created Sexism Detector. We let users sign in with their Facebook account, and we retrieve all comments made on their - and their friends - profile photos. Then we analyze the words that are used in these comments and display the words that are the most disproportionally used to comment photos of women compared to men, and vice verse. The result is unfortunately quite sad, but not that surprising.

Open Source projects

Leaflet UserMarker & GeolocationThrottle

While making Longitude.me, I developed two small JS libraries that I've open sourced. The first one is Leaflet UserMarker - a Leaflet plugin for displaying user markers on a map. The second one is GeolocationThrottle - it solves the problem of throttling the number of callbacks that one gets from the HTML5's navigator.geolocation.watchPosition function.

jQuery Draggable Touch

While developing Roni, we realized that there were no good jQuery (or pure JS) libs for making elements draggable, that had touch devices as it's main target (with support for multitouch, etc). Therefore I created jQuery Draggable Touch which solves this problem.


I also did quite a lot of work on my biggest open source project, Locust. It's a load testing tool where you define your load tests in simple Python code, and then it lets you spawn millions of users generating load against your target system. We originally developed it to load test Battlelog, and it's been used for the stress testing of both Battlefield 3 and Battlefield 4, so one can definitely say it's been "battle tested" ;). I very recently pushed out version 0.7.


I also did some consulting last year. Most of the consulting I did for DICE/EA, where I worked on Battlelog and Battlefield 4. I also did some work at Hyper Island where I made a conference website together with Trond Fröding, as well as some work on their main website.

Other peoples' projects

So now I've listed most of the computer related projects I did last year, but I would also like to mention a few projects of some other fellow swedish programmers/web people.

Martina Elm, Jonny Strömberg and Johannes Edelstam, who also are "Knackerists", have started their startup Confetti. They're building a great tool for event and conference organizers. They're also solving their own problem, since they are arranging the very promising conference Nordic JS

Ted Valentin, who has started Knackeriet, and who is my co-founder for boutiquehotel.me, has started a bunch of swedish sites like Populära Museer, Populära Barer, and more.

Jonas Lejon has started the swedish site, hitta rabatt for finding discount codes.

Anton Johansson, the creator of Headler seems to have two exciting projects in the pipeline. Osom Laundry seems to be some kind of modern Laundry service, and Alltid.se is some secret project which I hope we'll hear more about soon.

Petter Palander is doing a lot for the startup scene in Malmö with his Malmö Startups.

Susanne Jarl is running a swedish recipe website, Recepten.se, which is getting an impressive amount of traffic of 200k visitors/week.

Tomas Wennström, who is one of the founders of the great unconference Sweden Social Web Camp has a cool website with super local weather forecasts for sweden at Vackertvader.se

Peter Jaric did a cool hack, which is a browser game that only uses the JavaScript alert(), confirm() and prompt() functions. It's called Agessa's World and you should try it :).

Update (2016-09-06):

You should also check out Sebastian Razola's new project Where Foodies Eat. It's a service for finding restaurants and other food places, and it actually beats both Foursquare and Yelp when it comes to finding great places. It's currently launched in New York, San Francisco and Los Angeles.

Predictions for 2014

I always think it's fun to read people's next year (tech) predictions, and I thought I'd come with one myself. I believe the adoption of Docker - an incredibly useful tool for running applications in small linux containers - will explode. There are already many exciting projects building on Docker like Runnable and Circle CI. Personally, I hope that Flynn will come and solve all my deployment problems forever :).


OCTOBER 23, 2013

Releasing BoutiqueHotel.me

Last week, me and Ted Valentin released our new website, BoutiqueHotel.me.

Boutique hotels are, for those who don't know, (usually quite small) hotels with thought-through concepts and unique attributes. You can for example check out boutique hotels in Stockholm or in Cape Town.

The site's tech stack is Python + Django & Celery, PostgreSQL with PostGIS as database, memcached for caching and Redis as Celery's backend/broker. All maps on the website are powered by wonderful Leaflet.

Hopefully, I will be be open sourcing some of the website's code through some JS/Python libs. For example our image viewer which calculates how to distribute the images to create a perfectly balanced photo album.

I've realised that there are a lot of really nice hotels, and my current favorite is probably Treehotel in Harads quite far up north in Sweden.

Our aim with this site is to have the largest collection of the world's boutique hotels, and to give a far better experience when searching for boutique hotels than any other site out there. For this reason, we've started with just releasing the site for Sweden, and Swedish boutique hotels, but in the upcoming weeks we will roll out more countries.


JULY 09, 2013

Share your current location using Longitude.me


Today I'm releasing a new website, called longitude.me.

With it, you can create "longitude links" which you can share with people in order to see each others current geographic position. The visitors' positions are updated live in real-time while you're looking at the page.

So if you're meeting up with someone downtown, in the park, or anywhere else, and you need to know their location (or want to share yours), just send them a Longitude link! Or maybe you're going on a road-trip with more than one car, and you want to be able to see where the others are? Use longitude.me to share your location :)!

Since it's just a website (and no need to download some clunky app) and should work on any smartphone, it's super easy to just send a link to your friends whenever you need to see each others position.

I've been using the site with my friends for a while, and found it really useful, but I'd love to get more feedback on it! You can comment on the blog, send me e-mail at my-first-name@this-domain, or tweet me.

I should also add that I've tested out the site quite extensively using iOS where it should work fine, but unfortunately I haven't had the opportunity to use it much on Android. Therefore, there could be some Android-related bugs that I'll need to grind out.

Try it out yourself! Go share your location
(works best on a smartphone)


JANUARY 23, 2013

Releasing Whatismyzip.com

Every now and then, I find myself in need to know the ZIP code for the location where I'm at. Usually this is when I'm at the office, visiting my parents, or similar, and I'm about to order something.

I realized that combining HTML5's GeoLocation API with the Google Maps API, I could build a small website to solve this problem.

The result of this is called What is my zip? (use a smartphone or other device with GPS for best result).

All the functionality was built in one hour on a train between Stockholm and Uppsala, and then I spent a couple of hours designing it. Beeing a small hack, I'm quite pleased with the result :).

See it in action, go find out your zip code
(works best on a smartphone)


DECEMBER 06, 2012

Heroku: Running multiple python processes in a single dyno using foreman

Recently I've made a few small python web projects that I've deployed on Heroku. For some of these projects I've needed to run asynchronous jobs through Celery.

Heroku allows you to run one free dyno (or actually they give you 720 free dyno hours per month, which corresponds to one dyno constantly running). This means that if you choose to run one web dyno and one worker dyno (celery in this case), you'll be charged for 720 dyno hours. However, if you have a very small project, or your're working on a project that hasn't been released yet, you can avoid this cost.

A heroku dyno is like a process, and in this process you can actually spawn new processes, as long as you stay within the limit of 512 mb ram (the process also only has one CPU core). Heroku suggests that you use foreman when you run your application on your local machine, but you can actually use foreman on heroku, in order to run multiple processes in a single dyno.


1. The first thing we'll do is to create a post_compile script in the bin directory of our project. In this script we'll add a few lines that will install foreman and make it available in our project slug. Create the file PROJECT_ROOT/bin/post_compile with the following content:

#!/usr/bin/env bash

# set terminal to UTF8 (otherwise `gem install foreman` fails)
export LANG=en_CA.UTF-8

# set up ruby env
mkdir .ruby-gems
export GEM_HOME=$PWD/.ruby-gems
export PATH=$PATH:$PWD/.ruby-gems/bin

# install foreman
gem install foreman

2. Next, we'll create a new procfile, in the project root directory, which we'll call ProcfileFree:

web: gunicorn -b$PORT -w 4 myapp.wsgi:application
celery: python manage.py celeryd -c 3 --beat

3. The third thing to do is to update the "real" Procfile that Heroku uses, so that it starts foreman with our new ProcfileFree. The content of my Procfile is:

web: env > .env; env GEM_HOME=$HOME/.ruby-gems env PATH=$PATH:$HOME/.ruby-gems/bin foreman start -f ProcfileFree

And that's all! After deploying the above, and scaling the web dyno to 1, Heroku will start foreman which will start the processes that you've defined in ProcfileFree (in my example this was gunicorn and celery through Django's manage.py).

Please note

This method can be very useful for small projects sometimes, but it will not be performant. If you get more traffic than it can handle, scaling dynos the normal way is definitely the way to go.

Also note that when you're only running a single dyno, Heroku will stop it if it hasn't received any web requests in a while. One possible way to get around this is to ping your website with http requests regularly.

Lastly, I just want to say that I think Heroku is a great service, and I don't mind paying for it at all, which I do for a few larger projects that I host there.


SEPTEMBER 30, 2010

jQuery Title Alert

A little more than a year ago I wrote a small jQuery plugin at ESN where I work, called jquery-titlealert. It provides functionality for flashing a notification message in the browser title.

Title alert notifications can be useful when you want to notify a user of some kind of web page event (for example an incoming chat message), when the user has another window, or another browser tab, in focus. Especially if your site uses real-time functionality, like contact lists, user chats, etc. Which, BTW, can easily be achieved using Beacon Push, which is a real-time website service we run at ESN.

Get it

Download v0.7 here. The source code is hosted at GitHub.

Last update: 2010-10-07

How to use it

First, include it on the web page (make sure jQuery has been previously included on that page):

<script type="text/javascript" src="jquery.titlealert.js"></script>

Then you will be able to flash a notification message in the browser title by running:

$.titleAlert("New chat message!");

Or with some options:

$.titleAlert("New chat message!", {

The plugin provides options for setting different timings and intervals, as well as functionality for stopping the message flashing when browser window gets focused. See below for all details.


$.titleAlert(message, options);
message A string the message that should be flashed in the browser title.
options JavaScript object containing options


Here are the available options that can be set in the option object.

name default description
interval 500 The flashing interval in milliseconds.
originalTitleInterval null Time in milliseconds that the original title is diplayed for. If null the time is the same as interval.
duration 0 The total lenght of the flashing before it is automatically stopped. Zero means infinite.
stopOnFocus true If true, the flashing will stop when the window gets focus.
stopOnMouseMove false If true, the flashing will stop when the document recieves a mousemove event (i.e. when the user moves the mouse over the document area, regardless of what window is active).
requireBlur false Experimental. If true, the call will be ignored unless the window is out of focus.

Known issues: Firefox doesn't recognize tab switching as blur, and there are some minor IE problems as well.


Title Alert works with jQuery 1.3 and 1.4. It's tested in Firefox, Chrome, Internet Explorer >= 6 and Safari.


JUNE 18, 2010

URL Shorteners Suck

TAGS: web,

Ever since the rise of twitter, when URL shortening services got an extremely big popularity boost because twitter chose to shorten their URLs for technical reasons while ignoring user experience, the web has been polluted with shortened links.

  • I want to be able to see where a link goes before I click it.
  • I want to be sure that my links continue to work indefinitely.
  • I don't want random companies to track my internet usage.

URL shortening services interferes with all of my above statements. So please. Do. Not. Use. Them.

Let's just hope that the upcoming release of annotations for tweets functionality could help decrease the use of these horrible services.

How ever, there is a GreaseMonkey script that I've been using, called TinyURL Decoder, that changes URL shortened links into the real URL that they point to. It just solves one of the problems with URL shortening, but at least you can see where the links go.


MARCH 03, 2010

Favorite Django Tips

TAGS: django, python, web,

A few months ago I found a really useful Stack Overflow Question. Here are my favorites from the answers.

Use render_to decorator instead of render_to_response

This decorator is found in the app django annoying, and is a very nice shortcut for declaring what template a view should render.

Instead of returning the response of render_to_response, you just return a python dict which will be used as the template context for the template specified as argument to the @render_to decorator. If anything else than a dict is returned, normal view processing will occur, so this won't break redirects or any other cases where you might return a HttpResponse (for example normal render_to_response code).

Anyway, here is an example on how to use it:

def list_posts(request):
    posts = BlogPost.objects.all()
    return {"blog_posts": posts}

This equals to:

def list_posts(request):
    posts = BlogPost.objects.all()
    return render_to_response('list.html',
        {'blog_posts': posts},

Update (22/4): Marcin Nowak notified me that the render_to decorator breaks Django Reusable App converions, so I made a fork of django-annoying where I modified the render_to decorator to support template_name and extra_context keyword arguments.

Load custom template tags in all templates

Custom template tags that you use all over your templates can be auto loaded. Just add the following in a module that is loaded (i.e. your urlconf if you want the template tags to be loaded for the whole project)

from django import template

Use relative paths in settings.py

I hesitated about adding this tips, since I think it's quite obvious, but since so many people on Stack Overflow has voted it up, I guess there are people who use(d) absolute paths in their settings.py.

Don't use absolute paths in settings.py (i.e /home/jonatan/...), instead use relative paths so that the project will work wherever it resides.

import os.path
    os.path.join(os.path.dirname(__file__), "templates"),


JANUARY 08, 2010

MMS Decoder 0.82, and website back online

During the holiday I finally got to finish the re-make of my website, and I'm very happy to announce that it is now up and running on Python/Django. The biggest change here is that I've added a blog where I will write programming/web development/python/django/javascript/tech stuff. How ever, I predict that I will not write blog posts very often, but hopefully when I do, they will be interesting.

Powering this blog is a slightly modified version of Nathan Borror's Django Basic Apps. I'm planning to release my modified version (nothing fancy, just some small personal preference changes) as a GitHub fork when I get time.

New version of MMS Decoder (0.82)

I've released a new version of MMS Decoder that fixes a bug with decoding MMS messages encoded by an iPhone, as well as some other bugfixes and improvements.

Here are a few selected entries from the commit log:

  • Fixed correct decoding of From-value.
  • Changed default type of the part database column, in the example application, from blob to mediumblob.
  • Adding different MMS PDUs I've collected during the years. Very useful for debugging.

MMS Decoder on GitHub

I'm also quite happy to announce that I have now created a GitHub project for my MMS Decoder. This way it will be much easier for people to make patches, and for me to incorporate them in the code, by forking me. So go ahead and fork me on: http://github.com/heyman/mms-decoder. (Or just follow me if you want to know when a new version is released).

If you just want to pull the GIT repository here is the URL:




Jonatan Heyman My name is Jonatan Heyman, and I'm a programmer. On this blog I write about programming, the web and technology. I also listen to a large number of indie pop tunes. You can read more about me on the about page.



Copyright (c) 2009-2010 Jonatan Heyman