Abusing exceptions as goto statements

A reasonably common abuse I see is abusing exceptions as a form of control flow. If it’s inside a single method, it’s not too bad, but it’s easy to get to the point where exceptions get thrown or re-thrown and is dealt with elsewhere in the code. [Read More]

Testing Google Cloud Platform PubSub with Testcontainers

I wanted to be able to write tests against our Google Cloud Platforms PubSub implementation. Unfortunately, the way the SDK is written, it doesn’t exactly lend itself to easy testing. It’s incredibly verbose for something that is just sending a bunch of http requests! [Read More]

Developer environments and production parity

When I first started writing software, a common practice was to use an emulator or a lightweight version of something for your development environment. The most common of these were in-memory databases, things like SQLite and H2. They are lightweight, easy to use and easy to segregate. You didn’t need to worry about licensing or having a lot of resources for it to run. As machines have got more powerful and FOSS databases have become more mature, the reasons for not having a real database running for development are diminishing. The problem now seems to be more about orchestration. [Read More]