Runar Ovesen Hjerpbakk

Programmer. Software Architect. Technical Manager.

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

Cross-platform mobile development using C# and Xamarin Forms

One of my favorite professional activities is educating students on technical topics they’ve not yet encountered at the university.

Yesterday I gave a talk on cross-platform mobile development using C# and Xamarin for a group of students from NORD University in Bodø, Norway. The goal of the talk was to show how easy it is to create a cross-platform app using modern tools and give them a baseline from which they can create their own app.

Read More

Introducing Simplest Workout Tracker - The humane exercise log

Simples Workout Tracker icon

Most workout trackers are demanding. They require you to enter a lot of information just to track your progress and many shame you if you do not work out regularly. Simplest Workout Tracker has another philosophy: If you’ve exercised, that’s great! If not, there’s always another day.

Buy Simplest Workout Tracker in the App Store

Read More