3 ms·
Rough rule of thumb that works wonders: Write/modify code. Run program and/or ensure that codepath is executed. Did it do what you intended? If yes, figure
by mkramlich 16y ago
Rough rule of thumb that works wonders:
Write/modify code.
Run program and/or ensure that codepath is executed.
Did it do what you intended?
If yes, figure out what's wrong about it, fix it, retry.
If no, move on to next item on your agenda. (Possibly first doing a quick refactor to improve readability, etc.)
- Tyrannosaurs 16y agoIf you refactor you should always retest. I've lost track of the number of times things have been broken by someone tweaking things to make them better.
- silentbicycle 16y agoThe flip side of this is that you can do deep refactoring with more confidence if you have thorough test coverage (and/or a smart type system).