_blogs
// blogs / 20260828.md
// blogs / 20260828.md
Dev Log: August 28 Wrap-up
Overview
I spent way too much time today arguing with regex. Most of my energy went into fixing a logic bug in my expense tracker's SMS parser that has been quietly making a mess of my data. It’s one of those things that seems simple until you actually look at how inconsistently banks format their alerts.
What I Worked On
Solving the "Phantom Credit" Problem
For a while now, I’ve noticed that my ExpenseTracker app would occasionally flag a credit card purchase as income. After digging into the logs, I realized my parser was being too naive. Banks love to send messages like "Credit Card txn of Rs.500.00 at AMAZON". Because the word "credit" was in there, my old regex was happily marking it as an inflow.
I had to rethink the hierarchy of how I identify transaction directions. I split the keywords into "strong" outflows and more specific inflow signals. Basically, I removed the bare word "credit" from the inflow list entirely. Now, the parser only looks for "credited," which actually implies a change in balance, rather than just the name of the payment instrument.
// Identifying transaction direction without false positives
// "Credit Card" is an instrument, but "credited" is an action.
private val STRONG_DEBIT_PATTERN = Pattern.compile(
"\\b(?:debited|spent|paid|sent|deducted|withdrawn|purchase)\\b",
Pattern.CASE_INSENSITIVE
)
private val CREDIT_SIGNAL_PATTERN = Pattern.compile(
"\\b(?:credited|received|deposited|refunded|cashback)\\b",
Pattern.CASE_INSENSITIVE
)
It’s a small change, but it makes the auto-categorization feel so much more reliable. No more manual corrections every time I buy a coffee with my credit card.
Cleaning House
Aside from the parser fix, I've been doing some general maintenance. After the heavy lifting I did earlier this week—like migrating the database compiler to ksp and fixing that annoying UI persistence issue with the AI widget—today felt like a good day to just push out the fixes and let the system breathe. I also merged the last few days of logs into the portfolio main branch. It's satisfying to see a streak of consistent updates, even if some of them are just "under the hood" refinements.
Wrapping Up
Working on personal projects after a full day of work can be draining, but fixing that SMS parser felt like a weight off my shoulders. It's the difference between an app that's "almost" right and one you can actually trust. Tomorrow, I might take a break from the logic and look at some more UI polish, or maybe finally start playing with those ML Kit features I integrated earlier.
Catch you in the next one.