{"title":"jod.al","subtitle":"Personal blog of Stein Magnus Jodal","link":[{"@attributes":{"rel":"self","type":"application\/atom+xml","href":"https:\/\/jod.al\/atom.xml"}},{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al"}}],"generator":"Zola","updated":"2019-12-23T00:00:00+00:00","id":"https:\/\/jod.al\/atom.xml","entry":[{"title":"10 years of Mopidy","published":"2019-12-23T00:00:00+00:00","updated":"2019-12-23T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2019\/12\/23\/10y-of-mopidy\/"}},"id":"https:\/\/jod.al\/2019\/12\/23\/10y-of-mopidy\/","summary":"<p>Ten years ago today, on December 23, 2009, Mopidy was born. While chatting with\nmy friend and then-colleague Johannes Knutsen, we came up with the idea of\nbuilding an MPD server that could play music from Spotify instead of local\nfiles.<\/p>\n<p>This is the story of the first decade of Mopidy.<\/p>\n"},{"title":"pathlib and paths with arbitrary bytes","published":"2019-12-10T00:00:00+00:00","updated":"2019-12-10T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2019\/12\/10\/pathlib-and-paths-with-arbitrary-bytes\/"}},"id":"https:\/\/jod.al\/2019\/12\/10\/pathlib-and-paths-with-arbitrary-bytes\/","summary":"<p>The <a href=\"https:\/\/docs.python.org\/3\/library\/pathlib.html\"><code>pathlib<\/code><\/a> module\nwas added to the standard library in Python 3.4\nand is one of the many nice improvements that Python 3\nhas gained over the past decade.\nIn three weeks, Python 3.5 will be the oldest version of Python\nthat still receives security patches.\nThis means that the presence of <code>pathlib<\/code>\ncan soon be taken for granted on all Python installations,\nand the quest towards replacing <code>os.path<\/code> can begin for real.<\/p>\n<p>In this post, I\u2019ll have a look at how <code>pathlib<\/code> can be used to\nhandle file paths containing arbitrary bytes,\nas this is valid on most file systems.<\/p>\n"},{"title":"Pykka 2.0 released with better ergonomics and performance improvements","published":"2019-05-07T00:00:00+00:00","updated":"2019-05-07T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2019\/05\/07\/pykka-2.0\/"}},"id":"https:\/\/jod.al\/2019\/05\/07\/pykka-2.0\/","summary":"<p>I\u2019ve finally released <a href=\"https:\/\/pykka.readthedocs.io\/\">Pykka<\/a> 2.0, the\nfirst major update to Pykka in almost six years.<\/p>\n<p>Pykka is a Python implementation of the actor model. The actor model\nintroduces some simple rules to control the sharing of state and cooperation\nbetween execution units, which makes it easier to build concurrent\napplications.<\/p>\n<p>Pykka 2.0 is a major release because it is backwards incompatible in several\nminor ways. However, the backwards incompatible changes should only affect\nquite narrow use cases.\nMopidy and its extensions,\nwhich is the largest open source ecosystem I know of that uses Pykka,\nruns unmodified on Pykka 2.0.<\/p>\n<p>In this blog post I\u2019ll go through some of the more important improvements in\n2.0.<\/p>\n"},{"title":"Mopidy-MPRIS 2.0 released","published":"2018-12-07T00:00:00+00:00","updated":"2018-12-07T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2018\/12\/07\/mopidy-mpris-2.0\/"}},"id":"https:\/\/jod.al\/2018\/12\/07\/mopidy-mpris-2.0\/","summary":"<p>I\u2019ve released <a href=\"https:\/\/github.com\/mopidy\/mopidy-mpris\">Mopidy-MPRIS<\/a> 2.0, the\nfirst major update to Mopidy-MPRIS in about 3.5 years.<\/p>\n<p>Mopidy-MPRIS is a Mopidy extension that makes <a href=\"https:\/\/mopidy.com\/\">Mopidy<\/a>\ncontrollable from other programs on the same machine through D-Bus. This makes\nit possible to control Mopidy from various widgets in GNOME\/KDE\/etc, as well as\nwith keyboard media keys.<\/p>\n"},{"title":"Four years of JavaScript churn: Mopidy.js 1.0","published":"2018-12-02T00:00:00+00:00","updated":"2018-12-02T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2018\/12\/02\/4y-of-js-churn\/"}},"id":"https:\/\/jod.al\/2018\/12\/02\/4y-of-js-churn\/","summary":"<p>Yesterday, I released v1.0.0 of the <a href=\"https:\/\/github.com\/mopidy\/mopidy.js\">Mopidy.js<\/a>\nJavaScript library. Even though the library serves as the basis for most Mopidy\nweb clients and has been in active use since 2013, this was the first release\nin almost four years.<\/p>\n<p>Four years is quite a long time in the world of JavaScript.<\/p>\n"},{"title":"Bringing the Mopidy music server to the browser","published":"2017-08-26T00:00:00+00:00","updated":"2017-08-26T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2017\/08\/26\/mopidy-in-the-browser\/"}},"id":"https:\/\/jod.al\/2017\/08\/26\/mopidy-in-the-browser\/","summary":"<p>Note: This is a blog post draft that was originally written in January 2013,\nleft unattended for 1689 days, and rediscovered and published unedited in\nAugust 2017.<\/p>\n<p>During the five years since Mopidy entered the browser with its HTTP JSON-RPC\nAPI and the Mopidy.js JavaScript library, many successful Mopidy web\nclients have been built on top of this foundation. The APIs themselves have\nsurvived the test of time and have required minimal maintenance, just as I\nhoped when implementing the APIs back in November 2012.<\/p>\n<hr \/>\n<p><a href=\"https:\/\/mopidy.com\/\">Mopidy<\/a> is a music server written in\nPython. It plays music from various sources, including local disk and Spotify.\nMopidy can be remote-controlled by, among others, <abbr title=\"Music Player\nDaemon\">MPD<\/abbr> clients.<\/p>\n<p>In Mopidy 0.10, released in the middle of December, we added an HTTP frontend.\nThe HTTP frontend takes Mopidy\u2019s full core API and makes it available from\nJavaScript in the browser. This means that you now can make your own web\nclients for Mopidy in JavaScript, and Wouter van Wijk has already started on\n<a href=\"https:\/\/github.com\/pimusicbox\/mopidy-musicbox-webclient\">his client<\/a> (<em>updated\nlink<\/em>).<\/p>\n<p>I\u2019d like to write a bit about how we made the HTTP client.<\/p>\n"},{"title":"netsgiro: a parser and builder for AvtaleGiro and OCR Giro files","published":"2017-05-21T00:00:00+00:00","updated":"2017-05-21T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2017\/05\/21\/netsgiro-released\/"}},"id":"https:\/\/jod.al\/2017\/05\/21\/netsgiro-released\/","summary":"<p>Today I released the first stable release of\n<a href=\"https:\/\/netsgiro.readthedocs.io\/\">netsgiro<\/a> to\n<a href=\"https:\/\/pypi.org\/project\/netsgiro\/\">PyPI<\/a>. netsgiro is a Python 3.4+ library\nfor parsing and building <a href=\"https:\/\/www.nets.eu\/\">Nets<\/a> \u201cOCR\u201d files.<\/p>\n<p>AvtaleGiro is a direct debit solution that is in widespread use in Norway, with\nmore than 15 000 companies offering it to their customers. OCR Giro is used by\nNets and Norwegian banks to update payees on recent deposits to their bank\naccounts. In combination, AvtaleGiro and OCR Giro allows for a high level of\nautomation of invoicing and payment processing.<\/p>\n<p>The \u201cOCR\u201d file format and file format name originates in days when giro\npayments were delivered on paper to your bank and then processed either\nmanually or using optical character recognition, OCR. I\u2019m not sure how old the\nformat is, but some of the examples in the OCR Giro specification use dates in\n1993, and the specification changelog starts in 1999 and ends in 2003. A couple\nof decades later, the file format is still in daily use by Nets\u2019 AvtaleGiro\nand OCR Giro services. In other words, I have high hopes that this will be a\nvery stable open source project requiring minimal maintenance efforts.<\/p>\n"},{"title":"March and April contributions","published":"2016-04-30T00:00:00+00:00","updated":"2016-04-30T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2016\/04\/30\/march-and-april-contributions\/"}},"id":"https:\/\/jod.al\/2016\/04\/30\/march-and-april-contributions\/","summary":"<p>The following is a short summary of my open source work in March and April,\nalmost like in previous months, except that I haven\u2019t spent as much time as\npreviously on Open Source the last two months.<\/p>\n"},{"title":"February contributions","published":"2016-03-01T00:00:00+00:00","updated":"2016-03-01T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2016\/03\/01\/february-contributions\/"}},"id":"https:\/\/jod.al\/2016\/03\/01\/february-contributions\/","summary":"<p>The following is a short summary of my open source work in February, just like\n<a href=\"https:\/\/jod.al\/2015\/11\/30\/november-contributions\/\">in<\/a>\n<a href=\"https:\/\/jod.al\/2016\/01\/01\/december-contributions\/\">previous<\/a>\n<a href=\"https:\/\/jod.al\/2016\/02\/01\/january-contributions\/\">months<\/a>.<\/p>\n"},{"title":"A guide to poor API management","published":"2016-02-18T00:00:00+00:00","updated":"2016-02-18T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2016\/02\/18\/guide-to-poor-api-management\/"}},"id":"https:\/\/jod.al\/2016\/02\/18\/guide-to-poor-api-management\/","summary":"<p>This is the story of libspotify, as experienced by a Spotify customer and\nlibspotify developer for six years.<\/p>\n"},{"title":"January contributions","published":"2016-02-01T00:00:00+00:00","updated":"2016-02-01T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2016\/02\/01\/january-contributions\/"}},"id":"https:\/\/jod.al\/2016\/02\/01\/january-contributions\/","summary":"<p>The following is a short summary of my open source work in January, just like I\ndid back in <a href=\"https:\/\/jod.al\/2015\/11\/30\/november-contributions\/\">November<\/a> and\n<a href=\"https:\/\/jod.al\/2016\/01\/01\/december-contributions\/\">December<\/a>.<\/p>\n"},{"title":"December contributions","published":"2016-01-01T00:00:00+00:00","updated":"2016-01-01T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2016\/01\/01\/december-contributions\/"}},"id":"https:\/\/jod.al\/2016\/01\/01\/december-contributions\/","summary":"<p>The following is a short summary of my open source work in December, following\nup on <a href=\"https:\/\/jod.al\/2015\/11\/30\/november-contributions\/\">my first report in November<\/a>.<\/p>\n"},{"title":"November contributions","published":"2015-11-30T00:00:00+00:00","updated":"2015-11-30T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2015\/11\/30\/november-contributions\/"}},"id":"https:\/\/jod.al\/2015\/11\/30\/november-contributions\/","summary":"<p>The following is a short summary of my open source work in November. My hope is\nthat keeping better track of what I\u2019m doing will help me reflect on how I spend\nmy time, and help me to focus my efforts better.<\/p>\n"},{"title":"Building ARM Debian packages with pbuilder","published":"2015-03-08T00:00:00+00:00","updated":"2015-03-08T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2015\/03\/08\/building-arm-debs-with-pbuilder\/"}},"id":"https:\/\/jod.al\/2015\/03\/08\/building-arm-debs-with-pbuilder\/","summary":"<p><em>The goal of this post is to help myself reproduce this pbuilder setup in the\nfuture. If you find it useful too, then that\u2019s great.<\/em><\/p>\n<p>Building ARM packages on older ARM devices like the Raspberry Pi 1 is slow, so\nI want to use a single amd64 machine to build Debian packages for all my target\nplatforms:<\/p>\n<ul>\n<li>amd64,<\/li>\n<li>i386,<\/li>\n<li>armel\/ARMv4+ (e.g. Debian on Raspberry Pi 1),<\/li>\n<li>armhf\/ARMv6+ (Raspbian), and<\/li>\n<li>armhf\/ARMv7+ (e.g. Debian\/Ubuntu on Raspberry Pi 2, Odroid C1, etc.).<\/li>\n<\/ul>\n<p>Preferably, I want to build the packages for the current Debian stable, which\nat the time of writing is wheezy, so that they\u2019ll work for as many users as\npossible.<\/p>\n"},{"title":"Debian packaging of Mopidy","published":"2014-10-28T00:00:00+00:00","updated":"2014-10-28T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2014\/10\/28\/debian-packaging\/"}},"id":"https:\/\/jod.al\/2014\/10\/28\/debian-packaging\/","summary":"<p>My first upload to Debian as a Debian Maintainer, Mopidy 0.19.4-3, landed in\nDebian testing today, well in time for the upcoming freeze.<\/p>\n<p>The new version adjusts the LSB facilities the sysvinit script depends on, to\nmake sure that DNS lookups, DBus (used by Mopidy-MPRIS), and Avahi (used for\nZeroconf service publishing) are available before Mopidy starts.<\/p>\n"},{"title":"pyspotify v2.0.0b1 released, with new event loop and audio sinks","published":"2014-04-24T00:00:00+00:00","updated":"2014-04-24T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2014\/04\/24\/pyspotify-v2.0.0b1\/"}},"id":"https:\/\/jod.al\/2014\/04\/24\/pyspotify-v2.0.0b1\/","summary":"<p><a href=\"https:\/\/pyspotify.readthedocs.io\/\">pyspotify<\/a> 2.x is a full rewrite of pyspotify.\nWhile pyspotify 1.x is a CPython C extension, pyspotify 2.x uses\n<a href=\"http:\/\/cffi.readthedocs.org\/\">CFFI<\/a> to make 100% of the libspotify C library\navailable from Python. It works on CPython 2.7 and 3.2+, as well as PyPy 2.1+.<\/p>\n"},{"title":"Comics v2.3.0 released with better mobile support","published":"2014-04-07T00:00:00+00:00","updated":"2014-04-07T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2014\/04\/07\/comics-v2.3.0\/"}},"id":"https:\/\/jod.al\/2014\/04\/07\/comics-v2.3.0\/","summary":"<p>Version 2.3.0 of <a href=\"http:\/\/comics.readthedocs.org\/\">my comics aggregator<\/a> is now\nreleased. As always, dependencies have been updated, including the routine\nDjango upgrade from Django 1.5 to 1.6, just in time for the upcoming 1.7\nrelease. The largest change this time around is the move from Bootstrap 2 to 3,\nwhich includes a refreshed, flatter design and lots of tweaking to make Comics\nboth look good and work nicely on mobile devices, something it didn\u2019t use to\ndo.<\/p>\n"},{"title":"New Python wrapper for libspotify","published":"2014-02-14T00:00:00+00:00","updated":"2014-02-14T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2014\/02\/14\/new-python-wrapper-for-libspotify\/"}},"id":"https:\/\/jod.al\/2014\/02\/14\/new-python-wrapper-for-libspotify\/","summary":"<p>Today, after about nine months of working on it now and then, I uploaded the\nfirst alpha release of <a href=\"https:\/\/pyspotify.readthedocs.io\/\">pyspotify 2.0<\/a> to\n<a href=\"https:\/\/pypi.python.org\/pypi\/pyspotify\">PyPI<\/a>.<\/p>\n<p>pyspotify provides a Python interface to <a href=\"http:\/\/www.spotify.com\/\">Spotify\u2019s<\/a>\nonline music streaming service. With it you can access music metadata, search\nin Spotify\u2019s library of 20+ million tracks, manage your Spotify playlists, and\nplay music from Spotify. All from your own Python applications.<\/p>\n"},{"title":"Mopidy packaged in Debian and Ubuntu","published":"2013-12-28T00:00:00+00:00","updated":"2013-12-28T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2013\/12\/28\/mopidy-packaged-in-debian-and-ubuntu\/"}},"id":"https:\/\/jod.al\/2013\/12\/28\/mopidy-packaged-in-debian-and-ubuntu\/","summary":"<p>Looking back to my last post from September, my goal was to have\nthe music server <a href=\"https:\/\/mopidy.com\/\">Mopidy<\/a> packaged in Debian by the end\nof the year and in Ubuntu in time for the 14.04 LTS release in April. As of\nyesterday, Mopidy 0.17.0 is a part of <a href=\"http:\/\/packages.debian.org\/source\/sid\/mopidy\">Debian\nunstable<\/a> and <a href=\"https:\/\/launchpad.net\/ubuntu\/+source\/mopidy\">Ubuntu\ntrusty<\/a>, just a few days after\nMopidy\u2019s fourth anniversary on December 23.<\/p>\n"},{"title":"Pykka packaged in Debian and Ubuntu","published":"2013-09-03T00:00:00+00:00","updated":"2013-09-03T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2013\/09\/03\/pykka-packaged-in-debian-and-ubuntu\/"}},"id":"https:\/\/jod.al\/2013\/09\/03\/pykka-packaged-in-debian-and-ubuntu\/","summary":"<p>The Python actor library <a href=\"http:\/\/pykka.readthedocs.io\/\">Pykka<\/a> is now packaged as\n<code>python-pykka<\/code> and <code>python3-pykka<\/code> in\n<a href=\"http:\/\/packages.debian.org\/source\/sid\/python-pykka\">Debian unstable<\/a> and\n<a href=\"https:\/\/launchpad.net\/ubuntu\/+source\/python-pykka\">Ubuntu saucy<\/a>, soon to be\nUbuntu 13.10. In a few more days, the packages will be probably be available in\nDebian testing as well.<\/p>\n"},{"title":"Mopidy hosted by Rackspace","published":"2013-07-22T00:00:00+00:00","updated":"2013-07-22T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2013\/07\/22\/mopidy-hosted-by-rackspace\/"}},"id":"https:\/\/jod.al\/2013\/07\/22\/mopidy-hosted-by-rackspace\/","summary":"<p>A week ago <a href=\"https:\/\/twitter.com\/jessenoller\/status\/355757374906183680\">Jesse Noller\ntweeted<\/a> that\n<a href=\"http:\/\/www.rackspace.com\/\">Rackspace<\/a> would provide free Rackspace cloud\naccounts for open source projects. It only took a couple of hours from I first\nmailed Jesse to we had two servers up and running.<\/p>\n"},{"title":"Pykka v1.2.0 with eventlet support and future transformations","published":"2013-07-18T00:00:00+00:00","updated":"2013-07-18T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2013\/07\/18\/pykka-v1.2.0\/"}},"id":"https:\/\/jod.al\/2013\/07\/18\/pykka-v1.2.0\/","summary":"<p><a href=\"https:\/\/pykka.readthedocs.io\/\">Pykka<\/a> v1.2.0 is now available from PyPI, GitHub, and\n<a href=\"https:\/\/apt.mopidy.com\/\">APT<\/a>. It\u2019s about half a year since the previous\nrelease, during which no serious bugs have been found.<\/p>\n"},{"title":"Comics v2.2.0 released with Django 1.5 support","published":"2013-07-07T00:00:00+00:00","updated":"2013-07-07T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2013\/07\/07\/comics-v2.2.0\/"}},"id":"https:\/\/jod.al\/2013\/07\/07\/comics-v2.2.0\/","summary":"<p>Version 2.2.0 of my comics aggregator is now released. It features a general\nupgrade of dependencies, including the move from Django 1.4 to Django 1.5, and\na lot of updates to comic crawlers.<\/p>\n"},{"title":"Router setup for native IPv6 from Get.no","published":"2012-09-16T00:00:00+00:00","updated":"2012-09-16T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2012\/09\/16\/get-ipv6-setup\/"}},"id":"https:\/\/jod.al\/2012\/09\/16\/get-ipv6-setup\/","summary":"<p>As of June, the large Norwegian ISP <a href=\"http:\/\/www.get.no\/\">Get<\/a> let most\ncustomers sign up for a native IPv6 test program.<\/p>\n<p>The only information Get give you when you sign up to their IPv6 test program,\nis that they:<\/p>\n<ul>\n<li>use DHCPv6 to delegate addresses and prefixes to the customer,<\/li>\n<li>SLAAC (Stateless Address Autoconfiguration) is not supported, and<\/li>\n<li>you\u2019ll get a \/60 prefix, i.e. 16 prefixes of size \/64.<\/li>\n<\/ul>\n"},{"title":"How to fail a test on uncaptured AJAX requests","published":"2012-06-15T00:00:00+00:00","updated":"2012-06-15T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2012\/06\/15\/how-to-fail-a-test-on-uncaptured-ajax-requests\/"}},"id":"https:\/\/jod.al\/2012\/06\/15\/how-to-fail-a-test-on-uncaptured-ajax-requests\/","summary":"<p>Recently, the tests for a frontend web project I\u2019m working on started to become\nmore and more troublesome. Full hangs in the middle of a test run became a\nfrequent issue, destroying my precious coding flow.<\/p>\n"},{"title":"Speeding up a Django web site without touching the code","published":"2011-10-19T00:00:00+00:00","updated":"2011-10-19T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/10\/19\/speeding-up-a-django-web-site-without-touching-the-code\/"}},"id":"https:\/\/jod.al\/2011\/10\/19\/speeding-up-a-django-web-site-without-touching-the-code\/","summary":"<p>I\u2019ve recently been tweaking my server setup for a Django 1.3 web site with the\ngoal of making it a bit faster. Of course, there is a lot of speed to gain by\nimproving e.g. the number of database queries needed to render a web page, but\nthe server setup also has an effect on the web site performance. This is a log\nof my findings.<\/p>\n"},{"title":"Traversable attributes in Pykka","published":"2011-10-06T00:00:00+00:00","updated":"2011-10-06T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/10\/06\/traversable-attributes-in-pykka\/"}},"id":"https:\/\/jod.al\/2011\/10\/06\/traversable-attributes-in-pykka\/","summary":"<p>In <a href=\"https:\/\/pykka.readthedocs.io\/\">Pykka<\/a> 0.13\u2013which was released almost two\nweeks ago\u2013traversing the attributes of an actor is about 8.3 times faster than\nit used to be. To paraphrase Apple: \u201c8.3X faster. That\u2019s amazing!\u201d <em>(Update:\nThis was written a couple of hours before the news of Jobs\u2019 passing arrived.\nMay he continue to inspire us.)<\/em><\/p>\n<p>So, what is \u201ctraversable attributes\u201d? Let\u2019s take a few steps back.<\/p>\n"},{"title":"Hva alle utviklere m\u00e5 vite om tegnsettenkoding","published":"2011-09-08T00:00:00+00:00","updated":"2011-09-08T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/09\/08\/hva-alle-utviklere-ma-vite-om-tegnsettenkoding\/"}},"id":"https:\/\/jod.al\/2011\/09\/08\/hva-alle-utviklere-ma-vite-om-tegnsettenkoding\/","summary":"<p><em>English: This is slides and video from the Norwegian lightning presentation\non character encoding I did at the JavaZone 2011 conference today.<\/em><\/p>\n<p>Takk for nok en knall konferanse :-)<\/p>\n<p>Her er <a href=\"http:\/\/speakerdeck.com\/u\/jodal\/p\/hva-alle-utviklere-ma-vite-om-tegnsettenkoding\">slidene mine<\/a>\nfra lyntalen om tegnsettenkoding jeg holdt p\u00e5 JavaZone 2011 i dag.\n<a href=\"https:\/\/jod.al\/2011\/09\/08\/hva-alle-utviklere-ma-vite-om-tegnsettenkoding\/charset-encoding-as-presented-at-jz11.pdf\">PDF-versjon<\/a> er ogs\u00e5\ntilgjengelig, by popular demand.<\/p>\n"},{"title":"pyspotify 1.2 released","published":"2011-06-08T00:00:00+00:00","updated":"2011-06-08T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/06\/08\/pyspotify-1-2-released\/"}},"id":"https:\/\/jod.al\/2011\/06\/08\/pyspotify-1-2-released\/","summary":"<p>pyspotify is a Python wrapper for\n<a href=\"https:\/\/developer.spotify.com\/en\/libspotify\/\">libspotify<\/a>, which give\ndevelopers access to the <a href=\"https:\/\/www.spotify.com\/\">Spotify<\/a> music streaming\nservice.<\/p>\n<p>Today, I tagged pyspotify 1.2 at <a href=\"https:\/\/github.com\/mopidy\/pyspotify\">GitHub<\/a>\nand pushed the new release to\n<a href=\"http:\/\/pypi.python.org\/pypi\/pyspotify\/1.2\">PyPI<\/a>. I\u2019ve also made deb packages\nof libspotify and pyspotify available at\n<a href=\"https:\/\/apt.mopidy.com\/\">apt.mopidy.com<\/a>.<\/p>\n"},{"title":"Log from the debugging of a segfault","published":"2011-05-24T00:00:00+00:00","updated":"2011-05-24T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/05\/24\/log-from-the-debugging-of-a-segfault\/"}},"id":"https:\/\/jod.al\/2011\/05\/24\/log-from-the-debugging-of-a-segfault\/","summary":"<p><em>The following is a cleaned up log I wrote for myself while debugging a bug.\nWriting a log while working helps me keep track of the debugging effort in case\nI\u2019m interrupted (life, sleep, work, etc.). It also requires me to explain all\nfindings to myself in fully spelled out sentences, making my thoughts\nconsiderably easier to follow.<\/em><\/p>\n<p><em>In addition to serving as an example of a personal debug log, I hope it can be\nuseful as an introduction to debugging segfaults or other low-level bugs.<\/em><\/p>\n"},{"title":"FizzBuzz in Haskell","published":"2011-03-31T00:00:00+00:00","updated":"2011-03-31T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/03\/31\/fizzbuzz-in-haskell\/"}},"id":"https:\/\/jod.al\/2011\/03\/31\/fizzbuzz-in-haskell\/","summary":"<p>I\u2019ve recently started reading the free Haskell tutorial <a href=\"http:\/\/learnyouahaskell.com\/\">Learn You A Haskell\nfor Great Good!<\/a> while commuting. So far I\u2019ve\nenjoyed the tutorial, and I\u2019ve had a couple moments where I\u2019ve smiled to myself\non the bus due to typeclasses, etc., which I guess isn\u2019t quite normal behaviour\namong the general population ;-)<\/p>\n<p>I just discovered that the tutorial is going to be released as a book in a\ncouple of weeks. You should definitely pick it up if you\u2019re interested in\nlearning a different programming language.<\/p>\n"},{"title":"Pykka, and porting Pykka to Python 3","published":"2011-03-29T00:00:00+00:00","updated":"2011-03-29T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/03\/29\/pykka-and-porting-pykka-to-python-3\/"}},"id":"https:\/\/jod.al\/2011\/03\/29\/pykka-and-porting-pykka-to-python-3\/","summary":"<p>This is somewhat of an introduction to <a href=\"https:\/\/pykka.readthedocs.io\/\">Pykka<\/a>,\na Python library implementing the actor model, which I\u2019ve been working on now\nand then since November. And it\u2019s still just 300 lines of code!<\/p>\n<p>The goal of the actor model is to make it easier to develop concurrent programs\nby removing all shared state and use messaging for all communication. Removing\nshared state and doing lots of messaging doesn\u2019t make anything easier by\nitself, but it avoids common problems in concurrent programs like proper lock\nusage and data corruption (due to the absence of proper lock usage). Also, I\nbelieve the actor model makes it easier to reason about concurrent programs,\nwhich is a nice property since software development often feels like 10%\ndevelopment and 91% debugging.<\/p>\n"},{"title":"multiprocessing.Connection is not free","published":"2011-03-20T00:00:00+00:00","updated":"2011-03-20T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/03\/20\/multiprocessing-connection-is-not-free\/"}},"id":"https:\/\/jod.al\/2011\/03\/20\/multiprocessing-connection-is-not-free\/","summary":"<p>I\u2019ve\n<a href=\"https:\/\/jod.al\/2011\/03\/06\/pickling-multiprocessing-connection-objects\/\">previously written<\/a>\nabout how to wrap <code>multiprocessing.Connection<\/code> objects in a class that makes\n<code>Connection<\/code> objects picklable, and thus transferable over another\n<code>Connection<\/code>. That approach is still valid, but don\u2019t use it\u2013or <code>Connection<\/code>\nobjects at all\u2013for lots of use-once-and-throw-away connections.<\/p>\n"},{"title":"Traits in Python using multiple inheritance","published":"2011-03-15T00:00:00+00:00","updated":"2011-03-15T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/03\/15\/traits-in-python-using-multiple-inheritance\/"}},"id":"https:\/\/jod.al\/2011\/03\/15\/traits-in-python-using-multiple-inheritance\/","summary":"<p>As you probably know, if a class needs to handle two mostly unrelated concerns, the\nclass should probably be split into two. This way, your will achieve\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/Cohesion_(computer_science)\">higher cohesion<\/a> in your\ncode, which is generally considered a good thing. Though, there are times where\nyou need to address two mostly unrelated concerns in a single class.<\/p>\n<p>The Scala programming language has a concept they call\n<a href=\"http:\/\/www.scala-lang.org\/node\/126\">traits<\/a>. Scala traits can be compared to\nJava interfaces, except that Scala traits may be partially or fully\nimplemented, like abstract classes. As with Java interfaces, you can <em>mixin<\/em>\nmultiple traits in a class. If any of the traits has colliding method\nsignatures, the last trait mixed in overrides the earlier ones. Just as with\nregular inheritance and interfaces, the class <em>must<\/em> implement any methods that\nhas not been implemented by the traits, and <em>may<\/em> override any methods that\nalready has been implemented.<\/p>\n"},{"title":"Pickling multiprocessing Connection objects","published":"2011-03-06T00:00:00+00:00","updated":"2011-03-06T00:00:00+00:00","author":{"name":"\n            \n              Unknown\n            \n          "},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/jod.al\/2011\/03\/06\/pickling-multiprocessing-connection-objects\/"}},"id":"https:\/\/jod.al\/2011\/03\/06\/pickling-multiprocessing-connection-objects\/","summary":"<p>For safe message-based communication between threads and processes in Python, I\ntend to use\n<a href=\"http:\/\/docs.python.org\/library\/multiprocessing.html\">multiprocessing<\/a>\u2019s\n<code>Queue<\/code> and <code>Pipe<\/code>. A pattern often seen is using a queue for sending messages\nfrom multiple producers to a single consumer.<\/p>\n<p>When a producer wants a response to its message, I create a <code>Pipe<\/code> and\npiggy-back one end of the <code>Pipe<\/code> (a <code>Connection<\/code> object) to the message. I use\nPython dicts as messages, and use the string \u201creply_to\u201d as the dictionary key\nfor the connection objects.<\/p>\n<p>When the queue consumer processes a message, it doesn\u2019t know who the sender is\nor how to reach him. Though, if the message has an attached <code>Connection<\/code>\nobject, the consumer can\u2013almost magically\u2013respond to the sender, across\nthread and process boundaries.<\/p>\n<p>All good? Nope.<\/p>\n"}]}