Posts
All posts I have written.
-
Database Indexing Pitfalls: The Boolean Flag Trap, We Should Know
Ever wonder why your database ignores a perfectly good index on a boolean column? This guide dives into one of the most common indexing 'gotchas', explaining the database cost model and why a full-table scan is sometimes the smartest choice.
-
What Happens When You Run ->get()? Reading PostgreSQL Execution Plans (Laravel + PostgreSQL Performance Part 2)
A practical walkthrough for Laravel devs on what PostgreSQL does after Eloquent sends a query: parse, plan, execute. Learn how to extract SQL, run EXPLAIN, and decode Seq Scan cost, rows, and width so you can spot missing indexes early.
-
Level Up Your Laravel Queries: Advanced Indexing with Index-Only and JSON
Go beyond basic indexes. This guide unlocks two pro-level Laravel performance techniques: creating ultra-fast Index-Only Queries to avoid table reads, and taming the beast of indexing JSON columns for efficient lookups.
-
Beyond Eloquent: Think Like a Database (Laravel + PostgreSQL Performance Part 1)
Eloquent is elegant, but every Laravel developer eventually hits performance walls caused by hidden SQL inefficiencies. This first part explains the mindset shift from imperative PHP to declarative SQL, exposes pitfalls like N+1 and the 'shopping list problem,' and gives a simple first habit: inspect the actual queries your code generates.
-
My Epic Saga with a Rogue Database: A Guide to the SQL Queries That Saved My Sanity (and My Job)
A hilarious and deeply practical, story-driven guide to mastering the SQL queries you actually need on the job. From updating multiple columns and joining tables to performing a dreaded PIVOT, this article covers the real-world challenges of taming a legacy database.
-
Navigating Common SQL Performance Traps: !=, NULL, LIKE, and GROUP BY
Dive into common but tricky SQL query patterns that silently kill performance. Learn how to optimize !=, IS NULL, LIKE, and GROUP BY clauses with the right indexing strategies for faster, more efficient applications.
-
The Ultimate JavaScript Handbook: From 'Undefined' Nightmares to Flawless Code (And Everything In Between)
A hilarious and deeply practical guide to mastering JavaScript's most common pain points. We dive into everything from safely removing elements from arrays and the truth about 'break' in forEach, to the eternal battle of null vs. undefined, flawless email validation, and the modern way to handle dates, unique IDs, and asynchronous waiting. This isn't your standard dry documentation; it's a battle-tested survival guide written by a human, for a human.
-
Unlocking Performance: A Pragmatic Guide to Laravel Database Indexing
Struggling with slow Eloquent queries? Database indexing doesn't have to be a black box. This guide translates deep database principles into practical, everyday Laravel techniques. Learn to craft efficient single and multi-column indexes with migrations, optimize your `where` and `orderBy` clauses, and debug performance issues like a pro to make your application fly.
-
My Git Commit Catastrophes: A Definitive Guide to Squash, Revert, and Undo Your Blunders
Dive into a hilarious and deeply practical guide to mastering Git's most powerful recovery commands. From undoing a local commit before you push to reverting live mistakes and squashing messy histories, this article turns real-world developer disasters into actionable lessons. Learn to handle any Git blunder with confidence.
-
My Epic Quest to Master PSQL: From 'Show Tables' to Dropping Everything (Accidentally, Of Course)
Dive into a hilarious and deeply practical journey of taming the PSQL command line. This guide takes you from the utter confusion of `psql show tables` to the god-like power of dropping everything (and how not to do it on production). Learn to install, connect, inspect tables, manage users, and master the essential commands that will turn PSQL from a mysterious beast into your most trusted database companion.