Okio FileSystem Update

I’ve been working on a file system API for Kotlin Multiplatform. It’s simple & fast and I’m excited about it. We’ve got these: FileSystem.SYSTEM: the local file system.FakeFileSystem: our in-memory implementation. Use checkNoOpenFiles() to be confident that your code doesn’t leak!ForwardingFileSystem: like…

Big Things Aren’t Just Bigger Versions of Small Things

I’ve been working on a product that’s grown from 5 developers in 2013 to 400 developers today. Our product complexity and customer numbers have grown similarly. I’m lucky and thankful to have been on a team whose hard work has paid off so much. But I’m…

Discovering Limits

All systems have limits. If I don’t design for them that doesn’t make them disappear! It just means I’ll be unprepared when they’re reached. Most of the systems I work on accept HTTP requests, perform operations on databases to satisfy them, and format their responses. Though…

Gradle’s includeBuild() is Awesome

I’ve worked on teams that use many repositories and teams that put everything into a giant monorepo. But no matter how much code we jam into git, there’s always something else on the outside. Gradle’s includeBuild() feature smashes multiple projects together into one. Recently I used it…

I Love Control Flow

As discussed previously, I’m working on a file system API for Okio. I’ve already written real & testing implementations, and now I’m adding ZipFileSystem: it views a zip archive as a read-only file system. Most of the work is reading specs, writing tests, and learning the gotchas…

NullPointerException: bio == null

Sometimes multiple threads close the same Socket concurrently. Unfortunately, Android 10 and 11 may crash when this happens: java.lang.NullPointerException: bio == null at com.android.org.conscrypt.NativeCrypto.SSL_pending_written_bytes_in_BIO() at com.android.org.conscrypt.NativeSsl$BioWrapper.getPendingWrittenBytes() at com.android.org.conscrypt.ConscryptEngine.pendingOutboundEncryptedBytes(…

Files, Boilerplate, and Testability

I’m working on Okio’s multiplatform filesystem API. It introduces 3 main types: Path: a value object that identifies a file or directoryFileMetadata: a value object that describes a file or directory, including its type and sizeFilesystem: a service object to read and write files and directories Plus two…

On Files and Okio

Though Okio has been multiplatform for a year, it still lacks support for reading & writing files. I’ve been thinking about what application developers need and what APIs we should build. But the more I consider it, the more I think, ‘fuck, filesystems are awful’. Files as UIComputing used…