Archive for September 2012
Flying Math: Bees Solve Traveling Salesman Problem
Posted on Sunday, September 30, 2012 at 1:57 AM by Malcolm
Bumblebees foraging in flowers for nectar are like salesmen traveling between towns: Both seek the optimal route to minimize their travel costs. Mathematicians call this the “traveling salesman problem,” in which scientists try to calculate the shortest possible route given a theoretical arrangement of cities. Bumblebees, however, take the brute-force approach: For them, it’s simply a matter of experience, plus trial and error, as reported in this Wired article.
Unit Testing: Is There Really Any Debate Any Longer?
Posted on Wednesday, September 12, 2012 at 2:00 AM by Malcolm
On a panel several years ago, Dr. Dobbs's editor-in-chief Andrew Binstock was asked what was the greatest benefit that Agile had delivered to him personally. It took him no time to respond “unit testing.”
While this answer is not historically accurate — unit testing precedes the Agile movement — it’s clear that the Agile exponents made it a widespread practice. In large part, because of Kent Beck’s lapidary JUnit implementation, which has been widely copied to most major languages.
The specific benefit Andrew — and many other developers — have enjoyed is quite simply less time spent in the debugger. Today he writes code and then he writes unit tests that exercise the edge cases and one or two main cases. Right away, Andrew can tell if he missed something obvious or if his implementation has a slight burble that mishandles cases he expected to flow through easily.
Read the rest of this artcile here.