Learning log

Things I didn’t understand, until I did

I learn by finding the piece I’m missing and fitting it into what I already know. Each card is one of those pieces: the gap, what made it click, and how I checked it. They start as seedlings and grow when I come back to them.

Cards, newest first

  1. A BLE UUID says what kind of data, not which device

    In BLE, a UUID names a kind of service or characteristic and is the same on every device of that model. The device address is what tells two devices apart.

    seedling · ble, android

  2. A green build doesn't prove implementation() is right

    If a module's public API uses a type from another module, that dependency has to be api(). The modules that use it today can hide the mistake.

    budding · gradle, modularisation

  3. testFixtures share fakes between modules without shipping them

    The java-test-fixtures plugin gives a module a third source set for fakes and builders. Other modules' tests can use it, and it stays out of the production jar.

    budding · gradle, testing, modularisation

  4. Objects don't run on threads. Whoever calls them does.

    An object doesn't belong to a thread. Its method runs on whichever thread calls it, which is why "run this on the main thread" means putting a message in the main thread's queue.

    budding · android, threading

  5. Swift loses the type of a Kotlin Flow, because Flow is an interface

    Kotlin/Native talks to Swift through an Objective-C header, and Objective-C only puts generics on classes. Flow is an interface, so its element type doesn't survive the trip.

    seedling · kmp, ios