As each year goes by I think to myself "everything is going to get easier this time, surely."

And at the end of said year I realise that software is just as hard as it has always been, and probably getting harder.

I was working on GamePlan last week, finishing off the costing module and implementing some performance improvements.

To describe what I was working on in English is mostly straightforward:

  1. Update the screen with the quick-to-calculate information
  2. Start calculating the slightly-slower-to-calculate information, and when it's done, display it
  3. Start calculating the really long-time-to-calculate information, and when it's done, display it.

Step 3 relies on information from step 2, which in turn relies on information in step 1.

And that went fine for the most part.

But what happens if the original setup information changes, i.e the information that step 1 requires?

This causes a sequence of down stream effects. If the setup information changes, then:

  • We can't display any information from previous attempts at step 2 and 3
  • We should probably stop working on step 2 and 3 as quickly as possible, because we can't use the results.

So the process for updating instead becomes:

  1. Make a note of the current version of our setup
  2. Calculate and display the initial quick-to-calculate information
  3. Check if our current version of our setup is the same. If it is, start calculating our slightly-slower-to-calculate information
  4. When it is done, check if our current version of our setup is the same. If it is, display the results, and start the long-time-to-calculate information.
  5. When that calculation is done, check if our current version of our setup is the same. If it is, display the results.

It's not that much more difficult, but it is an extra layer and extra work.

It's a small thing, but you are constantly asking yourself "surely, there is an easier way!?"