GDCR 2026: My participation summary

As every year, the Global day of code retreat is a good excuse to work and rework the same kata a full day.

This year I was only an attendee; the event was still organized by the Software Crafters Lyon.

Subject

They have chosen the infamous game of life; at the end of the day, it was my 81st attempt at this kata.

Basically, the player announces a scoring method and throws 5 dice, then the dice are given to this method to be computed.

We decided it because it's wide, so if a pair is stuck with a score computation, they can skip it.

Iterations

  1. Introduction
  • Language: F#
  • Paired with an experienced developer I know for a long time
  • It was an exploratory session
  • We tackled transitions as a pure function, then we have introduced grid as a set of living cell coordinates
  • We covered all rules for the first function, not the grid
  1. Immutable and primitive obsession
  • Language: C#
  • Paired with a senior developer
  • We handled the grid, and my pair started to strongly typed coordinates, giving me a new idea (see below)
  • We did not cover all rules
  1. Blind navigator
  • Language: TypeScript
  • Paired with a senior developer, a former coworker I have talked to for a long time
  • We focused on the cell
  • The constraint was challenging, but knowing the rules helped me to have a precise mental representation of the code
  • We did not cover all rules
  1. Evil TDD programming and ping-pong
  • Language: TypeScript
  • Paired with a mid-level developer
  • We focused on the cell
  • My pair started with an incomplete test, so I have added code, as I would do in C code
  • My test was easy to make it green by my pair, but then, spent a lot of time designing the next test to drive me to the actual algorithm
  • We covered 3 out of 4 rules in one line
  1. No return and no control flow
  • Language: Java
  • Paired with an experienced developer I know for a long time
  • We focused on the cell, using callbacks to pass assertions, fulfilling the first constraint
  • I was pretty quick, so we moved to the second one, adding neighbors-count-based strategies
  • Once all the them were created, we have registered them in a Map and substituted each
  • We covered all rules
  1. Ensemble programming and evil TDD
  • Language: TypeScript
  • We handled cell function
  • It was not too serious, but we had steady progress. * 1 out of 2 evil members was found. * We covered all rules..## The new implementation idea

During the second iteration, my pair started to strongly-typed AliveCellCoordinates, giving me the idea to have transitions between neighbors and alive cells' coordinates.

Let's start by design coordinates with a phantom type, as follows:

data Coordinates a = Coord
  { x :: Int,
    y :: Int
  }
  deriving stock (Eq, Ord, Show)

data Neighbor

data Alive

Which enables us to list neighbors' coordinates, leaving the main coordinate, as follows:

neighbors :: Coordinates Alive -> Set.Set (Coordinates Neighbor)
neighbors coord = Set.fromList [Coord (coord.x + dx) (coord.y + dy) | dx <- [-1 .. 1], dy <- [-1 .. 1]]

Then comes my intuition: the aim is to convert a neighbor coordinate to a possible alive cell coordinate, looking at all neighbors, as follows:

aliveCell :: AliveCells -> Coordinates Neighbor -> Maybe (Coordinates Alive)
aliveCell alives coord =
  mfilter
    ( \alive ->
        isAlive
          (Set.member alive alives)
          (Set.size $ Set.delete alive $ Set.intersection (Set.map toAlive $ neighbors alive) alives)
    )
    $ Just (toAlive coord)
  where
    toAlive Coord {..} = Coord {..}

isAlive :: Bool -> Int -> Bool
isAlive alive =
  \case
    2 -> alive
    3 -> True
    _ -> False

It is specifically designed so it can be used as a filter.

For instance, going from a set of alive cells, generating all possible neighbors, filtering only those who have enough living neighbors, as follows:

nextGrid :: AliveCells -> AliveCells
nextGrid alives = setMapMaybe (aliveCell alives) $ foldMap neighbors alives

Note: Find below the tests I have used:

spec :: Spec
spec =
  describe "Game of Life" $ do
    forM_
      [ ([], []),
        ([(0, 0)], []),
        ([(0, 0), (0, 1)], []),
        ([(0, 0), (0, 1), (0, 2)], [(-1, 1), (0, 1), (1, 1)]),
        ([(0, 0), (0, 2), (1, 2)], [(0, 1), (1, 1)])
      ]
      $ \(current, expected) ->
        it (show current <> " should become " <> show expected) $
          nextGrid (Set.fromList $ uncurry Coord <$> current) `shouldBe` Set.fromList (uncurry Coord <$> expected)

My feedback

I have given a ROTI of 3/5.

Let's start with the negative part.* I know this kata too well

  • Not so much newcomers

  • Not an exotic programming language or approach.The good part:

  • Out of 15 registered attendees, only 13 showed up

  • Most of them were long-time attendees

  • I felt like with friends

As usual, for a few years now, LLMs have been part of discussions:

  • Many attendees are worried about the future of the field
  • Most of them experienced some form of loneliness, especially when they work remotely, and were happy to gather in person
  • We used them a bit (ironically to set up development environments), mostly improperly (lack of context, insults, etc.)