Home > Articles > Programming > Visual Basic

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Predict Project Duration

After you have defined the tasks needed to build the final application, you need to assign durations to each of the tasks. This is usually done in a somewhat ad hoc manner, with the lead developers guessing how long each task should take based on their previous experience. The quality of these estimates depends on the experience of the person making the predictions and the people writing the code.

You can compare the time needed to implement the tasks in the prototype with the predicted times and then make adjustments, if necessary. If you find that most of the prototyped tasks took longer than anticipated, then you should expect the nonprototyped tasks to take longer than expected, too. If most of the prototyped tasks are easier than anticipated, you might want to shorten the development schedule.

Although comparing prototype times to predicted times like this can be a very useful scheduling technique, there are several ways it can backfire.

Easy Prototype Tasks

Many prototypes include the easiest tasks in the project's development. This is particularly true when developers run out of prototyping time or face tight deadlines. In that case, developers often work on the easiest tasks first because that way they finish as much of the prototype as possible.

If an easy task turns out to be a little harder than expected, it will take a little longer to complete. On the other hand, a problem in a complex task can affect the solution in several different ways, possibly spawning other problems. When a complicated task is harder than expected, it may take disproportionately longer to complete. You should think about the tasks actually completed in the prototype and determine whether they are similar in difficulty to the project's other tasks. If they are generally easier, you may want to implement some of the harder tasks before you revise the project schedule.


Suppose that you want to build a routing application for a fleet of trucks. The prototype demonstrates the user interface and uses some prebuilt tables to simulate routing assignments. The prototype tasks are all done in roughly the expected time, so you assume that your current schedule estimates are correct.

Building a user interface is relatively simple using Visual Basic. Building a complex routine algorithm can be extremely complicated. If you don't thoroughly understand the algorithm, it could take a lot longer than you expect to get it right.

To prevent this kind of problem, give extra thought to the application's hardest tasks. Prototype some of them, if possible, to get a better idea of how hard they really are.

The 80/20 Rule

Typically about 80 percent of a project's features are implemented in just 20 percent of the code. To put this a different way, about 80 percent of the code implements the most complex 20 percent of the tasks. Look for those difficult tasks.

Insufficient Prototyping Time

Sometimes pressure from customers, marketing reps, or company executives limits the amount of time allowed for prototyping. The previous section explained how that might lead developers to implement the easiest tasks first and skew your time estimates.

Often not having enough time to finish the prototype is also a sign of unexpected time pressure. If the prototyping period is cut short, you should ask yourself about the chances of the main application's schedule also being shortened. Make sure you have time to finish the application based on your current best total time estimate.

For similar reasons, you need to be careful about making predictions before the prototype is finished. If you have built half of the prototype's features, you cannot assume that you have spent half of the time you will need. You need to think about the prototype tasks that are finished and decide whether they are the easiest half of the tasks. The user interface is often built first, and it is also often one of the easier parts of the prototype to build. In that case, you need to think hard about the relative difficulty of the remaining tasks before you can draw any reliable conclusions.

Incomplete Work

Depending on which approach you select for building your prototype, much of the functionality in the prototype may be incomplete. Text boxes may not perform validations, lists may contain hard-coded values instead of getting their values from a database, and password checks may not really look up passwords.

In that case, you cannot count these incomplete tasks as finished. Suppose that you predicted that the logon screen would take six hours to build, and it took only three hours. If the prototype version of this screen does not actually validate passwords, you cannot assume that your schedule allocated twice as much time as necessary. In cases like this, you need to guess how much of the final task was actually implemented by the prototype. If the prototype logon screen is about half finished, then your estimate of hours is right on target.

This seems obvious when you spell it out like this, but it underscores the danger of raised customer expectations described earlier in this chapter. If customers think that the prototype's logon screen was finished early, they may then try to convince you to shorten the project's timeline accordingly.

Nonprototyped Tasks

Lots of important development tasks are not included in a prototype. Things such as online help, documentation, and training classes are rarely included in a prototype, but they can take up a lot of time. It is all too common for an application to ship with terrible documentation, documentation based on an earlier version of the product, or no documentation at all because the development schedule didn't allow time for it.

You cannot simply multiply the time needed to build the prototype by some number and expect that to be the time needed to complete the whole project. You need to allow extra time for these items.

You also need to allow for extra development tasks that appear only when you start building the final project. Staff meetings, presentations for company officials and customers, and miscellaneous paperwork tend to take more time during application development than during prototype development. Even if a prototype task was finished in the time you predicted, you need to allow extra time for these things. Plan for them.

Insufficient Testing

It's extremely rare to test a prototype as thoroughly as a final application. When the prototype has come far enough to demonstrate certain design features, it is declared finished and work on the main project begins. Any bugs in the prototype are left for repair during the final implementation.

I can't argue that this is the wrong approach. Thorough testing of any application is a grueling process that can take a long time. Tracking down the last few bugs can take far longer than finding the first couple. Few organizations would be willing to spend four weeks on a prototype and four more weeks testing and debugging it before starting final application development.

Just be aware that the final application will need a lot more time for testing and debugging than you are likely to give the prototype. Even if a task finishes on time in the prototype, it may still need extra testing.

Feature Creep

During project development, it is very common for new features to creep into the design. For example, the customer may think of things that were not included in the initial design. If these things are necessary, you have little choice but to add them.

Unfortunately, items added to the prototype can complicate schedule predictions. Suppose that a prototype task requires twice as long as you thought it would, but the extra time is due to a new feature. The extra time may affect only this one task. In that case, the rest of your schedule may still be fine.

Developers also tend to add new features to applications. They find some interesting or clever new feature that doesn't take a lot of work, and they tack it on. Usually these add-ons are fairly easy to build, so they tend to weight the prototype with simpler code.

The easiest way to prevent these features from confusing the issue is to prohibit them. Tell developers not to add new features without prior approval. If someone suggests a really important addition, add it. Otherwise, you can filter out unnecessary noise from the product. That will probably give you a better product in the end anyway.

Adding new features during development can also raise customer expectations. Nontechnical customers often don't know what's easy and what's hard for programmers. If you give them something easy, they may assume that something similar is also easy and then may ask for it. Stick with your initial design as much as possible to prevent this sort of thing.

Unexpected Problems

Every software project encounters unexpected problems. You need to leave some time in the project schedule to let developers handle them. Similarly, you need to leave some time in the prototype schedule for emergencies.

The extra time that you need usually does not scale well from the prototype to the final application. Prototypes tend to use a lot of untested technology, so unexpected setbacks are common. After you finish the prototype, you should understand most of the formerly untried technology, so you should not need quite as much slack time.

Changing Development Team

For one reason or another, the developers working on final application development may not be the same as those who built the prototype. One developer may quit, another may be needed on a more urgent project, or you may be able to add new people to final development or even have completely separate prototyping and development teams.

In any case, if the developers who built the prototype are different from those who build the final application, whatever you learn from the prototype may not transfer directly. Some programmers are faster than others are. Some write code that is easier to maintain and that causes fewer bugs.

Individual developers may even work differently on different phases of a project. Some might be particularly good at building a quick-and-dirty prototype interfaces but might be bad at building bulletproof code for the final application. If you apply too much pressure during prototype development, some programmers will burn out and their productivity will suffer during final implementation.

These kinds of differences in developer productivity are hard to measure, but you must take them into account when you plan the development schedule.

Not Trusting the Results

A silly but remarkably easy mistake to make is to not trust the results of the prototype. If you went to all the trouble of building the prototype, you'd better learn from its results.


Suppose that you spend four weeks developing about 10 percent of the application's features, and nothing else has occurred to make you question your predicted schedule. Then it will probably take you around 40 weeks to build the application. Forty weeks? That can't possibly be right! Besides, you only have six months. Surely you can reuse pieces of the prototype. And you learned things during the prototype, so they won't take as long in the final application.

It's very easy to fall into this sort of trap, particularly if the project already has established deadlines. The pressure to ignore the prototype's results to meet those deadlines can be tremendous. If you build the final application the way you built the prototype, you are likely to be wrong if you don't trust the prototype's results. Just declaring "We will have the project done by the due date" will do little except demoralize the developers, possibly reducing productivity and making matters worse. Instead of ignoring the prototype's results because they don't tell you what you want to hear, modify your development plan to take them into account.

Summary of Time Issues

The previous sections described a lot of things that can compromise a prototype's capability to predict the time needed to build the final application. It may sound like a grim picture, but usually these things happen in minor ways and don't seriously damage the prototype's usefulness. Some untested technology might be harder to use than you thought it would be, but something else might turn out to be easier. The customer might insist on one or two new features, but they won't radically change the application's purpose.

In the end, you'll examine the work you did in the prototype and make a guess about what fraction of the whole project that covered. Then you'll scale the results and add some extra time for testing, documentation, staff meetings, and unexpected problems. You'll finally arrive at a predicted length for the finished application. It will not be perfectly accurate, of course, because software development is an inexact science. However, it will be a lot better than the half-baked guesses that many software projects use for their timetables.

Predict Needed Staffing

Staffing and duration are related closely but not in a simple way. Doubling the number of developers on a project does not necessarily halve the development time. However, sometimes you can shorten a project's duration by carefully adding extra developers.

The ideal time to add staff is right after you have finished the prototype and before you begin the main development effort. It is important to do this right away rather than taking a "let's wait and see" approach. If you wait until deadlines are looming, it will be hard or impossible to change the project's architecture to accommodate extra developers. At that point, throwing more people at the project may actually slow development while you get the new team members up to speed and try to repartition tasks in ways that do not fit the original architecture.

When you add developers to a project, you need to find things for them to do that do not interfere with what the other developers are doing. You need to somehow redefine or rearrange the project's tasks so they can be divided up differently. Rearranging a project's tasks has dangers of its own. Tasks tend to group together naturally. If you break the natural groupings, you may cause more work. The developers working on the tasks must spend extra time coordinating their efforts. The related tasks must work consistently and should not contain duplicated code. Sometimes changes to one routine force changes to others.

Repartitioning the application may also make it so complex that the developers can no longer understand it. That can bring development to a standstill.

One of the simplest ways to rearrange a project's tasks is to split one into two or more pieces. This may create interactions among the pieces, but at least the rest of the project's tasks should interact with this group of tasks in the same way as before.

Another strategy is to pull out key parts of the most time-consuming tasks and put them in a tool library. Then you can assign other developers to build the tool library. If you define the interface between the tools and the routines that use them carefully so that there is no confusion, the tool team can work in parallel with the rest of the developers.

No matter how you change the development plan, the final development effort will not follow the pattern set by the prototype. Predictions that you make using the prototype data are less likely to hold if you don't do things exactly the same way—you should track them closely as development progresses. If you see that you are not making up enough time to meet deadlines, you may have to try other measures.

  • + Share This
  • 🔖 Save To Your Account