Philosophy for people who read machine code
The last four posts were about money, banks, the world order and the spirit of the age. This one closes the series by going back to the oldest tools for thinking. People who reverse engineer software meet these questions every day without naming them. Here are some of them, with names.
.-""""""-.
.' '. "The unexamined binary
/ O O \ is not worth running."
: :
| .--. | — not Socrates
: ( ) :
\ '--' /
'. .'
'-......-'
___/ | | \___
/ |____| \1. Plato's cave: you only ever see the shadows
In Plato's Republic, prisoners are chained in a cave facing a wall. Behind them a fire throws the shadows of objects onto that wall. Having seen nothing else, the prisoners take the shadows for reality. Philosophy, for Plato, is the painful climb out to see the things themselves.
outside: the sun, the real things
______________________________________________________
| fire | objects carried past: [#] [^] [o] |
| )\ | |
| ( ) | o o o o o <- prisoners, |
| '' | | | | | | chained, facing |
|_________|______________________________ the wall __|
WALL: ~#~ ~^~ ~o~
"this is reality"A disassembler is a cave with good lighting. You never see the programmer's intent or the original source. You see a projection: bytes, decoded into instructions, rendered by a tool that makes its own guesses. Decompiler output is a shadow of a shadow. The discipline of the craft is the same as Plato's: never mistake the representation for the thing, and keep asking what produced it.
2. The ship of Theseus: is it still the same program?
The Greeks told of the ship of the hero Theseus, kept in Athens as a memorial. As planks rotted they were replaced, until no original plank remained. Is it the same ship? Thomas Hobbes added a twist: what if someone collected the old planks and rebuilt a ship from them? Which one is Theseus's ship?
v1.0 [####][####][####][####]
v1.1 [####][####][::::][####] one function patched
v2.0 [::::][####][::::][::::] most code rewritten
v3.0 [::::][::::][::::][::::] nothing original left
^ same name, same version history, same users... same program?Software makes this concrete. Every release replaces planks. A binary diff tool answers the question in one way (changed bytes), a user in another (same name, same purpose), a lawyer in a third (who owns which part). The lesson is that identity is not a property you can read from the bytes alone. It depends on which criterion you choose, and you should say which one you are using.
3. Descartes' demon and trusting trust
René Descartes asked what he could know for certain if a powerful demon were deceiving all his senses. He stripped away everything doubtable and found one thing left: the fact that he was thinking. Cogito, ergo sum: I think, therefore I am.
In 1984 Ken Thompson gave a Turing Award lecture called Reflections on Trusting Trust that is Descartes' demon in a compiler. He described a compiler that inserts a hidden behaviour into programs it compiles, and also re-inserts that trick whenever it compiles a new version of itself. The source code of both would look clean. His conclusion: you can't fully trust code you did not totally create yourself, and that includes your tools.
source (looks clean) --> [ compiler ] --> binary (not clean)
^
| who compiled the compiler?
[ compiler' ] <-- who compiled that one? ...Descartes escaped the demon by trusting a good God. Engineers escape it, partly, with methods: reproducible builds, compiling the compiler through independent toolchains, auditing the hardware. Neither escape is a proof. Both are reasonable bets. All knowledge rests somewhere on trust; the craft is choosing where.
4. The Chinese room: does the machine understand?
John Searle's 1980 thought experiment: a man who knows no Chinese sits in a room with a huge rulebook. Chinese questions come in through a slot. He matches the symbols to the rules and passes back the indicated symbols, which turn out to be fluent answers. To the people outside, the room understands Chinese. Searle says no one inside does. Following rules for symbols (syntax) is not the same as understanding them (semantics).
+----------------------------------------------+
"%#& @?" | [man] + [ RULEBOOK: if %#& @? -> &&% !# ] | "&&% !#"
--------->| ._. |---------->
| /|\ "I have no idea what this means" |
+----------------------------------------------+
(the squiggles stand for Chinese characters)Every CPU is a Chinese room. It fetches, decodes and executes with no idea what the program is "about". When we reverse engineer, we supply the semantics: this loop is a checksum, this struct is a network packet. The meaning is in our heads, not in the silicon. With today's language models, Searle's question is no longer academic. Some reply that understanding belongs to the whole system, not to the man. Others agree with Searle that symbol manipulation, however good, isn't understanding. The debate is open.
5. Social facts: what money really is
This brings the series back to its start. Searle also wrote about social reality. Some facts exist only because we collectively accept them, in the form "X counts as Y in context C":
X counts as Y in context C
a piece of paper ------------> a 100-euro note the euro area
a number in a DB ------------> a bank deposit banking law
a line of hex ------------> a valid signature this public key
a person ------------> president a constitutionMoney, borders, companies, marriages and passwords are all real, with huge effects. Yet none would exist if everyone stopped accepting them. That is why What money is ended on trust as the one field you can't write directly. A monetary order, a world order, even a Zeitgeist is a vast structure of "counts-as" agreements. They are sturdy as long as most people go along with them, and surprisingly fragile when they stop.
6. A short toolkit
+-----------------+--------------------------------------------+
| Ockham's razor | prefer the explanation with fewer moving |
| | parts (usually a bug, not a plot) |
| | |
| Socratic method | ask "what do you mean by that?" until |
| | the definition breaks |
| | |
| Popper | a claim no test could refute tells you |
| | little; try to break your own idea first |
| | |
| Hume | "it worked every time so far" does not |
| | prove it will work next time |
| | |
| Wittgenstein | meaning is use: judge a value by how it |
| | is used, not by what it is called |
+-----------------+--------------------------------------------+Each of these is also a habit of good analysis. The razor kills conspiracy theories and over-engineered hypotheses about a binary alike. Popper's test is the difference between a hunch and a finding. Wittgenstein's advice is literally how you name variables in a decompiler: by how they are used.
Closing
.----------------------------------------------.
| |
| bytes -> instructions -> intent |
| paper -> promises -> money |
| events -> patterns -> an age |
| |
| in every case the last step is ours. |
| |
'----------------------------------------------'Reverse engineering, economics and philosophy share one move: start from raw material that does not explain itself, and reconstruct the structure that gives it meaning. The best practitioners in all three stay humble about the last step, because that is where we add ourselves.