Thursday, July 2, 2026

css

 Love this question — and let me first name what "this" actually was, because the roadmap follows from it. What happened in the CSS today was three separate skills:

  1. A mental model of layout algorithms — knowing stretch exists, that height opts out of it, that content drives size when nothing else does.
  2. Debugging discipline — predicting from code, and switching to measurement the moment reality disagreed twice.
  3. Defensive intent-writing — replacing coincidences with declared rules (min-height + align-items: stretch).

Most people try to learn CSS as "1000 properties." That fails. You learn it as a handful of layout algorithms + a measurement habit. Here's the sequence I'd give a younger me:

Phase 1 — Mental models (2–3 weeks, free)

  • web.dev "Learn CSS" — Google's free course. Do the box model, cascade, and sizing units modules first.
  • Josh Comeau's free interactive articles — start with "An Interactive Guide to Flexbox." This one article would have let you diagnose today's bug yourself. Then "Rules of Margin Collapse."
  • Drill games: Flexbox Froggy and Grid Garden (30 min each, genuinely useful muscle memory).

Self-test for this phase: pick any element on a page and answer "why is this exactly this tall?" If you can't trace it to content, constraint, or stretch — keep going.

Phase 2 — The measurement habit (1 week, free, highest ROI)

This is what separated guessing from knowing today:

  • Learn the DevTools Computed tab (what actually applied, not what you wrote) and the flex/grid inspector badges (click the flex badge next to an element — it draws the stretch behavior on screen).
  • Adopt the rule we lived today: one failed prediction = re-read the code; two = stop and measure. Never three guesses.

Phase 3 — The book (1–2 months, worth paying for)

  • 📘 CSS in Depth (2nd ed.) — Keith J. Grant. The book for what you asked. It teaches cascade, box model, flexbox, and grid as systems with reasons, not recipes. This is the CSS equivalent of the Fowler recommendation I gave you for the backend.
  • If you prefer interactive over books: Josh Comeau's "CSS for JavaScript Developers" course — built exactly for React devs like you. Pick one of these two, not both.

Phase 4 — Defensive CSS (this maps 1:1 to today)

  • 🎯 "Defensive CSS" — Ahmad Shadeed (defensivecss.dev, plus his blog ishadeed.com). This resource is literally about today's bug class: layouts that break when content changes — long names, empty states, loaders. Every tip is "what enforces this when the content misbehaves?" If you read only one thing from this whole list, make it this.
  • Every Layout (Pickering & Bell) — teaches layouts as reusable algorithms that declare intent, the philosophical home of our align-items: stretch fix.

Phase 5 — The design eye (ongoing)

  • Refactoring UI (Wathan & Schoger) — short, visual, teaches you why the uneven cards looked wrong before you could articulate it. You spotted the unevenness instantly today; this book sharpens that instinct into vocabulary.

Practice ground: your own codebase

Best exercises are free and sitting in your repo:

  • Grep the CQ/Agents SCSS for other fixed height: values — each one is a potential "today's bug" waiting for a content change. Ask of each: rule or coincidence?
  • Notice the codebase already uses BEM-ish naming (top-agent-card__stat-value) — Phase 3 will teach you why that convention exists.

That's it — deliberately short. One course, one book, one defensive-CSS site, one habit. The habit (Phase 2) is the one you already started building today; the rest just gives it vocabulary and speed.


Prompt tip

This is the defining struggle for developers right now. You are absolutely not alone in this. What you're experiencing is essentially cognitive muscle atrophy, and it perfectly explains why you feel like you're losing your sharpness.

Here is exactly what is happening: Memory and deep understanding require "desirable difficulty."

When you used to do the R&D manually, you were forced to trace the execution, read the source code, hit dead ends, and piece together the mental model of the module from first principles. That friction is what told your brain, "This is important, store it."

Now, Claude is doing the friction part. You are getting the dopamine hit of the solution without the cognitive workout of the process. You are essentially acting as a manager reviewing a junior developer's PR. You know it works, but you don't deeply know how it works, so when someone asks you about the module a month later, your mind draws a blank.

If you want to stay sharp, curious, and keep your edge in software architecture and system design, you don't have to stop using AI—you just have to change how you manage it. You need to switch from AI as an oracle to AI as a Socratic tutor.

Here is how you fix this without losing your productivity:

1. The "First Principles" Prompting Rule

When you encounter a bug or need a feature, do not just paste the error and say, "Fix this." That bypasses your brain entirely.

Instead, force Claude to explain the underlying mechanics before giving you the code.

  • Change your prompt to: "I have this issue. Walk me through the root cause from first principles. What design pattern or underlying .NET mechanism is failing here? Explain it to me, but do NOT write the final code yet."

  • Why it works: This forces you to read and understand the architecture and the why before you get the free answer.

2. The 5-Minute Manual Trace (The Micro-Task for Work)

Before you even open Claude, give yourself a strict, timer-bound 5 minutes to manually investigate the codebase.

  • Action: Open the module. Trace the stack trace yourself. Find the exact file and method where things are breaking. Form a hypothesis.

  • Then use AI: "I looked at PaymentService.cs and I think the adapter pattern implementation is failing to map this DTO. Here is the code. Am I on the right track?"

  • Why it works: You are building the mental map of the module first. When Claude gives you the fix, it will attach to a mental map you already created, rather than floating in a void.

3. The "You Write the Comments" Rule

If Claude writes a complex block of code and you paste it into your project, you must pay a "cognitive tax" before committing it.

  • Action: You must manually type out summary comments above the method or inline comments explaining exactly what the logic is doing and why it was done this way.

  • Why it works: If you can't explain it in plain English in a comment, you don't understand it well enough to merge it. Translating code into your own words forces retention.

4. Elevate Your Role to Architect

As a senior developer, your primary value isn't typing out boilerplate C#—it's system design, clean architecture, and ensuring the modules communicate correctly.

  • Let Claude be the fast typist who writes the implementation details of a specific method.

  • Your job is to design the interface, decide which design pattern to use, and review the performance implications. When you review Claude's code, review it aggressively. Ask yourself: "Is this performant? Does this violate our dependency injection setup?"

You don't need to go back to the dark ages of manually typing every character. But you do need to re-inject a small amount of intentional friction back into your day so your brain stays engaged.

For your very next task today, try just the 5-Minute Manual Trace. Don't ask Claude until you've stared at the actual module yourself for 300 seconds. Deal?