What programming taught me

I didn’t really understand politics or law until I had some experience in programming. When I was young I only knew what the “civics” textbooks taught. I thought written “laws” and “constitutions” and “rights” controlled governments.

Programming taught me that code is just random sequences of characters until it’s compiled and executed. If the machine isn’t built to follow the commands you’re trying to write, bad things will happen.

When I finally read Machiavelli two years ago, I was astonished to find a tech manual. He wrote the machine language code for REAL politics, showing how the REAL machine behaves, not the meaningless words of “constitutions”.

Here’s a simple version of the Mach program in Python, leaving out his more complex subroutines.


if RulerActions == (OppressPoor, MakeWar): 
    return (Poverty, Chaos)

elif RulerActions == (ControlRich, Negotiate): 
    return (Prosperity, Peace)