3 ms·
You are absolutely right. It was not my intention to claim that you will get things right the first time if you just think hard enough. Iteration is needed very
by jeppester 5y ago
You are absolutely right. It was not my intention to claim that you will get things right the first time if you just think hard enough. Iteration is needed very often.
What I've seen many times is "best practices" like this being thoughtlessly applied.
A react component that rerenders 20 times, but passes the test. A database with no indices, no problem (until the number of records grow).
Things like that can easily be defended with "no need to optimise prematurely" or "I wrote the least amount of code to make the test pass".
- jacquesm 5y agoIndeed, in that context your comment makes good sense. What helps in those cases: to have a good idea of how long you think something should take and then to verify that it indeed is within an order of magnitude of that first estimate. If it is much slower you are probably in trouble, if it is much faster than you will have to check if you are really doing all the work that you should be doing. Colin Wright (also on HN) wrote: "You can't make computers faster, but you can make them do less work". The corollary is that if your program is faster than expected that may be because it is doing less work!