For some time now I've started to change the type system of Sparrow. I wanted to add immutability as a first-choice instead of the current "everything is mutable". For more details see:

The problem is that I'm moving too slow. It takes me a long time to make changes that can be seen as minor. I make one change here which seems good, and immediately I find errors in some other part. I fix that error, and a new error appear. It feels like going in circles. Actually, it I step back a bit, I realize that:
  • I don't understand that code that I've written some time ago
  • the number of cases that I need to consider exceeds by a large margin the number of things that I can hold in my head at a given time
  • the code related to typing rules is too fragile
  • it seems that the code contains a lot of "this will fix my immediate case" logic

That is the essential complexity that Brooks talks about, and sadly, that is a poor written code.

Ok, so what do I do now? I cannot let this happen forever. Here are some thoughts on addressing this:
  • the way to move forward on the immediate term is to move in small increments, and for each increment, ensure that nothing is broken; making a big rewrite is going to take forever
  • after each small step, ensure that we have proper unit-test, so that we can properly assess problems
  • with each functionality change, also try a small refactoring to simplify the logic
  • think of long term redesigns that need to be addressed for a state-of-the-art implementation

That's it for now... going back to fighting complexity. Wish me luck.