The Midwit Curve of Web Dev: Use What You Know, Ship Faster

2025-09-29
frontend+5

TL;DR

  • I learned modern web dev faster by sticking to my native stack: Python → FastHTML + HTMX + Tailwind.
  • React and FastHTML both output HTML; the big difference is interactivity (React runtime vs. HTMX attribute-driven requests).
  • After grokking web via Python, React/other stacks made way more sense. This post is about development speed, not production latency.

The midwit moment

I tried to learn web the “proper” way—React, app router, state libs, bundlers. Progress was slow and my site didn’t ship. Swapping to a Python-first stack (FastHTML + HTMX + Tailwind) clicked instantly: fewer moving parts, faster feedback loops, real pages online. Moral: use what you know; ship something true; iterate in public.

What I built (fast)

  • Personal site with blog, mobile-friendly nav, and project pages
  • OG metadata generator for shareable cards (the midwit visual is my OG image)
  • Sitemap + sensible SEO defaults Result: shipped in weeks, not months. Compared to a React/Next attempt, lines of code dropped ~80% (I gave up counting tokens 😅).

Why FastHTML + HTMX + Tailwind Worked for me

  • FastHTML: Python-first views that produce HTML. Think “just send good HTML.”
  • Tailwind: same utility-first styling I’d use anywhere.
  • HTMX: progressive interactivity—send/receive HTML fragments via attributes like hx-get, hx-post, hx-swap.

Same goal as React (render UI, handle interactions). Different bet: let the server render and return snippets; let the browser swap them in.

<!-- HTML (button updates a hidden count div) -->
<button
  hx-get="/count"
  hx-target="#count"
  hx-swap="outerHTML"
>
  Increment
</button>

<div id="count" hidden>0</div>
# Python route (returns a tiny HTML fragment)
def get_count(request):
    n = int(request.cookies.get("n", 0)) + 1
    html = f'<div id="count" {"hidden" if n==0 else ""}>{n}</div>'
    response = HTMLResponse(html)
    response.set_cookie("n", str(n))
    return response

With React I was learning the ecosystem and the browser and the framework’s mental model. With FastHTML/HTMX, I learned the web first—HTML, forms, caching, partials—and the rest clicked.

“Isn’t React More Powerful?”

For complex client state (rich editors, heavy offline, multi-user collab), React (or similar) still wins. If you started with React, keep going. If you’re a backend/ML person trying to ship a real site quickly, starting with HTMX gives a clean slope: HTML/CSS → sprinkle HTMX → level up later. After that, React’s ideas (components, state, routing) are easier to reason about.

My Learning Boosters

  • Design practice: I prototyped with a YC batchmates’ generator (Mocha — getmocha.com), similar to lovable.dev. It sped up layout choices and let me focus on content and flow.
  • One stack: Python everywhere (rendering, routes, small utilities). Fewer context switches, faster loops.
  • Tiny assets: one OG card style, one code snippet per post, one diagram max.

Practical Notes

  • Deployment: VPS behind Cloudflare (DNS). Add caching headers, enable TLS, and do the usual VPS hygiene (firewall, updates, fail2ban).
  • Interactivity wins: HTMX attributes with hx-trigger="keyup changed delay:300ms" made search and small UI updates painless. Hidden→visible element updates kept DOM churn low.
  • SEO: server-rendered pages, clean slugs, sitemap.xml, basic JSON-LD.

React vs. HTMX at a Glance

Aspect React / SPA-ish FastHTML + HTMX
Output HTML via client/runtime HTML from server
State Client state + hooks/store Mostly server state; minimal client state
Interactivity Components, VDOM, effects hx-* attributes + partial swaps
Tooling Router, bundler, TS, RSC, etc. Python routes + templates
When I'd use it Complex client logic, offline, collab Content-first sites, dashboards, CRUD

Disclaimer: This post is about development/shipping speed, not production latency. You can build fast apps in both worlds; architecture, caching, and infra matter more than the framework logo.

48-Hour Starter (Steal This)

  1. Scaffold: routes, base layout, Tailwind.
  2. Content: Markdown for posts; YAML for stack/library.
  3. Interactivity: HTMX for search/filter and “load more.”
  4. Meta: OG image generator, sitemap, JSON-LD.
  5. Deploy: VPS + Cloudflare; set cache headers and HSTS.

Closing

Learning web with a Python-first stack gave me velocity and, unexpectedly, a better mental model for every other stack. If you’re an ML/back-end person feeling blocked, try the HTML-first path, ship something small, and let curiosity pull you forward.


What made frontend finally click for you? Was it a specific framework, a project, or just finding the right mental model? Feel free to reach out on Twitter or GitHub.