Angry Monkeys

Go near that stepladder again. GO NEAR THAT STEPLADDER AGAIN. I dare you, I double dare you, motherfucker. Go near that stepladder one more goddamn time.

As a follow up to Cargo Cult Thinking and Best Practices, I’d like to share a story used by Dave Thomas (one of the authors of The Pragmatic Programmer) in a keynote Angry Monkeys and Cargo Cults.

I first heard this story from Neal Ford’s presentation on ways to improve your code. Fortunately, the presentation is a short run down of his book The Productive Programmer and this allows me to copy-pastequote the book instead of having to narrate it using my own words.

Back in the 1960s (when scientists were allowed to do all kinds of crazy things), behavioral scientists conducted an experiment where they placed five monkeys in a room with a stepladder and a bunch of bananas hanging from the ceiling. The monkeys quickly figured out that they could climb the ladder and eat the bananas, but every time the monkeys got near the stepladder, the scientists would douse the entire room in ice cold water. You can guess what that generated: angry monkeys. Soon, none of the monkeys would go near the ladder.

Then the scientists replaced one of the monkeys with a new monkey, who had not been subjected to the blasts of water. The first thing he did was make a beeline for the ladder, and all the other monkeys beat him up. He didn’t know why they were beating him up, but he quickly learned: don’t go near the ladder. Gradually, the scientists replaced the original monkeys until they had a group of monkeys who had never been doused with cold water, yet they would attack any monkey that approached the ladder.

The point? In software, lots of practices on projects exist because “that’s the way we’ve always done it.” In other words, because of angry monkeys.

Absolute Performance

You're Winner!

Here’s some data on a major U.S.-based retailer used an example in The Halo Effect:

According to the report of independent industry analyst, Alex. Brown & Sons, during the early 1990s, “Qual-Mart” did these things:

  • Installed point-of-sale terminals in its stores, which provided better information on sales by item and improved the inventory planning process.
  • Expanded central buying to 75 percent of its merchandise, helping to reduce the costs of procurement.
  • Modernized its inventory management and thereby significantly improved its “in-stock position.” One result: better management of seasonal inventory, boosting Christmas and Halloween sakes by 60 percent.
  • Conducted physical inventory counts more frequently, not just once at year-end, resulting in greater accuracy and efficiency.
  • Reduced its expense levels as a percentage of sales.
  • Improved its merchandise assortment to match current demand trends, helping to raise sales.
  • Installed a toll-free customer service number which led to a sharp improvement in customer satisfaction.
  • Implemented a sophisticated client/server technology that led to better merchandise management and savings of $240 million.

Thanks to these many steps, “Qual-Mart” saw an improvement in inventory turns–that is, how many times in a year it sold its inventory, a key measure of retailing efficiently–from 3.45 in 1994 all the way to 4.56 in 2002. That’s a jump of 32 percent, not bad at all.

Then the book asks:

Would you say “Qual-Mart” improved its performance?

Continue reading “Absolute Performance”

Hipster PDA

GTD advises those that practice it to empty their minds often. If you suddenly get a great idea or if just remembered something that you must do, you have to write it down somewhere as soon as that comes into your head. Not only will it be less likely to be forgotten, it will also free your mind to think about stuff that you actually enjoy thinking about.

The problem with this advice is that most of those ideas pop up when you’re on the go, and thus requires you to bring a portable note taking tool with you always. Ticklers or small notebooks are often too bulky to fit in your pocket, while PDAs and smartphones are often too expensive for such a simple task.

Enter the Hipster PDA.

Hipster PDA

The Hipster PDA (Parietal Disgorgement Aid) is a fully extensible system for coordinating incoming and outgoing data for any aspect of your life and work. It scales brilliantly, degrades gracefully, supports optional categories and “beaming,” and is configurable to an unlimited number of options. Best of all, the Hipster PDA fits into your hip pocket and costs practically nothing to purchase and maintain. Let’s make one together.

Continue reading “Hipster PDA”

Technical Debt

Technical debt is an important fundamental concept in the software engineering world, mainly because it pops up quite often in most real-world software projects. As much as I’d like to put the concept in my own words and sprinkle some personal experiences on it, Steve McConnell already wrote two good posts on the topic last year.

The term “technical debt” was coined by Ward Cunningham to describe the obligation that a software organization incurs when it chooses a design or construction approach that’s expedient in the short term but that increases complexity and is more costly in the long term.

Ward didn’t develop the metaphor in very much depth. The few other people who have discussed technical debt seem to use the metaphor mainly to communicate the concept to technical staff. I agree that it’s a useful metaphor for communicating with technical staff, but I’m more interested in the metaphor’s incredibly rich ability to explain a critical technical concept to non-technical project stakeholders.

Technical Debt and Technical Debt Decision Making [from 10x Software Development]

Technical Interviews and Regular Expressions

Some people, when confronted with a problem, think “I know, I’ll use regular expressions!” Now they have two problems.
– Jamie Zawinski

Some people, when confronted with a problem, think “I know, I’ll quote Jamie Zawinski!” Now they have two problems.
– anon

Just to show that I practice what I preach, I headed over to TopCoder a few hours ago to try my hand at some simple TCHS problems. By my surprise, the problem I opened was very similar to one of the technical interview questions in my previous company. I know this because as a technical interviewer, I’ve already given this problem to a couple of potential employees.

Now this isn’t surprising. Basic algorithm-related questions are good filters for weeding out so-called “developers” who never really had much programming practice in college, but there’s only a few types of questions you can ask at this level–go any higher and you’ll likely be stuck with Complicators instead of pragmatic programmers.

Anyway, what struck me with this problem is that it can also be solved with regular expressions. This has never occurred to me before, mainly because I didn’t expect even the top students from the top universities in the Philippines to approach the problem that way. From my experience, I would expect applicants to play around with loops instead.

This made me ask myself the question:

If you were a technical interviewer, how would you rate an applicant who used regular expressions in solving the problem?

Continue reading “Technical Interviews and Regular Expressions”