"Doing linear scans over an associative array is like trying to club someone to death with a loaded Uzi"
About this Quote
It is programming advice delivered as a deliberately absurd act of violence: the wrong tool applied with stubborn force. Larry Wall, the patron saint of Perl and of the programmer as mischievous craftsperson, isn’t just warning you against a slow operation. He’s mocking the mindset that produces it.
An associative array (a hash) is built for direct lookup: you ask for a key, you get a value. A linear scan ignores that structure and trudges through everything, turning a data type designed for precision into a blunt instrument. The “loaded Uzi” image matters because it isn’t merely a bad weapon; it’s an excellent weapon used in a way that nullifies its advantage. You still might hurt something, but only by wasting the very thing you paid for: speed, intent, leverage.
The subtext is Wall’s larger philosophy about good programming: expressiveness and efficiency aren’t enemies when you respect the semantics of your tools. Perl’s reputation is often reduced to “write-only” chaos, but Wall’s best instincts are about making the common thing easy and the correct thing natural. The joke is a social cue inside developer culture: if you’re scanning a hash, you’re either unaware, desperate, or ignoring what the code is telling you.
Contextually, it’s also a jab at macho “brute force” coding - the belief that enough CPU and enough determination can compensate for not thinking. Wall’s line lands because it shames that posture while making you laugh, which is how a community actually changes behavior.
An associative array (a hash) is built for direct lookup: you ask for a key, you get a value. A linear scan ignores that structure and trudges through everything, turning a data type designed for precision into a blunt instrument. The “loaded Uzi” image matters because it isn’t merely a bad weapon; it’s an excellent weapon used in a way that nullifies its advantage. You still might hurt something, but only by wasting the very thing you paid for: speed, intent, leverage.
The subtext is Wall’s larger philosophy about good programming: expressiveness and efficiency aren’t enemies when you respect the semantics of your tools. Perl’s reputation is often reduced to “write-only” chaos, but Wall’s best instincts are about making the common thing easy and the correct thing natural. The joke is a social cue inside developer culture: if you’re scanning a hash, you’re either unaware, desperate, or ignoring what the code is telling you.
Contextually, it’s also a jab at macho “brute force” coding - the belief that enough CPU and enough determination can compensate for not thinking. Wall’s line lands because it shames that posture while making you laugh, which is how a community actually changes behavior.
Quote Details
| Topic | Coding & Programming |
|---|
More Quotes by Larry
Add to List



