📝Today I Learned
10 posts
Show
- Gemini JSON Truncation, Font Scale Override in Compose, and Token Limits— Gemini was returning raw JSON as the answer because maxTokens=512 was cutting the response mid-object. Also learned how to lock font scale for a specific composable so data-viz labels don't break accessibility layouts.#today-i-learned#android#kotlin#compose#llm#gemini#ux2 min read
- OkHttp Blocking Calls Crash on Android Main Thread— My LLM validation was silently failing with 'network error' — not a network issue, not a wrong key. OkHttp's execute() is blocking, and I was calling it on the main thread.#today-i-learned#android#kotlin#coroutines#okhttp#llm2 min read
- Compose Box Z-Order, DB Trim Pattern, and Onboarding Layout Fixes— A fillMaxSize() column silently ate all touch events on a button beneath it — because in Compose Box, the last declared child is on top. Also learned the insert-then-trim pattern for bounding a Room table.#today-i-learned#android#kotlin#compose#room#ux2 min read
- API Key Validation UX in Android Settings— Added live validation feedback when users save an API key — spinner while checking, green/red result after. The hard part was making it unit-testable with Hilt.#today-i-learned#android#kotlin#hilt#testing#compose1 min read
- Testing Android MVVM Without Mocks— Wrote 38 JVM unit tests for an Android MVVM app. Skipped MockK entirely — in-memory fakes turned out to be cleaner.#today-i-learned#android#kotlin#testing#mvvm1 min read
- Setting Up an Android Side Project with AI Coding Assistant— Started scaffolding a new Android side project. The most useful thing wasn't the code — it was structuring context so the AI assistant stays consistent across sessions.#today-i-learned#android#side-project#ai-tools1 min read
- Stock Trading DP— Same base problem, three different constraints, three different approaches#today-i-learned#leetcode#algorithm1 min read
- Blog Setup + CI/CD with GitHub Actions— My shared hosting couldn't build Next.js — so I made GitHub do it instead.#ci-cd#github-actions#nextjs#deployment1 min read
- Sliding Window Problems— A few sliding window problems that taught me more than I expected.#leetcode#algorithm#sliding-window#hashmap1 min read
- Two Sum → Two Pointer → Three/Four Sum— Most people stop at HashMap. Here's why Two Pointer is worth knowing too.#leetcode#algorithm#two-pointer1 min read