Printing money - hacking loyalty points

At work, we’ve all grown quite vigilant when it comes to customers trying to cheat the system. A necessary trait when working in a domain where money flows back and forth and customers are always trying to find an edge that will turn the tables. While most tend to leave this mindset at work, one colleague in particular, is always probing, trying to find cracks in the surface of everyday models. Years of practice have made him exceptionally good at it too. When you want more than a shallow review of your design, you go see him. ...

February 12, 2017 · 3 min · Jef Claes

Everyone has to serve somebody, but software has to serve more than one

When people get paid to write software, we very often find some form of friction between the people that build the software and those that pay to have it built. The company I joined three years ago was no exception. When I joined, they had just launched three months ago, weren’t seeing any return on investment and prospects weren’t too bright either. I won’t lie, that first year was quite stressful. The business model sucked, the code was even worse. That first year, I wouldn’t have been too surprised if the whole team had been let go. In that situation, I could have played it safe, but to be fair, there was something quite exciting about actually having skin in the game and trying to make something out of nothing. ...

January 13, 2017 · 5 min · Jef Claes

Side by side

This week marked my first year at my current employer. While that event went by rather silently, one year in, a few of my observations are finally shaping up to be cast into writing. Where I used to work in the typical battery cage, I’m now part of a team of just four people, having the luxury of a big dedicated room to ourselves - a whole floor actually. The room is set up almost symmetrically; two desks on one side of the room and two more on the other side, with quite some space in between. Having only four people in the room makes it easy to casually throw something at the group - be it a question, a critique or a random idea. ...

February 15, 2015 · 3 min · Jef Claes

TDD as the crack cocaine of software

The psychologist Mihaly Csikszentmihalyi popularized the term “flow” to describe states of absorption in which attention is so narrowly focused on an activity that a sense of time fades, along with the troubles and concerns of day-to-day life. “Flow provides an escape from the chaos of the quotidian,” he wrote. This is a snippet from the highly recommended book Addiction by Design, which not only gives you an incredibly complete overview of the gambling industry, but also insights into the human psyche which apply far outside the domain of gambling. ...

December 28, 2014 · 4 min · Jef Claes

Solomon, the architect

Two junior developers who started working for the company at the same time, had been quite competitive with each other from the get-go. They had once been assigned to the same team, but because of the constant bickering, which had put a serious amount of stress on the team, one of them was pulled off the project and reassigned. A good year later, just the two of them were assigned to a new smallish, but interesting in-house project. When management assigned them to the same project again, they had just been shuffling resources around, and had no idea of the history these two had. An architect was also assigned to the project, but this was not more than a formality. As soon as the enterprise architecture diagram was updated and the paper work was out of the way, he would do an official hand over, but he would only occasionally check in on the project from then on. ...

August 26, 2014 · 4 min · Jef Claes

Tests as part of your code

In the last project I worked on - processing financial batches - we put a lot of effort in avoiding being silently wrong. The practice that contributed most was being religious about avoiding structures to ever be in an invalid state. Preconditions, invariants, value objects and immutability were key. One of the things we had to do with these structures was writing them to disk in a specific banking format; all the accounts with their transactions for a specific day. To verify the outcome of these functions, we had a decent test suite in place. But still, we felt like we had to do more; the person on the team that had been working in this domain for thirthy years had been relentlessy empathizing - nagging - that bugs here would be disastrous, and would have us end up in the newspaper. That’s when we decided to add postconditions, putting the tests closer to the production code. These would make sure we crashed hard, instead of silently producing something that was wrong. ...

March 9, 2014 · 2 min · Jef Claes

Command and event semantics

Yesterday, I read this blog post by Michael Feathers. In the post he goes over a pain point he has often found himself struggling with while breaking down a large method; conditional statements. if (alarmEnabled) { var alarm = new Alarm(); ... alarm.Sound(); } Should we extract the if and the associated block into a new method, or just the content of the block? Is the condition too important to hide in a method? How would we name the extracted method? How do we avoid the code from telling us lies? ...

January 5, 2014 · 2 min · Jef Claes

Observations over assumptions

I heard a story once about an engineer who worked on the Disneyland site when it opened in Anaheim, CA in 1955. A month before the park opened, the new grass and sod were being applied to the grounds as one of the last items to be completed before the big grand opening. The parking lot was some distance from the park’s gates and required a lot of turf. However, the sidewalks had not been planned or constructed to accommodate patterns. ...

November 24, 2013 · 3 min · Jef Claes

Event source all the things?

Having covered projections last week, I think I have come full circle in these posts that turned out to be a small preliminary series on event sourcing. Even though there are still a vast amount of nuances to discover, I think I’ve captured the gist of it. Even without running an event sourced system in production - I feel as if I somewhat have an idea of what event sourcing can bring to the table. ...

November 3, 2013 · 6 min · Jef Claes

My understanding of event sourcing

I’ve been studying event sourcing from a distance for little over a year now; reading online material and going through some of the excellent OS code. Unfortunately, there would be no value introducing it into my current project - it would even be a terrible idea, so I decided to satisfy my inquisitiveness by consolidating and sharing my understanding of the concept. Domain events An event is something that happened in the past. ...

October 6, 2013 · 2 min · Jef Claes