Catching Elephant is a theme by Andy Taylor
This is brilliant. (via @bradyjfrey @doughahn)
function fibonacci(size) { var first = 0, second = 1, next, count = 2, result = [first, second]; if(size < 2) return "the request was made but it was not good" while(count++ < size) { next = first + second; first = second; second = next; result.push(next); } return result; }
No surprises here. Code reduced to its essentials with no word or variable wasted. It’s not fancy; maybe its even a little pedantic - but that’s the beauty of Hemingway’s writing. No need for elaborate logic or clever variable names. It’s plain and its clear and it does what it has to - and nothing more.
Hemingway didn’t suffer fools gladly so if you ask for a series with less than two numbers he’ll just ignore you. “I’m tired and this question is idiotic”.
See more (William Shakespeare, Andre Breton, Roberto Bolano, Charles Dickens) at: