Kasper Tidemann - human, developer, businessman, man of the world.
From our hands we give.


Each month, I publish a newsletter about my business activities. I have a company, Tidemann&Co, through which I invest in exciting projects, develop software, and travel the world.

I recommend that you sign up for the newsletter to stay up-to-date.

Forcing apt-get to use IPv4

I recently experienced apt-get returning a bunch of 404s when trying to update the sources using IPv6. Instead of immediately disabling IPv6 using sysctl, the trick was to force apt-get to use IPv6 instead:

$ apt-get -o Acquire::ForceIPv4=true update

Adding the -o Acquire::ForceIPv4=true parameter did the trick.

Upgrading to Ubuntu 15.04

Ubuntu 15.04 was released a couple of days ago and with that came some changes. If you’re on the 14 branch, you’re probably using Upstart for running your jobs.

While Upstart is still available, it was ditched in favor of Systemd in Ubuntu 15.04. This means that after a successful do-release-upgrade, you’ll see none of your Upstart scripts running.

The quick fix is to install Upstart again on your server via apt-get install upstart-sysv. Alternatively, you may wish to convert your scripts to Systemd – for this, the Ubuntu Wiki contains some useful information.

con.devdk 2015

Last year saw the birth of a new conference in Denmark, con.devdk. The event was a massive success and a great experience for everybody attending.

This year should be even better. I’m excited to announce that I’ll be giving a talk about JavaScript, Mithril, the Go stack, and how virtual DOM brought server-side rendering back in the game.

The conference is scheduled for May 22nd in Odense, Denmark. I hope to see you there!

Mithril Elements

The Mithril project by Leo Horie has seen great traction the past few months and with good cause: it’s an amazingly simple, easy-to-use framework for client-side applications written in JavaScript.

With great traction comes community support and extensions to the framework. One of the first in line is the brand new Mithril Elements by Phil Toms. In short, Mithril Elements allows you to use custom elements when writing your templates like so:

m('menu', [
  m('.item', 'Blog'),
  m('.item', 'Profile'),
  m('.item', 'Log out')

For more examples, take a look at the starter kit.

Preventing Mobile Safari from upscaling font sizes

The other day, I noticed Mobile Safari on iPhone 6 was resizing the font sizes of my p tags when in landscape mode. The fonts rendered would be upscaled and not match the font-size: 18px; declaration in my CSS.

After digging through the latest documentation, it appears there is a declaration for managing how fonts are rendered according to the viewport. As MDN states:

On mobile devices, the text-size-adjust CSS property allows Web authors to control if and how the text-inflating algorithm is applied to the textual content of the element it is applied to.

Browsers on smartphones don’t display web pages using the same algorithms as browsers rendering web pages on desktop machines. Instead of laying out the web page at the width of the device screen, they lay it out using a viewport that is much wider than the device screen, usually of 800 or 1000 pixels wide. One of two possible methods is used to map back to the original device coordinates: either a smaller window is then used to display on the device screen only part of what is actually being rendered, or the viewport is stretched to the size of the device.

So, in cases where you don’t want Mobile Safari (or any other mobile browser) deciding at what scale to render your fonts, use this CSS:

body, html {
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -o-text-size-adjust: none;
  -webkit-text-size-adjust: none;

Note: the property only has an effect on devices using viewports. It will not affect the desktop rendering.

Upgrading to Go 1.4

If you’ve just upgraded to the newly released Go version 1.4, chances are you may be getting errors like these:

# command-line-arguments
./app.go:7: import /Users/kasper/Go/pkg/darwin_amd64/lib/env.a: object is [darwin amd64 go1.3.3 X:precisestack] expected [darwin amd64 go1.4 X:precisestack]

This is caused by previous compilations of the code. To fix the problem, just delete your $GOLANG/pkg folder and you should be good to go again.

The Road to Ember 2.0

Tom Dale just published his request for comments on the road to Ember 2.0. This is a much anticipated read from my part.

About a year ago, I came across React and was quite intrigued by their simplified take on developing for the frontend. Not being particularly fond of the API, I digged deeper, taking Mercury, Vue, and finally Mithril for a spin – the latter being the most easy-to-work-with framework I have ever experienced.

The speed and simplicity of Mithril is striking. Granted, many concepts are missing, but you find yourself in rare need of them for everyday tasks. In that light, I’m excited about the future of Ember.js. It is still my framework of choice for heavy web applications – and the road ahead tells of an even more intuitive, lightweight, and CLI-powered experience.

Source code for Commander Keen: Keen Dreams

I have fond memories of playing DOS-based games back in the day, including the fabled Commander Keen series. And now, it appears the source code for Commander Keen: Keen Dreams has been released.

Supposedly, the code is designed for Borland C++ 2.0, the 1991 version of the compiler. While I have yet to attempt to compile it myself, reading through the source code and understanding how the developers implemented gravity, friction and so on is quite fun. The source code is available on GitHub.

Simple, responsive charts using Chartist.js

There’s an exciting new charting library out by the name of Chartist.js. It works by leveraging inline SVG and does not offer any custom events, labels or the likes – Chartist.js is just for plain, simple charting that is responsive as well. Check out the examples here, they’re quite good.

Kasper Tidemann