Posts

A New Collection of Thoughtful Learning Apps — Now Available on iOS & Android

Image
I’m excited to share a set of mobile apps I’ve recently completed and published on both the Google Play Store and the Apple App Store. These apps are designed with a simple goal in mind: to make meaningful, structured content more accessible, whether you’re studying theology or improving your English vocabulary. 📱 Now Available on Both Platforms All apps are live and available for download: Google Play Developer Page: https://play.google.com/store/apps/dev?id=5835943159853189043 Apple App Store Developer Page: https://apps.apple.com/ca/developer/q-z-l-corp/id1888794100 📖 Theology & Confession Study Apps For those interested in Reformed theology and classical Christian teachings, I’ve developed a series of apps that present foundational texts in a clean, focused reading format: The Belgic Confession Canons of Dort Heidelberg Catechism Westminster Shorter Catechism Each app is designed to provide a distraction-free experience, making it easier to read, reflect, and revisit these im...

ParallelStream vs Virtual Threads in Java 21: What Actually Works for Database Workloads

Image
ParallelStream vs Virtual Threads in Java 21: What Actually Works for Database Workloads Java offers multiple ways to parallelize work, but not all concurrency models are suitable for database-heavy workloads. In modern systems, especially with large batch processing (e.g., 10,000–50,000 IDs), choosing the right model can drastically change performance. This article compares ParallelStream and Virtual Threads (Java 21) using a real-world scenario: batch database queries in Oracle. 🧠 The Problem: Large Batch Database Queries A common backend scenario is fetching data using large ID lists: Example: - 40,000 transaction IDs - Chunked into 1,000 per query - ~40 database queries executed The key question becomes: how do we execute these 40 queries efficiently? ⚙️ Approach 1: ParallelStream IntStream.range(0, batchCount) .parallel() .mapToObj(i -> repository.query(batch)) How it works Uses ForkJoin common pool Thread count ≈ number of CP...

How to Optimize a Slow JPA Query Processing 40K+ IDs (Real Performance Tuning Guide)

Image
How to Optimize a Slow JPA Query Processing 40K+ IDs (Real Performance Tuning Guide) Handling large datasets efficiently is one of the most common challenges in backend engineering. In this post, I’ll walk through how a query processing 40,000+ IDs went from ~24 seconds down to a few seconds using practical optimization techniques. All domain-specific details have been intentionally removed to focus purely on reusable engineering patterns. 📉 The Problem A service fetches data using a JPA query with a large IN clause and joins between tables: SELECT new SomeDto( A.primaryId, A.field1, A.field2, B.field3, C.metric1, C.metric2 ) FROM EntityA A LEFT JOIN A.relatedEntity B LEFT JOIN EntityC C ON C.refId = A.primaryId WHERE A.primaryId IN :ids Even with chunking (~900 IDs per query), total execution time was around 24 seconds . 🚨 Root Causes Unoptimized JOIN conditions Missing database indexes Sequential query execution ORM (JPA) over...

How We Made a Spring Boot Pagination Query 36× Faster (1.8 Minutes → 3 Seconds)

Image
How We Optimized a Spring Boot Pagination Query by 36× (From 1.8 Minutes to 3 Seconds) In high-traffic backend systems, slow database queries are often the hidden bottleneck that quietly kills performance. In our case, a paginated query powering a reporting API was taking 1.8 minutes to respond under load. After optimization, we reduced it to ~3 seconds . 36× faster ~97.2% less execution time ~3500% performance improvement Here’s how we did it — and the key lessons you can apply immediately. 🧱 The Problem: Slow Pagination Query We had a Spring Data JPA query backing a paginated API. It involved multiple filters, joins, and was returning a large dataset. Original issues: Full entity loading Heavy object graph hydration Unnecessary columns fetched Inefficient filtering logic Expensive pagination count The database schema (simplified and anonymized) looked like this: TABLE txn_line ( line_id BIGINT, order_id BIGINT, product_code ...

Sprint Design Notes: LDAP (OUD vs AD) and SQL Lookup Optimization

Image
Sprint Design Notes: LDAP (OUD vs AD) and SQL Lookup Optimization Today was a light but productive design session focused on aligning the team on upcoming sprint stories. While the implementation itself is not overly complex, the discussion surfaced two important architectural considerations: How we handle large identifier lookups in SQL queries How we manage LDAP-based authentication and group access control (OUD vs AD) This post documents both topics for future reference and knowledge sharing. SQL Lookup Design: Handling Large Identifier Lists One of the stories requires supporting lookup by identifier list, where the input may contain a comma-separated list of values. The Problem Directly passing a large list of identifiers into SQL introduces several risks: SQL query length limitations (database dependent) Overly large IN (...) clauses Performance degradation on large parameter sets SELECT * FROM orders WHERE identifier IN (...very long list...

Three More Real-World Auto-Fill Bugs We Found While Building a Chrome Extension

Image
  Three More Real-World Auto-Fill Bugs We Found While Building a Chrome Extension Yesterday we fixed an issue where our auto-fill engine was targeting invisible input elements instead of the actual visible fields. After deploying that fix, we continued testing across multiple vendor websites and discovered three additional issues. None of them were particularly complicated, but all three caused auto-fill failures in real-world scenarios. This is a good reminder that browser automation is often less about complex algorithms and more about handling the countless variations of web forms. Background We are building a Chrome extension that automatically fills customer information such as: First Name Last Name Email Address Phone Number Address Province Postal Code The extension works across multiple vendor websites, each built with different technologies and UI frameworks. During testing, we discovered the following issues. Issue #1: document.querySelector Only Returns the First Match I...

Why My Chrome Extension Filled Input Values but Nothing Appeared on Screen

Image
Extension auto-fill works on most vendor sites, but fails on Angular-based page (ng-pristine vs ng-dirty issue) Problem Background We are building a browser extension that auto-fills customer information (first name, last name, email, phone number, address, etc.) into different vendor websites. Each vendor site has different page structures, and our content script is responsible for detecting input fields and filling data automatically. Issue Symptom Most vendor sites work correctly. However, on one specific vendor site, auto-fill does not work: Our logs show values are being filled No visible changes appear in the UI Input fields remain empty from user perspective Filling input: firstName = John Filling input: email = test@example.com But UI still shows no updated values. Environment Extension: Chrome Extension (content script) Language: JavaScript Target site: Vendor web application Framework (discovered later): Angular Debugging Process W...

2026 June 14th - Afternoon Sermon Reflection:The Boldness of the Gospel in Acts 4

Image
The Boldness of the Gospel in Acts 4 A personal reflection on the message of Peter and John before the religious leaders, the healing at the Temple gate, and the unstoppable advance of the Gospel. Introduction: When the Gospel Disrupts the World The message in Acts 4 captures a moment of intense tension: a miraculous healing has just taken place, and the public response is growing rapidly. A once-lame man is now walking, leaping, and praising God. But instead of joy alone, the event triggers opposition, confusion, and confrontation. What stands out is not only the miracle itself, but the “fallout” it produces—spiritual, social, and political. The Gospel of Jesus Christ does not remain private or neutral; it enters public space and forces a response. The Miracle and Its Meaning The healing at the Beautiful Gate is more than compassion—it is a visible sign that the risen Christ is alive...