Mongo $or queries are slow

Mongo doesn’t appear to perform particularly well when querying large-ish collections with $or queries. For some reason, it can’t figure out which index to use and often ends up doing a COLLSCAN. Say you have the following document structure representing user transactions: [Read More]

Tight Coupling x Complexity

When building systems you will quite often have to make the tradeoff between having a system that is loosly coupled or one that is simple. When we think of tight coupling we tend to think of it as a bad thing. But that is not always the case, you need to understand what you are being tightly coupled to. A common example of tight coupling people give is database queries, most of the time people will advocate using ORM as it offers a loosly coupled way of connecting to a database. In theory you can swap out your database server with another one. The reality is usally somewhat different, the chances are that you’ve leaked database speicific concepts outside of your ‘repository’ classes. You might be able to switch between similar types of database (MySQL to PostgreSQL for example) without doing anything but are you really going to be able to swap out MongoDB for PostgreSQL? I doubt it. Further more, you are tightly coupled to the ORM. [Read More]

Scaling teams by embracing autonomy

Everyone knows that micromanagement is bad; it’s “common sense” right. So why is it so common that developers who become team leaders fall into the trap of becoming micromanagers? And why is it especially prevalent for accidental team leads? [Read More]

Not Net Negative Developers

I’ve worked with many developers over the years. More recently the majority of them have been junior developers. When working with someone junior the best you can hope for is not net negative NNPP. By that, I mean that the developer doesn’t have any impact on the project. [Read More]