Edge cases are where true delight lives

11/18/2025

TLDR: Edge cases reveal system design flaws. A redundant database policy blocked anonymous QR code access at an event, teaching me that SQL literacy = debugging power in the AI era.

Edge cases = where true delight lives

SQL literacy = AI debugging superpowers and that means the more we know how to read it…the more agency we have in the next era of creating delightful experiences.

Here’s an example of a real scenario in the events world in software that is basic enough to understand the power of simplicity:

I am an event operator marketing my latest concert. We’re using QR-barcodes for marketing the event URL, registering/checking-in as an attendee, and scanning in attendees at the event. I download and print the QR codes for marketing purposes. I send mass emails to the waitlist & my email list with the QR code. I then go to scan the code to test it…oh no…you have to login to get access? Blocked from registering?

The problem? There was a redundant (or missing) policy when accessing the database.

Before:
SELECT from events WHERE id = 'xyz'
├─ Policy 1: "Anyone can view events" → true ✅
└─ Policy 2: "Users can view own events" → auth.uid() = user_id → NULL = uuid → ❌ FAIL

Result: Query blocked

After:
SELECT from events WHERE id = 'xyz'
└─ Policy 1: "Anyone can view events" → true ✅

Result: Query succeeds

When there are issues that arise in software, it's easy to panic but oftentimes it's something small that can turn deadly if not found fast enough.

The fix? Delete the redundant policy. Five minutes to find, one line to fix, hours of potential disaster avoided. Edge cases aren't bugs, they're where your users actually live. The fake event sold out. ;)

Back to Blog