Hack Days; Removing the Rules

Posted by & filed under XP.

At Unruly we have a quarterly whole-company hack day that we call Oneruly day. Hackdays allow the whole company to focus on one thing for a day. Unlike our 20% time, which is time for individuals to work on what is most important to them, Hackdays are time for everyone to rally around a common… Read more »

End to End Tests

Posted by & filed under Java, Testing, XP.

End to end automated tests written with Webdriver have a reputation for being slow, unreliable (failing for spurious reasons), and brittle (breaking with any change). So much so that many recommend not using them. They can become a maintenance burden, making it harder, rather than easier, to make changes to the user interface. However, these… Read more »

Representing the Impractical and Impossible with JDK 10 “var”

Posted by & filed under Java.

Having benefited from “var” for many years when writing c#, I’m delighted that Java is at last getting support for local variable type inference in JDK 10. From JDK 10 instead of saying ArrayList<String> foo = new ArrayList<String>();ArrayList<String> foo = new ArrayList<String>(); we can say var foo = new ArrayList<String>();var foo = new ArrayList<String>(); and… Read more »

Gold Cards

Posted by & filed under XP.

How does your team prioritise work? Who gets to decide what is most important? What would happen if each team member just worked on what they felt like? I’ve had the opportunity to observe an experiment: over the past 8 years at Unruly, developers have had 20% of their time to work on whatever they… Read more »

Why I Strive to be a 0.1x Engineer

Posted by & filed under XP.

There has been more discussion recently on the concept of a “10x engineer”. 10x engineers are, (from Quora) “the top tier of engineers that are 10x more productive than the average” Productivity I have observed that some people are able to get 10 times more done than me. However, I’d argue that individual productivity is… Read more »

Team Efficiency is Irrelevant

Posted by & filed under XP.

The most common reaction I hear when I tell people about mob programming (or even paired programing) is “How can that possibly be efficient?”, sometimes phrased as “How can you justify that to management?” or “How productive are you?” I think that efficiency in terms of “How much stuff can we get done in a… Read more »

Optionally typechecked StateMachines

Posted by & filed under Java.

Many things can be modelled as finite state machines. Particularly things where you’d naturally use “state” in the name e.g. the current state of an order, or delivery status. We often model these as enums. enum OrderStatus { Pending, CheckingOut, Purchased, Shipped, Cancelled, Delivered, Failed, Refunded }enum OrderStatus { Pending, CheckingOut, Purchased, Shipped, Cancelled, Delivered,… Read more »

HTML in Java

Posted by & filed under Java.

Another use of lambda parameter reflection could be to write html inline in Java. It allows us to create builders like this, in Java, where we’d previously have to use a language like Kotlin and a library like Kara. String doc = html( head( meta(charset -> "utf-8"), link(rel->stylesheet, type->css, href->"/my.css"), script(type->javascript, src -> "/some.js") ),… Read more »

Lambda parameter names with reflection

Posted by & filed under Java.

Java 8 introduced a compiler flag -parameters, which makes method parameter names available at runtime with reflection. Up to now, this has not worked with lambda parameter names. However, Java 8u60 now has a fix for this bug back-ported which makes it possible. Some uses that spring to mind (and work as of recent 8u60ea… Read more »

Anonymous Types in Java

Posted by & filed under Java.

Java allows casting to an intersection of types, e.g. (Number & Comparable)5. When combined with default methods on interfaces, it provides a way to combine behaviour from multiple types into a single type, without a named class or interface to combine them. Let’s say we have two interfaces that provide behaviour for Quack and Waddle…. Read more »