loading...

Code and a Poem about Software

joelnet profile image JavaScript Joel Updated on ・1 min read

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

function alwaysLeft(left) {
  return function(right) {
    return left
  }
}

Test coverage,
gives confidence,
still can be busted.

alwaysLeft('L')('R') === 'L'

Code abused,
ways unimagined,
leaving you disgusted.

function I(x) {
  return x
}

alwaysLeft(I)('L')('R') === 'R'

@joelnet

Cheers!

Discussion

markdown guide