A few of us inherited two code bases from a previous team, both for what are now products but were essentially prototypes.
Every release includes new things and rewritten things. If we add new on old, we grow technical debt; if we rewrite too much, fixes and features are delayed too long.
It’s a tough balance. Our code and issues are full of comments re how things should be done, with cross references we added as we figured out what things need to change together.
As Joel Spolsky notes in the twice-linked post, reading code is harder than writing.
Just today I eliminated hundreds of lines of code after writing maybe two dozen over the last few days.
The writing and deletion took no time at all. The reading and forensic mental compilation and execution took days and days.
That’s our golden rule: change nothing you do not completely understand - and you only really understand it if you can explain it in plain English to someone who doesn’t know the code.
The coolest thing is that as we go along doing cool things becomes easier and doing wicked cool things becomes possible.
Just this morning we had to force ourselves to remember that entire blocks of code with poor reporting of errors are as they are because until changes we made elsewhere just weeks ago, there was no point in doing better: the better reports had no place to go.
But after a major refactor initiated primarily to make maintenance and addition easier, we can now do things with dramatic - and wholly positive - UI/UX impacts that were simply impossible before.
Every release includes new things and rewritten things. If we add new on old, we grow technical debt; if we rewrite too much, fixes and features are delayed too long.
It’s a tough balance. Our code and issues are full of comments re how things should be done, with cross references we added as we figured out what things need to change together.
As Joel Spolsky notes in the twice-linked post, reading code is harder than writing.
Just today I eliminated hundreds of lines of code after writing maybe two dozen over the last few days.
The writing and deletion took no time at all. The reading and forensic mental compilation and execution took days and days.
That’s our golden rule: change nothing you do not completely understand - and you only really understand it if you can explain it in plain English to someone who doesn’t know the code.
The coolest thing is that as we go along doing cool things becomes easier and doing wicked cool things becomes possible.
Just this morning we had to force ourselves to remember that entire blocks of code with poor reporting of errors are as they are because until changes we made elsewhere just weeks ago, there was no point in doing better: the better reports had no place to go.
But after a major refactor initiated primarily to make maintenance and addition easier, we can now do things with dramatic - and wholly positive - UI/UX impacts that were simply impossible before.
Read read read read digest digest cogitate muse read read correct read confirm, explain, write.