CHAPTER TWELVE
Coding Beyond Logic
0. The Basement
âCheck it out!â I sat in a beat-up beige armchair in the basement of a college apartment building, staring at a jumble of charts, icons, and code. Two physicists-in-training beamed down at me. One of them said, âItâs pretty simple. You know what it does, donât you?â
I paused, eyebrows raised, scanning the lines back and forth. The code read like a chalkboard full of high school algebra.
âNo,â I shrugged. âYou wrote a few loops and built a graph, but I have absolutely no idea what this code actually does.â
As they explained the graph, I couldnât stop thinking. Where were the well-named variables? Where were the comments? Who taught them to code?
1. Quineâs Paradox
William Van Orman Quine was a logician who explored the limits of self-reference (along with many other philosophical and logical concepts) throughout the 20th century. In his essay âThe Ways of Paradox,â he explores how indirect self-reference can be applied to the liarâs paradox (âThe following statement is false. The preceding statement is true.â). Aside from reading like a convoluted interview question, Quineâs paradox unintentionally laid the foundation for a programming puzzle that has persisted for decades:
âYields a falsehood when appended to its own quotationâ yields a falsehood when appended to its own quotation.
This sentence specifies a string of nine words and says of this string that if you put ...
Get Beautiful JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.