DEV Community

Dakota Huang profile picture

Dakota Huang

Building things with Python, Go, and JavaScript. Love automating everything.

Location Seattle, WA Joined Joined on 
From Characterization Tests to Minimal Safe Refactors: A Free-Resource Workflow

From Characterization Tests to Minimal Safe Refactors: A Free-Resource Workflow

Comments
3 min read
Characterize, Minify, Refactor: A Safe Path Through a Messy Codebase

Characterize, Minify, Refactor: A Safe Path Through a Messy Codebase

Comments
4 min read
You're the Reviewer Now. Who Reviews Your Verdict?

You're the Reviewer Now. Who Reviews Your Verdict?

Comments
3 min read
The Smallest Safe Change: Capture Behavior, Refactor, Ship

The Smallest Safe Change: Capture Behavior, Refactor, Ship

Comments
4 min read
Characterization Tests Need a Home: Run Them on a Free Server

Characterization Tests Need a Home: Run Them on a Free Server

Comments
3 min read
Real API Traffic Is Your Missing Test Data: A Free-Server Capture Workflow

Real API Traffic Is Your Missing Test Data: A Free-Server Capture Workflow

Comments
6 min read
Your AI Refactor Looks Right: Verify It With a Behavior Fingerprint

Your AI Refactor Looks Right: Verify It With a Behavior Fingerprint

Comments
4 min read
Characterization-First Refactoring: Lock the Mess, Then Fix It

Characterization-First Refactoring: Lock the Mess, Then Fix It

Comments
4 min read
Diff the AI's Test Draft Before You Adopt It

Diff the AI's Test Draft Before You Adopt It

Comments
5 min read
The AI Wrote the Diff. The Tests Wrote the Verdict.

The AI Wrote the Diff. The Tests Wrote the Verdict.

Comments
4 min read
A Refactor Without a Baseline Is a Trust Fall

A Refactor Without a Baseline Is a Trust Fall

Comments
3 min read
The Change Budget: A Decision Table for Messy Repo Refactors

The Change Budget: A Decision Table for Messy Repo Refactors

Comments
4 min read
Differential Testing Is the Proof Your Extraction Is Missing

Differential Testing Is the Proof Your Extraction Is Missing

Comments
5 min read
The Golden-File Refactor Loop: Record, Verify, Move, Commit

The Golden-File Refactor Loop: Record, Verify, Move, Commit

Comments
5 min read
A Golden File Is Not a Test: The Byte-Level Refactor Safety Net

A Golden File Is Not a Test: The Byte-Level Refactor Safety Net

Comments
5 min read
The Move-Only Contract: A Three-Step Refactor for a Messy Module

The Move-Only Contract: A Three-Step Refactor for a Messy Module

Comments
5 min read
Freeze First, Refactor Second: Snapshotting a Messy Order Function

Freeze First, Refactor Second: Snapshotting a Messy Order Function

Comments
5 min read
The Smallest Safe Change: Characterize the Mess, Then Extract the Seam

The Smallest Safe Change: Characterize the Mess, Then Extract the Seam

Comments
4 min read
The Diff Budget: Four Checks Before Merging an AI-Generated Refactor

The Diff Budget: Four Checks Before Merging an AI-Generated Refactor

Comments
4 min read
A Refactor Is Two Commits: Lock the Behavior, Then Edit the Body

A Refactor Is Two Commits: Lock the Behavior, Then Edit the Body

Comments
4 min read
The Reviewer Is the Untested Component: A Three-Layer Gate for AI Refactors

The Reviewer Is the Untested Component: A Three-Layer Gate for AI Refactors

Comments
5 min read
Fan-In Is the Refactor Safety Signal You're Ignoring

Fan-In Is the Refactor Safety Signal You're Ignoring

Comments 1
5 min read
Characterize Before You Review: A 30-Minute Loop for AI Patches

Characterize Before You Review: A 30-Minute Loop for AI Patches

Comments
5 min read
Intentional Drift: Updating Characterization Tests When the Refactor Fixes a Bug

Intentional Drift: Updating Characterization Tests When the Refactor Fixes a Bug

Comments
4 min read
The Refactor Ledger: Make Every Small Change Prove Itself

The Refactor Ledger: Make Every Small Change Prove Itself

Comments
4 min read
Don't Characterize the Whole Messy Repo: Triage Files by Churn, Complexity, and Risk First

Don't Characterize the Whole Messy Repo: Triage Files by Churn, Complexity, and Risk First

Comments
4 min read
The Fault That Breaks the Fewest Tests Is Your First Extraction

The Fault That Breaks the Fewest Tests Is Your First Extraction

Comments
5 min read
The Behavior Fingerprint: One Command That Gates Every Legacy Refactor

The Behavior Fingerprint: One Command That Gates Every Legacy Refactor

Comments
4 min read
Dead Probes Pass: Mutation-Check Your Characterization Tests Before You Refactor

Dead Probes Pass: Mutation-Check Your Characterization Tests Before You Refactor

Comments
5 min read
The Smallest Safe Change Is a Measured Property

The Smallest Safe Change Is a Measured Property

Comments
5 min read
Golden Master First: Let a Free Model Draft the Probes, Then Refactor Small

Golden Master First: Let a Free Model Draft the Probes, Then Refactor Small

Comments
4 min read
One Change, One Verify: Snapshot-Driven Refactoring for Legacy Code

One Change, One Verify: Snapshot-Driven Refactoring for Legacy Code

Comments
4 min read
A Characterization Suite That Never Caught a Bug Won't Protect Your Refactor

A Characterization Suite That Never Caught a Bug Won't Protect Your Refactor

Comments
3 min read
Set a Diff Budget Before You Let AI Refactor Your Messy Repo

Set a Diff Budget Before You Let AI Refactor Your Messy Repo

Comments
4 min read
Characterize First, Refactor Second: A Safe Workflow for Messy Repos

Characterize First, Refactor Second: A Safe Workflow for Messy Repos

Comments
4 min read
Measure Every Token: A SQLite-Backed Call Tracker for Free Model Endpoints

Measure Every Token: A SQLite-Backed Call Tracker for Free Model Endpoints

Comments
4 min read
Log the Decision, Not Just the Response

Log the Decision, Not Just the Response

Comments
5 min read
Seed a Bug, Score the Review: A Contract Test for AI Code Reviewers

Seed a Bug, Score the Review: A Contract Test for AI Code Reviewers

Comments
4 min read
Five Probes to Check Whether Your Free Model Endpoint Leaks or Obeys Strangers

Five Probes to Check Whether Your Free Model Endpoint Leaks or Obeys Strangers

Comments
4 min read
Inject Five Failures Before You Trust a Free Model Endpoint

Inject Five Failures Before You Trust a Free Model Endpoint

Comments
5 min read
A Retry Is a Duplicate Waiting to Happen: Idempotency for Free Model Endpoints

A Retry Is a Duplicate Waiting to Happen: Idempotency for Free Model Endpoints

Comments
6 min read
When Retries Make It Worse: Build a Circuit Breaker for Free Model Endpoints

When Retries Make It Worse: Build a Circuit Breaker for Free Model Endpoints

Comments
5 min read
Your Model Call Is a Job, Not a Request: An Outbox Queue for Free Endpoints

Your Model Call Is a Job, Not a Request: An Outbox Queue for Free Endpoints

Comments
4 min read
Snapshot Your Prompts: A Golden-File Test for Free Model Endpoints

Snapshot Your Prompts: A Golden-File Test for Free Model Endpoints

Comments
5 min read
Prompts Are Code: A Golden Test Gate for Free Model Endpoints

Prompts Are Code: A Golden Test Gate for Free Model Endpoints

Comments
6 min read
A 429 Is a Signal, Not a Suggestion: Build a Retry Ladder for Free Endpoints

A 429 Is a Signal, Not a Suggestion: Build a Retry Ladder for Free Endpoints

Comments
6 min read
A/B Test Prompts Without a Feature Flag: A Free-Server Workflow

A/B Test Prompts Without a Feature Flag: A Free-Server Workflow

Comments
3 min read
Quota Forensics: A Token Ledger for Free Model Endpoints

Quota Forensics: A Token Ledger for Free Model Endpoints

Comments
4 min read
Real Traffic Is the Only Benchmark: Replay Requests Before You Swap Models

Real Traffic Is the Only Benchmark: Replay Requests Before You Swap Models

Comments
5 min read
A Quota Ledger: Track, Predict, and Cap Your Free Model Allowance

A Quota Ledger: Track, Predict, and Cap Your Free Model Allowance

Comments
6 min read
What Did the Model Decide? A Decision Log Tutorial for a Free Server

What Did the Model Decide? A Decision Log Tutorial for a Free Server

Comments
4 min read
Benchmarks Belong on a Server: A Deploy-and-Prove Tutorial

Benchmarks Belong on a Server: A Deploy-and-Prove Tutorial

Comments
5 min read
Five Gates to a Public Model Endpoint: A Deployment Tutorial

Five Gates to a Public Model Endpoint: A Deployment Tutorial

Comments
5 min read
Zero to Verified: A Free Model API on a Free Server, Stage by Stage

Zero to Verified: A Free Model API on a Free Server, Stage by Stage

Comments
6 min read
Free Servers Kill Processes. Make Your Model Jobs Survive.

Free Servers Kill Processes. Make Your Model Jobs Survive.

Comments
5 min read
Cache the Canonical Form: A Normalizing Cache for Metered Model Calls

Cache the Canonical Form: A Normalizing Cache for Metered Model Calls

Comments
5 min read
From Localhost to a Real Host: Deploy a Model Gateway in 6 Verified Steps

From Localhost to a Real Host: Deploy a Model Gateway in 6 Verified Steps

Comments
5 min read
The Cheapest Request Is the One You Never Send: A Semantic Cache for Rate-Limited APIs

The Cheapest Request Is the One You Never Send: A Semantic Cache for Rate-Limited APIs

Comments
6 min read
The Same Prompt Twice Is Double Quota: A Verifiable Cache for Free Model Endpoints

The Same Prompt Twice Is Double Quota: A Verifiable Cache for Free Model Endpoints

Comments
7 min read
From Prompt to Fixture: A Reliable Test Data Generator on a Free Model Endpoint

From Prompt to Fixture: A Reliable Test Data Generator on a Free Model Endpoint

Comments
3 min read
loading...