Advertisement · 728 × 90

Posts by Public Object

‘Humans use Energy and Water too’ An engineer I admire was lamenting about AI. He said that his new programming agent is excellent at fixing bugs! And all that it costs is a bunch of energy and many litres of water. He said that he could also have fixed those same bugs, and that he also
1 month ago 0 0 0 0
Keep Android Open Google is building a digital lock into Android. It's a very bad idea and I hate it. The excellent organizers at keepandroidopen.org encouraged me to complain to the Competition Bureau of Canada. What I sent wasn't well edited but it captures my anger. Please send your own! * * * I found
1 month ago 0 0 0 0
Flattening my Dependency Graph <p>Rounds has a Kotlin server that integrates a few things:</p><ul><li>PostgreSQL persistence via <a href="https://sqldelight.github.io/sqldelight/latest/">SQLDelight</a> (hosted on <a href="https://planetscale.com/">PlanetScale</a>!)</li><li><a href="https://github.com/webauthn4j/webauthn4j">WebAuthn4J</a> for Passkeys</li><li><a href="https://github.com/Kotlin/kotlinx.html">kotlinx.html</a> for dynamic web pages</li><li><a href="https://ktor.io/">Ktor</a> for HTTP binding</li></ul><p>The service uses six database tables. The business domain tables are <code>Game</code> and <code>GameEvent</code>. Support for auth, sessions, and collaborative</p>
2 months ago 0 0 0 0
Dynamic Tints with CSS and Kotlin/JS <p>I’ve been trying to build a <em>remarkable</em> UI for <a href="https://rounds.app">Rounds.app</a>. One feature that turned out quite well is tinting the game name &amp; menu bar icons when the winner changes.</p><p>In this recording you can see colors change when I toggle the win condition:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img class="kg-image" src="https://publicobject.com/content/images/2026/01/tints.gif" /><figcaption>The title color changes</figcaption></figure>
2 months ago 0 0 0 0
Don’t Block Suspend Functions Here’s a program that launches 3 jobs. The first runs forever and the other two exchange a value. @Test fun test() = runTest { val channel = Channel<String>() val deferredA = async { while (isActive) { delay(1_000) } } val deferredB = async { channel.send("hello") } val deferredC = async { channel.receive() } deferredB.await(
2 months ago 0 0 0 0
Rounds.app In 2012, I published an Android score pad app named Rounds to the Play Store. I was quite proud of it! It used an iPod click wheel-style score entry UI and balanced capability with simplicity. Rounds’ animated action bar in 2012 I joined Square, did a bunch of open source,
3 months ago 0 0 0 0
Inside Burst’s Test Interceptors I recently posted on the Cash Code Blog announcing Burst’s new test interceptors feature. They are similar to JUnit rules in API and capability. ### A Small API A typical use case is connecting some lifecycle to a test’s execution. Perhaps we want a chess engine to be available
7 months ago 0 0 0 0
Advertisement
UIViewPropertyAnimator is Too Cute I was using the old `UIView` APIs when I found some code that broke my brain. Here’s Swift code to animates a `UIButton` from opaque to transparent over one second. let button = ... let animateOut = UIViewPropertyAnimator(duration: 1.0, curve: .easeInOut) { print("2 alpha=\(button.alpha)") button.alpha = 0.0
1 year ago 0 0 0 0
Try Something Simpler The late Joe Armstrong had a great rule for error handling that stuck with me. > ‘If you can’t do what you want to do try to do something simpler’ I was thinking about this recently. I was writing code to embed resource files in an iOS application binary. Here’
1 year ago 0 0 0 0
Testing safe area insets on iOS I’m adding edge-to-edge UI support in Redwood. My code asks the host platform how much of the screen is consumed by system bars and notches and things, and it returns us a measurement like ‘40 pixels at the top + 10 pixels at the bottom’. The iOS code to handle
1 year ago 0 0 0 0
Bad Luck Tickets My son’s swim meet is coming up. If he’s healthy, he’ll compete. My daughter’s hockey team has a game coming up. League rules say they must forfeit if they have fewer than 10 players. There’s only 10 girls on the roster so they need everyone
1 year ago 0 0 0 0
Writing For Me I’ve been posting on this website throughout my career. Many posts are motivated by my own suffering! These go like this: 1. I learned a thing. 2. The hard way. 3. It sucked. 4. Please avoid making the same mistake. In other posts, there’s a discussion on something and I feel compelled
1 year ago 0 0 0 0
‘It Needs Documentation’ I’ve seen bug reports and Slack conversations that start like this: > @blacktshirt1981: > ‘I tried to use your library to decode the integer 1 to a boolean and it crashed. Please document that your library doesn’t decode integers to booleans.’ I probe a bit in my response: > _@jessewilson:_ > ‘Oh
1 year ago 0 0 0 0
I Want a Fast Whitespace Fixer A couple of us are grumpy that putting robots in charge of code formatting is too slow & too clumsy. Jake Wharton reminded us that ranting isn’t as useful as participating, and challenged us to work on fixes. Lemme start with my ideal: 1. IntelliJ, Android Studio, and a command-line
1 year ago 0 0 0 0
Jesse’s Presentations This is a running archive of my technical presentations. I’ve also posted about my process, and I also follow Jake’s advice on conference talks. # 2024 GC You Later, Allocator # 2022 Nerding Out on Okio Dynamic Code With Zipline # 2019 JSON Explained HTTP in a Hostile World # 2018 Ok
1 year ago 0 0 0 0
GC You Later, Allocator I presented this at Droidcon NYC on September 19, 2024. Available as code, video, slides, Droidtube, & Speaker Deck. * * * * * * Memory management on Android is easy: the garbage collector does almost everything and LeakCanary handles the rest! But Kotlin/Multiplatform brings new challenges. Your new features could be blocked if Kotlin/
1 year ago 0 0 0 0
Identifiers aren’t Services _Originally published on May 23, 2024 infun code()._ The programs I write frequently involve strings that identify things: email addresses, file paths, URLs, time zones... even credit card numbers and drivers’ license numbers. For many years I followed the patterns of the Java standard library when creating my own
1 year ago 0 0 0 0
Advertisement
Get a Version Name for a Commit In some of the projects I work on, we publish an artifact for every build on the main branch. We don’t want to give these nice semver names like `1.5.0` because that’s too much work! Instead we just wanna generate a version name based on the
1 year ago 0 0 0 0
Pair More I pair program a lot and it makes me happy. Here’s some thoughts on pair programming... ### Tuple is Amazing I’ve tried pairing with Copilot, Screenhero, Drovio, Zoom, macOS Screen Sharing, and Code With Me. Tuple is my favorite of these. ### Not Just Programming I use pairing software for
1 year ago 0 0 0 0
Open Source & Zelda People do open source for lots of reasons. One reason that I do open source is because I enjoy it... Recently I had fun connecting Okio to zlib. It even had fun side quests: * I learned about zlib, info-zip, PKZip, and how they relate. Sometimes a project’s logo tells
2 years ago 0 0 0 0
Decisions, Deciders, and Executors Most of the software I write exists to automate a process. It might automate a high-level workflow like peer-to-peer money transfers, or a low-level implementation detail like encoding an HTTP request as bytes. I’ve learned that my code is healthier when it’s strictly divided into value objects, service
2 years ago 0 0 0 0