Starting From Working Code: A Strategy for Unfamiliar Projects

Taking on a side project with technology you've never used can feel daunting. The gap between "I have an idea" and "the idea works" is often wide, but there's a pragmatic approach that helps close it quickly: find code that already runs, then reshape it into what you need.

This pattern is straightforward: locate an existing example that performs a task roughly similar to your goal, get it running on your machine, and then incrementally modify it until it does what you want. Often you'll end up completely rewriting the original, but that's fine — the value was in having a solid foundation to build on.

The Two Essential Qualities of a Good Starting Point

Not all example code is equally useful. Two properties determine whether a starting point will actually accelerate your work.

It Must Actually Run

Browsing for examples often surfaces code that won't execute quickly — frequently because it's outdated and the ecosystem has moved on. The key is to prioritize examples you can get running on your own machine with minimal effort. When a piece of code won't start up promptly, it's usually worth abandoning it early and looking for a fresher example, rather than sinking time into debugging someone else's stale code.

It Must Be Amenable to Small Changes

The ideal starting point is something you can transform through a series of tiny, testable steps — each change preserving a working state. The failure mode here is familiar to anyone who's attempted to repurpose Jupyter notebooks for deep learning: you find a notebook that does roughly what you need, but every modification breaks it, and you don't have the context to fix those breaks.

Contrast that with a well-engineered scaffold like rails new: it produces a web server that does almost nothing, but it works. From there, you can evolve it into your desired application one small, verifiable change at a time.

Examples of Solid Foundations

  • rails new: a minimal but fully functional web application scaffold.
  • tinywm: a window manager implemented in about 50 lines of C.
  • rustboot: a tiny Rust kernel that does almost nothing — a useful entry point for OS development, though dated now.
  • Glitch: its "view source" feature exposes the backend of any project, making working examples transparent and forkable.
  • Allison Parrish's NLP tutorials: Jupyter notebooks with practical, runnable text-processing examples.

These little anchors matter more than they might seem. Hunting for the right one can be the hardest part, but once you find something that boots and runs, the path forward becomes much more manageable. Every complex project starts with something simple that works.