Hacker News new | ask | show | jobs
Simplicity of Code (titan.red)
3 points by garagol 3366 days ago
2 comments

You take code and you make it into poetry.

I can't tell you how many times I write out code, get it all done. It works perfectly. But being the perfectionist that I am sometimes, I look back on it and think, "This can be written so much better." Sometimes, I can take 10 lines of code and transform it into 3 or 4 lines of code.

And yeah, maybe a human being won't notice the difference in the time it takes to execute 10 lines of code vs 3 or 4 lines of code, but the developer knows those few nanoseconds can be reduced.

Code is poetry!

The two code examples don't do exactly the same thing. Consider lvl=1000.

That being said, I do appreciate the author's sentiment of insuring the code is easily readable by humans.

Thanks, I fixed it. Realistically lvl would never go above 3 digits, but in theory all cases should be covered, absolutely.