‘Iacta alea est’
This has turned into quite the series. I didn’t expect that such a small experiment would teach me quite so much. There’s also a bit of news that I’m saving up for a future post about a new library that (I think) owes at least part of its existence to some of this writing.
For now, I wanted to take a moment to reflect on the process so far and share a little bit more about the journey.
When I ‘quit’ (post 2), having been defeated by the problem with both the clock and my low mental energy against me, I was in two minds. Do I publish defeat? Surely I should be writing about the successes; showing off the finished, polished, final artefact.
Thankfully, my commitment to daily publishing made up my mind for me. Better to publish something than nothing, even if it paints myself in a bad light.
I’m glad I pushed through. For two reasons. What’s wrong with showing your working out? Hitting publish on a work in progress is not a weakness, but a strength. Secondly, without having published, I likely wouldn’t have had as much drive to solve the problem as I did. By publishing the work in an unfinished state it increased the chances that I would finish it.
And there are more benefits. Learning in public invites others to join you in the process. Perhaps they will be able to build on your unfinished work, in the same way that a cathedral in the middle ages was often built by three successive generations, each handing over just a part of the construction to the next.
Others can offer a different perspective, look at the problem from a different angle, and draw on their experiences solving similar problems. Or just plain disagree with you.
The first solution was also a little embarrassing. A reader wrote in:
I don’t get the solution at all.
and I agreed with him. But working it out with a sub-optimal solution gave me the tools I needed to solve it in a simpler manner. Would I have arrived at the simplicity of the ‘final’ solution without making that interim step? I don’t know.
And of course, it’s easy to question the value of an exercise like this, since HTML in Ruby is really a solved problem. You’ve got the tried and trusted ERB, HAML, Slim, Markaby, anything you want really.
Part of it is just fun. It’s fun to play around. It’s fun to push the boundaries. It’s good to push your own boundaries.
I learned a lot about Ruby blocks, I learned about HTML, I learned about tree structures, I learned that although you can copy things from other languages it helps to think about the problem in the language you’re writing it in.
I learned that sleeping on unfinished business allows you to wake up with solutions. I learned that learning in public is enjoyable and collaborative. I learned that it pays to work things through and deal with the discomfort. I learned that simplicity is lurking beneath your version one, or your version two. That thinking over ‘finished’ solutions can lead to further insight, the job might not yet be as done as you think it is.
And I learned that reassessing your solution from the first principles of the problem allow you to cut away many of the interim problems and solutions that only arose as a result of choosing a particular path. More about that in a future post.
—Thursday 11th March 2021.