Return on Investment for Test-Driven Development

Posted on Fri 28 April 2023 in Methodology • Tagged with tdd, roi

I recently came across a thread discussing Test-Driven Development (TDD) on one of the major social networks. The discussion revolved around when to use TDD and when it can be skipped. As a consistent TDD practitioner, I find these discussions interesting, especially when it comes to understanding the perspectives of …


Continue reading

Discovering Nim, part 1

Posted on Fri 02 December 2022 in Coding • Tagged with aoc, coding, nim

For this year’s Advent of Code, I use the programming language Nim. I wrote a little bit about Advent of Code yesterday.

For today’s puzzle, I got stuck on something that normally is so trivial that you don’t think twice about it—accessing a variable in the …


Continue reading

🎄 Advent of Code 2022, at last! 🎄

Posted on Thu 01 December 2022 in Coding • Tagged with aoc, coding

The time has come for another December with the alarm clock set earlier than usual! The yearly Advent of Code challenge opened its gates to the first puzzle at 00:00 Eastern Time, meaning 06:00 in Sweden.

This is my 6th year, and I’m looking forward to a …


Continue reading

A quick look at Cypress component testing

Posted on Wed 29 June 2022 in Coding • Tagged with ui-testing, cypress

Co-authors: Andreas Cederström and Sebastian Porling.

Cypress has recently released support for component testing in their 10.0 release. You read the announcement here. We decided to take a quick look and try it out, to gather some first impressions and see how it can fit into our development workflow …


Continue reading

Consequences of array covariance in C#

Posted on Fri 22 October 2021 in Coding • Tagged with csharp, covariance, cast

In today’s post, I’ll talk about array covariance in C#, how it hid a bug in code that was covered by a passing unit test (*gasp*), and some ideas for how to avoid such bugs.

What is covariance?

In computer science, variance has to do with how complex …


Continue reading

TDD and prototyping—a love story?

Posted on Tue 10 July 2018 in Methodology • Tagged with test, tdd, prototyping

Can you combine Test-Driven Development (TDD) with prototyping? How can you write tests for functionality that is largely unknown? Where do you even start if you’re on unfamiliar ground and you need to explore to learn about possibilities and constraints? How can you write tests when you don’t …


Continue reading

Git-diffing Excel files, part 2

Posted on Tue 02 January 2018 in Tools • Tagged with git, diff, excel

I previously wrote about how to get a useful diff for binary Excel files that reside in a Git repository.

This post adds some details that are big enough to deserve a separate post. They are:

  • User-level configuration of Excel diffing.
  • How to get an Excel diff from git show …

Continue reading

Nashorn's JSObject in context

Posted on Sun 12 November 2017 in Coding • Tagged with java, nashorn

The JSObject interface in Nashorn makes it possible to expose an object to script code and control in detail how it appears and behaves. The purpose of this article is to explain when the different JSObject methods are called during script execution and in some cases how they should be implemented.


Continue reading

Scala pattern matching & lowercase case objects

Posted on Wed 30 November 2016 in Coding • Tagged with scala, functional

I just learned something about pattern matching and case objects in Scala which I thought I’d share.


Continue reading

Git-diffing Excel files

Posted on Fri 04 March 2016 in Tools • Tagged with git, diff, excel

In this post, I’m going to demonstrate how to get a useful diff for binary Excel files that reside in a Git repository. I assume that you’re familiar with Git, and in that case you know that having binary files in a repository is generally not a good …


Continue reading