# Having One Tool

"When the only tool you have is a hammer, it is tempting to treat everything as if it were a nail."
--Abraham Maslow

The Law of the Instrument, known about for years and years and continuously recognized as a Bad Thing.

It's even an anti-pattern in software! This is why a good programmer will not just learn multiple languages, but also multiple paradigms. Knowing C++ and then switching to Java isn't much of a paradigm shift at all, let alone a language shift. Switching to a dialect of Lisp, however, would be a rewarding experience because it's vastly different. Different syntax, different paradigm, different typing. I'm on this path, but I don't think I've gone far enough. But my experiences with Python, Scheme, PHP, Java, C/C++ (which I know decently), and a little Perl, Ruby, and Assembly have all taught me very useful things. Even though my main programming language is Python, with all my web stuff being in PHP, ideas and patterns from other languages have influenced my coding in my primary ones for the better. Even if you don't use Scheme daily, just learning it will give you great insights.

This 'law' should be recognized for all fields. A great one, in my opinion, would be philosophy. Another, religion. Back before I became atheist, I considered myself a "Taoist Agnostic Mormon". When I became atheist, though, I kept some parts of Taoism as philosophy, and since I was raised Mormon I doubt there are parts I could even freely get rid of myself let alone acknowledge. But all the religious aspects are gone, and I make an effort to only believe things with evidence that also are useful.

What is my philosophy? It's a jumble of various philosophies and ideas, some from actual philosophy, some from science, some from math. What's their basis? There is no basis from which they all flow: they are modular, meaning I could find one of them horribly wrong and wipe it from my set without affecting the others. Not to mention Godel's Incompleteness Theorem proves you can't reach all true statements from any finite set of axioms.

Then there are other people who say "I'm a Marxist!" or "I'm an Objectivist!" or "I'm a humanitarian!" or "I'm a libertarian!" This is useful to help identify yourself in a group; it's a natural human thing to have an "us-vs-them" mentality (though I would assert it's a bad trait we have that I would totally wipe out of my mind had I the power). I have names for my modules, which is useful to help give someone a general idea of how I think, but in the end each separate idea needs to be explained explicitly. "Marxism" is a label encompassing a large selection of ideas, some of which I would agree with (like valuing humans because they're human), and some of which I would disagree with (like forcefully taking the more productive humans's resources to benefit the less productive humans who remain less productive).

In the end, though, it doesn't matter how big a selection of ideas your One True Belief has, because it's still just one entity. It's one tool. The world isn't simple enough for one tool to suffice, and I don't really think anything is simple enough. "Use the right tool for the right job" is a great quote, but it's not useful if you only have one tool in the first place. Thus one must learn as many tools as possible, and there's no half-assing it.

This doesn't mean all tools are equal of consideration, of course. Math should be the ultimate tool one can use, as it's the ultimate creation of humanity. The only way one can "prove" something is with math or logical contradiction, and the useful things that one can prove don't lend themselves easily to being the direct outcome of some contradiction. Even the notion of math "proofs" are suspect, because in the end how does one "prove" an axiom? Still, it's the closest humans can get and are likely to get to absolute truth. When a mathematical approach is available, it necessarily becomes the ideal choice. When to defer to less-optimal methods depends on several variables, but it still must be understood the mathematical way would have produced more correct answers had it been able to be used.

Praising reason does nothing to make one better at using reason. There exists a large amount of data that is mathematically derived for how one can be rational, and there is a large amount of data that is scientifically derived for how one can be rational. One must learn those things in order to become better at using reason, better at being a rational person. There's no way around it. No philosophy will teach you about the cognitive biases of the human brain which impede everyone's rationality, even when they're aware of them. You need psychology, a science, to teach you about those and what you can do to limit or if possible neutralize their effects.

Beware of knowing just one programming language. Beware more of knowing just one specialized language not suitable for anything outside its environment, even if it can theoretically go there (pointed at PHP). Beware of subscribing to one philosophy, and to one holy idea, but realize that unless you can actually demonstrate something is better than math, you should defer to the math way should there be one. The math way is not always the best way fitting the circumstances; we don't have infinite computing power, which limits us to using less-ideal mathematical approximations. (But still mathematical whenever possible.) To echo the first quote, beware of having only a hammer, lest everything look like a nail.

#### Posted on 2009-12-15 by Jach

LaTeX allowed in comments, use $\\...\\$\$ to wrap inline and $$...$$ to wrap blocks.