The concept of “hacking” is interesting; it’s usually thought of as finding some kind of novel solution or shortcut to solving a problem. I think there’s a deeper meaning, though.

Any time you write code (and arguably, when you solve any problem at all), you make a model. A model is a way of representing reality, and when you represent something, you necessarily simplify it. In fact, if you’re a good problem-solver, you simplify so much that you consider only those dimensions that matter for the solution.

Take an algebraic equation as an example. x + 3 = 7 answers the question “Jane has 7 apples. John has 3 fewer apples than Jane. How many apples does John have?”. And that’s all it does. It doesn’t consider any facts that are unrelated to the solution, such as John’s last name or how Jane got more apples than he did.

Or, if I want a JS function that squares a number, I could end up with:

<code>function square(x)
{return x*x;}
square(2); //4
</code>

This function doesn’t consider why I am squaring a number, or what I am doing with it. There’s no context other than that I want the input multiplied by itself.

As another example, let’s say I’m writing an application that needs to manipulate information about books. I might model a book this way:

It also doesn’t take into account, or generate, information about the authors’ lives, the jacket art, the main characters’ names, etc. It’s just whatever is in the function. Assume for a moment that I have a good product manager and we know that author, pages, and difficulty are all we need. In that case this would be a waste of time (and arguably a less effective solution):

You can keep elaborating the function until you get within an arbitrarily small distance of creating an actual book. You can add data about the year of publication, the fonts, and page sizes. You can take atomic measurements of printing materials, page wear, and ink. You can keep going until your model is a perfect representation of the book itself. (At which point it would cease to be a model, of course.)

I think that a hack might be the discovery and exploitation of the compromises that are made in this simplifying process.

This incredible playthrough of Ocarina of Time is a great example. The speedrunner playing the game finishes it in about a half an hour whereas the usual playthrough time is probably on the order of days. The link skips ahead to the major exploitation of the game’s code, and is followed by the explanation, which is long. But basically, the hack involves taking advantage of simplifications that the designers of the N64 and Ocarina of Time made in the way the world of the game is built and represented in system memory.

As one partial example, locations that are not in view are moved out of system memory, and when this happens to a warp location, it’s possible to change the timing of the warp animation to coincide with other events that then cause the warp destination to change.

This is an easy-to-understand exploitation but isn’t so different from hacking computer systems; it’s about in some way breaking the model used to build a system.

Under this definition, social engineering could be a type of hacking, if it’s used to exploit simplifications that people make in the way they think. Posing as an authority figure over the phone to get someone’s personal information, for example, is a way of taking advantage of the fact that most people assume those who claim authority are legitimate. The filibuster is arguably a hack, because it takes advantage of simplified (or incorrect) assumptions about when it would be used.

Trompe l’oeil painting and forced perspective photography would be hacking under this definition as well. Our visual systems make lots of simplifications in the way we perceive the world, and many assumptions about depth cues in particular. This allows a skilled person to create a fully 2-dimensional representation that mimics all of these cues and therefore looks 3-dimensional.

This is a meaning of “hacking” that I think is somewhat different from the usual one, so I’ll keep thinking about it. Still, it suggests that the skill of hacking is a very valuable one, if it means you are an expert at understanding models and their limitations, and also how to use those limitations to your advantage.