Showing posts with label software-engineering. Show all posts
Showing posts with label software-engineering. Show all posts

Wednesday, July 29, 2020

Fix Requirements Specification Errors Now

Errors in requirements result in larger costs the longer they go without being fixed. (Posted by Jerry Yoakum)

Errors in the requirements specification will cost you:
  • 5 times more to find and fix if they remain until design.
  • 10 times more if they remain until coding.
  • 20 times more if they remain until unit testing.
  • 200 times more if they remain until delivery.
That is more than convincing evidence to fix them during the requirements phase!

Start using your software architects and key software engineers to review software requirements before they go to development. Don't do this as a waterfall process where the SRS goes from Product to Architecture to Development. Make it an agile process where people get involved before the SRS is "done." It will make changes easier and less painful.

PROTIP: Put the SRS in a version-control system such as GIT with each section a separate file. This way anyone can make changes to the SRS that can be reviewed, approved, and tracked. Add in a script to combine the sections into a single file for easy handling. Everyone knows that this can be done but I have yet to meet a single product management team that does it.


Reference:
Boehm, B., "Software Engineering," IEEE Transactions on Computers, December 1976.

Monday, July 27, 2020

Top 10 Project Management Risks


As a software architect, I've assisted in project management and filled the role of product owner. For all of these roles it is important to be familiar with the situations that most often cause software disasters. These are your most likely risks, but not all of them:

If you don't already have one, this list is a good starting point for a project planning checklist. Additionally, you should add risks unique to your environment, industry, and project then develop plans on how to mitigate them.


Reference:
Boehm, B., "Software Risks Management: Principles and Practices," IEEE Software, January 1991.

Sunday, June 28, 2020

Avoid Standing Waves


Standing wave below Jacks Fork on the White River.

One of the odd side-effects of keeping your plans up-to-date is the standing wave. In this situation, you always plan to update your plans over the next few weeks. Since projects that are behind schedule tend to get further behind schedule, this "update the plan soon" strategy requires larger and larger resources to be applied over the next few weeks. The wave gets larger and larger with no corrective action taken. Rescheduling and replanning in general require action, not just promises that things will be fixed soon. Just because you are only a few days behind, don't put off updating the plan. All projects fall behind one day at a time.


Reference:
Brooks, F., The Mythical Man-Month, Reading, MA: Addison-Wesley, 1975.
Book cover of The Mythical Man-Month.


Saturday, May 23, 2020

Quantify Requirements

Magnifying glass over graphs to signify monitoring measurements.
All to often terms such as "fast," "responsive," and "extensible" are listed as software product requirements. Software architects often spend a lot of time helping product owners turn these desires into objective requirements. We do this by asking a lot of questions: How often? How many in what period? Increasing or decreasing at what rate?

It is a process that most product owners find maddening. Which is why it is important to explain that an exact answer is not expected. In fact, an exact answer would be a little worrying and I'd want to know how they got it. It is that process of how to get quantitative criteria that often needs to be explained and planned for. Finding ranges for quantitative requirements and checking against them is a time-consuming and expensive process. If no one wants to spend the time, effort, and money to do so then it reveals that the requirement isn't actually needed.

Focus your efforts on the parts of the system that stakeholders actually consider worth paying for.

Thursday, May 21, 2020

Plan A Project In Detail

Signpost on a ridge in the fog.

Every software project needs a plan. The level of detail should be appropriate for the size and complexity of the project. At an absolute minimum, you will need:

  • A PERT chart showing the interdependencies among tasks.
  • A GANTT chart showing when activity will be underway on each task.
  • A list of realistic milestones (based on previous projects).
  • A set of standards for writing documentation and code.
  • An allocation of people to various tasks.
As projects increase in complexity, each of these requirements becomes more detailed and more complex, and other documentation becomes necessary. A project without a plan is out of control before it even starts. As the Cheshire Cat said to Alice in Wonderland, "If you don't know where you are going, any road will get you there!"


Reference:
Glaser, G., "Managing Projects in the Computer Industry," IEEE Computer, October 1984.

Sunday, May 10, 2020

Allocate Appropriate Resources


Artificially constrained schedules and inappropriate budgets will doom a project regardless of the quality of the people or the availability of tools, languages, and process.

If you try to compress either schedule or budget, the engineers working on the project will not work efficiently, there will be no wiggle room when the inevitable slippage occurs, morale will suffer, and the project will probably cost more than what would otherwise be considered reasonable anyway.

In short, tightening a schedule or budget to land a contract or to get stakeholder sign-off will only ensure your failure to deliver. The goal isn't to get project approval. The goal is to get approval for a project that can actually succeed.


Reference:
DeMarco, T., "Why Does Software Cost So Much?" IEEE Software, March 1993.

Sunday, May 03, 2020

Minor Underestimates Are Not Always Bad

Large rocks in surf.

Assuming morale has not been diminished, members of a project that is perceived as slightly behind schedule will tend to work hard at catching up, thus increasing productivity. Similarly, members of a project that is perceived as slightly ahead of schedule often take vacation days, work less hours, read their email longer, and ease up in other ways, thus decreasing productivity. In other words, the cost estimation itself will affect the project outcome. Any specific project may expend less resources if it is slightly underestimated than if it is slightly overestimated.

Be careful, though! If project members believe that the schedule is ridiculously underestimated or that estimates are underestimated on purpose, then morale and productivity will decrease. Worse still, you, as a manager, might start to gain a reputation of being incompetent, manipulative, or both. If that happens then project members will begin to perceive all estimates, even good ones, as bad.

As long as a minor underestimate is a natural occurrence then there is no need to worry that it'll effect the schedule. Team productivity has a certain amount of flexibility to compensate as long as there are minor overestimates to balance things out.


Reference:
Abdel-Hamid, T., and Madnick, S., "Impact on Schedule Estimation on Software Project Behavior," IEEE Software, July 1986.

Friday, May 01, 2020

Reassess Schedules Regularly

Snail "hiking" the Katy Trail.

Schedules are usually set at the beginning of a project. These include intermediate deadlines as well as the product delivery deadline. As each phase is completed, the schedule must be reassessed. A behind-schedule project rarely recovers during subsequent phases. Thus, a project that is, for example, one month late at completion of design will be at least one month late for delivery. In most cases adding or removing people will only delay the project further. The most common technique is not to change the product delivery date. (After all, we don't want to disappoint the customer just yet; they might stop paying.) As each intermediate milestone is missed by an increasing amount of time, the time allocated to testing is reduced more and more. At the end, one of two situations is inevitable:

  1. The product is shipped without the necessary quality.
  2. The customer is notified of a very large schedule slip very late in the project.
Neither is acceptable. As a manager, your responsibility is to prevent disasters.

Instead, establish a working relationship with customers and/or management levels above you. Report every possible date change (usually a slip) and discuss the alternative strategies for overcoming them. The Agile methodology is very keen to cut out features in order to hit delivery deadlines. Only early intervention and involvement by all parties can prevent slippage escalation.


Reference:
Shore, J., Warden, S., The Art of Agile Development, O'Reilly Media, 2008.
Gilb, T., Principles of Software Engineering Management, Reading, MA: Addison-Wesley, 1988.

Saturday, April 04, 2020

Believe in the Schedule

Table showing that if a team believes in a schedule then it is more likely to success regardless of the realism of the schedule.
Probability of Project Success
Once a feasible schedule is established and appropriate resources allocated, all parties must believe the schedule. Engineers will not succeed in meeting a schedule if they don't believe it is realistic. The probability of success is more a function of faith in the schedule than its realism

The best advice is to have engineers set schedules. Unfortunately, this is not always possible. The second best advice is to involve engineers in the tough trade-offs that occur between functionality, schedule, and project abandonment. Few engineers would rather lose their job because a project is canceled than strive to meet a tough schedule.


Reference:
Lederer, A., and Prasad, J., "Nine Management Guidelines for Better Cost Estimating," Communications of the ACM, February 1992.

Tuesday, March 31, 2020

Know Before You Count

Rock arch landscape at Arches National Park. Photo by Jerry Yoakum.

"Know before you count" is a software development management principle simply stated by Gerald Weinberg as, "Before you can count anything, you've got to know something." He is talking about the many people who count things in software but don't know what they are counting. He provides a great example. We have data concerning what percentage of the software industry is involved with maintenance rather than development. But can we recognize maintenance? Is a "new" development that completely replaces an existing system considered maintenance or development? Is a "modification" to an existing system that doubles current functionality and removes 95 percent of old functionality considered maintenance or development?

When selecting metrics for your project, make sure that what you are measuring relates to what you are trying to achieve. This often entails using multiple metrics. Remember: Even if everybody is measuring something one way, that way is not automatically right for you. Think about your metrics. Since everything can be observed (and in most cases measured), carefully select what you want to observe (and measure).


References:
Stark, G., Durst, R., and Vowell, C., "Using Metrics in Management Decision-Making," IEEE Computer, September 1994.

Weinberg, G., Rethinking Systems Analysis and Design, New York: Dorset House, 1988.

Monday, March 23, 2020

Avoid The Impossible


This may seem like obvious advice. One the other hand, many projects commit to delivering their product on schedules that are 100 percent impossible. Barry Boehm has defined the "impossible region" as a relationship between the expected time to develop a product and the number of person-months (PM) to be consumed. Specifically, the elapsed time (T) from writing a software requirements specification to product delivery will not be less than 2.15 times the cube root of person-months, that is,


If you have a project that is estimated to take 5 person-months then this rule says that the project can't get finished faster than 3.7 calendar months.

Ninety-nine percent of completed projects have obeyed this rule. If you think you can do better then here are some ideas to revisit:


Reference:
Boehm, B., Software Engineering Economics, Englewood Cliffs, NJ: Prentice Hall, 1981.

Monday, March 16, 2020

Software Cost Estimation Methods

Hammons Field baseball park, Home of Springfield Cardinals.

Numerous cost estimation methods are available commercially. Each is based on data collected from a large set of completed projects. Any of these methods can be used to generate ball park estimates for your software development project. To use them to generate more accurate estimates, you must tailor them to your work environment. This tailoring adapts the model to your type of applications and tools. It eliminates variables that are invariant in your environment. It adds variables that are productivity-influential in your environment.

Chapter 29 of Barry Boehm's Software Engineering Economics explains in detail how to tailor the Constructive Cost Model (COCOMO) to your environment. Similar tailoring guidance is provided with other cost estimation methods. You must fully embrace the spirit of such tailoring, or you will end up with dismally inaccurate results.


Reference:
Boehm, B., Software Engineering Economics, Englewood Cliffs, NJ: Prentice Hall, 1981.

Sunday, March 01, 2020

Collect Data Unobtrusively

Data collection is extremely important to help with future cost predictions, to assess the current state of a project or organization, to assess the effect of a change in management, process, or technology, and so on. On the other hand, data collection in an obtrusive fashion -- for example, if it requires software developers to do considerable extra work -- is meaningless because its collection affects the data itself. Furthermore, data collected from developers who do not want to provide such data will likely be useless because it is unlikely that an uncooperative developer will provide meaningful data.

The best way to collect data is automatically, with no developer-perceived interference. Obviously you cannot do this all the time for all data, but you should automate data collection whenever you can. However, you must be careful not to cross any lines concerning privacy. Respect your employees privacy and be transparent about what and how you collect.


Reference:
Pfleeger, S., "Lessons Learned in Building a Corporate Metrics Program," IEEE Software, May 1993.

Friday, February 28, 2020

You Can Optimize Whatever You Want

Any project can optimize whatever factor of "quality" it wants to. In optimizing any one factor, other "quality" factors are generally denigrated. In a landmark experiment conducted by Gerald Weinberg and Edward Schulman, five teams of software developers where given identical requirements, but each was told to optimize something different: development time, program size, data space used, program clarity, and user friendliness. In all cases except one the programs produced by the teams where rated best in terms of the attribute they were told to optimize.

If you tell your people that everything (such as schedule, size, maintainability, performance, and user friendliness) is equally important, none will be optimized. If you tell them that only one or two are important and the rest unimportant, only the important ones will be addressed. If you give them an a priori relative ranking, the ranking may not be appropriate in all situations on the project. The fact is that there are trade-offs -- different trade-offs -- to be made constantly during product development. Work with your employees and help them understand your priorities and your customers' priorities.


Reference:
Weinberg, G., and Schulman, E., "Goals and Performance in Computer Programming," Human Factors, 1974.

Sunday, February 09, 2020

Huge Differences Among Software Engineers

San Francisco from Coit Tower to Transamerica Pyramid. Photo by Jerry Yoakum.

Productivity (measured by lines of code per person-month) can vary by as much as a factor of 25 from the most to the least prolific coder. Quality (measured by bugs found per thousand lines of code) can vary by as much as a factor of 10 from the best to the worst software engineers.

I'm sure you can see my bias in the words above that I think quality is more important than productivity. Unfortunately, I don't have data to see the intersection of those two measures. I suspect that there is a correlation between productivity and quality. But with a diminishing return where the act of writing more code prevents a person from thinking about the stakeholder's true intention or the ramifications of the new code.

As a manager, you have to encourage an optimal mix of productivity and quality. This isn't done just by focusing on a single software engineer. This is a whole team project. For example:

  • If quality is down then consider requiring stricter code reviews.
  • If productivity is down then consider lighter code reviews.
  • If both are down, is your team overworked?
  • If both are down, is your team in need of training?
  • And, yes, sometimes you do have to single one person out and say, "Slow down. You are making too many mistakes." Or, "Speed up. You are spending too much time testing your code."
    • I've heard both of those admonitions. They helped make me a better developer. They helped me find balance between getting stuff done and perfectionism.
  • etc...
There is no right way to optimize a development team's productivity and quality. But there is a wrong way - deciding everything for yourself. No one has all the answers and even if they did it would upset the team members to have no input.

Talk to your team! Show them the data that has you concerned and ask for input. Share details about the budget to explain why sending a few people to the QCon conference in Tokyo isn't feasible but the whole team could go to KCDC. Find ways to combine team building with training.



Reference:
Sackman, H., et al., "Exploratory Experimental Studies Comparing Online and Offline Programming Performance," Communications of the ACM, January 1968.

Friday, January 24, 2020

Brooks' Law


Measuring a project solely by person-months makes little sense. If a project could be completed in one year by six people, does that mean that 72 people could complete it in one month? Of course not!

Suppose you have 10 people working on a project that is due for completion in three months. You now believe your are three months behind schedule; that is, you estimate you need 60 more person-months (6 months x 10 people). You cannot add 10 more people and expect the project to be back on schedule. In fact, adding 10 more people would likely delay the project further due to additional training and communications overhead.
Approximately a decade ago, I worked on a big project alone. I approached it as proof-of-concept and focused on getting everything to work. Since ensuring that everything worked was my goal I didn't devote a lot of time to good object-oriented programming practices... I'm not going to apologize for that. I still think I did the right thing to ensure that the project worked. Half of the work I was doing was testing another team's API and helping them get it right. However, the project managers really screwed me over by announcing the project finished when reality I had only finished testing the API provided by the other team. My boss put 20 people on the project to finish it in the next month. This could have been a disaster but she did an amazing job coordinating everyone's efforts. While all those people were helpful with writing documentation and performing testing while the code was being rewritten. It really came down to one person, Charles Forsythe, who took the largely procedural code that I had written and turned it into high quality OO code.
This project would have gone more smoothly had we intentionally planned to throw away my prototype. Also, it is generally a bad idea to try to retrofit quality. It is either a testament that my prototype was of high quality code just not of the required OO paradigm and/or that Charles' coding ability overcame the difficulty of performing a retrofit.
The point of that story is that from the outside it looks like 20 people were thrown at the project to finish in a month. In reality, 1 person finished the project in a month and 19 people cleared the way and focused on tasks that multiplied that 1 person's impact. By doing it this way, my manager avoided the additional training and communications overhead. If they all would have tried to develop code for the project then it would have failed due to Brooks' Law. This isn't a guaranteed way around Brooks' Law but it is a good way to reframe development problems.


Reference:
Brooks, F., The Mythical Man-Month, Reading, MA: Addison-Wesley, 1975.

Wednesday, January 22, 2020

Keep The Office Quiet

The most productive employees and companies have quiet and private offices. They have phones that can be silenced or diverted. They are insulated from regular, nonbusiness interruptions. Contrast this with the general industry movement toward open, landscaped offices, which reduce physical plant cost but dramatically decrease productivity and quality. Of course, the usual management line is that such an arrangement "facilitates communication." Not true. It "facilitates interruption and noise."


Reference:
Tank, A., Why It's Time to Ditch Open Office Plans, 07-Feb-2019. [Online]. Available: https://www.entrepreneur.com/article/327142. [Accessed: 22-Jan-2020]

McGregor, J., Open office plans are as bad as you thought, 18-Jul-2018. [Online]. Available: https://www.washingtonpost.com/business/2018/07/18/open-office-plans-are-bad-you-thought/. [Accessed: 22-Jan-2020]

James, G., Open-Plan Offices Kill Productivity, According to Science, 18-May-2017. [Online]. Available: https://www.inc.com/geoffrey-james/science-just-proved-that-open-plan-offices-destroy-productivity.html. [Accessed: 22-Jan-2020]

DeMarco, T., and Lister, T., Peopleware, New York: Dorset House, 1987.
Book cover for Peopleware: Productive Projects and Teams.




Saturday, January 18, 2020

Carry The Water

Pigeon Point Lighthouse. Photo by Jerry Yoakum.

When your people are working long hours to get a software engineering job done, you should work the same hours. This sets the right example. Your employees will be more willing to work hard and do a good job if they know you are in the predicament with them. I had a software development manager, Karen Bolda, that did precisely this. It made all the difference in our attitude. During crises, Karen took on the role of "working for her employees." It worked.

If you can't help with the engineering work itself, let them know you are available to coordinate effort, run errands, order food, whatever they need. In short, carry the water.

Thursday, January 16, 2020

Communication Skills Are Essential

The Palace Of Fine Arts, San Francisco, CA. Photo by Jerry Yoakum.

When recruiting personnel for your project, don't underestimate the importance of teamwork and communication. The best software architect becomes a poor asset if he or she is unable to communicate, convince, listen, and compromise.

Communication breakdowns can occur at any process level. The effects of these problems are not independent. For instance, fluctuating requirements increase a development team's need for communication both with customers and with the project's other teams.

Exceptional architects are skilled at communicating their technical vision to other project members. They usually possess exceptional communication skills and often spend much of their time educating others about the application domain and its mapping into computational structures. In fact, much of their design work is accomplished while interacting with others. The integrative role of an exceptional designer compounds itself. This happens because those perceived as most knowledgeable will become communication focal points, providing them more knowledge about the system to integrate into a more comprehensive model.


Reference:
Curtis, B., Krasner, H., and Iscoe, N., "A Field Study of the Software Design Process for Large Systems," Communications of the ACM, November 1988.

Monday, December 23, 2019

A Few Good People Are Better Than Many Less Skilled People

This follows immediately from the idea that People Are The Key To Success, which says that you should always hire the best engineers. This principle says that you are better off allocating just a few good, experienced engineers on a critical task than to put many inexperienced engineers on it. This is Don Reifer's "Management Principle #6." On the other hand, Manny Lehman warns that you can't rely too much on "a few good people"; what if they quit? The best advice is to have the right mix of people on a project and take care not to gravitate towards either extreme. Those people with the most experience are probably closest to retirement. Keep them working with people with less experience so their knowledge isn't lost in the future.


Reference:
Reifer, D., "The Nature of Software Management: A Primer," Tutorial: Software Management, Washington, DC: IEEE Computer Society Press, 1986.