News for hackers. Stuff that matters.
Re:Jezen/is-thirteen: Check if a number is equal to 13 by riebschlager on Monday March 28, 2016 @07:23PM (#11378284)
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

Re:Jezen/is-thirteen: Check if a number is equal to 13 by dhatch387 on Monday March 28, 2016 @07:29PM (#11378322)
> tap.equal(is("B").thirteen(), true); // B looks like 13
Re:Jezen/is-thirteen: Check if a number is equal to 13 by dTal on Monday March 28, 2016 @08:13PM (#11378578)
Unless it's hidden by obfuscation, judging by the source code I think that test actually fails, and hilariously only lowercase 'b' works.
Re:Jezen/is-thirteen: Check if a number is equal to 13 by acrooks on Monday March 28, 2016 @08:18PM (#11378606)
Re:Jezen/is-thirteen: Check if a number is equal to 13 by gkoberger on Monday March 28, 2016 @07:28PM (#11378312)
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.
Re:Jezen/is-thirteen: Check if a number is equal to 13 by justinlardinois on Monday March 28, 2016 @08:07PM (#11378548)
You could just as easily read it as a comment on overengineering.
Re:Jezen/is-thirteen: Check if a number is equal to 13 by tluyben2 on Monday March 28, 2016 @11:01PM (#11379204)
That's what I did anyway...
Re:Jezen/is-thirteen: Check if a number is equal to 13 by 1QAm1 on Monday March 28, 2016 @07:32PM (#11378343)
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?
Re:Jezen/is-thirteen: Check if a number is equal to 13 by PeCaN on Monday March 28, 2016 @07:49PM (#11378452)
Re:Jezen/is-thirteen: Check if a number is equal to 13 by riebschlager on Monday March 28, 2016 @07:41PM (#11378403)
It's pretty much brilliant top to bottom. I starred the hell out of this repo.
Re:Jezen/is-thirteen: Check if a number is equal to 13 by z1mm32m4n on Monday March 28, 2016 @07:49PM (#11378450)
I'm imagining someone repeatedly unstarring the repo just to re-star it again.