Finding my voice

Almost four years ago I started this blog to share my journey, but aside from a few technical posts that didn’t quite pan out. Until recently I wasn’t really aware why that is, why it is so difficult for me to share my ideas. Now I think I know why and can take steps to improve.

Change which struct-key the Phoenix path-helpers use

By default the Elixir Phoenix path helpers use the :id key. For example: property_path(conn, :show, property) would turn into /properties/1. If you want to use a different key inside the property use the Phoenix.Param protocol in the schema definition.

Clear saved HSTS pinnings in Safari and macOS

So today I was trying to get SSL working on my machine with localhost. In the process I set the HSTS headers, telling the browser to never access the non-secure http:// version of localhost. Thus going to http://localhost:4000 would always fail as HSTS tells the browser to only access https://.

No overlapping dateranges in Postgres

Lets say we have several rooms, and every room has reservations. We do not want the reservations to overlap, ever. Here’s how we add that check to a table in PostgreSQL.

Water Based Analytics

When we consume food our body tries its best to extract everything in it to keep us going. Not everything gets used of course. There are limits to how much of a particular compound our body can process — or even needs on a day to day basis. The leftover leaves us as waste down the toilet and that’s it.

Respecting our users time and attention

Over the last decade there has been a rise in everyday tools fighting for our constant attention. Smartphones gaining widespread use have been big enablers of this.

Fix large navigation bar title not hiding on scroll in iOS 11

iOS 11 introduced large navigation bar titles. They look great and you should use them on main views. When you use large titles on a UITableViewController everything works as expected. On scroll the large title hides with a nice animation and returns to a normal smaller one.

How to verify and limit decimal number inputs in iOS with Swift

Apple only provides UITextField for inputs which always returns a string. You can define a keyboard layout (decimal pad in my case) but that is where support for numeric inputs in iOS ends.

Automatic recreation of Realm DB during development

In a previous devlog I mentioned choosing Realm as backend for a project. I like it so far, but there has been a minor nuisance. During early development the layout of the DB changes all the time.

Choosing how to persist data in iOS (and beyond)

In one of my iOS projects I had to figure out how I store data. There are several ways, all with their pros and cons. Let’s look at a few of them and what I ended up with. Here is what I reviewed:

  • NSUserDefaults / NSUbiquitousKeyValueStore
  • SQLite
  • CoreData
  • Realm.io
Archived articles...

Sending Sometimes Sundays

Subscribe to my newsletter for updates