Hacker News new | ask | show | jobs
by tsmith 4202 days ago
People understand that the compiler/executable doesn't run any faster the less newlines there are, right?

This is cute, but as others have pointed out it, it isn't really a correct implementation of a hash table. Also, it wouldn't pass a code review anywhere I've ever worked.

2 comments

> This is cute

Well that's the whole point, right? This is clearly written for fun, it's not production code, it's not supposed to pass a code review. It's just supposed to be cool and interesting, and a challenge for the author.

Exactly! Building cute but ultimately useless[0] programs is a lot of fun and makes for great brainteasers. It's also a great way to interact in a friendly but still technical way with your programmer peers. I recommend it to everyone!

[0] - http://lelandbatey.com/posts/2014/09/binary-tree-printer/

>People understand that the compiler/executable doesn't run any faster the less newlines there are, right?

As much as others understand that it's not like this is some obsfuscated thing with some bizarro code that eats newlines for breakfast.

Merely avoids 4-5 newlines anybody can easily add, only affecting 1 or 2 statements each. With newlines expanded it would still as small as it is.