_blogs
// blogs / 20260818.md
// blogs / 20260818.md
Dev Log: August 18 Wrap-up
Overview
Today was a mix of deep-diving into some messy Regex patterns and adding those small UI touches that make an app feel finished. It's funny how a single missing character in a search pattern can make the app think you're a billionaire overnight.
What I Worked On
The "15,000 Crore" Problem
I ran into a really specific bug in the SMS parser where some financial newsletters were triggering false credit alerts. In India, it's common to see "cr" used as shorthand for "crore" (ten million) in news headlines. My parser was looking for cr to identify a credit transaction, so a headline about a "15,000 cr order" was being picked up as a massive deposit.
I realized that while banks often use abbreviations like Cr. or Dr., they almost always include the period. By making the trailing period mandatory in my Regex patterns, I managed to filter out the noise from news alerts without breaking the actual transaction detection. It's a tiny change that saved my data integrity from total chaos.
// Before: the period was optional, which caused false positives
// val CR_PATTERN = "\\bcr\\b\\.?"
// After: enforcing the period to distinguish from news shorthand
val CR_PATTERN = "\\bcr\\."
val DR_PATTERN = "\\bdr\\."
Making Charts Interactive
I spent some time making the data visualizations more useful. Static charts are fine for a glance, but I wanted to be able to actually see the numbers behind the bars. I added tap gestures to the spend trend graph and the category donut chart.
Now, when you tap a bar, it highlights that specific day and shows the exact total. It sounds simple, but getting the hit detection right on a custom-drawn Canvas in Compose always takes a bit of coordinate math that I usually have to look up twice.
Privacy in Plain Sight
Since this app handles sensitive financial data, I finally added a feature to hide the app's content from the Android "Recents" screen. It’s a bit jarring to see your bank balance in full view when you're just switching apps in public. I also blocked screenshots on the transaction prompt screens.
Note to self: Always treat user data like it's your own. If I wouldn't want my balance visible to the person standing behind me in line, the app shouldn't show it by default.
Wrapping Up
It feels good to have the parsing logic sharpened up. Tomorrow I think I'll pivot back to some of the reporting features—maybe look at generating some monthly summaries now that the data is cleaner.