Re:Writing Code Was Never the Bottleneck
by fny on Thursday July 03, 2025 @08:15AM
(#44454218)
Have them first write a spec that is code with all the interfaces defined and comments describe the behaviors.
For new features:
```
"""
This is the new adder feature. Internally it uses chained Adders to multiply:
Adder(Adder(Adder(x, y), y), ...)
"""
class Adder:
# public attributes x and y
def __init__(self, x: float, y: float) -> None:
raise NotImplementedError()
class Muliplier:
# public attributes x and y
# should perform multiplication with repeated adders
def __init__(self, x: float, y: float) -> None:
raise NotImplementedError()
Depending on how much you trust a dev, you can kill the second review step. This is the pattern I've been using in my own work. It still fails dramatically sometimes (e.g. Multiplier calls some new adder function in a different file), but you'll at least be able to catch it because the update will happen outside the original specs.
For new features:
``` """ This is the new adder feature. Internally it uses chained Adders to multiply: Adder(Adder(Adder(x, y), y), ...) """ class Adder: # public attributes x and y def __init__(self, x: float, y: float) -> None: raise NotImplementedError()
class Muliplier: # public attributes x and y # should perform multiplication with repeated adders def __init__(self, x: float, y: float) -> None: raise NotImplementedError() ``` This is a really dumb example (frankly something Claude would write), but it illustrates how you specify external and internal interfaces.For updates, you do the same thing. Just specify the changes as a spec inside the code.
Then spec -> review -> tests -> review -> code -> review.
Depending on how much you trust a dev, you can kill the second review step. This is the pattern I've been using in my own work. It still fails dramatically sometimes (e.g. Multiplier calls some new adder function in a different file), but you'll at least be able to catch it because the update will happen outside the original specs.