Sealed Java State Machines

Posted by & filed under Java.

A few years back I posted about how to implement state machines that only permit valid transitions at compile time in Java. This used interfaces instead of enums, which had a big drawback—you can’t guarantee that you know all the states involved. Java 15 brings a preview feature of sealed classes, solving this downside.

A little rant about talent

Posted by & filed under XP.

It’s become less common to hear people referred to as “resources” in recent times. There’s more trendy “official vocab guidelines”, but what’s really changed? There’s still phrases in common use that sound good but betray the same mindset. I often hear people striving to “hire and retain the best talent“ as if that is a… Read more »

Fun with Java Records

Posted by & filed under Java.

A while back I promised to follow up from this tweet to elaborate on the fun I was having with Java’s new Records (currently preview) feature. Records, like lambdas and default methods on interfaces are tremendously useful language features because they enable many different patterns and uses beyond the obvious. Java 8 brought lambdas, with… Read more »

The benefits of making code worse

Posted by & filed under XP.

A recent twitter discussion reminded me of an interesting XTC discussion last year. The discussion topic was refactoring code to make it worse. We discussed why this happens, and what we can do about it. I found the most interesting discussion arose from the question “when might this be a good thing?”—when is it beneficial… Read more »

Reasons to hire inexperienced engineers

Posted by & filed under XP.

There are many reasons to consider hiring inexperienced software engineers into your team, beyond the commonly discussed factors of cost and social responsibility. Hire to maximise team effectiveness; not to maximise team size. Adding more people increases the communication and synchronisation overhead in the team. Growing a team has rapidly diminishing returns. However, adding the… Read more »

Do you CI?

Posted by & filed under ContinuousDelivery, XP.

When I ask ask people about their approach to continuous integration, I often hear a response like “yes of course, we have CI, we use…”. When I ask people about doing continuous integration I often hear “that wouldn’t work for us…” It seems the practice of continuous integration is still quite extreme. It’s hard, takes… Read more »

Learning from Pain

Posted by & filed under ContinuousDelivery, Java, XP.

Pain is something we generally try to avoid; pain is unpleasant, but it also serves an important purpose. Acute pain can be feedback that we need to avoid doing something harmful to our body, or protect something while it heals. Pain helps us remember the cause of injuries and adapt our behaviour to avoid a… Read more »

The unsung upsides of staying put

Posted by & filed under ContinuousDelivery, XP.

This week will be my last at Unruly; I’ll be moving on just shy of nine years from when I joined a very different company at the start of an enthralling journey. Unruly’s grown from around a dozen people when I joined to hundreds, with the tech team growing proportionally. Team growth driven by needs… Read more »

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 »