Monthly Archives: November 2012

Upgrading to Dojo 1.7.2

Upgrading a project to dojo 1.7.2 from 1.6.0.  While I could simply point to the new version (it seems quite backward compatible), I think it’s time to switch to the new AMD compatible require / declare syntax.

Step 1.  Pointed at the CDN and set async to true:

<script type="text/<span class=">// <![CDATA[
// <![<span class="hiddenSpellError" pre="">CDATA</span>[
// ]]></script>
javascript" src="//ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js"
// ]]></script>
 data-dojo-config="async: true, parseOnLoad:true">
</script>

Immediately the async: true caused dojo is undefined errors from dojo.byId and dojo.require statements.

// A slide out tab
dojo.require("dojo.fx");
dojo.addOnLoad(function() {
    dojo.animateProperty({
        node:"slideOutBox",
        properties: {
            height: 0
        }
    }).play();
});

The fix was pretty easy

Step 2. Change dojo.require to require and move dojo.addOnLoad into

require([“dojo”,”dojo/fx”, “dojo/domReady!”], function(fx){
});

 

Upgrading custom dojo build to 1.7.2

First build overwrote dojo.js, oops, which gave this unhelpful error,

js: uncaught JavaScript runtime exception: ReferenceError: "require" is not defined.

Note: I should have finished this post a year ago when I was doing the upgrade.  There were a few more issues I ran into but it’s a bit fuzzy now.

Project Failure

Part 1 of Managing Software Projects

Your project sucks.

It’s months late, over budget, full of bugs, or maybe it’s a total bust.  Worse, if you are managing the project you don’t even know how bad it is because you can’t spend your time crawling through the depths of the code.

At least you’re in good company. 70% of software projects fail to meet their budgets and deadlines and 1/4 of projects fail completely.

If failure is common, what can we learn?

First, let’s take off those rose-colored glasses that we put on every time we work on our résumé and look through our past jobs. “How many of your software projects have failed?”  It’s likely that not many come to mind, certainly not 70%. Most software operations tend to forget their failures or they never really kill off projects,

letting them sit around in a zombie state sucking morale from employees’ brains. Or, large projects are often partial failures once you measure the amount of maintenance required to run them;  a drag on the company rather than an engine of growth.

It may also be complicated, “These apps work, these features don’t, I don’t even know if that part works or not.” Especially for the project you are working on right now, it’s useful to think about whether different modules or features are successful or not. After all, the goal is to apply some bolt cutters to the parts that are a weight chained to your ankle and let the other parts of your project soar.

So it’s not enough to ask, “How many of your software projects have failed?”.  We’ll also ask “How did these projects fail?” Failure can take a lot of forms and it’s hard to measure something that people struggle to quantify and struggle to get good data on.

The largest source of failure, product failure, involves a lot more than software management. Getting the right product to customers for the right price, selling them on it, that’s the goal of most businesses and that’s the elephant’s graveyard of failures. Again, features or modules are often in this category. A set of features are developed for customers at great expense and then never rolled out or never purchased. Good prioritization can help with this problem, it’s a good compass, but when your customers are on the other side of the river a compass is not much use.

However, for now we’re concerned with software project failure—things that cause software projects for a good product to go awry, to fail completely, or to fail partially. First there are projects that got canceled. Those are clearly failures, right? Something was started, got some way along—a month, six months, two years, ten years—and then someone finally realizes that it’s a disaster and the company needs to stop working on it. Often this is because it’s gone way over budget or way over deadline. As the small problems add up over months or years, it’s easier to see, “Oh, this has gone really wrong.” “We were supposed to complete this in a year, it’s been two years, and it’s still not done.” Particularly this happens on projects for the government where there’s a set initial budget, things go late, extra funds are procured, but eventually things go so bad that the whole project ends up getting canceled.

Other projects get built and never rolled out, canceled in effect by the users. There isn’t enough checking in as the project’s being built, so when “suddenly” it’s time to deliver the project people realize, ‘Hey, this doesn’t do what we need,’ or ‘It does most of what we need but this last 10% is so critical that we’re going to ditch the whole thing; we can’t make the transition to that new software.’  All of these are failures due to lack of communication with users.

Another case is the cobbled-together software in use by customers that everyone agrees desperately needs to be redone. Similarly you often find software where the maintenance costs are too high, it’s not extensible enough, it’s breaking too often, it’s pretty clear  that new software needs to be built. A new software project is launched. Version 1 was at least a partial failure, thus we have Version 2: the complete rewrite.  Or 3.  Version 4: the complete rewrite? I think I saw that one already, it was much better with that one actor, you know, the guy with the long hair and the Linux Rules T-shirt?

When you add up these different kinds of software project failures you get that headline failure rate of 70%. People have studied this for decades and many studies come to the same conclusion.

Why is software hard?  Next up Software Engineering…