mohd-faraz

_blogs

// blogs / 20260824.md

Dev Log: August 24 Wrap-up

2026-08-24
#frontend#android#performance#python

Overview

Today was a bit of a whirlwind, bouncing between high-level UI polish and some pretty deep-in-the-weeds PDF rendering logic. It felt like a 'housekeeping' day at first, but it quickly turned into a deep dive on data portability and performance.

What I Worked On

Optimization and the 'Final Polish'

I spent some time tightening up the portfolio site. I finally made the jump to WebP for the gallery assets. It’s one of those low-hanging fruits for web performance that I’d been putting off, but seeing the payload size drop while the quality stays sharp is always satisfying.

I also went on a hunt for those annoying placeholder links. You know the ones—where you click a social icon in the footer and it just scrolls you back to the top of the page? I started wiring those up to actual destinations. It’s a tiny change, but it’s the difference between a project feeling like a dev build and a finished product.

Refining the Expense Tracker

On the mobile side, I hit a milestone with the expense tracker by bumping it to v1.3.0. The big addition was a CSV export feature. Most users just want something they can throw into Excel for their accountants, so I had to make sure the export wasn't just a raw database dump.

One thing that tripped me up was handling special characters in transaction notes. If a user types a comma, it breaks the whole CSV structure. I ended up implementing some RFC 4180-style escaping to keep things robust:

/* 
 * Sanitizing user notes for CSV export. 
 * Quotes are doubled up to follow standard spreadsheet parsing rules.
 */
val sanitizedRow = listOf(
    entry.date,
    entry.categoryName,
    "\"${entry.note.replace("\"", "\"\"")}\"",
    entry.amount
).joinToString(",")

I also updated the spending graphs to show the 'net' amount. Seeing only what goes out is depressing; seeing the balance after a friend pays you back for dinner makes the data much more useful.

Wrestling with PDF Renderers

Finally, I spent some time on the PrintEngine. I added a new mapping configuration for GST invoices which was straightforward enough, but the real headache was the PDF font support.

I found out that the PDF library I’m using really dislikes how certain CSS rules and @font-face blocks are structured, especially on Windows paths with spaces. I had to write a small sanitizer to strip out the incompatible CSS before the engine tries to parse it. It’s a bit of a hack, but since the fonts are pre-registered elsewhere, it actually makes the rendering much more stable.

Wrapping Up

It wasn't a day of massive architectural shifts, but it felt productive to close out those 'final 10%' tasks that usually linger forever. Tomorrow I’m planning to look more into the data visualization side of the tracker, but for now, I’m just happy the footer links actually go somewhere.

Catch you later.