Stacking responsibilities

TL;DR – Support decisions with automation and information; give people breadth of responsibility; let them learn from the results of their choices. When I started writing software in 1999, The software development cycle was divided into stages, ruled over by project management. Business people decided what to build to support the customers. Developers coded it. … Read moreStacking responsibilities

Testing akka actor termination

When testing akka code, I want to make sure a particular actor gets shut down within a time limit. I used to do it like this:  Thread.sleep(2.seconds) assertTrue(actorRef.isTerminated()) That isTerminated method is deprecated since Akka 2.2, and good thing too, since my test was wasting everyone’s time. Today I’m doing this instead: import akka.testkit.TestProbeval probe = … Read moreTesting akka actor termination

A suggestion for testing style in Clojure

Getting a test to fail is one thing; getting it to express why it failed is another.Clojure.test provides an assertion macro: is (deftest “my-function”   (testing “some requirement”    (is (something-that-evaluates-to-bool (arg1) (arg2))     “Message to print when it’s false”))) When this assertion fails, in addition to the message, “expected” and “actual” results print. The is macro tries to … Read moreA suggestion for testing style in Clojure

GOTO Amsterdam: Respect the past, renew the present

GOTO Amsterdam started with a retrospective on Java, and ended with the admonition that even Waterfall was an advancement in its time. The conference encouraged building on the past, renewing and adding for growth. As our bodies renew themselves, replacing cells so we’re never quite the same organism; so our software wants renewal and gradual … Read moreGOTO Amsterdam: Respect the past, renew the present

Limitations of Abstraction, and the Code+Coder symbiosis

Notes from #qconnewyorkI went into programming because I loved the predictability of it. Unlike physics, programs were deterministic at every scale. That’s not true anymore – and it doesn’t mean programming isn’t fun. This came out in some themes of QCon New York 2014. In the evening keynote, Peter Wang told us we’ve been sitting … Read moreLimitations of Abstraction, and the Code+Coder symbiosis

Declarative style in Java

The other day at work, we had this problem: Sort a sequence of rows, based on an input list of columns, where each column might be sorted ascending or descending, and each column might require a transformation first to get to something comparable. The function interface looks like this: Here is a concrete example where … Read moreDeclarative style in Java

Highway Speeds

This morning on the way to work, a driver next to me switched lanes unpredictably. Marking that car as dangerous, I wanted to be either in front of them or behind them. If in front, they can see me. If behind, I can see them. It’s clear whose responsibility it is to watch out for … Read moreHighway Speeds