Trading a Camera for a Compiler
For eleven years my job was to notice light. Then I taught myself to notice types, and it turns out the two aren't as far apart as everyone assumes.
The muscle transfers
Photography is a discipline of constraints. You have a fixed sensor, a fixed focal length in your hand, and a moment that will not wait. You learn to compose inside the box you were handed. Writing Rust feels the same:
The borrow checker is just a very opinionated art director. It will not let you ship the sloppy shot.
When I first fought the compiler I read it as hostility. Now I read it as the same voice that used to say "you cut off his hands, reframe it." It's not stopping me. It's stopping the bug.
What actually carried over
- Seeing the whole frame. A good photograph has no wasted corner. A good function has no unhandled case.
- Ruthless editing. I shot 2,000 frames to keep 6. I now write three versions of a module to keep one.
- Sitting with discomfort. Waiting two hours for the right light is the same patience as waiting for a nasty lifetime error to finally make sense.
The gear was never the point in photography, and the language is never the point in software. Both are just the excuse to pay attention.
Next post: why the tooling is what actually sold me on Rust.