An Excel interop trick

Yesterday I had a nice little evening spent with a silent failure of my program. The program needed to create an Excel document, save it and export as a PDF. It should also run periodically and automatically, so as a scheduled task right? Yes, and it works fine for me on my Windows 10 PC, but on clients Windows Server 2012? Not really.

Read More

Be careful with cache

There’s a well known saying that goes like this: There are only two hard things in Computer Science: cache invalidation and naming things *. This is a post about the first one.

Today I experienced a cache invalidation issue where I was presented with cached data instead of a fresh data which was different. This prevented me from fixing an issue which only my colleague discovered and for a minute we were confused with what was happening.

This just remembered me to be careful next time when I’m thinking about caching things. It’s extremely important that you know when to invalidate cache. If you don’t determine that moment correctly you are about to put a nasty bug in your product and frustrate your users.