Skip to content

Instantly share code, notes, and snippets.

@CharlesWiltgen
CharlesWiltgen / masonry-impl.md
Created April 16, 2026 17:06
Performant Masonry Layout in SwiftUI — Implementation (code + validation)

Performant Masonry Layout in SwiftUI — Implementation

Companion to the build plan. This document contains working Swift code, file-level organization, and the non-obvious engineering details that determine whether your masonry scrolls at 120Hz or stutters.

Targets iOS 17+. All samples compile under Swift 6.1 with strict concurrency checking.


File structure

@CharlesWiltgen
CharlesWiltgen / masonry-plan.md
Created April 16, 2026 17:00
Performant Masonry Layout in SwiftUI — Build Plan

Performant Masonry Layout in SwiftUI — Build Plan

A masonry layout arranges variable-height items in fixed-width columns, packing each new item into the currently-shortest column (Pinterest-style). SwiftUI has no built-in masonry, and the obvious implementations collapse under scale. This plan picks the right approach for your item count and lays out the build order.

Decision: which approach fits your data?

How many items can the feed hold at once?
├─ Bounded (<~300, e.g. a profile grid)
│ → Approach A: Layout protocol
@CharlesWiltgen
CharlesWiltgen / extended-hours-analysis.md
Last active March 19, 2026 02:52
Extended Hours Profitability Analysis — Liberty Lake (62111) & Francis (62137)

Extended Hours Profitability Analysis (Revised)

Two-store analysis of the 5am–11pm → 5am–1am schedule change. Focuses on the 2 added hours (11pm and midnight) and their net contribution after labor.

Analysis date: March 18, 2026 Data sources: TimescaleDB — store_pl_monthly, daily_store_metrics, transactions, transaction_lines


Francis (62137) — Extended Hours Analysis (5am-11pm → 5am-1am)

@CharlesWiltgen
CharlesWiltgen / grangeville-extended-hours.md
Created March 18, 2026 18:16
Grangeville (62221) Extended Hours Profitability Analysis

Extended Hours Profitability: Grangeville (62221)

Question: Did expanding store hours pay for themselves? Store: Grangeville (62221), Pacific Northwest Analysis Period: Jan 2024 – Dec 2025 (excl. Feb 6 – Apr 12, 2025 data gap) Split Point: July 2025 (highest employee cost month)


Phase 1: Employee Costs Trend

### Keybase proof
I hereby claim:
* I am CharlesWiltgen on github.
* I am charleswiltgen (https://keybase.io/charleswiltgen) on keybase.
* I have a public key whose fingerprint is 21DD 67BE B078 427D E9E2 F6AE 844E 1CF1 CA4F 55CA
To claim this, I am signing this object: