Notes for week 19 of 2021

Another week heavy on the errands. I still managed to do quite some progress on the Graveyard, especially mentally as I finally reconciled two access control models.

It was a rainy week here, leading to some local floods. It has a wonderful effect on nature though: I haven’t seen such lush greenery in a while. It is a proper spring.



  • Again it showed up that trying to develop anything without tests is slower even in the relative short run. I was trying to just display part of the old side and rabbit-holed into the old access control model, laden with bugs. It got much more clear and faster after I’ve bitten the bullet1 and started from test
  • I uploaded the new higher-quality logo to all appropriate places, thanks to Wynn
  • I wanted to shorten a text to use it as a cache key. In this particular instance, hash collision was not a big issue. I reviewed options:


  • I’ve missed Python supports enums since 3.4, very useful for magic constant handling
    • If you want to have the enum string name or representation, you have to call or EnumClass.ENUM_NAME.value, calling in str(EnumClass.ENUM_NAME) only gives you EnumClass.ENUM_NAME
    • If you have an enum value (like from DB) and need to map it back to enum class, that’s done using EnumClass(value)

  1. The bullet were not the tests themselves, but the necessary infrastructure for fixtures and resource creation. The old architecture doesn’t really allow for testing in isolation and it felt like going through this will make the whole feature development very non-incremental. I was proven wrong. ↩︎

Published in Weekly Notes and tagged

All texts written by . I'd love to hear your feedback. If you've liked this, you may want to subscribe for my monthly newsletter, RSS , or Mastodon. You can always return to home page or read about the site and its privacy handling.