Hacker News new | ask | show | jobs
by riebschlager 3901 days ago
My first reaction was, "Haha. That's fun code-as-parody."

Then I looked at the unit tests. [1] Now my reaction is more like, "Your commitment to this bit is both admirable and slightly disturbing."

[1] https://github.com/jezen/is-thirteen/blob/master/test.js

3 comments

> tap.equal(is("B").thirteen(), true); // B looks like 13
Unless it's hidden by obfuscation, judging by the source code I think that test actually fails, and hilariously only lowercase 'b' works.
I think that's the point the parody is making. A simple "piece" of code can have thousands of edge cases that a normal developer doesn't think about. That's the advantage of the UNIX-style "everything does one thing and does it well" philosophy that Node mirrors.
You could just as easily read it as a comment on overengineering.
That's what I did anyway...
I think that either [1] That IS the joke, or [2] the issues are where the good jokes lie. Maybe the real joke is in the commits?
It's pretty much brilliant top to bottom. I starred the hell out of this repo.
I'm imagining someone repeatedly unstarring the repo just to re-star it again.