Showing posts with label quality. Show all posts
Showing posts with label quality. Show all posts

2/04/2009

Guaranteed Results!

I flashback to Ron Popeil TV commercials and SNL take-offs as I sit here writing this entry. But I will tell you I am guaranteeing results. If you implement the two techniques with your team that I suggest in this blog I guarantee that the average amount of time it takes your team to fix bugs will decrease by at least 30% within 12 months.

But wait there's more: I also guarantee that your total over bugs found after release will decrease by at least 20% for the same period...

But wait there's more: I also guarantee that these techniques are so incremental that you will not notice them affecting your schedules directly.

Here are the two techniques:

  • Assertions
  • Root Cause analysis

Now I know you are about to say that these are not new. I agree they are not but most teams do not employ these easy techniques.

Assertions are an easy way for your code to find it's own problems before your customer find them symptomatically. I would much rather have a message be emitted during testing or deployment that detects an issue than having data corrupted or having a blue screen event.

You can do this incrementally by saying that no bug fix or new feature can be checked in without all changed methods containing assertions. Assertions should test three things: input, output and state. Never assume anything is correct. Input and output assertions are pretty obvious but there are some places in the code where the program is in a unique position to verify the consistency of internal state. All three will not only help insure quality but also give you a leg up when you change your program's assumptions.

Each team must decide what mechanism to use for assertions. The assertions should be light weight and provide enough data when they are triggered so that developers can easily debug the problem. Most assertions can be active all of the time and should be. There are times in critical sections of code where assertion can greatly impact performance. In these cases, you may have to employ other techniques like turning on assertions during testing only and checking result around the performance-sensitive section at a place where the assertions will have less impact.

Because this only affects modified or new code, the incremental cost should not be great. Often assertions can be inserted in minutes per method.

The second technique is really a change to process around bug fixes. If you don't measure and analyze your bugs it is hard to avoid them in the future.

Root cause is easy to do. Don't allow anyone to close a bug without inserting a root cause. Have a fixed number of choice for why the failure occurred (e.g. requirements, design, coding, testing, deployment, other).

Once a month conduct a mortality conference where you review a rollup of causes and go through a representative sample of the bugs. This requires that someone do some statistical analysis to prepare for the meeting to identify frequent causes and commonalities for those bugs.

The next step is to establish changes that will stop those problems from occurring again. This may result in new processes or work.

The act of doing the root cause work has little overhead. As I carefully said above, this will not directly impact your schedules in a direct way. Clearly you may identify process changes or projects to address the root causes and take enough effort that might impact resources.

If you take the statistics, do the work and don't see the impact I guaranteed above, I will provide a free day of consulting to work with you to figure out how to achieve those results.

More later ...

3/29/2007

What are good goals for testing?

Sadly, software testing has not become a prestigious endeavor in our industry. In ASIC design, for example, the test verification folks often are paid the most and lead the teams. In software, test development and test execution are often looked at as stepping stones to product development. As a result, test development has developed a stigma and is often done as an afterthought and often not pursued by the best engineers.

Without reasonable tests and test infrastructure, your company will spend a lot of time and effort doing manual testing at each patch or release. You may not be able to respond to customer requirements in a competitive fashion. The worst result may be inflicting poor software on your customers and having them find your bugs while you lose your reputation.

So how can you set good goals and get better results in your testing effort? Here are the basics:

  • Make sure everyone feels responsible for quality
  • Define detailed acceptance criteria that drives what you test
  • Invest in infrastructure for testing
  • Drive toward specific goals around automation and responsiveness

I have talked about many of these issues both in the book and in other blogs but I will summarize them here as a reminder.

Everyone needs to feel responsible for quality. From the developer who should produce automated exhaustive functional unit tests to the project or release owner who should drive quality across many functional areas, everyone should feel responsible. Break down the organizational walls. Treat quality like performance or reliability and bring to bear the resources you need to make it happen. Don't differentiate between a development specification and a test specification -- make them one document. Send a message that there is only one thing and that is a quality product for your customers. Send a message that there is only one team and everyone must work together to achieve quality.

Don't let acceptance of a project or product only be that it contains no critical bugs. That measure is a second order measure. Define the parametrics for the product around performance, durability, interoperability, compatibility, usability, etc.. Decide on those things together with all of your developers and product management. Use those criteria along with exhaustive functional unit tests to drive the test portion of your specifications. Make sure you identify real customer scenarios as a basis for the tests. Finally, measure, measure, measure the results in both your schedule as the tests are completed and in your integration as more of the tests are deployed. Do not hide these details behind test points. Expose them in highly visible presentations. Make sure everyone can see what is important to the team with respect to determining progress and whether the project or product is done.

I hate the word framework. It is used to denote a lot of things and does not communicate what work is actually being done. Testing frameworks fall into this grouping for me. So what infrastructure needs to be in place for people to actually develop automated tests? Here is a list of the basics:

  • Tools to setup and knockdown a test. These may include tools that can reboot or reinitialize test platforms and/or test drivers automatically. They may include setting up a configuration or data set. Clearly how fast they work is a factor.
  • A programmatic interface to the test platform. This may be through a CLI, scripting language or API. It must work remotely. It must control as much of the product as possible in order to test as much as possible. Avoid doing this through the GUI as test vehicles that go through the GUI are often hard to maintain.
  • A standard output format. Define what you need for summary and detailed information. If every test produces different output formats or worse undecipherable output formats, you will spend an enormous effort in trying to figure out what is working and what is not.

Obviously there are always more items that you may need for a particular product or environment but your list should always include the items listed above.

The last thing you should do is set goals around automation and responsiveness. How much effort should it take to test a patch or a release? How much elapsed time should it take to test a patch or a release? By its nature, the last question will affect the answer to the first question (i.e. with a limited amounted of time you will need to automate more and it will reduce the effort). So here are my rules of thumb for elapsed time:

  • For a patch you need to be able to broadly but not deeply test your whole product within 12 hours.
  • For a release you need to be able to test your whole product broadly and deeply within 7 days (excluding duration tests for obvious reasons).

The patch level test is often also used on nightly builds during a development cycle.

Obviously your goals should be to reduce the effort for both kinds of test cycles as low as possible. However, there will always be a manual component to verify that GUIs look right.

If you follow the guidelines above you can set better goals around testing and achieve better results for your team and your company.

More later ...

12/14/2006

Code reviews

In this new millennium there are certain activities that are just good hygiene. Code reviews are one of those activities. In addition it is the quintessential poster child for how managers should make changes to development processes. I will tackle both in the following paragraphs.

As I have said in numerous writings, managers must drive change with requirements and not dictate implementation details. Managers must find a way to empower and drive engineers to accomplish all of the tasks they need to do and not just the ones they consider to be fun. Many engineers consider any process to painful and bureaucratic. The best way I have discovered to overcome these issues is to delegate the definition and monitoring of development processes to engineers. Avoid having managers dictate and drive development processes.

My favorite way to delegate processes that affect all of engineering is to establish an engineering leadership team (ELT) to represent engineering. You must populate this team with people who are not process zealots. The members must be representative and respected. Make it clear they they will not do all the code reviews. Instead they will define the process and monitor it. Make sure you allocate real time for people to spend on this. Hold them accountable. Make sure they do not take forever to do it.

Once you have the ELT in place, it is your job to give them requirements and guidance. Often I will hand the team examples of what I have seen done elsewhere as a starting point. Then my management team will give them requirements. Here are some of the requirements I might set for code reviews:

  • One process across engineering including QA
  • Actions must be tracked
  • Code reviews and addressing the resulting critical actions must occur before other internal and external people get exposed to the code
  • Code reviews must be done in a timely manner
  • A checklist with a minimum amount of what needs review must be developed to engender consistency and help junior member participate
  • Code review results must be documented
  • Need to have a fast track process for small things

Stay away from things that are not requirements. For example, I will not say what items must be checked or what timely means. That is for the ELT to decide.

I would give the team a week or two at maximum to define the process and roll it out. I would set goals with my management team about compliance and any transition needed. I would communicate how important this is to the whole team and ask them to be proud and not defensive.

Also be careful about tools. Many engineers would rather spend their time implementing a tool to facilitate a process like code reviews before your team decides what they want. Decide first and then if appropriate find or develop a tool to help.

Measure the results like how many features and/or bugs got code reviewed relative to the total, how many critical bugs were found, and how many total bugs were found.

Make this a priority and you and your team will reap benefits.

More later ..

11/09/2006

How should you manage bugs?

Managing bugs is difficult. Often bugs become a battleground within a company. Questions like which bugs to fix when or what amount of bugs is ok to ship a release with becomes unclear and divisive. It take a little process and a lot of leadership to address bug management.

Here are the basics:

  • Improve quality so you do not have as many bugs
  • Provide clear direction on what bugs to fix
  • Track and forecast the trend and effort to meet your goals

We know that we are not perfect developers but there are some good hygiene things that all companies should adopt in order to improve quality:

  • Do feature/design specifications and reviews
  • Do code reviews
  • Require automated passing exhaustive feature unit tests before code complete
  • Determine and review root cause for bugs

It will always be better to catch bugs early or better yet never create them. You should pay attention to why bugs occur and help your organization address those reasons. One of the big issues in many companies is how to prioritize bugs. The first problem stems from ambiguous categories like priority described with P1, P2, P3, ... and the plethora of other categories like severity, customer priority, etc. While your company many need to gather the emotion and need of your customer regarding a bug, the only thing your engineers should care about is when to fix a bug. Here are my suggested categories:

  • Now (either for a patch or release build)
  • Must fix for a particular release
  • Should fix for a particular release Future

Don't confuse your engineers with overloaded codes. Make sure that bug backlogs that "must be fixed" for a released are legitimately scheduled and are not expected to be addressed in someone's overhead or free time. Make sure product management prioritizes the bugs in the must-fix categories appropriately and that you have resources allocated to fix them.

Finally, as I said in a previous blog, you need to track the trend of bugs. If your incoming rate does not go down, it does not matter how many bugs you have fixed, you will not have a stable release. Set an outstanding bug goal for your release acceptance criteria. Forecast when you get down to the bug goal for the release and manage to the forecast. Remember that there is always a tail and if you do not defer some bugs for the next release at the end of the cycle, you may never close on the current release. Bugs are tough. Pay attention and make your products quality products.

More later ...

9/23/2005

Who is responsible for quality?

I had the pleasure this week of speaking at a chapter of ASQ (American Society for Quality). I chose a topic which is near and dear to me: Roles and Responsibilities. Applying that topic to this venue meant speaking about quality.

I felt I had a big challenge going into a group of quality professionals because both my book and my consulting practice help organizations strive for excellence and that is part of what quality professionals try to accomplish as well. I was heading into their home turf. I was going to preach to the converted.

The way I approached it was to discuss what I would try to accomplish with product development engineers. I asked them to suspend belief and maybe they could use some of my philosophies and techniques to their advantage. With me being the only thing between them and dinner, I was pleased by their interest, excitement and acceptance of the talk.

So who is responsible for Quality? The answer is obviously everyone. If you ever cordon off responsibility for quality to some group you will not achieve quality in your product.

I am also, as I say in my book, a firm believer in having one owner for each task or goal (they may delegate pieces but they must make it happen). So, who is responsible for Quality in a product? The answer is the person responsible for developing the product. No finger pointing, no blame and very simple.

This is a leadership thing. Your leaders must make quality a priority and legitimize time. The must set expectations that everyone must do their part and be held accountable. Without these critical pieces, you will not achieve quality in your product.

So what does this mean on a practical basis? Here is one example that I try to implement in each company I participate in: exhaustive functional unit tests. I require the engineers development products be responsible for the basic tests that prove what they developed works. Code cannot be checked in without those tests complete, run, working and code reviewed just like the product itself.

What does this accomplish? It pushes quality earlier in the cycle, makes it easier to get a quality product and enables accountability. It is hard. It is different. It is effective.

How does this affect accountability? Imagine, if you will, a salesman who sells a lot of product but his customers never pay or we have no idea if they ever pay. There is a reason why commissions are paid out on receipt of customer payment. The same thing goes for software. If a developer codes away and never proves their software works then they are not completing their job and the value to their company is significantly reduced.

More later ...