Monday, June 25, 2012

Why Managers Hate Test-Driven Development (TDD)

Why do managers (and many developers) hate test-driven development? Many developers hate the extra work: creating unit tests, mocking frameworks etc. And besides, their code always runs correctly the first time, right? But why do managers refuse it?

Consider the chief aim of the manager: to show progress to their boss. And consider the fundamental truth of all software: it will have to be tested.

A "test-free" schedule can show three months of effort to reach the System Testing phase. That is, after three months the manager can report "We're done with the coding, we're just in testing now". The fact that it now takes six months to "test" (and rebuild) the code is ok, because all managers know know that developers produce crap that has to be tested for a long time.

On the other hand, the TDD manager takes five months to reach the System Testing phase. Thanks to TDD, System Testing only takes one month. Delivery in six months instead of nine.

But for two months the non-TDD manager has been able to claim progress, while the TDD manager gets the stink-eye from the Big Boss.


Wednesday, July 15, 2009

The Problem of Change

Imagine you are a first-rate aerodynamic engineer. The year is 1946, and you have been creating the products that won the war. However, today your boss walks in and says the days of propellers are over: you are now to work on an entirely new technology: rockets. How will your organization adopt the new technology? What project should you work on first? What should you expect? What if it doesn't work?

This is the situation organizations around the world face every day. Many of them have been successful using previous conventional technologies. But now they hear about some new technology and wonder what should they do.

Of utmost importance is executive vision. The effort involved in any significant technological change is immense. Effective management requires the ability to manage change. The key to managing change is the vision of where you want to be. Without high-level management leadership the change will not happen. Management must support the change. There must be an understanding of the risks and benefits of the new technology, but more importantly, an understanding of the difficulties of this kind of change.

To return to the aerodynamics to rockets metaphor, management must understand that despite the organization's previous success, with the new technology they are re-starting at square one. Management should not expect the first project using the new technology to be a trip to the moon. Small scale experiments are necessary first.

Furthermore, management must expect a few projects to "blow up on the pad". An effective engineering organization uses these "failures" to learn and improve. Without an acceptance of the risk of failure, no progress will be made.

This leads to the next major area of importance: the engineering organization. The effective engineering organization is at its core a learning organization. The organization has management support to examine new technology to determine if it is worthwhile or merely the latest flash in the pan.

The organization must be process and people focused with a culture of improvement both continuous and discontinuous. It understands technology transfer and has effective means of communication, training, and people development.

Many of the management techniques that produced success previously will be applicable to the new technology. How do you know which are applicable and which are not? And of those that are, how do they apply? Determining the answers is part of the process of technological transition. Invariably mistakes will be made. These mistakes must be treated as learning opportunities, not blame opportunities or the transition will not succeed.

Those organizations that have management support and already have in place an engineering culture are much more capable of change and the adoption of new technology than those without. While seemingly obvious, too many executives do not understand that the key is not technological at all, but the very way they themselves do their job.

Monday, July 6, 2009

I See You

Back in the old days the science fiction super genius Damon Knight wrote a story called "I See You". He's one of the giants of the field, and wrote some amazing classics (for example, "To Serve Man").I don't know if you can get his collections anymore, but you can get an ebook at the EBookMall, which has the summary:

A machine is invented that can view any person, place, or thing at any time in the past or present anywhere in the universe. The implications for politics, personal privacy, crime and punishment, space exploration, and historical research are mind-boggling and brilliantly explored in this short story. Hugo Award Nominee

While we don't quite have the "anywhere in the universe" part yet, we are nearly there as far as "the present" and even the recent past.

All that is needed is a user interface to an abstraction layer over all the traffic cams, surveillance cameras, nanny cams, cell phone videos, paparazzi, drone cams, flikr's, street-views, facebook's, you-tube's, etc on the internet. And your friendly search engine, of course. You could pick a place, say Trafalgar Square, and a time. The new tool would stitch together all the video and image sources to allow you to change viewpoints and pivot around the action in 3-D.

While this is fun, combine it with face recognition software to take the idea of "following" someone to a whole new level of creepy stalking. Now you are not just waiting for the next 140 characters but can actually watch them as they type. Set alerts to be notified when they emerge into view of any camera anywhere in the world. Back up the action and watch from a different angle. Use video interpolation software to fill in any missing parts.

Now go back and read the story. Just add a little more programming and we're there.

Friday, June 26, 2009

Requirements generation using Remember the Future

My current client needed to get requirements for a new system from people who do not think in terms of functional requirements, use cases, or even user stories. Their understanding of the future hypothetical system was too vague and undefined for those levels of detail.

Instead, I decided to run a session of Remember the Future (RtF). Not only does RtF encourage vision creation, it is also inexpensive and simple to run. The client understood that RtF generates material that then needs to be collated and translated into more "usable" requirements.

The session had good participation from marketing communication, business, and front-line customer interaction folk. The client was surprised by the amount of material that was generated, with about a third of it being directly translatable into requirements.

One of the reasons why Remember the Future is good for this sort of situation where specific detailed requirements are problematic is that by looking back from the successful "reality" of the future and telling us in the past what it is like up there, it leverages the human mind's ability to confabulate.

While confabulation is distressing from a politician explaining their fiascos and amusing in a four-year-old explaining how the dog got on the roof, it forces a pure "blue sky" vision into specifics and tangible details.

We can then derive requirements from the specifics and go back to the participants to check against the "reality" that they imagined.

The material that was not applicable to requirements is also useful because it allows us to set and communicate system boundaries.

Friday, June 5, 2009

Innovation Games in Action

I had the opportunity to work directly with Luke Hohmann, founder of Enthiosys and inventor of Innovation Games, helping to facilitate the sessions he was conducting. The venue was the User Conference of one of his customers, a software company from Austin. The games used were 2020-Vision, Speedboat, and Buy a Feature.

There was a lot of preparation behind the scenes prior to the event. The users were being asked to provide feedback on the future direction of the product, so time was spent putting together lists of features that could be developed along with descriptions of them, etc.

2020-Vision was used with executive-level customers to prioritize features. This is a more facilitator-focused activity, where participants compare features in pairs deciding "better One, better Two" much like your optometrist does when fitting you for new glasses.

Speedboat was used to identify things in the existing product that people wanted changed or improved. This game begins as an individual-focused activity, as each participant begins by writing down things that they personally don't like. As the game progresses and people see what other people have said more and more interaction occurs.

Buy a Feature is a completely participant-focused activity that simulates a "market" for features that "cost money". Users discuss the features and debate what is worth spending money on. This forces people to combine their money to get expensive features beyond the budget of any one person. This game is a cognitive decision-making triumph, as it leverages Wisdom of Crowds, Prediction Markets, and fun.

At the event was a journalist/observer who noted that despite the apparent chaos of the activities, it was actually quite directed and successful. My response was that Innovation Games events are forms of dynamic, non-linear stability, which is much more robust in the face of random or unexpected events. (The standard example is that of earthquake resistant buildings--fixed and rigid "stability" or designed to sway with the movement of the earth?)

Wednesday, May 27, 2009

A Quantum Entanglement test for Sentience

Quantum Entanglement was called "spooky action at a distance" by Einstein. For example you can "split" a photon and create two entangled photons, separate them by a great distance, and then what happens to one happens instantly to the other. "Instantly" means faster than it would take information traveling at the speed of light to get from one to the other.

What is interesting for us today is that the "happening" is done by a conscious mind. A photographic plate is examined, a phase filter is set, etc. In every article I've seen, the conscious mind is a human mind.

For purposes of this argument we'll call humans sentient. And we'll say the collapse/resolution of the quantum state is due to examination by a sentient being.

So here is my question. What if you trained an animal to "examine" the quantum state? Maybe with different lights for the state being up/down, and the rat or the bird or the dog has to push a lever to indicate they have "seen" the resolution one way or the other.

If the animal mind does cause the state to collapse, then do we say the animal is sentient? Or is it simply that being able to collapse a quantum state is not proof of sentience?

If the animal does not collapse the state then it is easier to say they are not sentient.

Wednesday, May 20, 2009

An Introduction to Time Travel using Black Holes for new Star Trek fans

People new to science fiction, black holes, or Star Trek might be confused by the new Star Trek movie. "How can we see Spock's mom in episodes of The Original Series (TOS) if she died on Vulcan?" Explanations that glibly proclaim "time travel" don't really explain what happened.

"Time Travel" using a black hole should not be called time travel at all, but instead alternate universe travel.

When you traverse a hyperbolic orbit around a black hole (and cross the event horizon) you "cease to exist" in the same universe you were in prior to the transit. Current physics says you end up in the "future", but what's the fun in that?

Think about what the word "horizon" means. As you watch something go "over the horizon" it has gone beyond your possible influence. Even if you do go to the future, it is a future that has no connection to the universe you left.

So in the movie we have Nero and Spock leaving their universe (the universe of William Shatner, TOS, The Next Generation (TNG), et al) and entering a new universe. This new universe is Our Universe. A universe with Nokia phones and 236 year old records of the Beastie Boys.

A universe where none of the episodes of The Original Series (TOS) exist.

Not merely don't happen, or haven't happened yet or will happen. Not exist.

This is not "time travel", because it has nothing in common with the previous, pre-transit universe. Nero and Spock have "stepped outside" the light cone (the set of all states reachable at the speed of light) of their universe and entered ours. (see The Large Scale Structure of Space-Time by Hawking et al page 169).

Any and all things you know of Star Trek occured in a different universe. There is no possible event path from this universe (with Bud Classic and dilithium crystal mines in Iowa) to a universe in which any event from the previous TV shows or movies occur.

You should think of TOS, TNG, DSN, V and the excreable Enterprise as just dreams, sort of like Dorothy and Oz.