Blaz Merela

A problem solver.

Recent posts

Jupyter tips

As I do data-related projects only on a semi-regular basis, I often find myself regrouping from the context switch. There's not much one can do about the inherent complexity of the subject, but maybe we can lessen the incidental complexity. One of the things I do is amend my Jupyter workflow with…

Read More

Bash defer idiom

One use case of in Bash is the following snippet: The highlighted line in particular might be considered an equivalent of a statement in, say, Swift or Go.

Read More

Keep 'hot reloading' after a compiler error

On macOS 10.15, you have to run this command which increases the limit from the original 49152. And for Ubuntu 18.04, the fix is supposedly:

Read More

Explicit localhost in Go

Just testing the waters with Golang. Every time a local server was restarted, macOS greeted me with a firewall prompt, asking me to Allow or Deny incoming network connections. One way to suppress this prompt is to run the app explicitly on , rather than mere .

Read More

awk's seen idiom

I wanted to extract distinct values of a particular column in a csv file, and just found has a concise idiom to do just that: . Say you want to operate on the 2nd column, hence in the following snippet. This is all it takes:

Read More

pgTAP's case-sensitivity

The following pgTAP inconsistency led to a few wasted hours. Turns out that handles both upper- and lower-case input for its parameter, whereas only handles the lower-case version. Case in point, given this function ... ... the first test passes, while the second one fails with the error! Quick…

Read More

Automated permissions testing

Previously we've covered deeplinks with automated tests. Let's now do the same for permissions. We'll only showcase doing so for notifications, but the same would apply to others: camera, photos, location, calendar, reminders, microphone, etc. UI testing power-up First we need to empower UI testing…

Read More

Automated deeplinks testing

UI testing under iOS 11 has the ability to interact with other installed apps. Specifically, got a new constructor that takes a bundle ID. Let's see how we use this to put our deeplinks under automated tests. Overview What you basically do is create a helper-app, in below examples, that merely…

Read More

Distilled iOS development tips

A collection of how-tos & tips related to iOS development. How to get more accurate Xcode test coverage The natural next step from testing your code, perhaps even in a test-first manner, is knowing how much of your code is covered by these tests. To do that, you have to first open the and tell…

Read More