Runar Ovesen Hjerpbakk

Programmer. Software Architect. Technical Manager.

Why software sucks

I received an excellent question today:

Hey Runar, why is almost all new software and programs so ugly and difficult to use? Everything new from Microsoft or say Kongsberg looks like it’s made for Apple and it just looks horrible and has much less functionality than the older software’s had.. Any ideas?

An excellent question. And the answer depends on your perspective.

Read More

FindRef - find those references!

.Net is awesome and especially .Net Core Global Tools. Similar to npm install -g you can install tools by executing and easy command:

dotnet tool install --global [name-of-global-tool]

Running the tool is as simple as:

[name-of-global-tool] [arguments]

Just like that you get access to thousands of useful tools, without running installers or browsing to find the correct binary for your system. These tools will run on all platforms supported by .Net Core, both macOS, Windows and Linux. This is truly the power of a cross-platform, open ecosystem. The only pre-requisite is an updated .Net Core SDK installed on your machine.

Read More

Making a Game Boy game in 2017 - A Sheep It Up! Post-Mortem

This post is the first in an excellent series of two where a guy details how he made his own Game Boy game in 2017. And put it on an actual cartridge!

Impressive work, well worth a read.

Building such a game with modern(?) tools is still hard and I’m very humbled by the achievements of the game devs of yore. I’m on maximum impostor syndrome right now.

Continuing an ordered list in Markdown

Today I created an ordered (numbered) list in Markdown for a Jekyll site and needed to continue the ordering after an image. Essentially, I wanted to achieve this:

  1. First item
  2. Second item
  1. Third item
  2. Fourth item

Read More

Signing commits using GitHub Desktop on macOS

This morning I got inspired by Phil Haack’s post on proving the identity of package authors. How can you know people are who they say they are online? A step of the way is a social proof, that is you link your identity on many different services together, thus increasing the certainty that you are you for every service added.

The place to tie these identities together is

So not only did I install and join Keybase, I decided to begin signing my Git commits with my PGP-key. Signed commits on GitHub gets a nice Verified badge when the key used to sign the commit matches that registered on the given user’s profile.

This increases the public’s confidence that the commit was indeed submitted by the actual person, and when this again can be verified on services like Keybase we’re almost there.

Setup commit signing

The following is a guide to setup automatic signing of commits on macOS. It even works with the GitHub Desktop app!

Read More

Changing the color of buttons in the iOS UINavigationBar

While creating a Xamarin Forms workshop for some local CS students, I encountered what I think to be a bug but might turn out to be a feature.

Consider the following code from AppDelegate.cs:

public override bool FinishedLaunching(
    UIApplication application, NSDictionary launchOptions)
    UIButton.Appearance.TintColor = UIColor.Green;
    UINavigationBar.Appearance.TintColor = UIColor.Red;
    return true;

What color will a button in the navigation bar have now, green or red?

Read More

Could not find any available provisioning profiles for iOS

I’ve used and created many different CI pipelines in the past, everything from make to TFS. Travis CI is my current favourite, but it is always useful to use new services or technologies to solve familiar problems. There’s a difference between Windows Workflow Foundation and .travis.yml

Since I already use App Center from Microsoft for diagnostics and analytics in my iOS apps, I decided to try their build system too, creating a build for my Golden Ratio Calculator app.

Read More

Script for creating transparent PNGs

Introducing transparent-png, a simple Python script for creating a transparent PNG of a given size.

Read More

VTable setup of type LightInject.ServiceContainer failed in Xamarin.iOS

An important concept in app development is the D in SOLID, the Dependency inversion principle. While using this technique together with the Interface segregation principle you end up with a lot of interfaces. And with cross-platform Xamarin apps, you’ll sometimes have different implementations on iOS and Android with some fake service implementations for testing too.

When creating iOS apps using Xamarin, another good practice is to enable linking. Enabling linking will remove unused code before compilation and decreases the size of your app manyfold. There’s a difference between 80 and 20 MB, even in 2019.

Xamarin Forms has a built-in DependencyService to help manage the interfaces and their implementations, but I prefer the always excellent LightInject. And after adding LigthInject to my latest Xamarin Forms app and enabling linking, this error message appeared on startup:

VTable setup of type LightInject.ServiceContainer failed

Read More

DNS worked using Docker run but not in Docker Compose

I created an API internal to our organization today. The API needed to access an SQL Server database and worked perfectly running on my local machine on the corporate network.

Then the time came to run it in a Docker container. And it failed. The API could not connect to the SQL database.

Read More