1. Pagination Pitfalls

    Wed 21 November 2018

    A common pattern in many REST APIs that return a large number of results is to do something like this:

    • There's an endpoint /item that returns all items starting with the most recent and limited by an amount, e.g. 100 items per page.
    • You can get the total number …
    read more
  2. Mongoengine - switching away from switch_collection.

    Wed 31 October 2018

    I was investigating why some users were losing their data, and discovered that data was being written to the wrong MongoDB collection, in the process overwriting existing data. I narrowed it down to a piece of code that was using Mongoengine's switch_collection. I noticed when looking at the logs that …

    read more