The Empty Else Block

I was adding a new functionality to one of my applications when I realised that I wrote this piece of code:

if condition1 && condition2
  # do what is necessary
  # ...
  # ...
  # I don't if when this will happen and what to do
  # send me a mail anyway

I had no idea if that else block was going to be executed, and if yes, how often, or what to do if it happened. So I left it empty and let the application send me an email in case it is reached. If the number of emails is starting to be annoying, I’ll figure out what to do with it. This is something real options and validated learning from lean startup taught me.

Real options suggests not to commit to anything until I don’t have all the relevant information and I actually have to commit to do something. If I don’t know what shall be in that else block, I won’t put anything there. However, I have to know if that else block covers an (important) use case. So I had to learn somehow if the users wanted to use that block. This approach comes from lean startup. It’s been days since the application has been running and I only received a single email. It seems that I have to start thinking about that block, because a use case has been executed which I don’t fully understand at the moment. Nevertheless I’m happy, because instead of releasing something I have no idea about, I’ve learned that it is used, and now I have to figure out how exactly.

comments powered by Disqus