SmartBear - Up Your Game With Code Review - Collaborator

11
Collaborator by SMARTBEAR

description

SmartBear - Up Your Game With Code Review - Collaborator

Transcript of SmartBear - Up Your Game With Code Review - Collaborator

Page 1: SmartBear - Up Your Game With Code Review - Collaborator

Collaboratorby SMARTBEAR

Page 2: SmartBear - Up Your Game With Code Review - Collaborator

2Collaboratorby SMARTBEAR

Up Your Game With Code Review

ContentsIntroduction ............................................................................... 4

Collaboration ............................................................................ 4Collaboration helps you use time more efficiently............................................. 4Distributed team members deliver high quality software faster ........................ 5

Measurement............................................................................ 5Metrics can help set expectations and win accolades ...................................... 5

Knowledge Sharing .................................................................. 6Knowledge sharing enhances skill levels with minimal expense ...................... 6Using Artifacts to Negotiate with Product Management .................................... 6

Issue Detection ......................................................................... 8How Code Review Reveals Quality Issues ....................................................... 8 How Code Review Reveals Evolvability Issues ............................................... 9

Page 3: SmartBear - Up Your Game With Code Review - Collaborator

3Collaboratorby SMARTBEAR

Most development managers innately understand that code review is an indispensable strategy to improve software quality. What many managers don’t know is that time invested in the up-front process of code review not only saves time later, but also helps managers position themselves more strategically within their organization.

Page 4: SmartBear - Up Your Game With Code Review - Collaborator

4Collaboratorby SMARTBEAR

Introduction

Collaboration

As a development manager, you already understand how code review improves software quality. But have you thought about how code review can benefit you directly? There are four important code review benefits that can reduce your stress levels and increase your visibility in your organization:

¿ Collaboration

¿ Measurement

¿ Knowledge Sharing

¿ Issue Detection

Collaboration helps you use time more efficiently

We often use the phrase, “code review saves you time!” However, managers of Agile development teams convey frustration with this perspective saying that trying to add yet another activity to already tight sprints was not viewed as a time saver! Many Agile teams fear that reviewing code is too time-consuming a step to add to their sprints.

Although we hear you and feel your pain, we have a different view. Consider this: If the code you pass over to QA has fewer bugs and anomalies, then it stands to reason that QA cycles will shorten. There are plenty of Agile code review successes that substantiate this reality. Many Agile team managers have found that the time invested in code review is made up during QA.

It’s true!

Code passed to QA that had better code quality (i.e., had been reviewed) decreased QA time. These savvy Agile managers also found that the constant interaction and collaboration about the code provided

Page 5: SmartBear - Up Your Game With Code Review - Collaborator

5Collaboratorby SMARTBEAR

needed communication among developers regarding existing coding standards, especially important to Agile teams since they often have fewer artifacts to reference when questions arise.

Distributed team members deliver high quality software faster

Bridging the gap between remote and on-premise teams can be tough. The structured collaboration that code review, and especially tool-assisted code review, provides helps distributed team members understand what needs to be done and the best ways to do it.

Code reviews help teams build on successes of existing solutions rather than on poor reinventions of them, since colleagues can provide insight into existing standards, which can often speed up the implementation of requirements. Tool-assisted review streamlines this process further by enabling asynchronous code reviews, so time differences are no longer a barrier. Remote team members can peruse review feedback at their convenience.

Metrics can help set expectations and win accolades

By periodically examining metrics, you can measure and trend your software’s quality over time and understand what aspects of the code tend to be the most complex. For larger development teams, careful interpretation of metrics provides helpful insight so managers can align resources with anticipated demand spikes (i.e. post-release support and defect remediation.) Metrics also come in handy for managers wanting to streamline ongoing resource planning, including new feature costing and estimation refinement.

Sharing metrics wisely increases transparency around product quality, highlights your team’s collective accomplishments and elevates discussions toward more strategic topics, such as securing competitive

Measurement

Page 6: SmartBear - Up Your Game With Code Review - Collaborator

6Collaboratorby SMARTBEAR

advantage with on-time releases, reducing the probability of costly recalls, and ensuring long-term stability and maintainability of valuable applications. Metrics also deliver valuable insight into overall quality and maintainability issues.

Knowledge sharing enhances skill levels with minimal expense

The knowledge transfer that results from code review is an unheralded yet significant benefit. Knowledge sharing reduces the risk of gaps in expertise across your team. That mentoring component of senior developer to junior developer is invaluable—it establishes a coaching relationship that gently fosters skill sets across the team. The unexpected gift for managers is even more appealing: Knowledge transfer can reduce your long-term project costs.

That’s right - collective insight into the code base, coding conventions and standards not only eliminates confusion and mistakes in your imminent release, but it also reduces unanticipated costs that result from catastrophic defects and technical debt arising from future software evolvability issues.

For these reasons code review is truly a strategic activity that all development managers should seriously consider implementing if they haven’t already.

Using Artifacts to Negotiate with Product Management

While the product manager works hard to write functional specs that detail the features for developers to code, developers are busy devising the best approach to implement each feature based on those specs. Because there are usually multiple ways to implement a feature, the developer needs to evaluate the options and select the best one. More opportunity for divergent perspective!

Knowledge Sharing

Page 7: SmartBear - Up Your Game With Code Review - Collaborator

7Collaboratorby SMARTBEAR

So, while the product manager is chartered with making the next release a commercial success by cramming it with useful and desirable features, developers are chartered with ensuring that each feature is integrated into the whole and coded consistently.

Add to this the necessity for developers to consider how the implementation of each feature will impact the code base and the overall evolvability of the code. Remember that, over time, code maintenance can become more complicated and difficult to assess. And even more challenging, developers are expected to make these assessments and decisions before coding begins. Of course they have questions about, and expect input into, feature design and implementation.

These questions require answers, squeezing the product manager’s time and priorities even further.

Try negotiating artifacts earlier in the development process. There’s a lot of negotiating that transpires between a product manager, product stakeholders and the development team. Everyone has ideas, questions and what-if scenarios that need to be explored and evaluated. Negotiation techniques often involve meetings, seemingly endless and confusing email threads and impromptu (and undocumented!) over the shoulder chats.

Although these conversations should ideally occur before coding begins, the reality of software development is that developer multi-tasking necessitates that some development effort be invested before consensus on all these issues actually occurs.

Frequent review of artifacts as early in the process as possible, ideally before coding begins, not only drives consensus about feature goals and implementation, but also about product vision, roadmap direction and overall milestones. Discussion will reveal why particular features were selected for inclusion in this release, reducing the need to grapple with difficult questions late in the development process.

Page 8: SmartBear - Up Your Game With Code Review - Collaborator

8Collaboratorby SMARTBEAR

Tool-assisted document review expedites the review process by eliminating the sharing, editing and reconciling of documents and other development artifacts typically handled by email. With tool-assisted peer review, teams can makes comments and suggest edits without altering original file content, and everyone can see each other’s comments in the always-current document version. Even better, developers can use one tool for artifact and code review while gaining insight into development artifacts earlier in the development process. What’s not to love?

How Code Review Reveals Quality Issues

Code reviews are not just a huge part of the software development life cycle, they are also an essential process for any development organization that creates complex software. Information system managers need the power to predict and plan the long-term evolution of their systems on an objective, quantified basis. This is a pretty difficult task, especially when a system is deeply embedded within an organization’s business processes. Simply put, managing software evolution and estimating the extent of future projects takes a lot of work!

Perhaps the most popular justification for spending time on code review is to increase code quality. New features and enhancements can cause downstream issues in maintainability and performance if not properly integrated.

Information system managers need the power to predict and plan the long-term evolution of their systems on an objective, quantified basis.

Issue Detection

Page 9: SmartBear - Up Your Game With Code Review - Collaborator

9Collaboratorby SMARTBEAR

Code reviews can reveal issues related to the inner quality (evolvability) of software, because reviews find defects in the system whether they’re visible to the user or not. Since evolvability defects are not visible to the customer, some people believe that they can’t cause a system failure. In reality, evolvability defects can have a huge impact on the cost and quality of the final product.

Quality code should:

¿ Require minimal effort to understand

¿ Require minimal effort to add new features

¿ Require minimal effort find and fix defects

How Code Review Reveals Evolvability Issues

No matter for which industry the software system is developed, a lack of coding standards and poor coding structure result in increased development effort. Since no two systems are exactly alike, enforcing coding standards is mission-critical.

For example, consider different systems that seem to be functionally similar, yet are structurally different. They may possess different levels of evolvability and require varying investments to remediate errors tied to new functionality. Poor coding standards will greatly influence productivity, resulting in additional costly rework.

There’s also a direct relationship between good coding techniques and evolvability in relation to your company’s economic bottom line - specifically with development of system features and error fixing efficiency.

Newer development methods (extreme programming, Agile development, etc.) that focus on short development cycles already

No matter for which industry the software system is developed, a lack of coding standards and poor coding structure result in increased development effort.

Page 10: SmartBear - Up Your Game With Code Review - Collaborator

10Collaboratorby SMARTBEAR

recognize the value of high evolvability. Developers in these environments work closely with the customer and continually changing requirements that acclimate the system as needed with a smaller up-front cost to the company. Both of the methodologies above emphasize a continuous refactoring claim in order to produce high evolvability in their systems.

Industry experts support the refactoring claim that high evolvability results in:

¿ Easier program comprehension and defect detection

¿ Increased software development speed

¿ Better testing, auditing, and documenting

¿ Reduced dependency on individuals

¿ Greater job satisfaction

¿ Extension of a system’s lifetime

All of these results help to preserve the software value for the organization and provide for better software development management. Keep in mind that the upfront costs associated with not fixing evolvability defects may result in higher incremental costs over the duration of the project.

And if the thought of a formal code review process makes you worry, remember... “code review doesn’t have to suck!” It can even make your job easier when you wield it as a tool to negotiate with product management. Read on to learn how to use the outcomes of code review to provide feature input into upcoming releases.

Page 11: SmartBear - Up Your Game With Code Review - Collaborator

About SmartBear Software

More than one million developers, testers and operations professionals use SmartBear tools to ensure the quality and performance of their APIs, desktop, mobile, Web and cloud-based applications. SmartBear products are easy to use and deploy, are affordable and available for trial at the website. Learn more about the company’s award-winning tools or join the active user community at http://www.smartbear.com, on Facebook or follow us on Twitter @smartbear and Google+.

SmartBear Software, Inc. 100 Cummings Center, Suite 234N Beverly, MA 01915+1 978.236.7900 www.smartbear.com ©2013 by SmartBear Software, Inc. Specifications subject to change. SB-COL-05/30/13-WEB