Notes for Week 10 of 2021
It was a fragmented week. I am focusing more on hiring and I agree it takes roughly 100 hours per hire. I am writing some articles about it, but the first one crashed and burned in the review process, so let’s see whether there will be anything hitting the public site.
As a reminder, 2021 is now 20% completed.
Random
- Open API Spec validation is so tied to Swagger Editor that you can’t do it otherwise. Apparently the best way is to render the editor in headless Chrome, inject your spec into it and watch for UI results. Vladimir shows how. I am crying.
- Linux kernel code is fun
- On my Synology NAS, I had LUN backed up via HyperBackup to another folder. I have discovered it’s possible to make btrfs shapshots via Snapshot Replication app for LUNs as well, which makes the backup speedier and less space demanding
- When I was not paying attention, PyPI added support for both authenticator apps as well as hardware keys with U2F. Cool!
Aurora
- I had a read-only instance in the cluster timing out on connection attempts from the apps, but being perfectly healthy for aurora/cloud watch monitoring. This made the
cluster-ro
endpoint time out. Adding a fresh instance into the cluster helped. - Unfortunately, the dangling instance can’t be deleted by terraform if it is on a main cluster replicated to a different region. Even after extending the cluster, terraform insists on deleting the dependent cluster when invoked using
terraform destroy -target="aws_rds_cluster_instance.name_instances[0]
. You can use AWS CLI instead:aws rds delete-db-instance --db-instance-identifier=name-cluster-instance-0
. The DB identifier can be read from console. If you are an adventurer like me and you use the same scripted cluster instance name in all regions (and differentiate them by cluster name), I recommend quadruple checking yourAWS_REGION
variable- Do not get discouraged when the output looks like listing an instance without any side effect; rerun will tell you
An error occurred (InvalidDBInstanceState) when calling the DeleteDBInstance operation: Instance name-cluster-instance-0 is already being deleted.
- Deleting takes forever; keep calm and drink tea
- Don’t forget to
terraform refresh
when done
- Do not get discouraged when the output looks like listing an instance without any side effect; rerun will tell you
- Prisma was verysuperslow for me to pick it up and reports “cannot connect to endpoint” long minutes after; it got fixed by redeploying latest version on Vercel. There were multiple things happening at the same time, so the jury is still out whether I should blame connection pool settings or something else.
IndexedDB
- Using plain database is pain, idb really does help significantly
- I like the build-in versioning and how upgrades are done
- There is a significant groundwork for good user experience though. If user has an open tab with old version of the database and loads the application in a new tab, blocking will happen and needs to be resolved in a user-friendly way
- Keys (think RDBMS’s “primary key”) and Indexes (think RDBMS’s indexes) are distinct concepts when you want to iterate over data. Read IDBIndex example and IDBKeyRange example carefully to save a lot of pain
- Note that locale-aware sorting is implemented in Firefox, but hidden behind a feature flag and not supported anywhere else
Pink Belt
Back in Apiary times, I wrote myself a very simple automation tool called Black Belt. It wired together simple tools we’ve been using in a small teams. Since I see myself using the same tools in more recent project and still operating within the same organizational blueprint, I have decided I’ll revive it for myself.
It goes under the name Pink Belt as it’s like Black Belt, just with more optimism.
It integrates Trello, Github and Slack in a way that makes Kanban CLI-driven. You probably don’t need it: you can use just GitHub Projects and Slack integrations. I do that for some projects where I do work alone myself. The problem is that GH projects is not friendly for non-developers and the integrations are quite noisy.
As with Trello, this will work for small-sized teams; larger teams want more robust tooling. Yet more robust tooling also adds more friction (looking at you, JIRA) and I tend to use it only when team has enough weight to support it.
The integration and problems that Pink Belt fixes for me:
- Automatically picking the next card in queue, making corresponding branch for me, showing the card
- Making correct cross-links when making pull requests for the card
- Make planning simple: brainstorm on a Trello card using a simple checklist and when everything is done, run pinkbelt to break down the checklist into cards that are on a different board and cross-link
Not all updated and (re)written, but it’s something that I plan to maintain for myself.
Recommended Readings From This Week
- How to Give a Status Update To Executives: Excellent template for effective communication
- Beyond REST: Netflix approach to SQL over the wire. Good vertical integration of the whole stack, for internal consumption and prototyping.
- Revenge of the tabloids: Analysis of popular political messaging in UK
- How to have sex as medieval penintenial (a flowchart)
- Coworking With a Friend to Write More: Setup for people who like to work with people and in a structure
- On weather, winter, and changing climates: Winter in middle ages were also Decembers without snow
- Best practices can slow your application down: What tradeoffs Stack Overflow made, like choosing application speed over testability
- How Long Does It Take to Hire Someone?: It takes about 100 person-hours
- Understanding the useEffect Dependency Array: I have issues completely understanding how useEffect’s dependency array works on rerenders in React. This article provides way better explanation than docs
- On history versus chronicles: When nations are forced to confront the less glamorous parts of their past, they are not happy. Apparently, UK government trying to censor those efforts makes historians angry. As a side node, I have huge respect for Germans: it’s the only nation I know about that truly acknowledged horrors from their past.
Published in Weekly Notes and tagged aws • Weekly Notes