The Law of Lossy Requirements by Bruce Nielson

Lossy Compression

In computer science, compression is an indispensible tool. Anyone familiar with .zip files knows what I mean. Interestingly, there are two kids of compression, lossless and lossy. Lossless compression is like .zip compression, you put a file of, say, 100kb in and the end result is a file of, say, 50k. But when you reverse the process, you get back your original 100kb file.

Lossless compression relies on the fact that in real life information contains patterns. Just imagine taking this post and finding the most common used words in it. Then replace the most common word with a the tag “<1>” and the next most common with “<2>”, etc. The end result would generally be a smaller file, yet by replacing “<x>” with the original words you could recover the original file in its entirety.

I used to wonder what possible use lossy compression could ever be. Why in the world would I ever want to save off a compressed version of my files if I couldn’t get them back to their original state ever again?

Of course for files, lossy compression is useless but for computer graphics it’s quite useful. Because the human eye is not capable of picking up all the details in an image it’s possible to reduce the details in the image without the human eye being able to tell the difference.

What’s even more interesting is that you can continue to increase that lossy compression on an image until the human eye can tell the difference, yet the brain will still be able to tell what the image is. It just looks a bit more blurry.

In fact, you can continue to compress and compress using lossy compression to any size. At some point you end up with a single solid color, of course, which isn’t useful, but even if you take a very large image – let’s say 1024 x 1024 pixels – and shrink it via lossy compression down to the equivalent of a 16 x 16 image, the human brain fills in the details and still makes sense of the image.

Requirements Are Lossy Compression

If Code is Design, one of the most under appreciated points of software development is that requirements are equivalent to lossy compression of graphics, only in reverse. (See also Tell Me What To Do, Not How to Do It for an example of this.) 

What we call “requirements documents” (or even “design documents”) are really a blurry picture of what is to be built. In other words, requirements and design documents by definition do not contain all the details.

Why do we do this? There are actually many reasons, but here are two key reasons:

1. Until the software is actually built, it doesn’t exist. So there isn’t really a choice but to imagine it with broad brush strokes and then refine it into reality.

2. As was discussed in a previous post <link>, human beings more easily understand abstractions rather than precision. If we didn’t have abstract and blurry views of the design, no one but the programmer would ever understand what is to be done. Actually, even the programmer would only understand it in chunks and not holistically.

The Law of Lossy Requirements

If you followed my argument so far, then The Law of Lossy Requirements will now make sense to you. This law states:

All requirements documents are a lossy compression of the business rules. If you made it non-lossy, the cheapest way to document it would be in code.

Therefore there are two corollaries to this law:

Corollary 1: There will never be a point where you know all details of what software is to be created until the software is completed.

Corollary 2: There is no such thing as documenting everything in the software because to do so would require synchronizing essentially a second copy of the code.

Comprehensibility vs. Precision by Bruce Nielson

Abstraction vs. Precision in Requirements

I used to be an instructor for Rational Software’s RequisitePro software, which included a class called “Requirements College.” This useful class helped teach people how to elicit requirements from their customers.

Three things that really stuck with me from the class were, first, the idea that one does not “gather requirements’ per se, but elicits them. If taken literally, “gathering requirements” implies that requirements are readily available and you just have to pick them up and take them. This flies in the face of reality; requirements have to be created from nothing.

The second was the idea that How and What are relative to a point of view. I’ve written about this in the past.

The third was that, according to the course, abstraction and precision form a spectrum that affects comprehensibility.  The idea was that if you are too abstract, your writing won’t be comprehensible at all. But if you are too precise, it’s also not comprehensible. The following graph illustrates the idea:

 

Comprehensibility 

Legalese is a good example of this. Legalese is very precise wording for legal purposes, but because its so precise, it’s difficult for anyone but a lawyer to understand – and that’s not a fair comparison because the lawyer at least gets paid to slog through it.

Therefore, according to the course, requirements should seek the sweet spot of maximum comprehensibility, where it’s neither too precise nor too abstract.

Useful, but Misleading

This idea of avoiding too much precision to increase comprehensibility is a useful idea. But I couldn’t help but feel it also somewhat mislead.

I kept thinking to myself: but what if that level of precision is what you need to come to an agreement on?

Imagine dumbing down legalese so that it’s more “comprehensible.” Would that be a good thing? It’s not like legalese was created to keep lawyers employed (though sometimes it might seem that way.) On the contrary, legalese was created because a more comprehensible abstraction would also have multiple possible meanings. In a court of law, that’s precisely what we’re trying to avoid. Ergo, the need for legalese.

Are Software Requirements Like Legalese?

Now if the point of requirements documents is to get everyone going in the same general fuzzy direction, I can see that a comprehensible abstraction would be the best way to handle it.

But if the point of the requirements is to come to agreement on how to specifically implement something, there is no substitute for precision in details. I believe “requirements” (and also “design”) must therefore be considered as something closer to legalese in such a circumstance.

In an ideal world, we’d probably want both. We’d want to start at the highest level of abstraction and work our way down, keeping every stakeholder informed and involved as we take the fuzzy abstraction and turn it into something specific and detailed.

But in reality, the Marketing People drop out after the first details start to be filled in, Management’s eyes begin to glaze over once the “requirements document” is complete, and even the Technical Lead might to nod off once we get into the really nitty gritty details.

Conclusions

I see an essential tension between “comprehensibility” and the need to come to agreement on an actual implementation, which requires comprehending the actual details. I think this is one of the hardest problems in software development and I do not expect this to be a problem that can ever be overcome because it’s the essential nature of software itself.

Proper Use of Overtime by Bruce Nielson

It seems to me that “overtime” is a much talked about subject, both in literature and just around the water cooler, but that people tend to take one of two extreme views on it.

The first view is that overtime is immoral unless the development team screwed up. This point of view says, “if I made a mistake, I’ll make good, but otherwise, I expect to never have to work overtime. So long as I’m giving it my best, overtime – particularly unpaid overtime – is immoral to ask me for.”

The second point of view is that “it’s part of the job.” From this point of view overtime is just part of doing your job and no developer should think otherwise. Those that do think otherwise should seek other employment.

Now it seems to me that people don’t usually stick with one point of view on this. We tend to swing about, based on our current situation, as to whether or not overtime is “part of the job” or “an immoral practice.” Particularly, we tend to think of it as “part of the job” when it’s someone else and “an immoral practice” when too much of it is asked of us personally.

I propose that neither point of view is true.

I think overtime is a legitimate tool in the toolbox to get a job done. But if it’s your only tool – or worse yet, only remaining tool -- you’ve probably already lost the battle.

In a past post I pointed out that software estimates tend to be pretty bad. And elsewhere, I pointed out that the need for upfront estimates is a ‘water breather’ i.e. the need for them is so significant that lack of ability to make good estimates isn’t reason enough to not make them.

I think the rest is obvious. In business, we rely on estimates that we often can’t accurately make. Even if we “do it right” when making an estimates it’s just not always enough for the estimate to be accurate. So when estimates fail, we must face hard choices. These include:

1. Cutting scope

2. Working overtime

3. Delaying the due date

Now it’s easy to say “Well, just cut scope or delay the due date, because it’s wrong to ask me to work overtime for something that isn’t my fault. I had no way of knowing that X was going to happen and delay the project.”

But I think this is an unrealistic view. If a project estimate goes south, typically it goes far south, so there is often a need to do all three of the above to rectify the situation.

But of course the inverse point of view must also be seen as valid. If your team is working overtime to make up a bad schedule, but you aren’t also cutting scope and/or delaying the due date as far as possible, then you might as well admit that you aren’t serious about your schedule and you’re really just punishing the team.

Oh, and expect your team to be aware of this.

So what’s the proper use of overtime? I’d say it’s one tool in the box to deal with bad estimates, that it shouldn’t be used without using other means as well (such as cutting back on scope), and that you should be careful to not do it more often than is necessary.

What Constitutes a Change of Scope? by Bruce Nielson

In a previous post I used Robert Glass’ advice from his excellent book, Facts and Fallacies of Software Engineering to come up with what I see as the industries standard advice on how to do good software estimates:

To summarize, the standard advice is to:

  1. Not make estimates until requirements have been defined
  2. Always let the programming team make the estimate, not management or marketing
  3. Use change control on the estimate as requirements change

While I believe the above advice is good advice, it’s no where near sufficient to address the very real problems of software estimation. However, if you aren’t doing at least the above, your estimates are doomed. So Glass’ points are at least a good starting point.

Now one objection I anticipate from the audience is that if #3, if understood in a certain way, would make it impossible to ever miss an estimate. If you can always change the estimate to match reality, how can it ever be missed?

I actually think this is a good point that starts up down the road to understanding the real problems of software estimation.

First of all, if we take that point of view to its logical conclusion, this is really just the same as saying that the estimate isn’t worth the paper it’s printed on. Imagine going into a car shop (or when buying a house, or whatever you want to imagine) and being told “well, it will probably cost $1,000, but we’ll let you know if it’s going to cost more.”

Then a couple of hours later you receive a phone call. “Yeah, it’s like I thought. The problem is bigger than anticipated. I’m projecting $2,000 now.”

Then the next day you receive another call. “Well, it’s taking longer than expected, so I’d say probably $3,000 now.”

By this point, you’d a) break into a cold sweat every time the phone rang, wondering how much more you owe now, and b) you’d probably have pulled the car out of the shop and taken it to a “reputable” place.

So the first thing we need to understand, is that if you take #3 above to mean “I get to correct the estimate any time I realize it’s going to take more” that we’ve fundamentally misunderstood both human nature and the purpose of an estimate.

The Meaning of “Scope”

Now I anticipate another objection might be: “Well, you’re giving an example of where nothing changed. It’s still the same scope at that car shop, they are just charging more because it took longer. That’s unfair and immoral. I’d never advocate that. I only advocate changes of scope that are obvious and clear.”

Ah, very good. So there is an emotional difference between asking for more money when there is a clear change of scope vs. when the change of scope is vague.

But what exactly is a “clear change of scope”? Are all legitimate changes of scope “obvious” and thus “clear?”

For example, if you brought your car into the shop because there is a knock in it and the shop looks it over and says “well, it’s probably the carburetor, so I know it will cost $1,000 to fix” and then they start work on the car and they don’t find a problem with the carburetor, is it really the same scope still?

There are two ways to think of this, both are fair in my opinion. The first is, the customer’s point of view:

The scope of work that was estimated was to remove the knock. They are the experts, so they should have diagnosed it correctly. If it wasn’t really the carburetor that was causing the problem, that’s their problem, not mine. The scope of work has not changed so the price should not change!

The second point of view is the car shops point of view:

I did my honest best to diagnose the problem. Every time in the past I’ve heard a knock like this, it’s been the carburetor. Any competent mechanic would have diagnosed it the same. When I made my ‘bid’ it was to fix the carburetor, not to remove a vague knock. If I later find out there is a much more extensive problem, that constitutes a change of scope, and thus I have the right to ask for more money!

So who is right? I think most of us impulsively believe the customer is right in this circumstance, mainly because it would make us really mad to be treated the way this hypothetical car shop is treating us. So we “go with our gut” on it and declare the car shop both wrong and immoral.

But think about this problem from the point of view of being a programmer. Really, give it some thought. I have never know a programmer that didn’t take the “car shop’s view” when the shoe was on their foot.

“Scope” is Inherently Vague in Software

I’d submit that actually both are right. Or more to the point, there is no actual “right or wrong” here. We’re making a moral issue where no moral issue exists.

In reality, whether the car shop should take the first or second point of view is entirely based on what is right for their business long term. If they want to ask for more money, this is completely fair and moral, but it’s very likely to end the relationship with the customer and that is as it should be. So they get to decide for themselves if they want to take a loss on this one to keep the customer or if they want to exert their right to declare this a change of scope and ask for more money before proceeding.

But the key point I want to make is that most of the time, it’s not clear what a “clear change of requirements” is. For it to be clear, the “requirements” would have had to have been very detailed, in this case, specifying what they were estimating based on their plan to inspect the carburetor.

But in the case of software, how detailed would you have to be with your ‘requirements’ to avoid debate over if something was a change of scope or not? Likely it would require you to write your ‘requirements’ in pseudo code. (More on this in later posts.)

If the requirements were more abstract and general then pseudo code, then I submit that there will usually be some wiggle room for both sides and for both points of view to declare a cost overrun as either “in” or “out” of scope for the requirements, just like our car shop example.

So my point is simply this: ‘Clear changes of scope’ are rare indeed. You’ll mostly have to live with muddy ones. Turning it into a moral issue is a mistake. (“Those crummy customers always changing the requirements on the project! What immoral cretins!”) It’s just a business decision about what will be in your best interest long term.

The Prime Mistake by Bruce Nielson

In a previous post I talked about the blame game. I suggested that “the blame game” is a necessary part of software failures so it shouldn't be treated with as much fear and loathing it usually receives. By understanding the human need to pin down blame (and the general inability for human's to be able to) we are avoiding ignoring this very human success or failure factor.

Related to “the Blame Game” is what I call “the Prime Mistake.” And unfortunately, The Prime Mistake, is very bad for software developers, so it’s best we understand the concept.

The perfect example of “the Prime Mistake” happened to me years ago back in high school, in my Geometry class. My teacher had a bad habit of making all the problems dependent on the answer of a previous problem. Worse yet, he didn’t give partial credit for having done the follow on problem the right way but with the wrong starting value.

On one test I took, I missed the very first problem due to a stupid error. The rest of the problems used that value as their starting point, so I basically missed everything.

That first problem that I missed is an example of “the Prime Mistake” because it’s the original mistake that causes all the follow on mistakes.

Part of the Blame Game is the attempt to track down the Prime Mistake so that we can pin everyone else’s mistakes on one person.

Developers and The Prime Mistake

When it comes to developers, the Prime Mistake seems to be particularly dangerous. As it turns out, absolutely all problems in software can be traced (in some way) back to the programmer, usually with a pretty obvious cause and effect – a mistake on the programmers part. Woe is the software programmer!

Due to the prime mistake, the programmer may end up with basically everything at their feet. After all, every single defect in the code is – in a very real sense – their fault.

The problem with this line of thought is that removing all defects is beyond human capacity.

Worse yet, we tend to be far more forgiving of “mistakes” in principle than in practice. Ask any user or manager or user upfront if they accept that programmers, no matter how hard they try, will make mistakes. “Sure, they say. It’s inevitable.”

But then watch those same managers and users after an actual bug lead to a problem that causes a real dollar loss! Heaven help the programmer then.

The problem is that when a real defect is uncovered, it doesn’t come in a “theoretical package” it comes with real damage, such as loss of dollars, confidence, or prestige. This is why we react differently to real defects than theoretical defects.

To make things worse, real defect are shortly followed with “a fix” which is really just a fancy way of saying “all information about how it could have been avoided if the programmer has just been ‘a bit more careful or smarter.’”

So the temptation to assign the Prime Mistake to the developer may become overwhelming for “real defects.”

Spreading the Blame Means Spreading the Responsibility

In our more theoretical moments, we know that programmers can’t possibly have no defects. It is this realization that has led to the industry standard of having “testers” that are separate from programmers. Indeed, the invention of “testers” is a very good step in the right direction. We effectively “spread the blame” out a bit. If a defect gets past both the developer and the tester, we might feel a bit more forgiving to the developer for having “screwed it up.”

(Another point is that a tester hopefully helps find the defect before there is a loss attached to it. But this is a tale for another time.)

But we shouldn’t stop here. Software is so complex that even a good developer and a good tester together can’t realistically “not make errors.” Everyone involved in the project must take responsibility for avoiding defects. The users must test regularly and give clear requirements, the programmer must use automated unit tests, and the testers must have test plans so that they aren’t relying on memory. Removing defects in software is never one person’s (or one group’s) responsibility.

And when all of that together fails, at least everyone knows we all did the best we could.

Code is Design by Bruce Nielson

The Story So Far

Let’s return to the primary concern with Software. We’ve talked about how most software projects either fail altogether or run significantly over budget. Along with that thought, we considered the statistics that show that the development team itself plays little role in the success and failure of the project in comparison to users and sponsors. However, contrasting that we’ve looked at how software development is really developed in “thought units” more so then actual code.

These two facts seem on the surface to be at odds with each other. If software is really developed in “thought units” then why do users and sponsors have more control over the success and failure of the project then the developers?

Coding As Design

I will now explore this question further in a series of posts. But first, we need to look at the concepts of “software design” vs. “software coding”

Rumor has it that software is an engineering discipline and because of that, our industry adopted much of the vocabulary and process used by real engineers. This led to the creation of the both famous and infamous “waterfall methodology” where we pass through water tight stages that start with Requirement Gathering, move on to a documented Design, and then finally Construct what was designed, finishing off with Testing and then Release.

It’s all a bunch of posh, of course.

Actually, despite it’s recent (and partially deserved) bad reputation, the waterfall methodology has a lot to recommend it. To this day, I’ve never come across any methodology, Agile or otherwise, that doesn’t owe a great debt to the Waterfall methodology. So let’s not throw out the baby with the bath water.

However, what we software developers do is not really engineering in the true sense and probably never will be. This is why a strict waterfall approach, which serves so well in other engineering fields, has failed us miserably.

Jack W. Reeves classic article, “What is Software Design?” addresses this directly. (See also this link, for further information.) What Reeves correctly points out is that what we call “Software Design” is not a complete design at all, but is rather what he calls a “high level structural design” yet we treat it as if it’s some sort of complete detailed design (even often calling it “The Detailed Design”).

Now maybe you’re now thinking, “So it’s a high level design instead of a detailed design. So what, who cares?”

Yet, as I’ll show in future posts, this seemingly small distinction might just be the entire difference between understanding the real problems of software development and turning a blind eye to them.

But let’s let Reeves speak for himself. He says:

For almost 10 years I have felt that the software industry collectively misses a subtle point about the difference between developing a software design and what a software design really is. … This lesson is that programming is not about building software; programming is about designing software.

…the software industry has created some false parallels with hardware engineering while missing some perfectly valid parallels. In essence, I concluded that we are not software engineers because we do not realize what a software design really is

A program listing is a document that represents a software design. Compilers and linkers actually build [manufacture or construct] software designs.

…it is cheaper and simpler to just build the design and test it than to do anything else. We do not care how many builds [constructions or manufactures] we do—they cost next to nothing in terms of time.

[The] designs will be coded in some programming language and then validated and refined via the build/test cycle.

Is Programming a Form of Engineering at All?

Reeves questions if Programmers should be called Engineers if they don’t even realize that programming isn’t “manufacturing” or “construction” at all, but is really “detailed design.” But Reeves never quite questions if programming might not be Engineering at all.

But this leaves one uncomfortable. If our industry is full of programmers that do detail design and think they are doing “manufacturing” (i.e. “construction or building of a design”) how could they possibly misunderstand their own engineering discipline so severely?

Agile Maven, Alistair Cockburn, suggests how by questioning the very notion of “software engineering”:

Software development is not “naturally” a branch of engineering. It was proposed as being a branch of engineering in 1968 as a deliberate provocation intended to stir people to new action [Naur-Randell]. As a provocation, it succeeded. As a means for providing sound advice to busy practitioners, however, it cannot be considered a success. After 35 years of using this model, our field lacks a notable project success rate [Standish], we do not find a correlation between project success and use of tidy “engineering” development processes [Cockburn 2003a], and we do not find practitioners able to derive practical advice to pressing problems on live projects. (See link)

Elsewhere, Cockburn points out that the whole notion of “software engineering” was actually just an attempt to provoke less than obvious parallels between programming and true engineering fields. “The term ‘software engineering’ was coined in 1968, in the NATO Conference on Software Engineering,” Says Cockburn, “It is fascinating to read the verbatim reports of that conference and compare what those attendees were saying with what we have created since then.”

He then quotes from that conferences notes on the background of the conference:

The Study Group concentrated on possible actions which would merit an international, rather than a national effort. In particular it focused its attentions on the problems of software. In late 1967 the Study Group recommended the holding of a working conference on Software Engineering. The phrase ‘software engineering’ was deliberately chosen as being provocative, in implying the need for software manufacture to be based on the types of theoretical foundations and practical disciplines, that are traditional in the established branches of engineering.

It may well be time for us to abandon the very notion of “Software Engineering” and to base our development techniques off of some more natural match. Reeves agrees:

In many ways, software bears more resemblance to complex social or organic systems than to hardware.

Ramifications of Software As Design

Rethink, for a moment, how accepting “Coding” as really being “Design” changes the way we think of software development. The ramifications are substantial.

First of all, it means software development, being a design activity, will always change after the requirements gathering and high level design are “completed.” We would no more expect software to merely follow the “original design” (which we now know is only a high level design without all the needed details) then we’d expect Intel to design their next generation process only at a high level and then lock it in permanently. Any attempt to do so would be met with the same sort of frustration that plagues the software industry.

Another ramification is that it often makes sense to “get to coding” (i.e. detailed design) as quickly as reasonable. Contrary to popular belief, not all rushes to code are “hacking.”

Indeed, any methodology that encourages “design” (i.e. high level design) to be simultaneous with “coding” (i.e. detailed design) will be superior to one that doesn’t. This explains the popularity of methodologies such as “spiral,” “rapid prototyping,” and now “agile.”

Furthermore, testing software is actually a design activity as well. It’s how we validate the design details. Thus any methodology (a la Agile) that encourages testing during “coding” will be more successful than one that doesn’t.

Conclusion: It’s All Design

Wait! Did you read that right? Is it really true that design, construction, and testing phases are all really just design?

As Reeves so aptly put it:

The overwhelming problem with software development is that everything is part of the design process. Coding is design, testing and debugging are part of design, and what we typically call software design is still part of design. Software may be cheap to build, but it is incredibly expensive to design.

Tell me What to Do, Not How to Do It! by Bruce Nielson

Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. – George Patten

This sounds like good advice doesn’t it? It is, actually, but we need to understand it correctly.

The first thing we need to notice is that there is no objective difference between ‘what’ and ‘how.’ The difference is purely relative.

If I’m a marketing guy, I’m going to give you a ‘software spec’ that might be a series of bullet points that says:

  • Make the Whiz-Bang 50% faster to improve the user experience
  • Add the Gog Widget everyone keeps asking about
  • Enhance the Dribblium feature to automatically look up user information

If I’m the marketing guy “what” I’m doing is increasing sales. “How” I’m doing it is by the feature improvements listed above.

But to the team manager, this looks a lot more like a list of “what” needs to be done with no details on “how” to do it.

So the team manager takes this list of bullet points and creates what we (mistakenly) call “detailed requirements.” He now carefully lays out the details of “what” needs to be done but decides to leave it up to his tech lead on “how” to accomplish it.

The tech lead then creates what is (mistakenly) called a “detailed design” where he makes a bunch of UML and designs out exactly “what” he wants his programmers to do but still leaves it up to them on the specifics of “how” to implement that design.

Interestingly, the programmer then writes the code which, from the compiler's point of view (do compilers have points of view?) is really a specification of “what” the software needs to do, but leaves it up to the compiler of “how” to do it.

So based on this example, we must accept that “what” and “how” are purely relative to a point of view. They do not objectively exist.

Perhaps this is why we don’t usually make a separation between “what” and “how.” They tend to mingle freely in our minds. Have you ever called your spouse and said “Hey, what time were you planning to be home?” when what you really wanted to know was “How much longer can I stay out with the guys/girls?” I do this all the time.

This is actually useful to know. Because it means that you never have to take an instruction as “how” you have to do your job because what people actually care about is “what” they wanted to accomplish.

I remember a customer that insisted that a certain field, I think a zip code, was to have exactly 6 characters in it. This was a hard fast requirement.

It turned out that they were used to a DOS-based program where the program moved to the next screen upon finishing typing in the last field on the previous screen. The zip code was the last field, so they wanted to be able to enter it and not move to the next screen before having a change to review it. (For those of you under 30, DOS is a quaint little program that lets you type stuff and then it deletes all your files)

Of course in a windows based program (for those of you under 20, Windows is that thing you see just before you click on the browser) this was a non-issue. The correct ‘requirement’ was actually “allow me to review the screen before I move to the next” which is built into windows anyhow.

But that’s my point. You should never just assume that because your customer told you “how” to do something that they weren’t actually trying to tell you “what” to do and just didn’t know how to ask it right.

So don’t just blindly follow requirements. Instead, make a real effort to understand ‘what’ the customer really wants to accomplish and come up with your own suggestions of ‘how’ to accomplish it. Think of requirements as the starting point of the discussion, not the ending point of ‘what’ you’ll finally deliver.

Software Schedules as Budgets by Bruce Nielson

Do you make a keep a budget with your home finances?

Maybe I should ask “should you make and keep a budget with your home finances?”

If you are the average American it's likely that you answered “no” to the first and “yes” to the second. Why do we not do things we know we should do? I suspect the answer is quite simply: because it's hard work. As Scott Adams (creator of Dilbert) so aptly pointed out, hard ward is both “hard and work.”

The other day I was talking to my boss about a project over run. I explained that I had talked to the developer one day and the project was under budget. I had talked to the developer about how much more time to spend on the project and then to stop work and save some of our remaining budget for a final site visit. He had forgotten and kept working and used up the remaining budget.

When I told my boss about the overrun, he asked me why developers did this so often: “Why do they over run their budget and not tell anyone when all they had to do was prior to over running their budget tell someone so that the appropriate arrangements could be made?” he asked.

He is right to ask this question. This really is a case of cutting off your nose to spite your face. If you put yourself into the customer’s shoes, there is a considerable psychological difference between being told in advanced that you have some hours left and being given choices on how you can spend them versus being told you are already over budget and have no choices at all.

So why does it happen so often that the developer only informs us all about the budget overrun after the budget is gone?

I think it goes back to my personal finance budget question: budgets are hard work. I suspect that programmers really don't like to track their time and tasks.

Indeed, I have been routinely told by developers that “Tracking hours is the Project Manager’s job!”

I don’t buy it.

Now typically status updates are done once a week in detail, maybe less. So it's not hard to see that, if a programmer have a 20 hour task and the next status update is 40 hours away, a refusal to track his own hours will lead to up to a 20 hour overrun before the Project Manager is even capable of interfering.

So of course, if the Project Manager can't trust the programmer to report the pending overrun, he'll probably switch to twice weekly status reporting to avoid this problem in the future.

But what if it's a 1 hour task with with (now) bi-weekly status reporting? This is a losing proposition, isn’t it?

Lest we decided to have status reports every hour, there really is no alternative to a programmer tracking their own tasks and schedule.

The Blame Game by Bruce Nielson

I want to discuss the need for blame on software projects. “Ug! The blame game! I hate that!” I hear you groan.

But it's an all too familiar game for all of us. We all know that software (or all human endeavors actually) end with what we call “the blame game” where we all point figures at each other and claim the failure was someone else's fault. We say we are mad when this happens, yet we participate in said game with uncanny gusto.

I think it's a mistake to overlook the human value of “the blame game.” Frustrating though it is, the end result of the blame game is usually that blame is redistributed around to the point where it's impossible to blame anyone, because everyone (or no one) was at fault. And I'd argue that this end result is generally the accurate one – there really was no one person at fault more so than just about everyone else.

 

In fact, most of the time, the “fault” is the “process,” not a person. (There is that dirty word “process” again.) Yes, there are many exceptions, but my experience is that most people (granted, not all) really do care about their projects. They want to be successful and they want to make their company successful. If there was a failure, it's generally because there was no recourse but the one taken.

An Example – Just Cut Testing! 

Think about this familiar scenario: A software developer is faced with unreasonably mandated due date from the highest echelons of a large company.

Do they:

a) Have a nice chat with everyone up the food chain (possibly including the chairman of the board, the stockholders, or the competing company that forced the situation) and change the date to be more realistic, or

b) Quit their job now, since they’ve already failed, or

c) Make qualified statements about how “they can make it if…” knowing full well “if” will never happen.

For those that insist that they’d never choose option c, but would instead negotiate a better schedule, please, for the sake of argument, assume you tried that a thousand times and failed. So you now have to decide to either quit or go forward. You always have the option to quit later, of course.

I don’t know about you, but I’m not an idiot. I’d choose c over b. In fact, I’d dare say there is no choice here in the first place. C was the only correct answer.

In other words, my best bet is to take a stab at it.

I’d quickly come up with some written “requirements” (Heck, I’ll at least then be able to explain what requirements changed during the course of the project that way) but I’d have no qualms about reducing safety margins on other tasks, like say testing. (This is a painfully familiar story, right?)

Given this hypothetical circumstance, I’d have to be stupid to not use this approach.

Who’s to Blame for All These Defects?

When inevitably this leads to defects – perhaps even critical ones – can we truly say it's the developers fault? Or is it the testers fault for not having caught the defect? Or is it the project manager's for not planning enough time?

Or, here's a thought, maybe it's the Chairman of the Board’s fault for creating a culture where a developer finds himself in this position in the first place?

No wait! Maybe it’s the stockholder’s fault for demanding more than was reasonable.

You tell me, because it seems to me that you can't really pin the blame on anyone really. Granted, the Chairman of the Board (who probably didn't even know about the project) probably has more blame to shoulder than the developer who caused the problem. But can we really say it’s his/her fault?

So when things get ugly and the blame starts to fly, just repeat to yourself this little rule:

The blame game is a healthy way of redistributing blame until no one is found to be at fault.

Then, without guilt, play the blame game. Since you know it's a necessary ritual to moving on, you can choose to not be nasty about it. Defend yourself, but make it clear it's not “all your fault” either.

For example, let's say you are a developer. Go ahead and point out that you weren't given much test time, so it made sense to code and test quickly to make the schedule. Go ahead and point out that even the tester missed the problem. Go ahead and point out that if the company really wanted to see defect-less software, they'd take more time to get the software “just right” before a release. The end result is that you just blamed everyone else (including yourself) and helped appropriately redistribute the blame so that no one was really at fault.

And that's how it (generally) should be.

How Do You Estimate for That?! by Bruce Nielson

Trying to estimate software projects is difficult to say the least. But sometimes, it’s just impossible.

I just finished resolving a problem on my project that I spent the last two days working on. The task was to issue a Purchase Order (PO) to a vendor using the SAP interface available to me. 

It all started when the Purchasing group called to tell me they couldn’t release the PO because they got an error in SAP that says it would put the project over budget. They tried everything and couldn’t get it to work. They had no idea how to fix it, so they threw it back to me to resolve. I then started calling people all over the place. I talked to accounting, to finance, to IT, and I even called the help desk which resulted in a conversation with someone in some other country that I couldn’t understand.

Finally, IT sent me over to taxes, who told me that the reason it wasn’t working is because when they make a PO, they automatically add an amount to it for tax even if the purchase is services and not taxable. So any project amount you enter must have taxes added to it even if there are no taxes to be charged.

Armed with this knowledge, I then had the project amount raised to account for these ghost taxes and the problem disappeared.

Do you really believe it’s possible to estimate something like this in a project?

Does Robert Glass’ Formula for Estimation Success Actually Work? by Bruce Nielson

In a previous post I mentioned Robert Glass’ “fact” that estimates are made at the beginning of the project before the problem is even defined, thus the estimate is invalid from the get go.

While I don’t disagree with Glass, I do believe he is under estimating (pun intended!) why we human’s prefer estimates – even known bad ones – over no estimate at all. I referred to this phenomenon as “water breathing” because if you are about to drown anyhow, you might as well see if you can breath under water.

Up front estimates are much the same – if you don’t make them at all, you’ve failed. If you make them and they are bad, you might (and often will) have time to correct them later. So that’s the real reason we make bad up front software estimates regularly. It’s a good reason once properly understood.

I know this probably sounds defeatist and I don’t mean it to be. In later posts I’ll discuss alternatives to making bad upfront estimates, even when you have “no choice.” But before I explore alternatives, I think we could benefit from looking at all of Glass’ “facts” about estimation. (See Facts and Fallacies of Software Engineering, p. 27 – 42)

Fact 8: One of the most common causes of runaway projects is poor estimation.

Fact 9: Most software estimates are performed at beginning of the life cycle. This makes sense until we realize that estimates are obtained before the requirements are defined and thus before the problem is understood. Estimation, therefore, usually occurs at the wrong time.

Fact 10: Most software estimates are made either by upper management or by marketing, not by the people who will build the software or their managers. Estimation is, therefore, done by the wrong people.

Fact 11: Software estimates are rarely adjusted as the project proceeds. Thus those estimates done at the wrong time by the wrong people are usually not corrected.

Fact 12: Since estimates are so faulty, there is little reason to be concerned when software projects do not meet estimates targets. But everyone is concerned anyway.

Fact 13: There is a disconnect between management and their programmers. In one research study of a project that failed to meet its estimates and was seen by its management as a failure, the technical participants saw it as the most successful project they had ever worked on.

Look over that list carefully. I can see everyone nodding their head approvingly. “Yup, it’s all so true! Those stupid pointy haired managers are the real cause of the bad estimates!”

While these facts all seem generally correct to me, I feel like something is missing. Glass seems to be advocating that if we do the inverse, we’ll be fine. Likewise, as you shake your head knowingly and wag your finger at management, you are advocating the same. But is this really true?

Let’s try taking the inverse of all his facts and see if we really believe the software estimation problem is solved. Can you honestly say you’ll agree with the following statement as being factually correct?

You’re software estimates will all be wildly successful if you just:

  • Make good estimates instead of poor ones (inverse of fact 8) by…
  • Making the estimates after the problem is defined – so after requirements gather is completed (inverse of fact 9)
  • Have the developers make the estimate, not marketing or management (inverse of fact 10)
  • And adjust your estimates when there are clear changes to the scope of the project (inverse of fact 11)

Since all of the above are true for your project, we can then conclude that it’s perfectly acceptable for management to get very concerned if you miss your estimates, since they “did it all the right way” (inverse of fact 12) and so we know there will never be another disconnected between management and programmers again. (inverse of fact 13).

Do you believe it?

I don’t.

Personally, I have never let management or marketing make estimates for the programming team (except to add fudge factor on top), I’ve always performed the estimate after requirements gathering when we’d supposedly “defined the problem”, and I always adjust my estimate for clear changes of scope. But even when I “do it all right” my experience is that programmers still can’t generally keep to their estimates.

So my conclusion is that while Glass has hit on a series of true problems about software estimation – and I’d agree if you don’t at least do the above, you have no hope at all in making your estimates – I feel he is failing to address the true underlying problems with software estimation.

So then what are the real reasons we all seem to suck at software estimation? To find that answer, we need to learn a lot more about how software and human psychology collide before we have any real hope of finding a solution to the problem.

Sure It’s the People – But Which People? by Bruce Nielson

So if we admit that software is really about human intelligence, not tools, then we know that human factors matter the most.

Tom Demarco and Lister, in their famous (infamous?) book Peopleware, were the first to make popular the idea that it was people that mattered the most.

But I can't shake the sneaking suspicion that they missed something. You see, I've taken top notch programmers and had them succeed on one project and failure miserably on another.

I remember one client that, whenever he called, I'd cringe. I knew – knew – that no matter who I assigned to the project, it was already a failure from the moment he called. But when his counterpart at the same company called, I knew – knew -- the project was going to succeed no matter what.

Somewhere along the line the thought occurred to me: could it be that the customer was the primary success or failure factor on my projects?

 

But how could that be? I knew tools weren’t the main factor, but how could programmers not be? How could it be the customer -- who never wrote a line of code!?

Thus began my study of the broader software project success factors.

The Chaos Report

Perhaps you are familiar with the original Chaos study from the Standish group and it's project failure and project impair factors. This was a study that started out trying to determine what affect tools has on the success or failure of a project. As they started interviewing people, people would volunteer things like “well, the tools don't really matter, but let me tell you what does.”

Eventually, due to the overwhelming evidence, they had to rethink the study based on the documented factors that correlated with success.

First, they found that a lot of software projects –nearly a third! – fail entirely. As in, you spend a lot of money and get nothing back for it. (See this link for more information.) This is sort of scary and I hope word doesn't get out about this little fact about software production.

Think about that for a moment. If one third of all software projects fail (or did back when the study was done, anyhow) then that means that every software project you do already costs you one third more than you thought, even if you come in on time and on budget. Okay, I admit that's bad math. In reality, it's the big projects that fail, so it's probably closer to half or more if you're a big company with big projects and a lot less if you're a smaller company with smaller projects. But you get the point.

The Chaos report further showed that over half of projects will cost 189% or more of their original estimate. Imagine if that happened to your house when you built it.

“Hey, buddy, sorry about that. I told your house would be $200,000 – greater starter home by the way – but instead I'm going to have to charge you $378,000 for it. But don't worry, you can mortgage it and pay it back over 30 years. That's there what we in this industry call capitalization!”

What Were the Real Success / Failure Factors?

More interesting was the fact that the success and failure factors that we normally think about, such as having a good project team, didn't turn out to be that important to the project after all. Here is the list they found in the study:

Project Success Factors % of Responses

  1. User Involvement 15.9%
  2. Executive Management Support 13.9%
  3. Clear Statement of Requirements 13.0%
  4. Proper Planning 9.6%
  5. Realistic Expectations 8.2%
  6. Smaller Project Milestones 7.7%
  7. Competent Staff 7.2%
  8. Ownership 5.3%
  9. Clear Vision & Objectives 2.9%
  10. Hard-Working, Focused Staff 2.4%

Other 13.9%

Apparently a competent staff only mattered 7.2% of the time. You get another 2.4% if they are hard-working and focused. That's a whopping 9.6% of the time that the development team ended up causing the success of the project.

What really amazes me is which members of the extended project team really mattered: End Users (15.9%) and Executive Mismanagement (13.9%).

But it gets better. It turns out that the process you used (Run for the hills! He's talking about process!) mattered more than the development team!

If your “process” included a “clear statement of requirements,” you score an extra 13.0%. If it included that little thing called “planning,” you get another 9.6% (that's equivalent to the entire development staff under best circumstances!). If you have “smaller project milestones,” score another 7.7%.

So apparently “process” does matter and maybe even more than the development team. Counter intuitive? You betcha ya!

It’s Not the Development Team That Matters!?

So, as it turns out, people are what matter the most, but it's not primarily the “developer-people” that cause projects to succeed or fail.

How can this be? Since when does a project get determined by the people not doing the work on the project? Welcome to the topsy turvy roller coaster ride that is software projects. Buckle up and grab the barf bag. You're going to need it.

What are Water Breathers? by Bruce Nielson

In Robert Glass' excellent book, Fact and Fallacies of Software Engineering, one of his “facts” (I.e. Qualified opinions) if that “Most software estimates are preformed at the beginning of the life cycle... before the requirements are defined and thus before the problem is understood.”

He goes on to say that, unlike many of his “facts” in the book, there seems to be no controversy on this one; there seems to be general intellectual agreement that we lock in on estimates too soon. This being the case, he says, “Someone should be crying out to change things. But no one is.”

He then adds:

At the very least, you need to know what problem you are to solve. But the first phase of the life cycle, the very beginning of the project, is about requirements determination. ... Put more succinctly, requirements determination is about figuring out what problem is to be solved. How can you possibly estimate solution time and cost if you don't yet know what problem you are going to be solving?

Why No Outcry?

While I agree the basic sentiment behind what Glass is saying, namely that we do lock in on estimates far too soon, I can't help but feel that Glass has missed several important points. In future posts, I'll contrast the approach Glass is advocating to my own approach to software estimation and demonstrate that Glass is actually misunderstanding certain critical points about software development and estimation. He’s also confusing the subjective nature of a so-called “problem space.” 

But at the moment, I want to look at a different aspect of this paradox that Glass is uncovering: if everyone agrees software estimates are locked in too soon, why isn't there a general out cry for change?

Glass holds this lack of outcry up as something strange to behold. Why would we all, time and again, slit our own throats like this? Surely we're smart enough to change blatantly stupid behavior like this!

Human Psychology and Software

In my opinion, Glass has fallen into the trap of overlooking the overriding importance of human psychology as it pertains to software solutions. The problem of “premature software estimations” can't be fixed by simply pointing out that the estimates will be bad at that point and failing to address the real problem.

Glass has failed to realize that upfront software estimates are what I call a “water breather.”

Imagine that you angered the mafia. The Godfather has you caught, puts you in cement boots and drops you into the Brooklyn river. There you are, holding your breath at the bottom of the river. You are starting to pass out. This is it, you're going to die.

Why not go ahead and see if maybe you can breathe water?

Sure, normally trying to breath water is a bad idea and I don't recommend it. But if you are in the situation above, you really might as well. You're dead anyway and there has got to be at least some very (very very) slight chance that you happen to have a genetic adaption that you didn't know about until this point whereby you can breathe underwater. Since the risk of death by drowning yourself has been eliminated, it really is time to try to breathe water. Go for it.

Of course you're probably not genetically adapted for water breathing and you're probably going to die. But you were definitely going to die if you didn't try, so what the heck.

As silly as this example seems, its actually quite logical. And it explains quite accurately the real reason we lock in on premature software estimates over and over again despite overwhelming evidence that they don't work.

Business Plans Are Part of Reality

What I am trying to say, is that Glass is ignoring all together the very real need – overriding need – to make business plans. Once we factor in this overriding need, upfront software estimates make perfect sense. Sure, they don't statically work. But if you're only other alternative is to never do the project in the first place – and I contend that is almost always the case – of course you're going to make an upfront estimate and go for it. Why? Because it's the single most sensible thing for you to do under that circumstance.

And actually, this is better than water breathing. In water breathing, testing your genetic adaption to breath water only buys you another faction of a second at the most. But when it comes to upfront software estimates, making a bad estimate buys you months or even years to come up with good reasons why the estimate was “right, except things changed” and convince everyone (often including yourself) that you need a “minor” change of plans or maybe a “follow on project.”

In short, “premature software estimates” are here to stay because they make rational sense compared to the next best alternative. People innately “get it” and do what is in their and often their company’s best interest: they go ahead and make the premature estimate and roll the dice and then start working on their best excuses. I just can't argue with this logic and I certainly wouldn't want to see it changed or “fixed” until we really do have a better alternative available. 

Tools or People? by Bruce Nielson

What matters more to the outcome of a software project? Good tools or good people? Okay, that one is a no brainer, right? We all know people matter more than tools, right?

But try this thought experiment. Take an average group of programmers today and set them up in a contest with the brainiest programmers of 1000 years ago. Who wins?

No, no, no, that's not right because computers didn't exist 1000 years ago. But isn't a computer just a tool? So apparently tools matter in some cases.

So let’s make this more fair by flashing forward to, say, the 1950s and retry the thought experiment. Again, the average programmers in 2009 will win hands down on a productivity basis. They can make more complex programs using Java or .Net then the 1950s programmers could ever dream of. So again, tools do appear to matter more than we given them credit for.

The problem is that the “tools vs. people” dichotomy we talk about doesn’t really exist. Apparently, what we mean when we say that “people are more important than tools” is that given roughly modern tools, one new snazzy tool isn't going to make much of a difference and it's certainly not going to cause your productivity to go through the roof. However, over longer periods of time, changes to paradigms, as supported by tools, can and will significantly increase a programmer’s productivity.

Tools allow a person to be more productive by changing the level of abstraction the programmer is forced to think at. 1950's programmers had to us machine language or punch cards or, gulp, both. No matter how smart they were, they were limited in their productivity by the tools. Today's programmers use modern compilers that allow code in something similar to English, virtual machines, automatic garbage collection, built in error handling, build tools, automated unit tests, etc. Throw in there a nice GUI-based drag and drop interface and now you're talking real productivity gains. So tools matter and they matter a lot.

With each new tool paradigm, we get closer and closer to the way a real human thinks. When we are dealing with punch cards and machine language the amount of translation between what the programmer is able to think and the way to implement it is huge. With modern tools, the gap has narrowed and thus productivity has climbed to match.

Now if you followed my argument above, we have uncovered that real source of productivity in software – a programmer’s ability to think! The basic unit of productivity in software has always been a “thought unit” (whatever that is.) No matter how good your tools get, the best programmers will always be the clear thinkers that require less thinking to accomplish their goals.

Tools are used to make thinking easier and more human-like and nothing more. So it turns out tools are really just a way to remove obstacles that naturally exists between the programmer's ability to think and the computer's need for formalized instructions.

Software Psychology Blog

Nate has generously allowed me to add a new blog to his site. My topics are going to be a bit different, however. I am not interested in code so much as the human factors in software development. I will do a series of posts about such topics.

Hope to talk to you all soon.

Bruce Nielson