← Back to Blog
Building in Public

When Your AI Writes 500 Lines of Boilerplate (And Why That's Actually Useful)

christian crumlish•
A robot surrounded by detailed blueprints, generating structural scaffolding at scale.
“You finished it all?”

When Your AI Writes 500 Lines of Boilerplate (And Why That’s Actually Useful)

Part 4 of of the reconstructed “Lost Weekend” at the beginning of this project, as best as we can determine!

May 30, later in the day

“Can you program this for me?”

That simple question to Gemini started the most interesting experiment in my AI development toolkit. Not “help me debug” or “explain this code” — but literally “build the entire thing from specifications.”

What came back was 500+ lines of complete, working Python across 12 files. Every class, every method, every import statement.

The complete scaffold

Gemini took my technical specifications and generated:

  • config.py with environment variable management
  • exceptions.py with custom error hierarchy
  • claude_client.py with robust JSON parsing
  • github_agent.py with complete PyGithub integration
  • knowledge_base.py with ChromaDB operations
  • pm_agent_poc.py orchestrating everything
  • Plus six more files with Streamlit UI, logging, and workflows

Not pseudo-code. Not skeleton classes. Complete, runnable implementation. This was one of my first tests. Can an AI take a new spec and write the first set of files for my MVP? Would it work? Worth a try, right?

The boilerplate value proposition

Here’s what surprised me: the generated code wasn’t just functional — it was good. Proper error handling, dependency injection, comprehensive logging, modular architecture.

Was it perfect? No. Did it follow every pattern I would have chosen? No.

But it gave me something more valuable than perfect code: a working starting point.

The speed of scaffolding

Think about the alternative: writing 500 lines of boilerplate from scratch. Even copying and adapting from previous projects takes hours of mechanical work.

Gemini did it in minutes.

The time savings weren’t just about typing — they were about mental bandwidth. Instead of grinding through imports, class definitions, and method signatures, I could focus on the interesting problems.

I’m not a programmer. I didn’t understand half of it, but I had a general idea about what the various files were for and what they did.

What AI-generated code teaches us

The generated prototype revealed something important about my own development patterns. Looking at Gemini’s implementation choices showed me:

  • Where my specifications were clear (good code)
  • Where they were ambiguous (odd implementations)
  • What I’d forgotten to specify entirely (reasonable defaults)

It was like having a mirror held up to my architectural thinking.

The integration reality

Of course, generated code is never drop-in ready. Saturday’s debugging session (covered in other posts) was partly about fixing issues in the generated scaffold.

But that’s not a bug — it’s a feature. The generated code gave me a concrete implementation to debug, rather than a blank file to fill.

Debugging specific code is faster than writing code from nothing.

When to generate vs. craft

This experiment taught me when AI-generated scaffolding works best:

✅ Good for: Boilerplate, integration patterns, standard implementations
✅ Good for: First drafts when you need something to react against ✅ Good for: Exploring implementation approaches quickly

❌ Not for: Core business logic, performance-critical paths, novel algorithms
❌ Not for: Code you don’t understand well enough to debug 
❌ Not for: Final implementations without review and refinement

The collaboration model

The best part wasn’t having AI write my code — it was having AI generate a foundation I could improve.

Generative coding works best as collaboration, not automation. The AI provides the scaffold, the human provides the judgment.

500 lines of imperfect, working code beats zero lines of perfect, imaginary code.

The speed advantage

In a world where AI can generate functional prototypes from specifications, the competitive advantage isn’t in writing boilerplate faster.

It’s in writing better specifications, making better architectural decisions, and debugging more efficiently.

The code generation is just the beginning.

← Back to BlogAlso available on Medium