API Design as an Art
summary
AutoDispose is an RxJava2 utility for automatic stream disposal built and rewritten about six times to solve real Java pains: leaking disposables, generics erasure, and IDE autocomplete. Iterations move from disposable extensions and builder-heavy observers to a compose-style converter that returns a subscribe-proxy, landing at a V5 that shortens client code and respects Rx subscribe signatures. Work includes a month-and-a-half incubation, an IntelliJ autocomplete fix (Oct 4), and a focus on scope binding and IDE ergonomics that proves effective in practice.
AI-written summary · about
chapters (15)
- 0:00Introduction and background
- 3:10What makes an API bad
- 5:14What makes an API good
- 8:04Case study: Autodispose library
- 11:16First API iteration and flaws
- 14:20V1: Bound observer builder
- 17:49V2: Simplifying the API
- 19:19V3: Making scope explicit
- 20:22Fixing generic type inference
- 23:01Reducing ceremony in Java 7
- 24:02V4: Using to operator
- 27:12V5: Explicit subscribe proxy
- 28:35Final tweaks and IDE fixes
- 31:06Key learnings from API design
- 37:26Q&A and backward compatibility








