Iteration: The Antithesis of Perfection

Why it should be quantity over quality

TL;DR

Writing a lot of great code is better than writing a little bit of perfect code.

Perfection

When an interviewer asks, “What is your biggest weakness?”, a staple reply is, “I’m a perfectionist”.

Missed Deadlines

The trouble with a perfect solution is that it takes time; however, in the fast-paced world of software development that’s a luxury that isn’t always available. Perfection is easy to sell on paper: imagine writing software that is provably bug free and readable. It sounds too good to be true because it usually is.

Premature Optimization

function getReversedNum1(num) {
let result = 0;

while (Math.trunc(num) > 0) {
result *= 10;
result += Math.trunc(num % 10);
num /= 10;
}

return result;
}
function getReversedNum2(num) {
if (!Number.isInteger(num)) {
return NaN;
}
let result = 0; while (Math.trunc(num) !== 0) {
result *= 10;
result += Math.abs(Math.trunc(num % 10));
num /= 10;
}

result *= (num < 0) ? -1 : 1;
return result;
}

Iteration

An effective way to overcome the lure of perfection is with iteration. Rather than painstakingly writing a solution that can do every thing from the get go, it’s more practical to start small. A minimum viable product is better than an ambitious solution that never makes it out of the pipeline.

Computer Science student at the University of Waterloo