Code and a Poem about Software

JavaScript Joel - Jul 17 '19 - - Dev Community

The best code,
without tests,
not to be trusted.

function alwaysLeft(left) {
  return function(right) {
    return left
  }
}
Enter fullscreen mode Exit fullscreen mode

Test coverage,
gives confidence,
still can be busted.

alwaysLeft('L')('R') === 'L'
Enter fullscreen mode Exit fullscreen mode

Code abused,
ways unimagined,
leaving you disgusted.

function I(x) {
  return x
}

alwaysLeft(I)('L')('R') === 'R'
Enter fullscreen mode Exit fullscreen mode

@joelnet

Cheers!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player