3 ms·
> After writing a few lines of code (3 to 6 lines, a short block within a function), re-read them. That's insufficient in a lot of codebases in a lot of langua
by pornel 5y ago
> After writing a few lines of code (3 to 6 lines, a short block within a function), re-read them.
That's insufficient in a lot of codebases in a lot of languages. Addition of a few new "locally-correct" lines can break something else in a completely different part of the code.
A trivial example: You've had a correctly-working program, you change a value of a field using correct calculation, and your program becomes incorrect — because other function elsewhere assumed this value won't change.
To avoid this you'd need to re-read the whole program after introducing any change, and that gets exponentially harder.