Complexity bump

Was tweaking some code today to improve it.

At first I thought it would be straightforward. Then I realised it was a little bit more complicated that I thought.

After a bit more thought I realised it was a lot more complicated than I thought.

Then it became clear that there was a natural solution that made a lot of sense and would lead to considerably less complicated code than was originally there.

So I did that.

Battling through the 'pain' of the complexity was worth it - once we punched through to the other side we were left with something much more understandable, maintainable and useful.

Sometimes you've just got to grit your teeth and persevere.

[Image credit: P. Bibler]