<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEMAQ3c6cCp7ImA9WhRbEE0.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436</id><updated>2012-01-31T02:40:42.918-08:00</updated><category term="project rescue" /><category term="scalability" /><category term="static analysis" /><category term="cloud computing" /><category term="refactoring" /><category term="XP" /><category term="books" /><category term="OpenSAMM" /><category term="security" /><category term="iterative development" /><category term="risk management" /><category term="Construx" /><category term="Capers Jones" /><category term="SANS" /><category term="deployment" /><category term="Oracle" /><category term="incremental development" /><category term="teams" /><category term="Joel Test" /><category term="CSDP" /><category term="leadership" /><category term="software development" /><category term="code reviews" /><category term="technical debt" /><category term="stackoverflow" /><category term="qualty" /><category term="OWASP" /><category term="SDL" /><category term="resources" /><category term="Continuous Delivery" /><category term="Kanban" /><category term="Scrum" /><category term="agile development" /><category term="reliability" /><category term="maintenance" /><category term="quality" /><category term="attack surface" /><category term="middleware" /><category term="project management" /><category term="productivity" /><category term="testing" /><category term="devops" /><category term="failure" /><category term="architecture" /><category term="estimation" /><category term="Continuous Deployment" /><title>Building Real Software</title><subtitle type="html">Developing and Maintaining Secure and Reliable Software in the Real World</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://swreflections.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/BuildingRealSoftware" /><feedburner:info uri="buildingrealsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0QHQXo6eSp7ImA9WhRUFkU.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-1748583481109579695</id><published>2012-01-27T08:14:00.000-08:00</published><updated>2012-01-27T08:22:10.411-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T08:22:10.411-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="project management" /><category scheme="http://www.blogger.com/atom/ns#" term="project rescue" /><title>Keys to Rescuing a Project</title><content type="html">Fascinating presentation last night at the local PMI chapter by &lt;a href="http://ca.linkedin.com/pub/tom-facklam/b/a83/bab"&gt;Dr. Tom Facklam&lt;/a&gt; on rescuing a project at a biotech firm. The company ran into serious problems during Phase III &lt;a href="http://clinicaltrials.gov/ct2/info/understand"&gt;clinical trials&lt;/a&gt; of a breast cancer vaccine. This was a real life-or-death situation for the patients, and it also threatened the financial viability of the company.&lt;br /&gt;&lt;br /&gt;The key success factors for surviving and resolving this project crisis apply to major problems on other projects:&lt;br /&gt;&lt;br /&gt;Create a sense of urgency. Make sure everyone understands that you don’t have time to do things “properly”. Break down standard ways of working and ways of thinking. Fix first, document later.&lt;br /&gt;&lt;br /&gt;Reassure the sponsors, customers and other stakeholders that your team can take care of the problem – even if you don’t know what the problem is yet, and if you don’t know how to fix it yet. Keep people (especially executives) from panicking, and secure a mandate to act.&lt;br /&gt;&lt;br /&gt;Insist on an open, blameless environment. No witch hunts now or later. Prove to everyone that they can bring up information without repercussions. All that matters is fixing the problem.&lt;br /&gt;&lt;br /&gt;Put the customer first. Don't put the customer at risk, don’t hide things from them, don’t try to “protect” them.&lt;br /&gt;&lt;br /&gt;Communicate constantly. Be transparent. No spin. Stick to the facts – what you know, what you don’t know, what you are doing about it.&lt;br /&gt;&lt;br /&gt;Brainstorm. Encourage people to try things even if it doesn’t make sense. Run multiple concurrent experiments until the data starts to converge on the problems and on solutions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-1748583481109579695?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/6AxHT8tjqX8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/1748583481109579695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=1748583481109579695" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/1748583481109579695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/1748583481109579695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/6AxHT8tjqX8/keys-to-rescuing-project.html" title="Keys to Rescuing a Project" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2012/01/keys-to-rescuing-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EFRXk5cSp7ImA9WhRUFU0.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-8493278970954258359</id><published>2012-01-25T08:35:00.000-08:00</published><updated>2012-01-25T08:40:14.729-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-25T08:40:14.729-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SANS" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="qualty" /><title>Software Security Starts with Software Quality</title><content type="html">In &lt;a href="http://www.amazon.com/Software-Security-Building-Gary-McGraw/dp/0321356705"&gt;Software Security: Building Security In&lt;/a&gt;, Cigital's Gray McGraw breaks software security problems down into roughly equal halves. One half of security problems are security design flaws: missing authorization or doing encryption wrong — or not using encryption at all when you are supposed to, not handling passwords properly, not auditing the right data, relying on client-side instead of server-side data validation, not managing sessions safely, not taking care of SQL injection properly, and so on. These are problems that require training and experience to understand and solve properly.&lt;br /&gt;&lt;br /&gt;The other half are security coding defects — basic mistakes in coding that attackers find ways to exploit. Focusing on preventing, finding and fixing these mistakes is a good place to start a software security program. It's something that developers and testers understand and something that they can take ownership of right away.&lt;br /&gt;&lt;br /&gt;Read my latest post at the &lt;a href="http://software-security.sans.org/blog/2012/01/25/software-security-starts-with-software-quality/"&gt;SANS Appsec Street Fighter blog&lt;/a&gt; on how basic software security practices can take you a long way towards building secure software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-8493278970954258359?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/51DKGolmsOk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/8493278970954258359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=8493278970954258359" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/8493278970954258359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/8493278970954258359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/51DKGolmsOk/software-security-starts-with-software.html" title="Software Security Starts with Software Quality" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2012/01/software-security-starts-with-software.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMEQ3Y5fSp7ImA9WhRVGUU.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-1675747730828933619</id><published>2012-01-19T07:38:00.000-08:00</published><updated>2012-01-19T07:53:22.825-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-19T07:53:22.825-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>Agile Before there was Agile: Egoless Programming and Step-by-Step</title><content type="html">Two key ideas underlying modern Agile development practices. First, that work can be done more effectively by &lt;a href="http://www.infoq.com/articles/whole-team"&gt;Whole Teams&lt;/a&gt; in which people work together collaboratively to design and build systems. They share code, the review each other’s work, they share ideas and problems and solutions, they share responsibility, they work closely with each other and communicate constantly with each other and the customer.&lt;br /&gt;&lt;br /&gt;The second is that working software is designed, built and delivered incrementally in short time boxes.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Egoless Programming&lt;/h3&gt;&lt;br /&gt;The idea of developers working together collaboratively, sharing code and reviewing each other’s work isn’t new. It goes back to &lt;a href="http://en.wikipedia.org/wiki/Egoless_programming"&gt;Egoless Programming&lt;/a&gt; first described by &lt;a href="http://en.wikipedia.org/wiki/Gerald_Weinberg"&gt;Gerald Weinberg&lt;/a&gt; in the early 1970s, in his book &lt;a href="http://www.geraldmweinberg.com/Site/Programming_Psychology.html"&gt;The Psychology of Computer Programming&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In Egoless Programming teams, everyone works together to build the best possible software, in an open, respectful, democratic way, sharing ideas and techniques. People put personal feelings aside, accept criticism and look for opportunities to learn from each other. The important thing is to write the best possible code. Egoless programmers share code, review each other's work, improve code, find bugs and fix them. People work on what they can do best. Leadership of the team moves around and changes based on what problems the team is working on.&lt;br /&gt;&lt;br /&gt;The result is people who are more motivated and code that is more understandable and more maintainable. Sounds a lot like how Agile teams are trying to work together today.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step-by-Step&lt;/h3&gt;&lt;br /&gt;My first experience with “agile development”, or at least with iterative design and incremental time boxed development and egoless programming, came a long time before the famous meeting at Snowbird in 2001. In 1990 joined the technical support team at a small software development company on the west coast of Canada. It was quite a culture shock joining the firm. First, I was recruited while I was back-packing around the world on a shoestring for a year – coming back to Canada and back to work was a culture shock in itself. But this wasn’t your standard corporate environment. The small development team all worked from their homes, while the rest of us worked in a horse ranch in the country side, taking calls and solving problems while cooking spaghetti for lunch in the ranch house kitchen, with an attic stuffed full of expensive high-tech gear. &lt;br /&gt;&lt;br /&gt;We built and supported tools used by thousands of other programmers around the world to build software of their own. All of our software was developed following an incremental, time boxed method called &lt;a href=" http://www.robelle.com/library/papers/step/"&gt;Step-by-Step&lt;/a&gt; which was created by &lt;a href="http://www.linkedin.com/in/emediaboard"&gt;Michel Kohon&lt;/a&gt; in the early 1980s.&lt;br /&gt;&lt;br /&gt;In Step-by-Step, requirements are broken down into incremental pieces and developers develop and deliver working software in regular time boxes (ideally two weeks long), building and designing as they go. You expect requirements to be incomplete or wrong, and you expect them to change, especially as you deliver software to the customer and they start to use it. Sounds a lot like today’s Agile time boxed development, doesn’t it?&lt;br /&gt;&lt;br /&gt;Even though the company was distributed (the company’s President, who still did a lot of the programming, moved to a remote island off the west coast of Canada, and later to an even more remote island in the Caribbean), we all worked closely together and were in constant communication. We relied a lot on email (we wrote our own) and an excellent issue tracking system (we wrote that too), and we spent a lot of time on the phone with each other and with customers and partners. &lt;br /&gt;&lt;br /&gt;The programmers were careful and disciplined. All code changes were peer reviewed (I still remember going through my first code review, how much I learned about how to write good code) and developers tested all their own code. Then the support team reviewed and tested everything again. Each month we documented and packaged up a time boxed release and delivered it to beta test customers – customers who had reported a problem or asked for a new feature – and asked for their feedback. Once a year we put together a final release and distributed to everyone around the world.&lt;br /&gt;&lt;br /&gt;We carefully managed &lt;a href="http://swreflections.blogspot.com/2011/01/theres-more-to-managing-software-debt.html"&gt;technical debt&lt;/a&gt; – although of course we didn’t know that it was called technical debt back then, we just wrote good code to last. Some of that code is still being used today, more than 25 years after the products were first developed. &lt;br /&gt;&lt;br /&gt;After I left this company and started leading and managing development teams, I didn’t appreciate how this way of working could be scaled up to bigger teams and bigger problems. It wasn’t until years later, after I had more experience with Agile development practices, that I saw how what I learned 20 years ago could be applied to make the work that we do today  better and simpler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-1675747730828933619?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/GXhLoe1yYco" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/1675747730828933619/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=1675747730828933619" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/1675747730828933619?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/1675747730828933619?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/GXhLoe1yYco/agile-before-there-was-agile-egoless.html" title="Agile Before there was Agile: Egoless Programming and Step-by-Step" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2012/01/agile-before-there-was-agile-egoless.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMMSHYzfSp7ImA9WhRVE0Q.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-5861965347685985313</id><published>2012-01-12T10:19:00.000-08:00</published><updated>2012-01-12T10:38:09.885-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-12T10:38:09.885-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OWASP" /><category scheme="http://www.blogger.com/atom/ns#" term="attack surface" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Essential Attack Surface Management</title><content type="html">To attack your system, to steal something or do something else nasty, the bad guys need to find a way in, and usually a way out as well. This is what &lt;a href="https://www.owasp.org/index.php/Identify_attack_surface"&gt;Attack Surface Analysis&lt;/a&gt; is all about: mapping the ways in and out of your system, looking at the system from an attacker’s perspective, understanding what parts of the system are most vulnerable, where you need to focus testing and reviews. It’s part of design and it’s also part of risk management.  &lt;br /&gt;&lt;br /&gt;Attack Surface Analysis is simple in concept. It’s like walking around your house, counting all of the doors and windows, and checking to see if they are open, or easy to force open. The fewer doors and windows you have, and the harder they are to open, the safer you are. The bigger a system’s attack surface, &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163882.aspx  "&gt;the bigger a security problem you have&lt;/a&gt;, and the more work that you have to put into your security program.&lt;br /&gt;&lt;br /&gt;For enterprise systems and web apps, the doors and windows include web URLs (every form, input field – including hidden fields, URL parameters and scripts), cookies, files and databases shared outside the app, open ports and sockets, external system calls and application APIs, admin user ids and functions. And any &lt;a href="http://www.veracode.com/blog/2011/12/ics-cert-warns-of-backdoors-in-standard-network-module/"&gt;support backdoors&lt;/a&gt; into the app, if you allow that kind of thing. &lt;br /&gt;&lt;br /&gt;I’m not going to deal with &lt;a href="http://www.veracode.com/blog/2008/06/minimizing-the-attack-surface-part-1/"&gt;minimizing the attack surface&lt;/a&gt; by turning off features or deleting code. It’s important to do this when you can of course, but most developers are paid to add new features and write more forms and other interfaces – to open up the Attack Surface. So it’s important to understand what this means in terms of security risk.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Measuring the System’s Attack Surface&lt;/h3&gt;&lt;br /&gt;Michael Howard at Microsoft and other researchers have developed a method for measuring the attack surface of an application, and to track changes to the attack surface over time, called the &lt;a href="http://www.cs.cmu.edu/~wing/publications/Howard-Wing03.pdf"&gt;Relative Attack Surface Quotient (RSQ)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Using this method you calculate an overall attack surface score for the system, and measure this score as changes are made to the system and to how it is deployed. Researchers at Carnegie Mellon built on this work to develop a formal way to calculate an &lt;a href="http://www.cs.cmu.edu/~pratyus/tse10.pdf"&gt;Attack Surface Metric&lt;/a&gt; for large systems like SAP. They calculate the Attack Surface as the sum of all entry and exit points, channels (the different ways that clients or external systems connect to the system, including TCP/UDP ports, RPC end points, named pipes...) and untrusted data elements. Then they apply a damage potential/effort ratio to these Attack Surface elements to identify high-risk areas.&lt;br /&gt;&lt;br /&gt;Smaller teams building and maintaining smaller systems (which is most of us) and Agile teams trying to move fast don’t need to go this far. Managing a system’s attack surface can be done through a few straightforward steps that developers can understand and take ownership of.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Attack Surface: Where to Start?&lt;/h3&gt;&lt;br /&gt;Start with some kind of baseline if you can – at least a basic understanding of the system’s attack surface.  Spend a few hours reviewing design and architecture documents from an attack surface perspective. For web apps you can use a tool like &lt;a href="http://zapotek.github.com/arachni/"&gt;Arachni&lt;/a&gt; or &lt;a href="http://code.google.com/p/skipfish/"&gt;Skipfish&lt;/a&gt; or &lt;a href="http://w3af.sourceforge.net/"&gt;w3af&lt;/a&gt; or one of the many &lt;a href="http://projects.webappsec.org/w/page/13246988/Web%20Application%20Security%20Scanner%20List"&gt;commercial dynamic testing and vulnerability scanning&lt;/a&gt; tools or services to crawl your app and map the attack surface – at least the part of the system that is accessible over the web. Or better, get an appsec expert to review the application and pen test it so that you understand the attack surface and real vulnerabilities. &lt;br /&gt;&lt;br /&gt;Once you have a map of the attack surface, identify the high risk areas. Focus on remote entry points – interfaces with outside systems and to the Internet – and especially where the system allows anonymous, public access. This is where you are most exposed to attack. Then understand what compensating controls you have in place, operational controls like network firewalls and &lt;a href="https://www.owasp.org/index.php/Web_Application_Firewall"&gt;application firewalls&lt;/a&gt;,and intrusion detection or prevention systems to help protect your app.&lt;br /&gt;&lt;br /&gt;The attack surface model will be rough and incomplete to start, especially if you haven’t done any security work on the system before. Use what you have and fill in the holes as the team makes changes to the attack surface. But how do you know when you are changing the attack surface?&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;When are you Changing the Attack Surface?&lt;/h3&gt;&lt;br /&gt;According to &lt;a href="http://isc2education.org/shop/books-literature/isc-press-publications/official-isc-2r-guide-to-the-csslp.html"&gt;The Official Guide to the CSSLP&lt;/a&gt;&lt;blockquote&gt;“… it is important to understand that the moment a single line of code is written, the attack surface has increased.”&lt;/blockquote&gt;But this over states the risk of making code changes – there are lots of code changes (for example to behind-the-scenes reporting and analytics and changes to business logic) that don’t make the system more vulnerable to attack. Remember, the attack surface is the sum of entry and exit points and untrusted data elements in the system. &lt;br /&gt;&lt;br /&gt;Adding a new system interface, a new channel into the system, a new connection type, a new API, a new type of client, a new mobile app, or a new file or database table shared with the outside – these changes directly affect the Attack Surface and change the risk profile of your app. The first web page that you create opens up the system’s attack surface significantly and introduces all kinds of new risks. If you add another field to that page, or another web page like it, while technically you have made the attack surface bigger, you haven’t increased the risk profile of the application in a meaningful way.  Each of these incremental changes is more of the same, unless you follow a new design or use a new framework.&lt;br /&gt;&lt;br /&gt;Changes to session management and authentication and password management also affect the attack surface. So do changes to authorization and access control logic, especially adding or changing role definitions, adding admin users or admin functions with high privileges. Changes to the code that handles encryption and secrets. Changes to how data validation is done.  And major architectural changes to layering and trust relationships, or fundamental  changes in technical architecture – swapping out your web server or database platform, or changing the run-time OS. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Use a Risk-Based and Opportunity-Based Approach&lt;/h3&gt;&lt;br /&gt;Attack Surface management can be done in an opportunistic way, driven by your ongoing development requirements. As they work on a piece of the system, the team reviews whether and how the changes affect the attack surface, what the risks are, and raise flags for deeper review. These red flags drive &lt;a href="https://www.owasp.org/index.php/Threat_Risk_Modeling"&gt;threat modeling&lt;/a&gt; and secure code reviews and additional testing. &lt;br /&gt;&lt;br /&gt;This means that developers can stay focused on delivering features, while still taking responsibility for security. Attack surface reviews become a part of design and QA and risk management, burned in to how the team works, &lt;a href="http://www.microsoft.com/security/sdl/discover/sdlagile.aspx"&gt;done when needed&lt;/a&gt; in each stage or phase or sprint. &lt;br /&gt;&lt;br /&gt;The first time that you touch a piece of the system it may take longer to finish the change because you need to go through more risk assessment. But over time, as you work on the same parts of the system or the same problems, and as you learn more about the application and more about security risks, it will get simpler and faster.&lt;br /&gt; &lt;br /&gt;Your understanding of the system’s attack surface will probably never be perfect or complete – but you will always be updating it and improving it. New risks and vulnerabilities will keep coming up. When this happens you add new items to your risk checklists, new red flags to watch for. As long as the system is being maintained, you’re never finished doing attack surface management.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-5861965347685985313?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/QeR-qV66jLs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/5861965347685985313/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=5861965347685985313" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5861965347685985313?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5861965347685985313?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/QeR-qV66jLs/essential-attack-surface-management.html" title="Essential Attack Surface Management" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2012/01/essential-attack-surface-management.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8MQnw5cCp7ImA9WhRWGEs.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-4622981690492869975</id><published>2012-01-06T08:04:00.000-08:00</published><updated>2012-01-06T08:38:03.228-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-06T08:38:03.228-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="testing" /><category scheme="http://www.blogger.com/atom/ns#" term="static analysis" /><title>Static Analysis isn’t Development Testing</title><content type="html">I constantly get emails from Static Analysis vendors telling me why I need to buy their technology. Recently I’ve been receiving emails explaining how my team can use static analysis tools to do impressive things like “test millions of complex lines of codes [sic] in minutes”.&lt;br /&gt;&lt;br /&gt;Hold on now, pardner. Running static analysis tools against your code to enforce good coding practices and check for common coding mistakes and violations of security coding rules is a darn good idea. But this isn’t testing, and it’s not a substitute for testing. &lt;br /&gt;&lt;br /&gt;Static Analysis tools like &lt;a href="http://www.coverity.com/products/static-analysis.html"&gt;Coverity&lt;/a&gt;, &lt;a href="http://www.klocwork.com/products/insight/?source=feature"&gt;Klocwork Insight&lt;/a&gt; or &lt;a href="http://www.klocwork.com/products/solo/?source=feature"&gt;Klocwork Solo for Java Developers&lt;/a&gt;,&lt;a href="http://findbugs.sourceforge.net/"&gt;Findbugs&lt;/a&gt;,&lt;a href="https://www.fortify.com/products/hpfssc/source-code-analyzer.html"&gt;HP Fortify&lt;/a&gt;,IBM’s &lt;a href="http://www-01.ibm.com/software/awdtools/swanalyzer/"&gt;Software Analyzer&lt;/a&gt;, Microsoft’s &lt;a href="http://en.wikipedia.org/wiki/FxCop"&gt;FXCop&lt;/a&gt; and &lt;a href="http://www.veracode.com/products/static"&gt;Veracode’s&lt;/a&gt; on-demand static analysis checking are a step up from what compilers and IDEs check for you (although IDEs like &lt;a href="http://www.jetbrains.com/idea/"&gt;IntelliJ IDEA&lt;/a&gt; include a good set of &lt;a href="http://www.jetbrains.com/idea/documentation/static_code_analysis.html"&gt;built-in static analysis&lt;/a&gt; code checkers). These tools should be part of your development and continuous integration environment.&lt;br /&gt;&lt;br /&gt;They are fast and efficient at finding common coding mistakes and inconsistencies in large code bases. The kinds of mistakes that are easy to miss and hard to test for, and that are usually easy to fix. This makes code reviews more efficient and effective, because it lets reviewers focus on higher-level problems rather than low-level correctness. And they can identify areas in the code that need to be refactored and simplified, and areas of the code that may need more testing or deeper review – especially if the tool finds problems in code that is already “working”.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;But static analysis isn’t the same as, or as good as, testing&lt;/h3&gt;&lt;br /&gt;Static analysis tools can’t test the code to validate that it does what it is supposed to do. That the features that the customer requested are all there and that the business logic is correct (unit testing and functional testing and acceptance testing). They can’t check that the interfaces of a module and its behavior is correct (component-level testing), or that the larger pieces of the system work correctly together and with other systems (system testing and integration testing). Or that the system will hold up under load (performance and stress testing and soak testing), or whether it is vulnerable to security attacks (pen testing), or that it people can actually understand how to use it (usability testing). Static analysis tools, even the best ones, are limited to finding &lt;a href="http://drdobbs.com/architecture-and-design/231903203"&gt;“a narrow band of code-related defects”&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I appreciate that static analysis tool vendors want to find new ways to sell their solutions. Maybe this is why Coverity is now calling its static analysis toolset the &lt;a href="http://www.coverity.com/html/press/coverity-unveils-industrys-first-development-testing-platform.html"&gt;“Industry’s First Development Testing Platform”&lt;/a&gt;. Their &lt;a href="http://www.coverity.com/development-testing/index.html"&gt;message seems to be&lt;/a&gt; that developers don’t test their code and won’t fix bugs found by testers “because of organizational silos and conflicting priorities”. So static analysis has to fill this perceived gap. &lt;br /&gt;&lt;br /&gt;By improving integration with development tools like Eclipse and Visual Studio and making the static analysis checks run faster, Coverity has made it easier for developers to find and fix more coding bugs earlier – that’s good. But better packaging and workflow and faster performance doesn’t change what the tool actually does.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Development Testing or Developer Testing&lt;/h3&gt;&lt;br /&gt;Running a static analysis tool isn’t “Development Testing”. Development Testing or &lt;a href="http://www.construx.com/Page.aspx?nid=15&amp;id=49"&gt;Developer Testing&lt;/a&gt; is what developers do to test their own code to see if it works: walking through their code in a debugger as it executes and making sure that it does what they expect, profiling it to make sure that performance doesn’t suck, writing automated unit tests and component tests to make sure that the code does what it is actually supposed to do.&lt;br /&gt;&lt;br /&gt;Confusing static analysis tools with other automated testing tools is a bad idea. It misrepresents what static analysis tools can do. It could lead people to believe that static analysis is a substitute for testing. Bill Pugh, an expert in static analysis and the father of FindBugs, &lt;a href="http://www.cs.umd.edu/~pugh/MistakesThatMatter.pdf"&gt;makes it clear&lt;/a&gt; that while static analysis tools definitely work, “testing is far more valuable than static analysis” at finding bugs. And security experts like Jeremiah Grossman at White Hat Security &lt;a href="https://blog.whitehatsec.com/mythbusting-static-analysis-software-testing-100-code-coverage/"&gt;debunk the idea that static analysis is enough&lt;/a&gt; to check for security bugs or other kinds of bugs in a system.&lt;br /&gt;&lt;br /&gt;Static analysis tools are getting better and easier to use, they’re getting faster and more accurate and they throw off less false positives than they did even a couple of years ago. Everyone should use them if they can find a tool that works well for them and that they can afford. If you’re in a Java shop for example, there’s no excuse not to be using Findbugs at least – it’s free and it works. My team uses multiple different static analysis tools at different stages of development and continuous integration, because different tools find different kinds of problems, and some tools take longer to run. These tools find real bugs and coding problems. But there’s too much hype in this market. In the land of software testing, static analysis tools don’t &lt;a href="http://www.computerweekly.com/blogs/cwdn/2011/06/in-the-land-of-software-testing-static-analysis-reigns-king.html"&gt;“reign king”&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-4622981690492869975?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/7ARvcMq0oGo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/4622981690492869975/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=4622981690492869975" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4622981690492869975?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4622981690492869975?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/7ARvcMq0oGo/static-analysis-isnt-development.html" title="Static Analysis isn’t Development Testing" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2012/01/static-analysis-isnt-development.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4GSXY9fyp7ImA9WhRXEEU.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-7760916116132736784</id><published>2011-12-15T13:08:00.000-08:00</published><updated>2011-12-16T16:48:48.867-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-16T16:48:48.867-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="code reviews" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>2011: The State of Software Security and Quality</title><content type="html">It’s the end of the year. Time to look back on what you’ve done, what you’ve learned, your successes and mistakes, and what you learned from them. I also like to look at the big picture: not just my team and the projects that I manage, or even the company that I work for, but software development in general. How are we doing as an industry, are we getting better, where are we falling behind, what are the main drivers for developers and development managers?&lt;br /&gt;&lt;br /&gt;Besides the usual analysis from &lt;a href="http://informationweek.com/"&gt;InformationWeek,&lt;/a&gt; and from Forrester and Gartner (if you can afford them), there’s some interesting data available from software quality and software security vendors.&lt;br /&gt;&lt;a href="http://www.castsoftware.com/default.aspx"&gt;&lt;br /&gt;CAST Software&lt;/a&gt;, a vendor of code structural analysis tools, publishes an annual Report on Application Software Health based on an analysis of 745 applications from 160 companies (365 million lines of code) using CAST's static analysis platform. A 25-page &lt;a href="http://www.castsoftware.com/resources/resource/email-campaigns/cast-report-on-application-software-health"&gt;executive summary&lt;/a&gt; of the report is available free with registration – registration also provides you access to some &lt;a href="http://www.castsoftware.com/resources/analysts"&gt;interesting research&lt;/a&gt; from Gartner and Forrester Research, including a pretty good paper from Forrester Research on &lt;a href="http://www.castsoftware.com/resources/resource/analyst-reports/the-six-most-meaningful-metrics-to-prove-and-improve-app-dev-s-business-value"&gt;application development metrics&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The code that CAST analyzed is in different languages, approximately half of it in Java. Their findings are kinda interesting:&lt;ul type="square"&gt;&lt;li&gt;They found no strong correlation between the size of the system and structural quality except for COBOL apps where bigger apps have more structural quality problems.&lt;/li&gt;&lt;li&gt;COBOL apps also tended to have more high-complexity code modules.&lt;/li&gt;&lt;li&gt;I thought that the COBOL findings were interesting, although I haven’t worked with COBOL code in a long long time. Maybe too interesting – CAST decided that the findings for COBOL were so far outside of the norm that “consequently we do not believe that COBOL applications should be directly benchmarked against other technologies”. &lt;/li&gt;&lt;li&gt;For 204 applications, information was included on what kind of application development method was followed. Applications developed with Agile methods and Waterfall methods had similar profiles for business risk factors (robustness, performance, security) but Agile methods were not as effective when it comes to cost factors (transferability, changeability), which would seem counter-intuitive, given that Agile methods are intended to reduce the cost of change.&lt;/li&gt;&lt;li&gt;The more releases per year, the less robust, less secure and less changeable the code was. Even the people at CAST don’t believe this finding.&lt;/li&gt;&lt;/ul&gt;CAST also attempts to calculate an average technical debt cost for applications, using the following formula:&lt;br /&gt;&lt;blockquote&gt;(10% of low severity findings + 25% of medium severity findings + 50% of high severity findings) * # of hours to fix a problem * cost per hour for development time&lt;br /&gt;&lt;/blockquote&gt;The idea is that not all findings from the static analysis tool need to be fixed (maybe 10% of low severity findings and 25% of medium severity findings), but at least half of the high severity issues found need to be fixed. They assume that on average each of these fixes can be made in 1 hour, and estimate that the average development cost for doing this work is $75 per hour. This results in an average technical debt cost of $3.61 per LOC. For Java apps, the cost is much higher, at $5.42 per LOC. So your average 100 KLOC Java system carries about $500,000 worth of technical debt....&lt;br /&gt;&lt;br /&gt;It’s difficult to say how real or meaningful these findings are. The analysis depends a lot on the extensiveness of CAST’s static analysis checkers (with different checking done for different languages, making it difficult to compare findings across languages) and the limited size of their customer base. As their tools improve and their customer base grows, this analysis will become more interesting, more accurate and more useful.&lt;br /&gt;&lt;br /&gt;The same goes for the &lt;a href="http://info.veracode.com/state-of-software-security-report-volume4.html"&gt;State of Software Security Report&lt;/a&gt; from &lt;a href="http://www.veracode.com/"&gt;Veracode&lt;/a&gt;, a company that supplies static and dynamic software security testing services. Like the CAST study, this report attempts to draw wide-ranging conclusions from a limited data set – in this case, the analysis of almost 10,000 “application builds” over the last 18 months (which is a lot less than 10,000 applications, as the same application may be analyzed at least twice if not more in this time window). The analysis focused on web apps (75% of the applications reviewed were web apps). Approximately half of the code was in Java, one quarter in .NET, the rest in C/C++, PHP, etc.&lt;br /&gt;&lt;br /&gt;Their key findings:&lt;ul type="square"&gt;&lt;li&gt;8 out of 10 apps fail to pass Veracode’s security tests on the first pass - the app contains at least 1 high-risk vulnerability.&lt;/li&gt;&lt;li&gt;For web apps, the top vulnerability is still XSS. More than half of the vulnerabilities found are XSS, and 68% of web apps are vulnerable to XSS attacks.&lt;/li&gt;&lt;li&gt;32% of web apps were vulnerable to SQL Injection, even though only 5% of all vulnerabilities found were SQL Injection issues.&lt;/li&gt;&lt;li&gt;For other apps, the most common problems were in error handling (19% of all issues found) and cryptographic mistakes (more than 46% of these apps had issues with crypto).&lt;/li&gt;&lt;/ul&gt;Another interesting analysis is available from &lt;a href="http://smartbear.com/"&gt;SmartBear Software&lt;/a&gt;, a vendor of software quality tools, which recently sponsored a webinar by Capers Jones on &lt;a href="http://www2.smartbear.com/Software_Quality_Webinar_Series_ondemand_reg1.html"&gt;The State of Software Quality in 2011&lt;/a&gt;. Capers Jones draws from a much bigger database of analysis over a much longer period of time. He provides a whirlwind tour of facts and findings in this webinar, summarizing and updating some of the material that you can find in his books.&lt;br /&gt;&lt;br /&gt;SmartBear provides some other &lt;a href="http://smartbear.com/community/resources/"&gt;useful free resources&lt;/a&gt;, including a good white paper on &lt;a href="http://smartbear.com/PDF/11_Best_Practices_for_Peer_Code_Review.pdf"&gt;best practices for code review&lt;/a&gt;. This is further explored in the chapter on Modern Code Reviews by SmartBear’s Jason Cohen in the book &lt;a href="http://www.amazon.com/Making-Software-Really-Works-Believe/dp/0596808321"&gt;Making Software: What Really Works, and Why we Believe it&lt;/a&gt;, a good collection of essays on software development practices and the state of research in software engineering.&lt;br /&gt;&lt;br /&gt;All of these reports are free – you need to sign up, but you will get minimal hassle – at least I haven’t been hassled much so far. I’m not a customer of any of these companies (we use competing or alternative solutions that we are happy with for now) but I am impressed with the work that these companies do to make this information available to the community.&lt;br /&gt;&lt;br /&gt;There were no real surprises from this analysis. We already know what it takes to build good software, we just have to make sure that we actually do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-7760916116132736784?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/RjtGUUtNwGg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/7760916116132736784/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=7760916116132736784" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7760916116132736784?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7760916116132736784?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/RjtGUUtNwGg/2011-state-of-software-security-and.html" title="2011: The State of Software Security and Quality" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/12/2011-state-of-software-security-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UGQH8yfyp7ImA9WhRQEUU.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-6467871132735320011</id><published>2011-12-06T08:12:00.000-08:00</published><updated>2011-12-06T08:33:41.197-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-06T08:33:41.197-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="devops" /><category scheme="http://www.blogger.com/atom/ns#" term="Continuous Delivery" /><category scheme="http://www.blogger.com/atom/ns#" term="XP" /><title>Devops has made Release and Deployment Cool</title><content type="html">Back 10 years or so when Extreme Programming came out, it began to change the way that programmers thought about testing. XP made software developers accountable for testing their own code. XPers gave programmers practices like &lt;a href="http://www.extremeprogramming.org/rules/testfirst.html"&gt;Test-First Development&lt;/a&gt; and simple, free community-based automated testing tools like &lt;a href="http://martinfowler.com/bliki/Xunit.html"&gt;xUnit&lt;/a&gt; and &lt;a href="http://fit.c2.com/"&gt;FIT&lt;/a&gt; and &lt;a href="http://fitnesse.org/"&gt;Fitnesse&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;XP made testing cool. Programmers started to care about how to write good automated tests and achieving high levels of test code coverage and about optimizing feedback loops from testing and continuous integration. Instead of throwing code over the wall to a test team, programmers began to take responsibility for reviewing and testing their own code and making sure that it really worked. It’s taken some time, but most of these ideas have gone mainstream, and the impact has been positive for software development and software quality.&lt;br /&gt;&lt;br /&gt;Now Devops is doing the same thing with release and deployment. People are finding new ways to make it simpler and easier to release and deploy software, using better tools and getting developers and ops staff together to do this.&lt;br /&gt;&lt;br /&gt;And this is a good thing. Because release and deployment, maybe even more than testing, has been neglected by developers. It’s left to the end because it’s the last thing that you have to do – on some big, serial life cycle projects, you can spend months designing and developing something before you get around to releasing the code. Release and deployment is hard – it involves all sorts of finicky technical details and checks. To do it you have to understand how all the pieces of the system are laid out, and you need to understand the technology platform and operational environment for the system, and how Ops needs the system to be setup and monitored, how they need it wired in, what tools they use and how these tools work, and work through operational dependencies, and compliance and governance requirements. You have to talk to different people in a different language, learn and care about their wants and needs and pain points. It’s hard to get all of this right, and it’s hard to test it, and you’re under pressure to get the system out. Why not just give Ops the JARs and EARs and WARs and ZIPs (and your phone number in case anything goes wrong) and let them figure it out? We’re back to throwing the code over a wall again.&lt;br /&gt;&lt;br /&gt;Devops, by getting Developers and Operations staff working together and sharing technology and solving problems together, is changing this. It’s making developers, and development managers like me, pay more attention to release and deployment (and post-deployment) requirements. Not just getting it done. Getting developers and QA and Operations staff to think together about how to make release and deployment and configuration simpler and faster, about what could go wrong and then making sure that it doesn’t go wrong, for every release – not just when there is a problem or if Ops complains. Replacing checklists and instructions with automated steps. Adding post-release health checks. Building on Continuous Integration to &lt;a href="http://continuousdelivery.com/"&gt;Continuous Delivery&lt;/a&gt;, making it easier and safer and less expensive to release to test as well as production. This is all practical, concrete work, and a natural next step for teams that are trying to design and build software faster.&lt;br /&gt;&lt;br /&gt;One difference between the XP and Devops stories is that there’s a lot more vendor support in Devops than there was in the early days of Agile development. Commercial vendors for products like &lt;a href="http://www.opscode.com/products/"&gt;Chef&lt;/a&gt; and &lt;a href="http://puppetlabs.com/puppet/puppet-enterprise/"&gt;Puppet&lt;/a&gt; and UrbanCode (which has rebranded their Anthill Pro build and release toolset the &lt;a href="http://www.urbancode.com/html/products/devops/default.html"&gt;DevOps Platform&lt;/a&gt;) and ThoughtWorks Studios with &lt;a href="http://www.thoughtworks-studios.com/go-agile-release-management"&gt;Go&lt;/a&gt;, and even IBM and HP are involved in Devops and pushing Devops ideas forward.&lt;br /&gt;&lt;br /&gt;This is good and bad. Good – because this means that there are tools that people can use and people who can help them understand how to use them. And there’s somebody to help sponsor the conferences and other events that bring people together to explore Devops problems. Bad, because in order to understand and appreciate what’s going on and what’s really useful in Devops you have to wade through a growing amount of marketing noise. It’s too soon to say yet whether the real thought leaders and evangelists will be &lt;a href="http://server.dzone.com/news/devops-tweets-week-125"&gt;drowned out&lt;/a&gt; by vendor product managers and consultants – much like the problem that the Agile development community faces today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-6467871132735320011?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/Ho-1v1E_Ojs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/6467871132735320011/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=6467871132735320011" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6467871132735320011?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6467871132735320011?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/Ho-1v1E_Ojs/devops-has-made-release-and-deployment.html" title="Devops has made Release and Deployment Cool" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/12/devops-has-made-release-and-deployment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUANR348cCp7ImA9WhRRF0s.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-3684520370140741593</id><published>2011-11-30T09:12:00.000-08:00</published><updated>2011-12-01T10:23:16.078-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-01T10:23:16.078-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="maintenance" /><title>Incorrect bug fixes</title><content type="html">Whenever developers fix a bug there is of course a chance of making a mistake – not fixing the bug correctly or completely, or introducing a regression, an unexpected side effect. This is a serious problem in system maintenance. In &lt;a href="http://www.crosstalkonline.org/storage/issue-archives/2007/200712/200712-Jones.pdf"&gt;Geriatric Issues of Aging Software&lt;/a&gt;, Capers Jones says that&lt;br /&gt;&lt;blockquote&gt;Roughly 7 percent of all defect repairs will contain a new defect that was not there before. For very complex and poorly structured applications, these bad fix injections have topped 20 percent.&lt;br /&gt;&lt;/blockquote&gt;An interesting new study &lt;a href="http://patterninsight.com/fileadmin/PI/products/downloads/Pattern_Insight_How_Do_Fixes_Become_Bugs.pdf"&gt;How do Fixes Become Bugs?&lt;/a&gt; looks at mistakes made by developers trying to fix bugs. The study was done on bug fixes made to large operating system code bases. Their findings aren’t surprising, but they are interesting:&lt;ul type="square"&gt;&lt;li&gt; Somewhere between 15-25% of fixes for bugs are found to be incorrect in the field. Almost half of these mistakes are serious (can cause crashes, hangs, data corruptions or security problems). &lt;/li&gt;&lt;li&gt; Concurrency bugs are the most difficult to fix correctly: 39% of concurrency bug fixes are wrong, and fixes on data race bugs can easily introduce deadlocks or reveal other bugs that were previously hidden. Not surprising given that the analysis was of operating system code. But this still hilights the risks in trying to fix concurrent code.&lt;/li&gt;&lt;li&gt; The risk of making mistakes is magnified if the person making the fix is not familiar with the code. More than 25%of incorrect fixes are made by developers who had never previously touched this part of the code before.&lt;/li&gt;&lt;/ul&gt;The main reasons for incorrect bug fixes:&lt;ul type="square"&gt;&lt;li&gt;Bug fixes are usually done under tight timelines – bug fixers don’t have the chance to think about potential side-effects and the interaction with the rest of the system, and testers don’t have enough time to thoroughly regression test the fix.&lt;/li&gt;&lt;li&gt;Bug fixing has a narrow focus – the developer is focused on understanding and fixing the bug, and doesn’t bother to understand the wider context of the system, often doesn’t even check for other places where the same fix needs to be made. Testers are also narrowly focused on proving that the fix works, and don’t look outside of the specific problem.&lt;/li&gt;&lt;li&gt;Lack of understanding of the code base – fixes, especially high-risk fixes (like concurrency changes) should be made by whoever understands the code the best.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So: don't let people who don't know the code well try to fix high-risk problems like concurrency bugs. But you knew that already, didn't you.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-3684520370140741593?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/MbdYSzYoDLs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/3684520370140741593/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=3684520370140741593" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/3684520370140741593?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/3684520370140741593?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/MbdYSzYoDLs/incorrect-bug-fixes.html" title="Incorrect bug fixes" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/11/incorrect-bug-fixes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEGRXc-fSp7ImA9WhRRFUQ.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-4139175599160359481</id><published>2011-11-29T09:32:00.000-08:00</published><updated>2011-11-29T10:17:04.955-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-29T10:17:04.955-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Kanban" /><category scheme="http://www.blogger.com/atom/ns#" term="Continuous Deployment" /><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>Iterationless Development – the latest New New Thing</title><content type="html">Thanks to the &lt;a href="http://theleanstartup.com/"&gt;Lean Startup&lt;/a&gt; movement, Iterationless Development and &lt;a href="http://swreflections.blogspot.com/2010/06/still-getting-my-head-around-continuous.html"&gt;Continuous Deployment&lt;/a&gt; have become the New New Thing in software development methods. Apparently this has gone so far that “there are venture firms in Silicon Valley that won’t even fund a company unless they employ Lean startup methodologies”.&lt;br /&gt;&lt;br /&gt;Although most of us don’t work in a Web 2.0 social media startup, or anything like one, it’s important to cut through the hype and see what we can learn from these ideas. One of the most comprehensive descriptions I’ve seen so far of Iterationless Development is a (good, but buzzword-heavy) &lt;a href="http://summit.atlassian.com/archives/plan-and-track/iterationless-kanban-and-continuous-deployment"&gt;presentation by Erik Huddleston&lt;/a&gt; that explains how development is done at Dachis Group, which builds online social communities. The development team’s backlog is updated on a just-in-time basis, and includes customer business requirements (defined as minimum features), feedback from Operations (data from analytics and results of Devops retrospectives), and minimally required technical architecture.&lt;br /&gt;&lt;br /&gt;Work is managed using Kanban WIP limits and queues. Developers create tests for each change or fix up front. Every check-in kicks off automated tests and static analysis checks for complexity and code duplication as part of Continuous Integration. If it passes these steps, the change is promoted to a test environment, and the code must then be reviewed for architectural oversight (they use &lt;a href="http://www.atlassian.com/software/crucible/overview"&gt;Atlassian’s Crucible&lt;/a&gt; online code review tool to do this).&lt;br /&gt;&lt;br /&gt;Once all of the associated change sets have been reviewed, the code changes are deployed to staging for acceptance testing and review by product management, before being promoted to production. All production changes (code change sets, environment changes and database migration sets) are packaged into &lt;a href="http://www.opscode.com/chef/"&gt;Chef recipes&lt;/a&gt; and progressively rolled out online. It’s a disciplined and well-structured approach that depends a lot on automation and a good tool set.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Death to Time Boxing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What makes Iterationless Development different is obviously the lack of time boxing – instead of being structured in sprints or spikes, work is done in a continuous flow. According to Huddleston, iterationless &lt;a href="http://www.infoq.com/articles/hiranabe-lean-agile-kanban"&gt;Kanban&lt;/a&gt; is “here to stay” and is “much more productive than artificial time boxing”.&lt;br /&gt;&lt;br /&gt;In a separate blog post, he talks about the &lt;a href="http://www.erik.net/post/2387443734/death-of-iteration"&gt;death of iterations&lt;/a&gt;. While he agrees that iterations have benefits – providing a fixed and consistent routine for the team to follow, a forcing function to drive work to conclusion (nothing focuses the mind like a deadline), and logical points for the team to synch up with the rest of the business – Huddleston asserts that working in time boxes is unnatural and unnecessary. That the artificial and arbitrary boundaries defined by time boxes force people to compromise on solutions, and force them to cut corners in order to meet deadlines.&lt;br /&gt;&lt;br /&gt;I agree that time boxes are arbitrary – but no more arbitrary than a work day or work week, or a month or a financial quarter; all cycles that businesses follow. In business we are always working towards a deadline, whether it is hard and real or soft and arbitrary. This is how work gets done. And this doesn’t change if we are working in time boxes or without them. &lt;br /&gt;&lt;br /&gt;In iterationless Kanban, the pressure to meet periodic time box deadlines is replaced with the constant pressure to deliver work as fast as possible, to meet individual task deadlines. Rapid cycling in short time boxes is hard enough on teams over a long period of time. Continuous, interrupt-driven development with a tight focus on optimizing cycle time is even harder.  The dials are set to on and they stay that  way. Kanban makes this easy, giving the team, and the customer and  management, the tools to continuously visualize work in progress,  identify bottlenecks and delays and squeeze out waste – to maximize  efficiency. This is a manufacturing process model remember.  The emphasis on tactical optimization and fast-feedback loops, and the  “myopic focus on eliminating waste” is just that – short-sighted and  difficult to sustain.&lt;br /&gt;&lt;br /&gt;With time boxes there are at least built-in synch points, chances for the team to review and reset, so that people can reflect on what they have done, look for ways to improve, look ahead at what they need to do next, and then build up again to an optimal pace. This isn’t waste. Cycling up and down is important and necessary to keep people from getting burnt out and to give them a chance to think and to get better at what they do.&lt;br /&gt;&lt;br /&gt;Risk is managed in the same tactical, short-sighted way. Teams working on one issue at a time end up managing risk one issue at a time, relying heavily on automated testing and in-stream controls like code reviews. This is good, but not good enough for many environments: security and reliability risks need to be managed in a more comprehensive, systemic way. Even integrating feedback from Ops isn’t enough to find and prevent deep problems. Working in Agile time boxes is already &lt;a href="http://securosis.com/presentations/Security+AgileFAIL_OWASP.ppt_.pdf"&gt;trading technical risks for speed&lt;/a&gt; and efficiency. Iterationless Development and Continuous Deployment, focused on eliminating waste and on accelerating cycle time, pushes these tradeoffs even further, into the danger zone.&lt;br /&gt;&lt;br /&gt;Huddleston is also critical of “boxcaring” – batching different pieces of work together in a time box – because it interferes with simple prioritization and introduces unnecessary delays. But batching work together that makes sense to do together can be a useful way to reduce risk and cost. Take a simple example. The team is working on feature 1a . Once it's done, they move on to feature 1b, then 1c. All of this work requires changing the same parts of code, the same or similar testing and reviews, and has a similar impact on operations. By batching this work together, you might deliver it slower, but you can reduce waste and minimize risk by delivering it once, rather than 3 times.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Iterationless Development Makes Sense…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Iterationless Development using Kanban as a control structure is an effective way to deal with excessive pressure and uncertainty – like in an early-stage startup, or a firefighting support team. It’s good for rapid innovation and experimental prototyping, building on continuous feedback from customers and from Operations – situations where speed and responsiveness to the business and customers is critical, more important than minimizing technical and operational risks. It formalizes the way that most successful web startups work – come up with a cool idea, build a prototype as quickly as possible, and then put it out and find out what customers actually want before you run out of cash. But it’s not a one-size-fits-all solution to software development problems.&lt;br /&gt;&lt;br /&gt;All software development methods are compromises – imperfect attempts at managing risks and uncertainty. Sequential or serial development methods attempt to specify and fix the solution space upfront, and then manage to this fixed scope. Iterative, time-boxed development helps teams deal with uncertainty by breaking business needs down into small, concrete problems and delivering a working solution in regular steps. And iterationless, continuous-flow allows teams to rapidly test ideas and alternatives, when the problem isn’t clear and nobody is sure yet what direction to go in.&lt;br /&gt;&lt;br /&gt;There’s no one right answer. What approach you follow depends on what your priorities and circumstances are, and what kind of problems and risks you need to solve today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-4139175599160359481?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/PR9F6w-9oeU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/4139175599160359481/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=4139175599160359481" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4139175599160359481?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4139175599160359481?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/PR9F6w-9oeU/iterationless-development-latest-new.html" title="Iterationless Development – the latest New New Thing" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/11/iterationless-development-latest-new.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAFRXc8eSp7ImA9WhRSE0U.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-2239542721454138634</id><published>2011-11-15T09:56:00.000-08:00</published><updated>2011-11-15T10:11:54.971-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-15T10:11:54.971-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="maintenance" /><category scheme="http://www.blogger.com/atom/ns#" term="leadership" /><title>Diminishing Returns in software development and maintenance</title><content type="html">Everyone knows from reading &lt;a href="http://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959"&gt;The Mythical Man Month&lt;/a&gt; that as you add more people to a software development project you will see &lt;a href="http://en.wikipedia.org/wiki/Diminishing_returns"&gt;diminishing marginal returns&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;When you add a person to a team, there’s a short-term hit as the rest of the team slows down to bring the new team member up to speed and adjusts to working with another person, making sure that they fit in and can contribute. There’s also a long-term cost. More people means more people who need to talk to each other (n x n-1 / 2), which means more opportunities for misunderstandings and mistakes and misdirections and missed handoffs, more chances for disagreements and conflicts, more bottleneck points.&lt;br /&gt;&lt;br /&gt;As you continue to add people, the team needs to spend more time getting each new person up to speed and more time keeping everyone on the team in synch. Adding more people means that the team speeds up less and less, while people costs and communications costs and overhead costs keep going up. At some point negative returns set in – if you add more people, the team’s performance will decline and you will get less work done, not more.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Diminishing Returns from any One Practice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But adding too many people to a project isn’t the only case of diminishing returns in software development. If you work on a big enough project, or if you work in maintenance for long enough, you will run into problems of diminishing returns everywhere that you look.&lt;br /&gt;&lt;br /&gt;Pushing too hard in one direction, depending too much on any tool or practice, will eventually yield diminishing returns. This applies to:&lt;br /&gt;-    Manual functional and acceptance testing&lt;br /&gt;-    Test automation&lt;br /&gt;-    Any single testing technique&lt;br /&gt;-    Code reviews&lt;br /&gt;-    Static analysis bug finding tools&lt;br /&gt;-    Penetration tests and other security reviews&lt;br /&gt;&lt;br /&gt;Aiming for 100% code coverage on unit tests is a good example. Building a good automated regression safety net is important – as you wire in tests for key areas of the system, programmers get more confidence and can make more changes faster.&lt;br /&gt;&lt;br /&gt;How many tests are enough? In &lt;a href="http://www.informit.com/store/product.aspx?isbn=0321601912"&gt;Continuous Delivery&lt;/a&gt;, Jez Humble and David Farley set 80% coverage as a target for each of automated unit testing, functional testing and acceptance testing.  You could get by with lower coverage in many areas, higher coverage in core areas. You need enough tests to catch common and important mistakes. But beyond this point, more tests get more difficult to write, and find fewer problems.&lt;br /&gt;&lt;br /&gt;Unit testing can only find so many problems in the first place. In &lt;a href="http://cc2e.com/"&gt;Code Complete&lt;/a&gt;, Steve McConnell explains that unit testing can only find between 15% and 50% (on average 30%) of the defects in your code.  Rather than writing more unit tests, people’s time would be better spent on other approaches like &lt;a href="http://www.google.ca/url?sa=t&amp;amp;rct=j&amp;amp;q=exploratory%20testing&amp;amp;source=web&amp;amp;cd=2&amp;amp;ved=0CDAQFjAB&amp;amp;url=http%3A%2F%2Fwww.satisfice.com%2Farticles%2Fet-article.pdf&amp;amp;ei=y064TrHwEoX30gGF1bzRBw&amp;amp;usg=AFQjCNGlnmPrWeJ_ZKGmRYF0EDcqRD-V8w&amp;amp;cad=rja"&gt;exploratory system testing&lt;/a&gt; and &lt;a href="http://swreflections.blogspot.com/2011/05/not-doing-code-reviews-whats-your.html"&gt;code reviews&lt;/a&gt; or &lt;a href="http://agiletesting.blogspot.com/2005/02/performance-vs-load-vs-stress-testing.html"&gt;stress testing&lt;/a&gt; or &lt;a href="http://blogs.msdn.com/b/sdl/archive/2007/09/20/fuzz-testing-at-microsoft-and-the-triage-process.aspx"&gt;fuzzing&lt;/a&gt; to find different kinds of errors.&lt;br /&gt;&lt;blockquote&gt;Too much of anything is bad, but too much whiskey is enough.&lt;br /&gt;Mark Twain, as quoted in Code Complete&lt;br /&gt;&lt;/blockquote&gt;Refactoring is important for maintaining and improving the structure and readability of code over time. It is intended to be a supporting practice – to help make changes and fixes simpler and clearer and safer. When refactoring becomes an &lt;a href="http://www.makinggoodsoftware.com/2011/03/27/the-obsession-with-beautiful-code-the-refactor-syndrome/"&gt;end in itself&lt;/a&gt; or turns into &lt;a href="http://programmers.stackexchange.com/questions/43506/is-it-bad-to-have-an-obsessive-refactoring-disorder"&gt;Obsessive Refactoring Disorder&lt;/a&gt;, it not only adds unnecessary costs as programmers waste time over &lt;a href="http://www.gamedev.net/topic/596995-obsessive-compulsiverefactoring-disorder/"&gt;trivial details&lt;/a&gt; and style issues, it can also add unnecessary risks and &lt;a href="http://programmers.stackexchange.com/questions/43489/how-to-handle-coworker-with-obsessive-refactoring-disorder"&gt;create conflict in a team&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Make sure that refactoring is done in a disciplined way, and focus refactoring on those areas that need it the most: on code that is frequently changed, routines that are too big, too hard to read, too complex and &lt;a href="http://books.google.com/books?id=oEPjYVfUR1wC&amp;amp;pg=PT489&amp;amp;lpg=PT489&amp;amp;dq=capers+jones+error-prone+modules&amp;amp;source=bl&amp;amp;ots=b8u6SqhQyG&amp;amp;sig=_JTohpdPTXB1Bbyrc9wEPo5nWhE&amp;amp;hl=en&amp;amp;ei=MVK4Tpj8Ieft0gGSouHVCQ&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;redir_esc=y#v=onepage&amp;amp;q&amp;amp;f=false"&gt;error-prone&lt;/a&gt;. Putting most of your attention refactoring (or if necessary rewriting) this code will get you the highest returns.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Less and Less over Time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Diminishing returns also set in over time. The longer that you spend working the same way and with the same tools, the less benefits you will see. Even core practices that you’ve grown to depend on don’t pay back over time, and at some point may cost more than they are worth.&lt;br /&gt;&lt;br /&gt;It’s time again for New Year’s resolutions – time to sign up at a gym and start lifting weights. If you stick with the same routine for a couple of months, you will start to see good results. But after a while your body will get used to the work – if you keep doing the same things the same way your &lt;a href="http://www.nytimes.com/1999/01/19/health/law-of-diminishing-returns-for-athletes.html"&gt;performance will plateau&lt;/a&gt; and you will stop seeing gains. You will get bored and stop going to the gym, which will leave more room for people like me. If you do keep going, trying to push harder for returns, you will overtrain and injure yourself.&lt;br /&gt;&lt;br /&gt;The same thing happens to software teams following the same practices, using the same tools. Some of this is due to inertia. Teams, organizations reach an equilibrium point and they want to stay there. Because it is comfortable, and it works – or at least they understand it. And because the better the team is working, the harder it is to get better – all the low-hanging fruit has been picked. People keep doing what worked for them in the past. They stop looking beyond their established routines, stop looking for new ideas. Competence and control lead to complacency and acceptance. Instead of trying to be as good as possible, they settle for being good enough.&lt;br /&gt;&lt;br /&gt;This is the point of inspect-and-adapt in Scrum and other time boxed methods – asking the team to regularly re-evaluate what they are doing and how they are doing it, what’s going well and what isn’t, what they should do more of or less of, challenging the status quo and finding new ways to move forward.  But even the act of assessing and improving is subject to diminishing returns.  If you are building software in 2-week time boxes, and you’ve been doing this for 3, 4 or 5 years, then how much meaningful feedback should you really expect from so many superficial reviews?  After a while the team finds themselves going over the same issues and problems and coming up with the same results. Reviews become an unnecessary and empty ritual, another waste of time.&lt;br /&gt;&lt;br /&gt;The same thing happens with tools. When you first start using a static analysis bug checking tool for example, there’s a good chance that you will find some interesting problems that you didn’t know were in the code – maybe even more problems than you can deal with. But once you triage this and fix up the code and use the tool for a while, the tool will find fewer and fewer problems until it gets to the point where you are paying for insurance – it isn’t finding problems any more, but it might someday.&lt;br /&gt;&lt;br /&gt;In "&lt;a href="http://gcn.com/Articles/2009/11/09/Cybereye-SDLC-diminishing-returns.aspx"&gt;Has secure software development reached its limits?&lt;/a&gt;” William Jackson argues that SDLCs – all of them – eventually reach a point of diminishing returns from a quality and security standpoint, and that Microsoft and Oracle and other big shops are already seeing diminishing returns from their SDLCs. Their software won’t get any better – all they can do is to keep spending time and money to stay where they are. The same thing happens with Agile methods like Scrum or XP – at some point you’ve squeezed everything that you can from this way or working, and the team’s performance will plateau.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What can you do about diminishing returns?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, understand and expect returns to diminish over time. Watch for the signs, and factor this into your expectations – that even if you maintain discipline and keep spending on tools, you will get less and less return for your time and money. Watch for the team’s velocity to plateau or decline.&lt;br /&gt;&lt;br /&gt;Expect this to happen and be prepared to make changes, even force fundamental changes on the team. If the tools that you are using aren’t giving returns any more, then find new ones, or stop using them and see what happens.&lt;br /&gt;&lt;br /&gt;Keep reviewing how the team is working, but do these reviews differently: review less often, make the reviews more focused on specific problems, involve different people from inside and outside of the team. Use problems or mistakes as an opportunity to shake things up and challenge the status quo. Dig deep using &lt;a href="http://swreflections.blogspot.com/2011/06/moving-forward-from-failure.html"&gt;Root Cause Analysis&lt;/a&gt; and challenge the team’s way of thinking and working, look for something better. Don’t settle for simple answers or incremental improvements.&lt;br /&gt;&lt;br /&gt;Remember the 80/20 rule. Most of your problems will happen in the same small number of areas, from a small number of common causes. And most of your gains will come from a few initiatives.&lt;br /&gt;&lt;br /&gt;Change the team’s driving focus and key metrics, set new bars. Use Lean methods and Lean Thinking to identify and eliminate bottlenecks, delays and inefficiencies. Look at the controls and tests and checks that you have added over time, question whether you still need them, or find steps and checks that can be combined or automated or simplified. Focus on reducing cycle time and eliminating waste until you have squeezed out what you can. Then change your focus to quality and eliminating bugs, or to simplifying the release and deployment pipeline, or some other new focus that will push the team to improve in a meaningful way. And keep doing this and pushing until you see the team slowing down and results declining. Then start again, and push the team to improve again along another dimension.  Keep watching, keep changing, keep moving ahead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-2239542721454138634?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/Rv1wvh6ZxPM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/2239542721454138634/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=2239542721454138634" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2239542721454138634?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2239542721454138634?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/Rv1wvh6ZxPM/diminishing-returns-in-software.html" title="Diminishing Returns in software development and maintenance" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/11/diminishing-returns-in-software.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cHQ3Y9fCp7ImA9WhRTE0g.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-5094078820246356549</id><published>2011-11-03T14:12:00.001-07:00</published><updated>2011-11-03T14:17:12.864-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T14:17:12.864-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OWASP" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Real, useful security help for software developers</title><content type="html">There's lots of advice on designing and building secure software. All you need to do is: Think  like an attacker. Minimize the Attack Surface. Apply the principles of  Least Privilege and Defense in Depth and Economy of Mechanism.  Canonicalize and validate all input. Encode and escape output within the  correct context. Use encryption properly. Manage sessions in a secure  way....&lt;br /&gt;&lt;br /&gt;But how are development teams actually supposed to do all of  this? How do they know what's important, and what's not? What frameworks  and libraries should they use? Where are code samples that they can  review and follow? How can they test the software to see if they did  everything correctly?&lt;br /&gt;&lt;br /&gt;Read my latest post at the &lt;a href="http://software-security.sans.org/blog/2011/11/03/real-and-useful-security-help-for-software-developers/"&gt;SANS Appsec Street Fighter blog&lt;/a&gt; for the best of the tools, cheat sheets and programming books that I've found to help development teams deal with the details of building secure software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-5094078820246356549?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/q_qWV1syBLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/5094078820246356549/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=5094078820246356549" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5094078820246356549?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5094078820246356549?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/q_qWV1syBLk/real-useful-security-help-for-software.html" title="Real, useful security help for software developers" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/11/real-useful-security-help-for-software.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04MSHg5fyp7ImA9WhdaFEU.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-4652300981567961122</id><published>2011-10-24T12:09:00.001-07:00</published><updated>2011-10-24T12:53:09.627-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-24T12:53:09.627-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="devops" /><category scheme="http://www.blogger.com/atom/ns#" term="deployment" /><category scheme="http://www.blogger.com/atom/ns#" term="risk management" /><title>Rolling Forward and other Deployment Myths</title><content type="html">There is more and more writing on &lt;a href="http://twitter.com/#%21/search/%23DevOps?q=%23DevOps"&gt;Devops&lt;/a&gt; lately, which is good and bad. There still remains a small core of &lt;a href="http://www.kitchensoap.com/"&gt;thoughtful people&lt;/a&gt; that are worth listening to and learning from.  There’s more and more marketing from vendors and consultants jumping on the Devops bandwagon. There’s some naïve silliness (“Hire wicked smart people and give them all access to root.”) which can probably be safely ignored. And then there’s stuff that is half-right and half-wrong, too dangerous to be ignored. Like this recent post on &lt;a href="http://blog.lusis.org/blog/2011/10/18/rollbacks-and-other-deployment-myths/"&gt;Rollbacks and Other Deployment Myths&lt;/a&gt;, in which John Vincent lists 5 “myths” about system deployment, which I want to take some time to respond to here.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Change is change?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The author tries to make the point that “Change is neither good or bad. It’s just change.” Therefore we do not need to be afraid of making changes.&lt;br /&gt;&lt;br /&gt;I don’t agree. This attitude to change ignores the fact that once a system is up and running and customers are relying on it to conduct their business, whatever change you are making to the system is almost never as important as making sure that the system keeps running properly. Unfortunately, changes often lead to problems. We know from &lt;a href="http://www.wikisummaries.org/Visible_Ops"&gt;Visible Ops&lt;/a&gt; that based on studies of hundreds of companies, 80% of operational failures are caused by mistakes made during changes. This is where heavyweight process control frameworks like ITIL and &lt;a href="http://www.isaca.org/Knowledge-Center/COBIT/Pages/Overview.aspx"&gt;COBIT&lt;/a&gt;, and detective change control tools like &lt;a href="http://www.tripwire.com/"&gt;Tripwire&lt;/a&gt; came from. To help companies get control over IT change, because people had to find some way to stop shit from breaking.&lt;br /&gt;&lt;br /&gt;Yes, I get the point that in IT we tend to over-compensate, and I agree that calling in the Release Police and trying to put up a wall around all changes isn’t sustainable. People don’t have to work this way. But trivializing change, pretending that changes don't lead to problems, is dangerous.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Deploys are not risky?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can be smart and careful and break changes down into small steps and try to automate code pushes and configuration changes, and plan ahead and stage and review and test all your changes, and after all of this you can still mess up the deploy. Even if you make frequent small changes and simplify the work and practice it a lot.&lt;br /&gt;&lt;br /&gt;For systems like Facebook and online games and a small number of other cases, maybe deployment really is a non-issue. I don’t care if Facebook deploys in the middle of the day – I can usually tell when they are doing a “zero downtime” deploy (or maybe they are “transparently” recovering from a failure) because data disappears temporarily or shows up in the wrong order, functions aren’t accessible for a while, forms don’t resolve properly, and other weird shit happens, and then things come back later or they don’t. As a customer, do I care? No. It’s an inconvenience, and it’s occasionally unsettling ("WTF just happened?"), but I get used to it and so do millions of others. That’s because most of us don’t use Facebook or systems like this for anything important.&lt;br /&gt;&lt;br /&gt;For business-critical systems handling thousands of transactions a second that are tied into hundreds of other company’s systems (the world that I work in) this doesn’t cut it. Maybe I spend too much time at this extreme, where even small problems with compatibility that only affect a small number of customers, or slight and temporary performance slow downs, are a big deal. But most people I work with and talk to in software development and maintenance and system operations agree that deployment is a big deal and needs to be done with care and attention, no matter how simple and small the changes are and no matter how clean and simple and automated the deployment process is.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rollbacks are a myth?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Vincent wants us to “understand that it’s typically more risky to rollback than rolling forward. Always be rolling forward.”&lt;br /&gt;&lt;br /&gt;Not even the Continuous Deployment advocates (who are often some of the most radical – and &lt;a href="http://swreflections.blogspot.com/2010/06/still-getting-my-head-around-continuous.html"&gt;I think some of the most irresponsible&lt;/a&gt; – voices in the Devops community) agree with this – they still &lt;a href="http://timothyfitz.wordpress.com/2009/02/10/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day/"&gt;roll back if they find problems&lt;/a&gt; with changes.&lt;br /&gt;&lt;br /&gt;“Rollbacks are a myth” is an echo of the “real men fail forward” crap I heard at &lt;a href="http://swreflections.blogspot.com/2010/06/velocity-2010-conference-take-aways.html"&gt;Velocity last year&lt;/a&gt; and it is where I draw the line. It's one thing to state an extreme position for argument's sake or put up a straw man – but this is just plain wrong.&lt;br /&gt;&lt;br /&gt;If you're going to deploy, you have to anticipate roll back and think about it when you make changes and you have to test rolling back to make sure that it works. All of this is hard. But without a working roll back you have no choice other than to fail forward (whatever this means, because nobody who talks about it actually explains how to do it), and this is putting your customers and their business at unnecessary risk. It’s not another valid way of thinking. It’s irresponsible.&lt;br /&gt;&lt;br /&gt;James Hamilton wrote an excellent paper on &lt;a href="http://mvdirona.com/jrh/talksAndPapers/JamesRH_Lisa.pdf"&gt;Designing and Delivering Internet-Scale Services&lt;/a&gt; when he was at Microsoft (now he’s a an executive and Distinguished Engineer at Amazon). Hamilton’s paper remains one of the smartest things that anyone has written about how to deal with deployment and operational problems at scale. Everyone who designs, builds, maintains or operates an online system should read it. His position on roll back is simple and obvious and right:&lt;br /&gt;&lt;blockquote&gt;Reverting to the previous version is a rip cord that should always be available on any deployment.&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Everything fails. Embrace failure.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I agree that everything can and will fail some day, that we can’t pretend that we can prevent failures in any system. But I don’t agree with embracing failure, at least in business-critical enterprise systems, where recovering from a failure means lost business and requires unraveling chains of transactions between different upstream and downstream systems and different companies, messing up other companies' businesses as well as your own and dealing the follow-on compliance problems. Failures in these kinds of systems, and a lot of other systems, are ugly and serious, and they should be treated seriously.&lt;br /&gt;&lt;br /&gt;We do whatever we can to make sure that failures are controlled and isolated, and we make sure that we can recover quickly if something goes wrong (which includes being able to roll back!). But we also do everything that we can to prevent failures. Embracing failure is fine for online consumer web site startups – let’s leave it to them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SLAs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I wanted to respond to the points about SLAs, but it’s not clear to me what the author was trying to say. SLAs are not about servers. Umm, yes that’s right of course...&lt;br /&gt;&lt;br /&gt;SLAs are important to set business expectations with your customers (the people who are using the system) and with your partners and suppliers. So that your partners and suppliers know what you need from them and what you are paying them for, and so that you know if you can depend on them when you have to. So that your customers know what they are paying you for. And SLAs (not just high-level uptime SLAs, but SLAs for Recovery Time and Recovery Point goals and incident response and escalation) are important so that your team understands the constraints that they need to work under, what trade-offs to make in design and implementation and in operations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Under-compensating is worse than Over-compensating&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I spent more time than I thought I would responding to this post, because some of what the author says is right – especially in the second part of his post, &lt;a href="http://blog.lusis.org/blog/2011/10/18/deploy-all-the-things/"&gt;Deploy All the Things&lt;/a&gt; where he provides some good practical advice on how to reduce risk in deployment. He’s right that Operations main purpose isn’t to stop change – it can’t be. We have to be able to keep changing, and developers and operations have to work together to do this in safe and efficient ways. But trivializing the problems and risks of change and over-simplifying how to deal with these risks and how to deal with failures, isn’t the way to do this. There has to be a middle way between the ITIL and COBIT world of controls and paper and process, and cool Web startups failing forward, a way that can really work for the rest of us.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-4652300981567961122?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/sn1dEEh7Od8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/4652300981567961122/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=4652300981567961122" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4652300981567961122?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4652300981567961122?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/sn1dEEh7Od8/rolling-forward-and-other-deployment.html" title="Rolling Forward and other Deployment Myths" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/10/rolling-forward-and-other-deployment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QHRX8-fyp7ImA9WhdbFE4.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-5467634591050867313</id><published>2011-10-12T07:35:00.001-07:00</published><updated>2011-10-12T07:55:34.157-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T07:55:34.157-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XP" /><category scheme="http://www.blogger.com/atom/ns#" term="maintenance" /><category scheme="http://www.blogger.com/atom/ns#" term="Scrum" /><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>You can’t be Agile in Maintenance?</title><content type="html">I’ve been going over a couple of &lt;a href="http://kilnerblog.com/can-agile-methods-work-for-software-maintenance-part-1/"&gt;posts by Steve Kilner&lt;/a&gt; that question whether Agile methods can be used effectively in software maintenance. It’s a surprising question really. There are a lot of &lt;a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.89.2324&amp;amp;rep=rep1&amp;amp;type=pdf"&gt;maintenance teams who have had success&lt;/a&gt; following Agile methods like Scrum and &lt;a href="http://i-proving.ca/download/Articles+and+White+Papers/shaw_paper_agile2007.pdf"&gt;Extreme Programming (XP)&lt;/a&gt; for some time now. We’ve been doing it for almost 5 years, enhancing and maintaining and supporting enterprise systems, and I know that it works.&lt;br /&gt;&lt;br /&gt;Agile development naturally leads into maintenance – the goal of incremental Agile development is to get working software out to customers as soon as possible, and get customers using it. At some point, when customers are relying on the software to get real business done and need support and help to keep the system running, teams cross from development over to maintenance. But there’s no reason for Agile development teams to fundamentally change the way that they work when this happens.&lt;br /&gt;&lt;br /&gt;It is harder to &lt;a href="http://www.computer.org/portal/web/csdl/doi/10.1109/CSMR.2005.33"&gt;introduce Agile practices into a legacy&lt;/a&gt; maintenance team – there are a lot of technical requirements and some cultural changes that need to be made. But most maintenance teams have little to lose and lots to gain from borrowing from what Agile development teams are doing. Agile methods are designed to help small teams deal with a lot of change and uncertainty, and to deliver software quickly – all things that are at least as important in maintenance as they are in development. Technical practices in Extreme Programming especially help ensure that the code is always working – which is even more important in maintenance than it is in development, because the code has to work the first time in production.&lt;br /&gt;&lt;br /&gt;Agile methods have to be adapted to maintenance, but most teams have found it necessary to &lt;a href="http://swreflections.blogspot.com/2010/10/adopting-and-adapting-agile-practices.html"&gt;adapt these methods to fit their situations&lt;/a&gt; anyways.  Let’s look at what works and what has to be changed to make Agile methods like Scrum and XP work in maintenance.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What works well and what doesn’t&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Planning Game&lt;br /&gt;&lt;br /&gt;Managing maintenance isn’t the same as managing a development project – even an Agile development project. Although Agile development teams expect to deal with ambiguity and constant change, maintenance teams need to be even more flexible and responsive, to manage conflicts and unpredictable resourcing problems. Work has to be continuously reviewed and prioritized as it comes in – the customer can’t wait for 2 weeks for you to look at a production bug. The team needs a fast path for urgent changes and especially for hot fixes.&lt;br /&gt;&lt;br /&gt;You have to be prepared for support demands and interruptions. &lt;a href="http://agilesoftwaredevelopment.com/blog/artem/maintenance-victims"&gt;Structure the team&lt;/a&gt; so that some people can take care of second-level support, firefighting and emergency bug fixing and the rest of the team can keep moving forward and get something done. Build &lt;a href="http://www.amazon.com/Slack-Getting-Burnout-Busywork-Efficiency/dp/0767907698"&gt;slack&lt;/a&gt; into schedules to allow for last-minute changes and support escalation.&lt;br /&gt;&lt;br /&gt;You will also have to be more careful in planning out maintenance work, to take into account technical and operational dependencies and constraints and risks. You’re working in the real world now, not the virtual reality of a project.&lt;br /&gt;&lt;br /&gt;Standups&lt;br /&gt;&lt;br /&gt;Standups play an important role in Agile projects to help teams come up to speed and bond. But most maintenance teams &lt;a href="http://swreflections.blogspot.com/2011/09/standups-take-em-or-leave-em.html"&gt;work fine without standups&lt;/a&gt; – since a lot of maintenance work can be done by one person working on their own, team members don’t need to listen to each other each morning talking about what they did yesterday and what they’re going to do – unless the team is working together on major changes. If someone has a question or runs into a problem, they can ask for help without waiting until the next day.&lt;br /&gt;&lt;br /&gt;Small releases&lt;br /&gt;&lt;br /&gt;Most changes and fixes that maintenance teams need to make are small, and there is almost always pressure from the business to get the code out as soon as it is ready, so an Agile approach with small and frequent releases makes a lot of sense. If the &lt;a href="http://swreflections.blogspot.com/2009/06/how-long-can-this-go-on.html"&gt;time boxes are short enough&lt;/a&gt;, the customer is less likely to interrupt and re-prioritize work in progress – most businesses can wait a few days or a couple of weeks to get something changed.&lt;br /&gt;&lt;br /&gt;Time boxing gives teams a way to &lt;a href="http://swreflections.blogspot.com/2010/09/kanban-scrumxp-and-paradox-of.html"&gt;control and structure their work&lt;/a&gt;, an opportunity to batch up related work to reduce development and testing costs, and natural opportunities to add in security controls and reviews and other gates.  It also makes maintenance work more like a project, giving the team a chance to set goals and to see something get done. But time boxing comes with overhead – the planning and setup at the start, then deployment and reviews at the end – all of which adds up over time. Maintenance teams need to be ruthless with ceremonies and meetings, pare them down, keep only what’s necessary and what works.&lt;br /&gt;&lt;br /&gt;It’s even more important in maintenance than in development to remember that the goal is to deliver working code at the end of each time box. If some code is not working, or you’re not sure if it is working, then extend the deadline, back some of the changes out, or pull the plug on this release and start over. Don’t risk a production failure in order to hit an arbitrary deadline. If the team is having problems fitting work into time boxes, then stop and figure out what you’re doing wrong – the team is trying to do too much too fast, or the code is too unstable, or people don’t understand the code enough – and fix it and move on.&lt;br /&gt;&lt;br /&gt;Reviews and Retrospectives&lt;br /&gt;&lt;br /&gt;Retrospectives are important in maintenance to keep the team moving forward, to find better ways of working, and to solve problems. But like many practices, regular reviews reach a point of diminishing returns over time – people end up going through the motions. Once the team is setup, reviews don’t need to be done in each iteration unless the team runs into problems.&lt;br /&gt;&lt;br /&gt;Schedule reviews when you or the team need them. Collect data on how the team is working, on cycle time and bug report/fix ratios, &lt;a href="http://www.slideshare.net/jallspaw/ops-metametrics-the-currency-you-pay-for-change"&gt;correlate problems in production with changes&lt;/a&gt;, and get the team together to review if the numbers move off track. If the team runs into a serious problem like a major production failure, then get to the bottom of it through &lt;a href="http://swreflections.blogspot.com/2011/06/moving-forward-from-failure.html"&gt;Root Cause Analysis&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sustainable pace / 40-hour week&lt;br /&gt;&lt;br /&gt;It’s not always possible to work a 40-hour week in maintenance. There are times when the team will be pushed to make urgent changes, spend late nights firefighting, releasing after hours and testing on weekends. But if this happens too often or goes on too long the team will burn out. It’s critical to establish a sustainable pace over the long term, to treat people fairly and give them a chance to do a good job.&lt;br /&gt;&lt;br /&gt;Pairing&lt;br /&gt;&lt;br /&gt;Pairing is hard to do in small teams where people are working on many different things. Pairing does make sense in some cases – people naturally pair-up when trying to debug a nasty problem or walking through a complicated change – but it’s not necessary to force it on people, and there are &lt;a href="http://mwilden.blogspot.com/2009/11/why-i-dont-like-pair-programming-and.html"&gt;good reasons not to&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Some teams (like mine) rely more on &lt;a href="http://swreflections.blogspot.com/2011/05/not-doing-code-reviews-whats-your.html"&gt;code reviews&lt;/a&gt; instead of pairing, or try to get developers to pair when first looking at a problem or change, and at the end again to review the code and tests. The important thing is to ensure that changes get looked at by at least one other person if possible, however this gets done.&lt;br /&gt;&lt;br /&gt;Collective Code Ownership&lt;br /&gt;&lt;br /&gt;Because maintenance teams are usually small and have to deal with a lot of different kinds of work, sooner or later different people will end up working on different parts of the code. It’s necessary, and it’s a good thing because people get a chance to learn more about the system and work with different technologies and on different problems.&lt;br /&gt;&lt;br /&gt;But there’s still a place for specialists in maintenance. You want the people who know the code the best to make emergency fixes or high-risk changes – or at least have them review the changes – because it has to work the first time. And sometimes you have no choice – sometimes there is only one person who understands a framework or language or technical problem well enough to get something done.&lt;br /&gt;&lt;br /&gt;Coding Guidelines – follow the rules&lt;br /&gt;&lt;br /&gt;Getting the team to follow coding guidelines is important in maintenance to help ensure the consistency and integrity of the code base over time – and to &lt;a href="https://www.owasp.org/images/7/74/Secure_Coding_Practices_Quick_Ref_4.ppt"&gt;help ensure software security&lt;/a&gt;. Of course teams may have to compromise on coding standards and style conventions, depending on what they have inherited in the code base; and teams that maintain multiple systems will have to follow different guidelines for each system.&lt;br /&gt;&lt;br /&gt;Metaphor&lt;br /&gt;&lt;br /&gt;In XP, teams are supposed to share a &lt;a href="http://www.extremeprogramming.org/rules/metaphor.html"&gt;Metaphor&lt;/a&gt;: a simple high-level expression of the system architecture (the system is a production line, or a bill of materials) and common names and patterns that can be used to describe the system. It’s a &lt;a href="http://reports-archive.adm.cs.cmu.edu/anon/isri/CMU-ISRI-03-100.pdf"&gt;fuzzy concept at best&lt;/a&gt;, a weak substitute for more detailed architecture or design, and it’s not of much practical value in maintenance. Maintenance teams have to work with the architecture and patterns that are already in place in the system.&lt;br /&gt;&lt;br /&gt;What is important is making sure that the team has a common understanding of these patterns and the basic architecture so that the integrity isn’t lost – if it hasn’t been lost already. Getting the team together and reviewing the architecture, or reverse-engineering it, making sure that they all agree on it and documenting it in a simple way is important especially when taking over maintenance of a new system and when you are planning major changes.&lt;br /&gt;&lt;br /&gt;Simple Design&lt;br /&gt;&lt;br /&gt;Agile development teams start with simple designs and try to keep them simple. Maintenance teams have to work with whatever design and architecture that they inherit, which can be overwhelmingly complex, especially in bigger and older systems. But the driving principle should still be to design changes and new features as simple as the existing system lets you – and to simplify the system’s design further whenever you can.&lt;br /&gt;&lt;br /&gt;Especially when making small changes, simple, just-enough design is good – it means less documentation and less time and less cost. But maintenance teams need to be more risk adverse than development teams – even small mistakes can break compatibility or cause a run-time failure or open a security hole. This means that maintainers can’t be as iterative and free to take chances, and they need to spend more time upfront doing analysis, understanding the existing design and working through dependencies, as well as reviewing and testing their changes for regressions afterwards.&lt;br /&gt;&lt;br /&gt;Refactoring&lt;br /&gt;&lt;br /&gt;Refactoring takes on a lot of importance in maintenance. Every time a developer makes a change or fix they should consider &lt;a href="http://swreflections.blogspot.com/2010/05/code-quality-refactoring-and-risk-of.html"&gt;how much refactoring&lt;/a&gt; work they should do and can do to make the code and design clearer and simpler, and to pay off technical debt. What and how much to refactor depends on what kind of work they are doing (making a well-thought-out isolated change, or doing &lt;a href="http://en.wikipedia.org/wiki/Shotgun_surgery"&gt;shotgun surgery&lt;/a&gt;, or pushing out an emergency hot fix) and the time and risks involved, how well they understand the code, how good their tools are (development IDEs for Java and .NET at least have good &lt;a href="http://www.jetbrains.com/idea/features/refactoring.html"&gt;built-in tools&lt;/a&gt; that make many refactorings simple and safe) and what kind of safety net they have in place to catch mistakes – automated tests, code reviews, static analysis.&lt;br /&gt;&lt;br /&gt;Some maintenance teams don’t refactor because they are too afraid of making mistakes. It’s a vicious circle – over time the code will get harder and harder to understand and change, and they will have more reasons to be more afraid. Others claim that a maintenance team is not working correctly if they don’t spend at least &lt;a href="http://agileindia.org/agileindia2005/presentations/AgileMaintenance.pdf"&gt;50% of their time refactoring&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The real answer is somewhere in between – enough refactoring to make changes and fixes safe. There are cases where extensive refactoring, restructuring or rewriting code is the right thing to do. Some code is too dangerous to change or too full of bugs to leave the way it is – studies show that in most systems, especially big systems, &lt;a href="http://books.google.ca/books?id=B-wgoRVAhm4C&amp;amp;pg=PA583&amp;amp;lpg=PA583&amp;amp;dq=capers+jones+error-prone+modules&amp;amp;source=bl&amp;amp;ots=0sb2SoBReV&amp;amp;sig=ZrCsRC4TdycwdCYxM0U_x9lcqjM&amp;amp;hl=en&amp;amp;ei=HBqTTrP-AoHv0gGn99wr&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1&amp;amp;ved=0CBoQ6AEwAA#v=onepage&amp;amp;q&amp;amp;f=false"&gt;80% of the bugs can cluster in 20% of the code&lt;/a&gt;. Restructuring or rewriting this code can pay off quickly, reducing problems in production, and significantly reducing the time needed to make changes and test them as you go forward.&lt;br /&gt;&lt;br /&gt;Continuous Testing&lt;br /&gt;&lt;br /&gt;Testing is even more important and necessary in maintenance than it is in development. And it’s a major part of maintenance costs. Most maintenance teams rely on developers to test their own changes and fixes by hand to make sure that the change worked and that they didn’t break anything as a side effect. Of course this makes testing expensive and inefficient and it limits how much work the team can do. In order to move fast, to make incremental changes and refactoring safe, the team needs a better safety net, by automating unit and functional tests and acceptance tests.&lt;br /&gt;&lt;br /&gt;It can take a long time to put in test scaffolding and tools and write a good set of automated tests. But even a simple test framework and a small set of core fat tests can pay back quickly in maintenance, because a lot changes (and bugs) tend to be concentrated in the same parts of the code – the same features, framework code and APIs get changed over and over again, and will need to be tested over and over again. You can start small, get these tests running quickly and reliably and get the team to rely on them, fill in the gaps with manual tests and reviews, and then fill out the tests over time. Once you have a basic test framework in place, developers can take advantage of &lt;a href="http://xprogramming.com/articles/testfirstguidelines/"&gt;TFD/TDD&lt;/a&gt; especially for bug fixes – the fix has to be tested anyways, so why not write the test first and make sure that you fixed what you were supposed to?&lt;br /&gt;&lt;br /&gt;Continuous Integration&lt;br /&gt;&lt;br /&gt;To get Continuous Testing to work, you need a &lt;a href="http://martinfowler.com/articles/continuousIntegration.html"&gt;Continuous Integration&lt;/a&gt; environment. Understanding, automating and streamlining the build and getting the CI server up and running and wiring in tests and static analysis checks and reporting can take a lot of work in an enterprise system, especially if you have to deal with multiple languages and platforms and dependencies between systems. But doing this work is also the foundation for &lt;a href="http://continuousdelivery.com/"&gt;simplifying release and deployment&lt;/a&gt; – frequent short releases means that release and deployment has to be made as simple as possible.&lt;br /&gt;&lt;br /&gt;Onsite Customer / Product Owner&lt;br /&gt;&lt;br /&gt;Working closely with the customer to make sure that the team is delivering what the customer needs when the customer needs it is as important in maintenance as it is in developing a new system. Getting a talented and committed Customer engaged is hard enough on a high-profile development project – but it’s even harder in maintenance. You may end up with too many customers with conflicting agendas competing for the team’s attention, or nobody who has the time or ability to answer questions and make decisions. Maintenance teams often have to make compromises and help fill in this role on their own.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But it doesn’t all fit….&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Kilner’s &lt;a href="http://kilnerblog.com/22/"&gt;main point of concern&lt;/a&gt; isn’t really with Agile methods in maintenance. It’s with incremental design and development in general – that some work doesn’t fit nicely into short time boxes. Short iterations might work ok for bug fixes and small enhancements (they do), but sometimes you need to make bigger changes that have lots of dependencies. He argues that while Agile teams building new systems can stub out incomplete work and keep going in steps, maintenance teams have to get everything working all at once – it’s all or nothing.&lt;br /&gt;&lt;br /&gt;It’s not easy to see how big changes can be broken down into small steps that can be fit into short time boxes. I agree that this is harder in maintenance because you have to be more careful in understanding and untangling dependencies before you make changes, and you have to be more careful not to break things. The code and design will sometimes fight the kinds of changes that you need to make, because you need to do something that was never anticipated in the original design, or whatever design there was has been lost over time and any kind of change is hard to make.&lt;br /&gt;&lt;br /&gt;It’s not easy – but teams solve these problems all the time. You can use tools to figure out how much of a &lt;a href="http://www.headwaysoftware.com/products/"&gt;dependency mess you have&lt;/a&gt; in the code and what kind of changes you need to make to get out of this mess. If you are going to spend “weeks, months, or even years” to make changes to a system, then it makes sense to take time upfront to understand and break down build dependencies and isolate run-time dependencies, and put in test scaffolding and tests to protect the team from making mistakes as they go along. All of this can be done in time boxed steps. Just because you are following time boxes and simple, incremental design doesn’t mean that you start making changes without thinking them through.&lt;br /&gt;&lt;br /&gt;Read &lt;a href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052"&gt;Working With Legacy Code&lt;/a&gt; – Michael Feathers walks through how to deal with these problems in detail, in both object oriented and procedural languages. What to do if it takes forever to make a change. How to break dependencies. How to find interception points and pinch points. How to find structure in the design and the code. What tests to write and how to get automated tests to work.&lt;br /&gt;&lt;br /&gt;Changing data in a production system, especially data shared with other systems, isn’t easy either. You need to plan out API changes and data structure changes as carefully as possible, but you can still &lt;a href="http://databaserefactoring.com/"&gt;make data and database changes in small, structured steps&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To make code changes in steps you can use &lt;a href="http://continuousdelivery.com/2011/05/make-large-scale-changes-incrementally-with-branch-by-abstraction/"&gt;Branching by Abstraction&lt;/a&gt; where it makes sense (like making back-end changes) and you can protect customers from changes through &lt;a href="http://code.flickr.com/blog/2009/12/02/flipping-out/"&gt;Feature Flags&lt;/a&gt; and &lt;a href="http://www.facebook.com/note.php?note_id=96390263919"&gt;Dark Launching&lt;/a&gt; like Facebook and Twitter and Flickr do to continuously roll out changes – although you need to be careful, because if taken too far these practices &lt;a href="http://jamesmckay.net/2011/07/why-does-martin-fowler-not-understand-feature-branches/"&gt;can make code more fragile&lt;/a&gt; and harder to work with.&lt;br /&gt;&lt;br /&gt;Agile development teams follow incremental design and development to help them discover an optimal solution through trial-and-error. Maintenance teams work this way for a different reason – to manage technical risks by breaking big changes down and &lt;a href="http://books.google.com/books?id=0oXB7aFQ1FwC&amp;amp;pg=PA142&amp;amp;lpg=PA142&amp;amp;dq=allspaw+small+changes&amp;amp;source=bl&amp;amp;ots=3h-taYUJCJ&amp;amp;sig=eCjayQIqzyBYz5bnAEXyqm-BFH8&amp;amp;hl=en&amp;amp;ei=o6CVTsD2GcLr0gHJ47XnBw&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1&amp;amp;ved=0CBkQ6AEwAA#v=onepage&amp;amp;q=allspaw%20small%20changes&amp;amp;f=false"&gt;making small bets instead of big ones&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Working this way means that you have to put in scaffolding (and remember to take it out afterwards) and plan out intermediate steps and review and test everything as you make each change. Sometimes it might feel like you are running in place, that it is taking longer and costing more. But getting there in small steps is much safer, and gives you a lot more control.&lt;br /&gt;Teams working on large legacy code bases and old technology platforms will have a harder time taking on these ideas and succeeding with them. But that doesn’t mean that they won’t work. Yes, you can be Agile in maintenance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-5467634591050867313?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/3vYAVUoRFJw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/5467634591050867313/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=5467634591050867313" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5467634591050867313?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5467634591050867313?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/3vYAVUoRFJw/you-cant-be-agile-in-maintenance.html" title="You can’t be Agile in Maintenance?" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/10/you-cant-be-agile-in-maintenance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHR3k7eip7ImA9WhRUGUk.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-3671439922279765981</id><published>2011-10-04T08:20:00.000-07:00</published><updated>2012-01-30T08:57:16.702-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T08:57:16.702-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SANS" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Dealing with security vulnerabilities ... er... bugs</title><content type="html">A serious problem in many organizations is that development teams (and their business sponsors) don't take ownership  for understanding and managing software security risks, and often try to ignore vulnerabilities or hide them. Without real pressure from the top, it's hard to convince developers and  management that dealing with security vulnerabilities is a priority  because vulnerabilities aren't requirements or real problems — they are  potential problems and risks that can be put off until later.&lt;br /&gt;&lt;br /&gt;This is wrong. Vulnerabilities found in pen testing and reviews and  scans are either bugs — real problems in the code that should be fixed —  or they are noise — false positives or motherhood that can be ignored.  Treating them as something different and distinct and managing them in a  different way is a mistake.&lt;br /&gt;&lt;br /&gt;Read my latest post at the &lt;a href="http://software-security.sans.org/blog"&gt;SANS AppSec Street Fighter blog&lt;/a&gt; on &lt;a href="http://software-security.sans.org/blog/2011/10/04/dealing-with-security-vulnerabilies-er-bugs/"&gt;Dealing with Security Vulnerabilities&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-3671439922279765981?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/-a9eFVQbLpU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/3671439922279765981/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=3671439922279765981" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/3671439922279765981?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/3671439922279765981?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/-a9eFVQbLpU/dealing-with-security-vulnerabilies-er.html" title="Dealing with security vulnerabilities ... er... bugs" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/10/dealing-with-security-vulnerabilies-er.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cEQnw9fCp7ImA9WhdUEkk.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-6111100551985252929</id><published>2011-09-26T09:33:00.001-07:00</published><updated>2011-09-28T13:16:43.264-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T13:16:43.264-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OWASP" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Takeaways from OWASP AppSec USA 2011</title><content type="html">Last week I attended the OWASP AppSec USA  conference in Minneapolis. It was my first time at an OWASP event, and it was an impressive show. More than 600 attendees, some high-quality speakers, lots of vendor representation.&lt;br /&gt;&lt;br /&gt;There were several different tracks over the two days of the conference: attacks and defenses, security issues in Mobile computing and Cloud computing, thought leadership, OWASP tools, security patterns and secure SDLCs. And there were lots of opportunities to talk to vendors and smart people. Here were the hilights for me:&lt;br /&gt;&lt;br /&gt;Jim Manico showed that there’s hope for developers to write secure code, at least when it comes to protecting web apps from XSS attacks,  if they use common good sense and new frameworks and libraries like &lt;a href="http://code.google.com/p/google-caja/"&gt;Google’s Caja&lt;/a&gt;, the technology behind &lt;a href="https://www.owasp.org/index.php/Projects/OWASP_Java_HTML_Sanitizer_Project"&gt;OWASP’s Java HTML Sanitizer&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There is even some hope for writing secure Mobile apps, as long as developers are careful and informed. This is a more reassuring story than what I was hearing from security experts earlier in the year, when everyone was focused on how pathetically insecure the platforms and tools were for writing Mobile apps.&lt;br /&gt;&lt;br /&gt;It's also possible to be secure in the Cloud as long as you take the time to understand the Cloud services that you are using and how they are implemented and what assumptions they make, and if you think through your design. Which a lot of people probably aren’t bothering to do.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;There's too much code already out there&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We’re still trying to find ways to build software that is secure. But a bigger problem for many organizations is that there is already too much code out there that is insecure. Jeff Williams at Aspect Security guesstimates that there are more than 1 trillion lines of code in the world, and around 15 million developers around the world writing more of it. A lot of this legacy code contains serious security problems – but it is too expensive to find these and fix these problems. We need better tools to do this, tools that scale up to enterprises and down to small companies.&lt;br /&gt;&lt;br /&gt;Many organizations, especially big enterprises with thousands of applications, are relying heavily on scanning tools to find security vulnerabilities. But it takes too long and costs too much to work through all of the results and to find real risks from the long lists of findings and false positives – to figure out what problems need to be fixed and how to fix them.&lt;br /&gt;&lt;br /&gt;HP thinks that they have an answer by correlating dynamic scanning and static code analysis results. The idea is to scan the source code, then run dynamic scans against an application under a run-time monitor which captures problems found by the dynamic scanner and records where the problems occurred in the code. By matching up these results, you can see which static analysis findings are exploitable, and it makes it easier to find and fix problems found in run-time testing. And combining these techniques also makes it possible to find new types of vulnerabilities that can’t be found using just one or other of the approaches. I heard about this idea earlier in the year when Brian Chess presented it at SANS Appsec, but it is interesting to see how far it has come since then. Hybrid testing is limited to HP technology for now (SPI Dynamics and Fortify) and it’s limited by what problems the scanners can find, but it looks like a good step forward in the test tool space.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Good Pen Testing and Bad Pen Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It’s clear talking to vendors that there are good pen tests and bad pen tests. In most cases, good pen tests are what they offer, and bad pen tests are what you would get from a competitor. Comparing one vendor to another isn't easy, since an application pen test means different things to different people, and the vendors all had different stories and offerings. Some stressed the quality of their tools, others stressed the experience and ingenuity of their testers. Some offered automated scans with some interpretation, which could work fine for plain-vanilla web apps. Some do combined source code review and scanning. Some don’t want help understanding the code or scoping an engagement – they have a fixed-price menu running from running scans to manual pen tests using scanners and fuzzers and attack proxies. Others expect to spend a lot of time scoping and understanding what to test, to make sure that they focus on what's important.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SSL is broken&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Moxie Marlinspike’s keynote on the problems with SSL and the CA model was entertaining but scary. He showed that the circle of trust model that underlies SSL – I trust the host because my browser trusts the CA and the CA trusts the host – is fundamentally broken now that CAs like Comodo and DigiNotar (and maybe others) have &lt;a href="http://arstechnica.com/security/news/2011/09/comodo-hacker-i-hacked-diginotar-too-other-cas-breached.ars"&gt;been compromised.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;His solution is &lt;a href="http://convergence.io/"&gt;Convergence&lt;/a&gt;, an alternative way to establish trust between parties, where the client is responsible for choosing trust providers (notaries) rather than being locked into a single trust provider selected by the host.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Metrics and numbers for fun&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I like numbers and statistics, here are a few that I found especially interesting. Some of them were thrown out quickly, I hope that I got them right.&lt;br /&gt;&lt;br /&gt;At a panel on secure development, one expert estimated that the tax for introducing a secure SDLC, including training people, getting tools and getting people to use them, was about 15% of the total development costs. Although he qualified this number by saying that it was from a pilot, another panelist agreed that it was reasonable, so it seems a good rule of thumb to use for now.&lt;br /&gt;&lt;br /&gt;John Steven at Cigital says they have found that an inexperienced team can expect to have 38-40 security vulnerabilities per KLOC. A mature team, following good security hygiene, can get this down to 7-10 vulnerabilities per KLOC.&lt;br /&gt;&lt;br /&gt;Chris Wysopal at Veracode presented some interesting numbers in his presentation on Application Security Debt – you can read more on his ideas on applying the technical debt metaphor to application security and building economic models for the costs of this debt on his &lt;a href="http://www.veracode.com/blog/2011/03/a-financial-model-for-application-security-debt/"&gt;blog&lt;/a&gt;. He referenced findings from the &lt;a href="http://www.verizonbusiness.com/resources/reports/rp_2010-data-breach-report_en_xg.pdf"&gt;2010 Verizon Breach study&lt;/a&gt; and tried to correlate these findings with analysis work that Veracode has done using data from testing customer applications.  This showed that the most common application-related breach was through Backdoors or hidden Command Channels which I was surprised at, and so was he, since Veracode’s own analysis shows that application Backdoors are not that common. I assumed from this analysis that application Backdoors were so dangerous because they were so easily found and exploited by attackers. However, when I read the Verizon report again, what Verizon calls a Backdoor is a command channel opened up by malware, which is something quite different to a Backdoor left in an application, so the comparison doesn’t stand up. This leaves SQL Injection to be the number one application vulnerability, something that shouldn't surprise anyone.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The “A Word”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most of the speakers and panelists at the conference were from enterprise companies or from vendors trying to sell to the enterprise. Not surprisingly, as a result there was little said about the needs and constraints of small companies, and at the sessions I attended, the speakers had not come to terms with the reality that most companies are adopting or have already adopted more incremental agile development practices. At one panel, Agile development was referred to as the “A Word”.&lt;br /&gt;&lt;br /&gt;We urgently need tools and practices that small, fast-moving teams can use, because these teams are building and maintaining a lot of the world's software. It's time for OWASP and ISC2 and the rest of the application security community to accept this and understand what it means and offer help where it's really needed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dumbest thing said at the conference&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This award goes to one vendor on a panel on security testing who said that it is irresponsible for developers to work with new technologies where they don't understand the security risks, that developers  who work on the bleeding edge are putting their customers and businesses at unnecessary risk. Besides being blindingly obvious, it shows a complete lack of connection to the realities of software development and the businesses that rely on software (which is pretty much every business today). Dinis Cruz pointed out the absurdity of this statement, by admitting that we don’t fully understand the security risks of the common platforms that we use today like Java and .NET. This means that nobody should be writing software at all - or maybe it would be ok if we all went back to writing batch programs in COBOL and FORTRAN.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Impressed and Humbled&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Overall I learned some good stuff, and I enjoyed the conference and the opportunity to meet some of the people behind OWASP. I was impressed and humbled by the commitment and accomplishments of the many OWASP contributors. Seeing how much they have done, talking to them, understanding how much they care, gives me some hope that we can all find a way to build better software together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-6111100551985252929?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/-30yx906iwU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/6111100551985252929/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=6111100551985252929" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6111100551985252929?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6111100551985252929?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/-30yx906iwU/takeaways-from-owasp-appsec-usa-2011.html" title="Takeaways from OWASP AppSec USA 2011" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/09/takeaways-from-owasp-appsec-usa-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEINQH09fCp7ImA9WhdWFEw.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-2048397655476435267</id><published>2011-09-07T09:08:00.000-07:00</published><updated>2011-09-07T09:23:11.364-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T09:23:11.364-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="maintenance" /><category scheme="http://www.blogger.com/atom/ns#" term="Scrum" /><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>Standups – take ‘em or leave ‘em</title><content type="html">We left ‘em.&lt;br /&gt;&lt;br /&gt;Standup meetings are a core practice in Agile methods like Scrum and XP. Each day the team meets briefly to answer 3 questions:  What did I get done yesterday? What am I going to do today? What is getting in my way?&lt;br /&gt;&lt;br /&gt;Standups offer a quick check on what’s happening, what’s changed, who ‘s working on what, who needs help. The meeting is supposed to be short and sweet, no more than 15 minutes a day. Martin Fowler lists some &lt;a href="http://martinfowler.com/articles/itsNotJustStandingUp.html"&gt;good reasons to hold standups&lt;/a&gt;:&lt;br /&gt;-    Share commitment&lt;br /&gt;-    Communicate status&lt;br /&gt;-    Identify obstacles to be solved&lt;br /&gt;-    Set direction and focus&lt;br /&gt;-    Help to build a team&lt;br /&gt;&lt;br /&gt;However, &lt;a href="http://lostechies.com/jimmybogard/2010/06/10/are-daily-stand-ups-necessary/"&gt;not everyone  finds that standups are necessary&lt;/a&gt; and some people have started to &lt;a href="http://groups.yahoo.com/group/scrumdevelopment/message/50446"&gt;question the value of standups&lt;/a&gt; over time and are looking for substitutes. A number of people have suffered through &lt;a href="http://fishbowl.pastiche.org/2003/11/19/standup_meeting_antipatterns/"&gt;poorly-run standup meetings&lt;/a&gt;. And some people &lt;a href="http://queue.acm.org/detail.cfm?id=957730"&gt;just plain don’t like them&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Our team has been successful following Scrum and XP practices as we transitioned from delivering phased releases (a release every 2-3 months) to 2-3 small releases a month. We looked closely at how other teams worked, spent time learning about incremental and iterative development methods, and took what made sense to us and tried it and adapted it. But one of the Agile practices that we did not take up was standups.&lt;br /&gt;&lt;br /&gt;When we introduced the idea of standups to the team a few years ago, we were surprised by the response. The team was roughly split. Some people, especially people who were new to the team, or people who had worked on successful Scrum teams or XP teams before, liked the idea. But other people who had been on the team from the beginning were opposed, some of them strongly opposed. And they had some good reasons:&lt;br /&gt;&lt;br /&gt;We were already running an operational business and building and delivering new software at the same time. Team members were helping to support the system, helping with day-to-day operations, and working closely with the business side. Some people were working late and weekends to get changes in or to do after-hours testing, others were working early to help with startup issues or to coordinate with partners, some people were working in different timezones, some people were working at home, others were at the beck and call of integration partners and important clients. It would not be possible to schedule a daily meeting, even a short one, which would work well for everyone on a sustained basis. This is one example (and there many others), where Agile development ideas which work well in the controlled, artificial reality of a development project need to be rethought and adapted to fit day-to-day operational demands and constraints.&lt;br /&gt;&lt;br /&gt;Some of the team had their hands full with important changes or problems that had to be taken care of urgently. They met regularly with other team members to work through design issues and reviewed each other’s code. They got help from other team members or managers when they needed it – there was no need to wait for a daily meeting to bring up blockers or get whatever information they needed.&lt;br /&gt;&lt;br /&gt;And there were a couple of introverts who hated all meetings and didn’t understand why a meeting that they had to go to everyday and standup at would be any better than any other meeting. They saw it as a half hour wasted out of every day – because they knew that a 15-minute meeting, when you include the time taken to save what you were working on, go to the meeting, standup, get out of the meeting and get back to working productively, would mean at least 30 minutes if not more time every day from what they were doing.&lt;br /&gt;&lt;br /&gt;Rather than try to fight with the team to implement a practice that we weren’t sure was really needed, we decided to find other ways to get the same results.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Alternatives to standups&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are other ways to share status within (and outside of) the team. Because we have people working together in different countries and different groups, we rely heavily on our &lt;a href="http://www.atlassian.com/software/jira/"&gt;bug tracking system&lt;/a&gt; to manage the backlog of work, to schedule and plan work, and to radiate status information. The bug tracking system is used by and shared with everyone: developers, testers, support, business operations, systems engineering, IT, compliance and management. Everything to do with the software and systems operations is tracked here, including new features and bug fixes and security vulnerabilities and problems found in testing, and operational and infrastructural changes, compliance reviews and new clients being onboarded. Using the system’s dashboards and notification feeds everyone can easily tell what is happening and what will be happening and when. The team doesn’t need standups to know what is happening, who is working on what, what the schedule is or what needs to be worked on next.&lt;br /&gt;&lt;br /&gt;Managers who need to know what’s going on and who want to make sure that everyone is on track can get all of this through &lt;a href="http://www.economist.com/node/12075015"&gt;MBWA&lt;/a&gt;. And regular &lt;a href="http://blogs.msdn.com/b/eric_brechner/archive/2010/01/01/one-to-one-and-many-to-many.aspx"&gt;one-on-one meetings&lt;/a&gt; help reinforce priorities and make sure that everyone gets face time and a chance to ask questions without wasting the rest of the team’s time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Standups help at the start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I can see that standups are more useful in the early stages of a project, when the team is starting to come together and everyone is working through the design and learning the domain and the technology and feeling out each other, finding out each other’s strengths and quirks.&lt;br /&gt;&lt;br /&gt;Without standups, it is harder for new people joining the team to understand what is going on and what’s important, and figure out where they fit in. Pairing up new team members with someone more experienced helps, but if you have a couple or more people joining a team, it makes sense to hold standups for a while at least to help them get up to speed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Declining value over time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But when people have been working together for a while, standups offer declining value. Once the team has gelled and people know each other and can depend on each other, they don’t need to meet in a room every morning to talk about what they are working on. Like some other practices that are important and useful in the beginning, the team grows up or grows out of them.&lt;br /&gt;&lt;br /&gt;And as you move more into maintenance and support work, when people on the team are working on smaller individual changes and fixes and the work tends to be more interrupt-driven, standups are a waste. What one person is working on doesn’t have much if anything to do with what somebody else is doing.  They don’t need to, or want to, listen to each other talking about what they did and what they’re going to do, because if &lt;a href="http://i-proving.ca/download/Articles+and+White+Papers/shaw_paper_agile2007.pdf"&gt;it was important they would already know about it anyways&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Stuffed Pigs, Nerf Balls and other Silly Games&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the things I don’t like about standups is that they are fundamentally paternalistic – you’re treating the team like children, forcing them to get together and stand up in a room every day (they have to stand up because they can’t be trusted to sit down) and making them speak in turn for only a few minutes (but only of course if they are a pig, not a chicken). And on some teams, people go so far as to &lt;a href="http://kanemar.com/2006/05/13/controling-the-flow-of-daily-meetings-with-a-team-mascot/"&gt;hand around a stuffed pig&lt;/a&gt; or &lt;a href="http://www.whattofix.com/blog/archives/2010/09/agile-ruined-my.php"&gt;a Nerf ball &lt;/a&gt;or follow some other awkward ritual to make sure that people don’t speak out of turn. If this sounds silly and childish, it is. You have a room full of children: team members who can’t ask questions, they can’t solve problems, they have to stand there and follow silly rituals. Day after day, week after week, month after month, year after year…&lt;br /&gt;&lt;br /&gt;Rather than treating adults like little children, why not let people meet when they need to or want to – to solve problems, to review requirements or designs, to respond to incidents (Root Cause Analysis), to plan, and to make sure that people know when requirements or priorities are changing in a significant way.&lt;br /&gt;&lt;br /&gt;Would we have had different results if we had implemented standups? Probably. Would the results have been better for the team and for the company? I’m not sure. We found other good ways for the team, and the rest of the company, to track what was going on and what needed to be done next. We’ve had some misunderstandings, and some people did get off track – standups might have helped prevent this. And standups would have helped new people joining the team, to come up to speed. But the rest of the team gelled quickly during our crazy startup days, and built up a high level of trust and openness and shared commitment without standups. Can you build high-performing, collaborative teams without standups? Of course you can.&lt;br /&gt;&lt;br /&gt;Standups have a place, especially early on with people who don’t know each other, where everyone is learning and uncertain about what to do and about each other. But don’t do something, or keep doing something if you don’t think that you need to, just because somebody read it in a book or learned about it in a 3 day SCM class. It’s your team, and you can find your own way to succeed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-2048397655476435267?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/C7qepIIzVHs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/2048397655476435267/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=2048397655476435267" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2048397655476435267?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2048397655476435267?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/C7qepIIzVHs/standups-take-em-or-leave-em.html" title="Standups – take ‘em or leave ‘em" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/09/standups-take-em-or-leave-em.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcDSHg5cCp7ImA9WhdXEk0.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-4651286437259126802</id><published>2011-08-24T08:52:00.000-07:00</published><updated>2011-08-24T09:24:39.628-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-24T09:24:39.628-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="maintenance" /><category scheme="http://www.blogger.com/atom/ns#" term="Capers Jones" /><title>Bugs and Numbers: How many bugs do you have in your code?</title><content type="html">If you follow &lt;a href="http://swreflections.blogspot.com/2011/02/zero-bug-tolerance-intolerance.html"&gt;Zero Bug Tolerance&lt;/a&gt; of course you’re not supposed to have any bugs to fix after the code is done. But let’s get real. Is there any way to know how many bugs you're missing and will have to fix later, and how many bugs you might already have in your code? Are there any &lt;a href="http://stackoverflow.com/questions/862277/what-is-the-industry-standard-for-bugs-per-1000-lines-of-code"&gt;&lt;span style="text-decoration: underline;"&gt;industry&lt;/span&gt; measures of code quality&lt;/a&gt; that you can use as a starting point?
&lt;br /&gt;
&lt;br /&gt;For questions like these, the first place I look is one of the books by Capers Jones: arguably the leading expert in all things to do with software development metrics. There’s &lt;a href="http://www.amazon.com/Applied-Software-Measurement-Analysis-Productivity/dp/0071502440/ref=sr_1_2?s=books&amp;amp;ie=UTF8&amp;amp;qid=1310482050&amp;amp;sr=1-2"&gt;Applied Software Measurement&lt;/a&gt;, or &lt;a href="http://www.amazon.com/Estimating-Software-Costs-Bringing-Realism/dp/0071483004/ref=sr_1_3?s=books&amp;amp;ie=UTF8&amp;amp;qid=1310482050&amp;amp;sr=1-3"&gt;Estimating Software Costs&lt;/a&gt;, or &lt;a href="http://www.amazon.com/Software-Engineering-Best-Practices-Successful/dp/007162161X"&gt;Software Engineering Best Practices: Lessons from Successful Projects in the Top Companies&lt;/a&gt;. These books offer different views into a fascinating set of data that Capers Jones has collected over decades from thousands of different projects. It’s easy to spend hours getting lost in this data set, and reading through and questioning the findings that he draws from it.
&lt;br /&gt;
&lt;br /&gt;So what can we learn from Capers Jones about bugs and defect potentials and defect density rates? A lot, actually.
&lt;br /&gt;
&lt;br /&gt;On average 85% of bugs introduced in design and development are caught before the code is released (this is the average in the US as of 2009). His research shows that this defect removal rate has stayed roughly the same over 20 years, which is disappointing given the advances in tools and methods over that time.
&lt;br /&gt;
&lt;br /&gt;We introduce 5 bugs per Function Point (Capers Jones is awfully fond of measuring everything by &lt;a href="http://en.wikipedia.org/wiki/Function_point"&gt;Function Points&lt;/a&gt;, which are an abstract way of measuring code size), depending on the type of system being built. Web systems are a bit lower surprisingly, at 4 bugs per Function Point; other internal business systems are 5, military systems average around 7. Using &lt;a href="http://www.spr.com/programming-languages-table.html"&gt;backfiring&lt;/a&gt; (a crude technique to convert function points back into LOC measures) you can equivalence 1 Function Point to about &lt;a href="http://www.qsm.com/resources/function-point-languages-table"&gt;50-55 lines of Java code&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;For the sake of simplicity, let’s use 1 Function Point = 50 LOC, and keep in mind that all of these numbers are really rough, and that using backfiring techniques to translate Function Points to source code statements introduces a probability of error, but it’s a lot easier than trying to think in Function Points. And all I want here is a rough indicator of how much trouble a team might be in.
&lt;br /&gt;
&lt;br /&gt;If 85% of bugs are hopefully found and fixed before the code is released, this leaves 0.75 bugs per Function Point unfound (and obviously unfixed) in the code when it gets to production. Which means that &lt;span style="font-weight: bold;"&gt;for a small application of 1,000 Function Points (50,000 or so lines of Java code), you could expect around 750 defects at release &lt;/span&gt;.
&lt;br /&gt;
&lt;br /&gt;And this is only accounting for the bugs that you don’t already know about: a lot of code is released with a list of known bugs that the development team hasn’t had a chance to fix, or doesn’t think is worth fixing, or doesn’t know how to fix. And, this is just your code: it doesn’t account for bugs in the technology stack that the application depends on: the frameworks and application platform, database and messaging middleware, and any open source libraries or COTS that you take advantage of.
&lt;br /&gt;
&lt;br /&gt;Of these 750+ bugs around 25% will be severity 1 show stoppers – real production problems that cause something significant to break.
&lt;br /&gt; 
&lt;br /&gt;Ouch – no wonder most teams will spend a lot of time on support and fixing bugs after releasing a big system. Of course, if you’re building and releasing software incrementally, you’ll find and fix more of these bugs as you go along, but you’ll still be fixing a lot of bugs in production.
&lt;br /&gt;
&lt;br /&gt;Remember that these are rough averages. And remember (especially the other guys out there), we can’t all be above average, no matter how much we would like to be. For risk management purposes, it might be best to stick with averages, or even consider yourself below the bar.
&lt;br /&gt;
&lt;br /&gt;Also keep in mind that defect potentials increase with the size of the system – &lt;a href="http://www.informationweek.com/news/development/c/225701340"&gt;big apps have more bugs&lt;/a&gt; on average. Not only is there a higher potential to write buggy code in bigger systems, but as the code base gets bigger and more complex it’s also harder to find and fix bugs. So big systems get released with even more bugs, and really big apps with a lot more bugs.
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;All of this gets worse in maintenance&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;In maintenance, the average defect potential for making changes is higher than in development, about 6 bugs per Function Point instead of 5. And the chance of finding and fixing mistakes in your changes is lower (83%).  This is all because it’s harder to work with legacy code that you didn’t write and don’t understand all that well. So you should expect to release 1.08 bugs per Function Point when changing code in maintenance, instead of 0.75 bugs per Function Point.
&lt;br /&gt;
&lt;br /&gt;And maintenance teams still have to deal with the latent bugs in the system, some of which may hide in the code for years, or forever. This includes heisenbugs and ghosts and weird timing issues and concurrency problems that disappear when you try to debug them. On average, 50% of residual latent defects are found each calendar year. The more people using your code, the faster that these bugs will be found. 
&lt;br /&gt;
&lt;br /&gt;Of course, once you find these bugs, you still have to fix them. The average maintenance programmer can be expected to fix around 10 bugs per month – and maybe implement some small enhancements too. That's not a great return on investment.
&lt;br /&gt;
&lt;br /&gt;Then there’s the problem of bug re-injections, or regressions –  when a programmer breaks something accidentally as a side-effect of making a fix. On average, programmers fixing a bug will introduce a new bug 7% of the time – and this can run as high as 20% for complex, poorly-structured code. Trying to fix these bad fixes is even worse – programmers trying to fix these mistakes have a 15% chance of still messing up the fix, and a 30% chance of introducing yet another bug as a side effect! It's better to roll-back the fix and start again.
&lt;br /&gt;
&lt;br /&gt;Unfortunately, all of this gets worse over time. Unless you are doing a perfect job of refactoring and continuously simplifying the code, you can expect code complexity to increase an average of between 1% and 3% per year. And most systems get bigger over time, as you add more features and copy-and-paste code (of course you don't do that): the code base for a system under maintenance increases between 5-10% per year. As the code gets bigger and more complex, the chance for more bugs also increases each year.
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But what if we’re not average? What if we’re best in class?&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;What if you are doing an almost perfect job, if you are truly best in class? Capers Jones finds that best in class teams create half as many bugs as average teams (2.5 or fewer defects per Function Point instead of 5), and they find and fix  95% or more of these bugs before the code is released. That sounds impressive - it means only 0.125 bugs per Function Point. But for a 50,000 LOC system, that’s still somewhere around 125 bugs on delivery.
&lt;br /&gt;
&lt;br /&gt;And as for zero bugs? In his analysis of 13,000 projects over a period of more than 40 years, there were 2 projects with no defects reported within a year of release. So you can aspire to it. But don’t depend on it.
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-4651286437259126802?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/X9Ki_8U3xOM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/4651286437259126802/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=4651286437259126802" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4651286437259126802?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4651286437259126802?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/X9Ki_8U3xOM/bugs-and-numbers-how-many-bugs-do-you.html" title="Bugs and Numbers: How many bugs do you have in your code?" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/08/bugs-and-numbers-how-many-bugs-do-you.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08MQ3Y7fCp7ImA9WhdQFEk.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-4000980346549015124</id><published>2011-08-15T13:55:00.000-07:00</published><updated>2011-08-15T13:58:02.804-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-15T13:58:02.804-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SANS" /><category scheme="http://www.blogger.com/atom/ns#" term="OWASP" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>The C14N challenge</title><content type="html">&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); "&gt;&lt;p&gt;Failing to properly validate input data is behind&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;a href="https://www.owasp.org/index.php?title=Testing_for_Data_Validation&amp;amp;oldid=53171" _mce_href="https://www.owasp.org/index.php?title=Testing_for_Data_Validation&amp;amp;oldid=53171"&gt;at least half of all application security problems&lt;/a&gt;. In order to properly validate input data, you have to start by first ensuring that all data is in the same standard, simple, consistent format – a&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;strong&gt;canonical&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;form. This is because of all the wonderful flexibility in internationalization and data formatting and encoding that modern platforms and especially the Web offer. Wonderful capabilities that attackers can take advantage of to hide malicious code inside data in all sorts of sneaky ways.&lt;/p&gt;&lt;p&gt;Canonicalization is a conceptually simple idea: take data inputs, and convert all of it into a single, simple, consistent normalized internal format before you do anything else with it. But how exactly do you do this, and how do you know that it has been done properly? What are the steps that programmers need to take to properly canonicalize data? And how do you test for it? This is where things get fuzzy as hell.&lt;/p&gt;&lt;p&gt;To read my latest post on canonicalization problems (and the search for solutions), go to the &lt;a href="http://software-security.sans.org/blog/2011/08/15/the-c14n-challenge"&gt;SANS Application Security&lt;/a&gt; blog.
&lt;br /&gt;&lt;/p&gt;&lt;p&gt;
&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-4000980346549015124?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/amvOywDP9sM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/4000980346549015124/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=4000980346549015124" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4000980346549015124?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/4000980346549015124?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/amvOywDP9sM/c14n-challenge.html" title="The C14N challenge" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/08/c14n-challenge.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4GRns5cSp7ImA9WhdTFE0.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-8212787498736534501</id><published>2011-07-11T09:50:00.000-07:00</published><updated>2011-07-11T10:55:27.529-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-11T10:55:27.529-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="cloud computing" /><title>Developing and Testing in the Cloud</title><content type="html">There’s a lot of hype around “&lt;a href="http://www.infoworld.com/d/cloud-computing/what-cloud-computing-really-means-031"&gt;the Cloud&lt;/a&gt;” and what it can do.&lt;br /&gt;&lt;br /&gt;One of the things that I am interested in is Cloud solutions that can help small software companies, and especially to kickstart software startups. Good tools that development teams can take advantage of to build and test their own stuff, without all of the hassle and expense of internal IT, buying and provisioning their own gear, setting up the tools and systems and networks and finding someone who understands all of it well enough to do it right and to keep it running. I want to find Cloud-based technology that can do for software teams what &lt;a href="http://www.salesforce.com/"&gt;Salesforce.com &lt;/a&gt;does for customer-service businesses, so that software teams can get started off quickly, and doing things right from the start.&lt;br /&gt;&lt;br /&gt;Software teams need a core set of shared tools and capabilities:&lt;ul type="square"&gt;&lt;li&gt;Source code management / version control&lt;/li&gt;&lt;li&gt;Bug tracking&lt;/li&gt;&lt;li&gt;Collaboration and shared documentationBuild and Continuous Integration&lt;/li&gt;&lt;li&gt;Source code scanning and static analysis&lt;/li&gt;&lt;li&gt;Unit and functional testing&lt;/li&gt;&lt;li&gt;System, load and stress testing&lt;/li&gt;&lt;li&gt;Code deployment.&lt;/li&gt;&lt;/ul&gt;Can the Cloud provide all of this in an effective way?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Managing and Building Code in the Cloud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I keep running into people using &lt;a href="https://github.com/"&gt;GitHub &lt;/a&gt;to host their source code repositories. Not just people working on Open Source projects, but companies using GitHub to manage commercial projects in &lt;a href="https://github.com/features/hosting"&gt;hosted private repositories&lt;/a&gt;, a service &lt;a href="http://www.quora.com/Do-any-startups-use-Github-as-a-repository-for-their-private-proprietary-code"&gt;used by a number of startups&lt;/a&gt;. In GitHub, developers have a platform for managing code with the &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; distributed version control system, and they get access to a good set of tools for a development team, especially distributed teams: admin functions to control &lt;a href="https://github.com/features/projects/collaboration"&gt;permissioning, &lt;/a&gt;&lt;a href="https://github.com/features/projects/wikis"&gt;wikis&lt;/a&gt;, a &lt;a href="https://github.com/features/projects/issues"&gt;bug tracking system&lt;/a&gt; and an online &lt;a href="https://github.com/features/projects/codereview"&gt;code review tool&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One alternative to GitHub is &lt;a href="https://bitbucket.org/"&gt;BitBucket &lt;/a&gt;which uses the &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt; DVCS. Like GitHub, BitBucket can be used to manage Open Source and private projects, and it looks like it offers a &lt;a href="http://thingsilearned.com/2010/01/07/github-and-bitbucket/"&gt;similar set&lt;/a&gt; of management capabilities and tools. GitHub is &lt;a href="https://github.com/plans"&gt;free for Open Source projects and cheap for small teams&lt;/a&gt; while BitBucket’s &lt;a href="https://bitbucket.org/plans"&gt;pricing&lt;/a&gt; is based on the number of users, small teams (up to 5 users) are free for open or closed source.&lt;br /&gt;&lt;br /&gt;Another On Demand SCM platform built on Mercurial is Fog Creek Software’s &lt;a href="http://www.fogcreek.com/kiln/"&gt;Kiln&lt;/a&gt; which integrates nicely with Fog Creek’s bug tracking and planning system &lt;a href="http://www.fogcreek.com/fogbugz/"&gt;FogBugz&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Atlassian, which &lt;a href="http://techcrunch.com/2010/09/29/atlassian-buys-mercurial-project-hosting-site-bitbucket/"&gt;bought BitBucket last year&lt;/a&gt;  also offers &lt;a href="http://www.atlassian.com/hosted/studio/"&gt;Jira Studio&lt;/a&gt; a comprehensive hosted development platform centered on a &lt;a href="http://www.atlassian.com/hosted/studio/tour/subversion-svn-hosting.jsp"&gt;Subversion code repository&lt;/a&gt; integrated with the rest of Atlaissian’s strong development toolset: &lt;a href="http://www.atlassian.com/software/jira/"&gt;Jira&lt;/a&gt; bug tracking, &lt;a href="http://www.atlassian.com/software/fisheye/"&gt;FishEye&lt;/a&gt; for code searching, &lt;a href="http://www.atlassian.com/software/confluence/"&gt;Confluence&lt;/a&gt; wiki, &lt;a href="http://www.atlassian.com/software/greenhopper/"&gt;Greenhopper&lt;/a&gt; for Agile team planning, &lt;a href="http://confluence.atlassian.com/display/BAMBOO/About+Elastic+Bamboo"&gt;Elastic Bamboo &lt;/a&gt;for build and Continuous Integration on Amazon EC2 and &lt;a href="http://www.atlassian.com/software/crucible/"&gt;Crucible&lt;/a&gt; for online code review. That’s almost everything that a team needs (all that is missing is static analysis and a functional and load testing platform). Presumably the same integrated development tool support will extend to BitBucket over time, although there are already some overlaps between BitBucket and Jira Studio.&lt;br /&gt;&lt;br /&gt;And there’s CloudBees &lt;a href="http://cloudbees.com/dev.cb"&gt;Dev@cloud&lt;/a&gt; which offers a choice of secure Git, SVN or Maven repositories, and Continuous Integration through a &lt;a href="http://jenkins-ci.org/"&gt;hosted Jenkins server&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Spring Source’s &lt;a href="http://www.springsource.com/code2cloud"&gt;Code2Cloud&lt;/a&gt; might be a good option especially for Java / Spring developers when it is ready – the details are fuzzy at the moment.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/"&gt;Google Code&lt;/a&gt; is cool, but for now is &lt;a href="http://code.google.com/p/support/wiki/FAQ"&gt;only available for Open Source&lt;/a&gt; projects.&lt;br /&gt;&lt;br /&gt;For enterprises, IBM &lt;a href="http://www.ibm.com/press/us/en/pressrelease/29685.wss"&gt;recently announced&lt;/a&gt; &lt;a href="http://www.ibm.com/services/us/en/it-services/smart-business-development-and-test-cloud.html"&gt;Smart Business Development and Test Cloud&lt;/a&gt; and &lt;a href="http://www.ibm.com/services/us/en/it-services/smart-business-development-and-test-on-the-ibm-cloud.html"&gt;IBM Smart Business Development and Test on the IBM Cloud&lt;/a&gt; (also known as SmartCloud Enterprise - I’m not sure what the difference is between them, I got too worn out reading through the marketing speak) , with all sorts of &lt;a href="http://www.ibm.com/software/rational/info/cloud-services/"&gt;IBM technology&lt;/a&gt; and partner tools. This stuff isn’t for the faint of heart, or the small of wallet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Continuous Integration in the Cloud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Continuous Integration is a problem that development teams need to solve before they get too far along, and setting up a CI server and keeping it running isn’t trivial. It’s another good fit for the elastic On Demand model of the Cloud, paying for more infrastructure only when you need it.&lt;br /&gt;&lt;br /&gt;Besides Atlassian’s hosted end-to-end platform, and CloudBees’ &lt;a href="http://cloudbees.com/dev-faq.cb"&gt;Jenkins as a Service&lt;/a&gt; which can be used to build code hosted on a repository accessible through the Internet, there are a few options for CI in the Cloud (courtesy of &lt;a href="http://stackoverflow.com/questions/2380721/hosted-continuous-integration"&gt;Pascal Thivent on Stack Overflow&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;For Open Source projects there is &lt;a href="http://codebetter.com/jameskovacs/2009/02/24/announcing-teamcity-codebetter-com/"&gt;CodeBetter&lt;/a&gt; based on the &lt;a href="http://codebetter.com/codebetter-ci/"&gt;TeamCity build server&lt;/a&gt;. For proprietary projects there is &lt;a href="http://mikeci.com/"&gt;Mike CI &lt;/a&gt;which is hosted on Amazon EC2, and includes interfaces to Subversion, Git and Mercurial repositories; and &lt;a href="http://cifoundry.net/"&gt;CI Foundry&lt;/a&gt;. However, I don’t know how real these services are. Mike CI was down the last couple of times I went to check on it, and CI Foundry’s home page includes this not-very-convincing testimonial:&lt;br /&gt;&lt;blockquote&gt;What people are saying...&lt;br /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris quis ligula vel ligula varius cursus tristique eget sem. Mauris sagittis, ante id imperdiet auctor, sem mi condimentum neque, quis feugiat quam dui dictum risus.&lt;br /&gt;- Chris Read&lt;br /&gt;Continuous Deployment expert&lt;br /&gt;&lt;/blockquote&gt;Thivent suggests that you can roll-your- own CI solution on Amazon EC2 or maybe use something like &lt;a href="http://www.ciinabox.com/"&gt;“CI in a box”&lt;/a&gt;. Using an On Demand platform like &lt;a href="http://aws.amazon.com/ec2/"&gt;EC2&lt;/a&gt; makes sense for CI, rather than provisioning your own gear: it’s a bit more work for you to do the setup, but you can rely on Amazon’s infrastructure to reduce costs and simplify operations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bug Tracking in the Cloud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are some decent and reasonably priced Cloud-based bug tracking systems suitable for small teams, including &lt;a href="http://www.fogcreek.com/fogbugz/pricing.html"&gt;Fog Creek Software’s FogBugz&lt;/a&gt; and Atlassian’s &lt;a href="http://www.atlassian.com/software/jira/hosted/"&gt;Jira Hosted&lt;/a&gt; option both of which are also included in their hosted code management suites.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Testing in the Cloud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Cloud has a lot of promise for app testing, especially for large-scale performance and load testing. You’re building a cool new Web platform that needs to support 10,000 or 100,000 concurrent sessions according to your business plan. Before your investors put more money in, they want to see just how real your software is, how far away you are from delivering something that could work. Of course you don’t have the money or time or IT skills to build a large-scale test center of your own at this point, and there’s a lot of waste in doing this – you need a lot of gear, but you won’t need to use all of it very often.&lt;br /&gt;&lt;br /&gt;You can spin up a test farm on EC2 surprisingly quickly, even a big one – and as long as you don’t need to run the tests for a long time and you don’t ask for too high a service level, it &lt;a href="http://aws.amazon.com/ec2/pricing/"&gt;won’t cost you much&lt;/a&gt; at all. You pay for what you need when you need it.&lt;br /&gt;&lt;br /&gt;To run stress tests you need more than just the app deployed in a farm. You also need a scalable stress test harness to drive load scenarios and to measure the results. There are some viable options available in the Cloud today: &lt;a href="http://www.soasta.com/"&gt;SOASTA&lt;/a&gt; with its CloudTest solution for load testing and extreme stress testing, scaling from smallish sites to really big; &lt;a href="http://www8.hp.com/us/en/software/software-product.html?compURI=tcm:245-936943"&gt;HP Load Runner in the Cloud&lt;/a&gt; running on EC2; &lt;a href="http://performancexpert.com/jmeter"&gt;JMeter in the Cloud&lt;/a&gt;; &lt;a href="http://loadstorm.com/"&gt;LoadStorm &lt;/a&gt;and &lt;a href="http://browsermob.com/performance-testing"&gt;BrowserMob&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are also some other interesting test capabilities, including technology from &lt;a href="http://saucelabs.com/"&gt;Sauce Labs&lt;/a&gt; which lets you run &lt;a href="http://saucelabs.com/ondemand"&gt;Selenium tests on Web apps in the Cloud&lt;/a&gt; or &lt;a href="http://saucelabs.com/docs/scout"&gt;manually test&lt;/a&gt; your app against different Cloud-based instantly-available browsers, all with video records of failed tests and other problems found. Simple, useful and cool.&lt;br /&gt;&lt;br /&gt;A different take on Cloud-based testing that could work for startups and smaller companies is crowd-sourced testing services like &lt;a href="http://www.utest.com/"&gt;uTest&lt;/a&gt;, where you get people “in the Cloud” to test your app (web apps, desktop apps and mobile apps), including functional coverage and regression testing (you give them tests, they run them and maybe help improve them), exploratory testing, usability testing, load testing and test planning and management. Like other Cloud-based On Demand solutions, you pay for work when you need it. uTest has a community of something like 40,000 testers available, although it’s not clear how many of them are much good.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mob4hire.com/"&gt;Mob4Hire &lt;/a&gt;is another crowd-sourced solution specifically for mobile apps – they offer &lt;a href="http://mob4hire.com/services/mobtestsuite"&gt;functional testing and usability testing&lt;/a&gt; and other services like market research.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Static Analysis in the Cloud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some of the leading static analysis suppliers have also gone to the Cloud. HP offers &lt;a href="https://www.fortify.com/products/fortify-on-demand/index.html"&gt;Fortify on Demand&lt;/a&gt; to scan code for security vulnerabilities, and IBM has &lt;a href="http://www.ibm.com/software/awdtools/appscan/ondemand/"&gt;Rational Appscan OnDemand &lt;/a&gt;which includes assistance from an experienced team to help you interpret the results and plan remediation. Both of these solutions are targeted more towards the enterprise than small teams.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.veracode.com/"&gt;Veracode&lt;/a&gt;, which runs binary code analysis for security vulnerabilities and now also offers web vulnerability scanning, is only available through the Cloud. They offer a &lt;a href="https://trial.veracode.com/freetrials/veracode-free-trial-signup.php"&gt;free trial scan&lt;/a&gt; of small Java apps for XSS and SQL Injection flaws (two of the most common and fatal web application vulnerabilities).&lt;br /&gt;&lt;br /&gt;For startups that care about building reliable and secure apps (and most of them should, especially Web 2.0 startups and mobile app developers) it probably makes more sense to look at simpler developer IDE-based tools like &lt;a href="http://findbugs.sourceforge.net/manual/eclipse.html"&gt;Findbugs &lt;/a&gt;and &lt;a href="http://code.google.com/javadevtools/codepro/doc/index.html"&gt;Google’s CodePro Analytix&lt;/a&gt; (both free) or &lt;a href="http://www.klocwork.com/products/solo/index.php"&gt;Klocwork Solo for Java&lt;/a&gt; which is priced per user.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Tradeoffs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Managing your code, building it and testing it in the Cloud has a number of clear advantages:&lt;ul type="square"&gt;&lt;li&gt;Faster time to market – you can get access to the infrastructure and tools quickly, with minimal hassle and setup time.&lt;/li&gt;&lt;li&gt;Savings on cost and Capex – especially for load testing – you don’t have to pay upfront, you only have to pay for what you use when you use it, so you can better manage your cash flow.&lt;/li&gt;&lt;li&gt;Convenience – you don’t have to provision and operate the gear yourself and add to your operational headaches.&lt;/li&gt;&lt;li&gt;Access to specialist skills – your Cloud provider will know more about these technologies and how to solve a specific problem much better than you can afford to, so you don’t need to contract or hire gurus to help solve problems or make sure everything is setup properly, or waste time figuring it out yourself.&lt;/li&gt;&lt;li&gt;Service levels – they’ll have more people to help keep things running, to make sure code and data are backed up, systems are cleaned up and monitored and patched. They’re less likely to lose your code and data than you are.&lt;/li&gt;&lt;/ul&gt;When it comes to security, the common argument for working with a Cloud-based provider is that they will be more responsible and serious about security than most of their customers will be or can be. Because the of economies of scale, they can invest in doing things right, and because they have to be secure to compete. GitHub for example looks like they have a &lt;a href="http://help.github.com/security/"&gt;good security program in place&lt;/a&gt; and they are hosted by &lt;a href="https://github.com/blog/493-github-is-moving-to-rackspace"&gt;Rackspace&lt;/a&gt; so the data center, network and servers will be setup and taken care of much better than a small company, especially a startup, can afford to or would know how to do.&lt;br /&gt;&lt;br /&gt;The concern with using a Cloud platform like this comes down to some fundamental points:&lt;br /&gt;&lt;br /&gt;1.    It’s a shared platform, used by a lot of companies. The more successful the platform is, the more customers and interesting and valuable data / IP that they manage, the more attractive a target they are to bad guys. A small company by itself is an easy target, but not especially interesting or easy to find. But a platform that holds data for a lot of small, innovative companies? Yummy….[pronounced in a deep, growly voice with a foreign accent]&lt;br /&gt;&lt;br /&gt;2.    You take on some important risks any time that you outsource something that is core and critical to your business. Your data / code / customer base is more important to you than it is to whoever you outsource this responsibility to. If something goes badly wrong, if you can’t get an important change or an important bug fix out to a customer because the Cloud service isn’t working, or if the integrity or confidentiality of your code is compromised, they will be sad, and they will lose a customer (you)... but you may go out of business.&lt;br /&gt;&lt;br /&gt;You can ask for, and pay for, good SLAs - but &lt;a href="http://www.informationweek.com/news/cloud-computing/infrastructure/229402054"&gt;Amazon’s major EC2 outage&lt;/a&gt; earlier this year showed that even the best providers can’t meet their SLA commitments. While Amazon did a lot of things right in handling and recovering from that outage, it affected a lot of customers for too long.&lt;br /&gt;&lt;br /&gt;3.    There’s &lt;a href="http://www.atlassian.com/hosted/security.jsp"&gt;more to a secure online platform&lt;/a&gt; than using SSL and network firewalls and running in a good data center - pretending otherwise is at best naïve. As a customer, you need to be confident in how the Cloud services provider designed and built the software architecture and platform to protect the confidentiality and integrity of your IP and data, in their multi-tenant partitioning scheme and software security controls, and in their SDLC. Security vulnerabilities in application code are a &lt;a href="https://www.whitehatsec.com/home/news/10pressarchives/NR_042610survey.html"&gt;serious source of risk to businesses on the Web&lt;/a&gt;, and most companies still &lt;a href="http://www.veracode.com/reports/index.html"&gt;do a poor job of building apps in a secure way&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.dropbox.com/features"&gt;DropBox&lt;/a&gt;, a Cloud-based document storage facility is an example of a platform that seemed to be secure and confidential, until somebody &lt;a href="http://www.theregister.co.uk/2011/05/16/dropbox_ftc_not_good_enough/"&gt;started to look deeper into it&lt;/a&gt;, and they continue to run into &lt;a href="http://www.pcmag.com/article2/0,2817,2387343,00.asp"&gt;problems with basic security issues&lt;/a&gt; Unfortunately, none of the hosted platforms provide any kind of statement on their secure SDLC that I could find, on what steps they take to ensure that the platform is designed and implemented safely.&lt;br /&gt;&lt;br /&gt;Testing in the Cloud, especially load testing for Web apps, looks to be a no-brainer – the business case is too compelling to ignore. Many of the other tools have a lot of promise: something like Atlassian’s end-to-end hosted studio would save a lot of time and trouble for a small company, and the upfront cost savings are real.&lt;br /&gt;&lt;br /&gt;It comes down to how much trust you can put into your Cloud provider and their SLAs for availability and support, and whether in the end you can afford to trust your core IP to somebody else. &lt;a href="http://37signals.com/"&gt;37 Signals&lt;/a&gt;, which builds and operates its own Cloud solutions for project management and document sharing, &lt;a href="http://37signals.com/svn/posts/1206-37signals-on-github"&gt;doesn’t think it is a good idea&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;We host all the source code for our applications internally for obvious security reasons. That’s not to say Github’s private repository hosting isn’t a good option, especially if you want a hassle-free setup. It’s just not for us.&lt;br /&gt;JH 22 Aug 08&lt;br /&gt;&lt;/blockquote&gt;For some companies, especially startups, IP embodied in their code is critically important – it may be all that they have. Ironically, it’s these companies that are most likely to use a Cloud platform like GitHub or Jira Studio or BitBucket. Deciding whether to trust your future to the Cloud is not an easy decision to make. But as the technology continues to get better, it’s a question that is worth asking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-8212787498736534501?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/lwSil_ThtwU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/8212787498736534501/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=8212787498736534501" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/8212787498736534501?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/8212787498736534501?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/lwSil_ThtwU/developing-and-testing-in-cloud.html" title="Developing and Testing in the Cloud" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/07/developing-and-testing-in-cloud.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMBSX0_cSp7ImA9WhZaFUk.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-7025324419129499978</id><published>2011-07-01T10:02:00.000-07:00</published><updated>2011-07-01T10:47:38.349-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-01T10:47:38.349-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="devops" /><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>Please, no more Manifestos</title><content type="html">For some reason, people involved in software development have a thing for &lt;a href="http://en.wikipedia.org/wiki/Manifesto"&gt;Manifestos&lt;/a&gt; (always with a Capital M). It all started with the &lt;a href="http://agilemanifesto.org/"&gt;Agile Manifesto. &lt;/a&gt;Then came the &lt;a href="http://manifesto.softwarecraftsmanship.org/"&gt;Software Craftsmanship Manifesto&lt;/a&gt;, signed by serious programmers big and small, except ironically the original author of &lt;a href="http://www.improvingwetware.com/2010/12/29/no-i-dont-agree-with-the-manifesto"&gt;Software Craftsmanship&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Then there have been other, less practical and less successful manifestos, like the &lt;a href="http://www.ruggedsoftware.org/"&gt;Rugged Software Manifesto&lt;/a&gt; which as I have &lt;a href="http://swreflections.blogspot.com/2010/02/and-now-we-need-to-be-rugged.html"&gt;explained before&lt;/a&gt; was proclaimed with the naïve understanding that reciting feel-good phrases will somehow make developers write better software.&lt;br /&gt;&lt;blockquote&gt; “I am rugged…”&lt;br /&gt;&lt;/blockquote&gt;And the even-less-practical but much-more fun-to-read &lt;a href="http://programming-motherfucker.com/"&gt;manifesto for truly hard-core programmers &lt;/a&gt;(there really is no problem that you can’t program your way out of) and of course the cynical &lt;a href="http://www.halfarsedagilemanifesto.org/"&gt;Half-Arsed Agile Manifesto&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What brought this all up is that some people involved in DevOps still feel incomplete without a &lt;a href="http://theagileadmin.com/2010/10/15/a-devops-manifesto/"&gt;Manifesto&lt;/a&gt; of &lt;a href="http://groups.google.com/group/devops/browse_thread/thread/5aa0fe40a843a404"&gt;their very own&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This is a shame, because I like following what’s happening in DevOps and learning from the best (&lt;a href="http://timothyfitz.wordpress.com/2009/02/10/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day/"&gt;and worst&lt;/a&gt;) of it, and I want them to keep doing what they’re doing.&lt;br /&gt;&lt;br /&gt;I don’t see the point in manifestos. They don’t move me or change the way that I think or work. I can get through each day without having to refer to a manifesto. I want tools and concrete ideas that I can use to get things done, to do a better job. Not motherhood or bullshit. Patterns and anti-patterns and recipes and best practices (and worst practices) – these are useful. But Manifestos? Useless, or at their worst, dangerous:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Workers of the world unite….&lt;br /&gt;&lt;/blockquote&gt;Look how that one worked out.&lt;br /&gt;&lt;br /&gt;Manifestos s are a way to keep people from thinking and asking questions.&lt;br /&gt;&lt;blockquote&gt;Oh no, people have more than one way of thinking about a problem, or what something means!&lt;br /&gt;&lt;/blockquote&gt;This is not a bad thing. This is a GOOD THING! This is how we move forward, this is how we get better. What we’re doing isn’t simple, or right, or wrong, so let’s stop pretending.&lt;br /&gt;&lt;br /&gt;Or maybe Andrew Shafer is right&lt;br /&gt;&lt;blockquote&gt;A manifesto, by definition, is essentially a marketing document.&lt;br /&gt;“Re: Time for a DevOps Manifesto?”&lt;br /&gt;&lt;/blockquote&gt;Either way, we don’t need more manifestos. What we need is people to keep thinking and asking questions, and getting things done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-7025324419129499978?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/ZxBWTBzYO9k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/7025324419129499978/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=7025324419129499978" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7025324419129499978?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7025324419129499978?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/ZxBWTBzYO9k/please-no-more-manifestos.html" title="Please, no more Manifestos" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/07/please-no-more-manifestos.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcFRn07fCp7ImA9WhZaEUQ.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-5371392677688940432</id><published>2011-06-27T10:34:00.000-07:00</published><updated>2011-06-27T11:06:57.304-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-27T11:06:57.304-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="devops" /><category scheme="http://www.blogger.com/atom/ns#" term="reliability" /><category scheme="http://www.blogger.com/atom/ns#" term="failure" /><title>Moving forward from Failure</title><content type="html">System failures at scale are inescapable, as I have talked about before in the context of &lt;a href="http://swreflections.blogspot.com/2010/03/failure-isolation-and-recovery-learning.html"&gt;designing systems for failure in high-scale computing&lt;/a&gt; and how to apply these ideas to enterprise systems. Failures are wasted if you don’t learn enough from them; if the way that you design and deliver application systems, and the way that you deploy and run these systems, don’t get better as a result. You have to find lessons in each failure and constantly move forward, and make the system, and the team, more resilient.&lt;br /&gt;&lt;br /&gt;I’ve read and heard a lot of good stuff over the last year or so from the DevOps community on handling system failures: how to minimize the risk of failures through &lt;a href="http://www.kitchensoap.com/2010/11/03/go-or-no-go-operability-and-contingency-planning-surge/"&gt;deployment planning&lt;/a&gt;, how &lt;a href="http://www.kitchensoap.com/2009/11/12/how-complex-systems-fail-a-webops-perspective/"&gt;complex systems fail&lt;/a&gt;, how to &lt;a href="http://velocityconf.com/velocity2010/public/schedule/detail/12605"&gt;communicate failures&lt;/a&gt; effectively to stakeholders so that you don’t destroy trust, and how to understand failures through postmortem analysis, including Jacob Loomis’ essay “How to Make Failure Beautiful” in the &lt;a href="http://oreilly.com/catalog/0636920000136"&gt;Web Operations&lt;/a&gt; book and John Allspaw’s keynote on &lt;a href="http://www.slideshare.net/jallspaw/advanced-postmortem-fu-and-human-error-101-velocity-2011"&gt;Advanced Postmortem Fu and Human Error 101&lt;/a&gt; at this year’s Velocity conference.&lt;br /&gt;&lt;br /&gt;Many of these ideas fit with my own experience, and fill in some important gaps – they extend beyond the concerns of operating high-volume Web sites to broader, general problems in system operations and systems engineering, and deserve a wider audience outside of the Web operations and Web startup worlds.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Postmortems and Root Cause Analysis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The keys to successful postmortems and Root Cause Analysis are deceptively simple, and therefore difficult to get right:&lt;ul type="square"&gt;&lt;li&gt;get the right people together in a room.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;create the right environment for blameless problem solving: make it safe for people to be open and honest, don’t point fingers, focus on facts and solving problems and how to get better.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;postmortems are expensive and painful, and people want to get out of them as soon as possible. Don’t stop too soon, before the team has really understood the problems, and the solutions.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;don’t be satisfied with a single root cause – complex system failures usually have multiple causes if you dig deep enough.&lt;/li&gt;&lt;br /&gt;&lt;li&gt; human error isn’t a root cause – it’s a symptom of something else that you’ve done wrong.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;You can’t stop with Root Cause Analysis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Root Cause Analysis is important, but it is just the first step. Once you’ve reviewed a failure as a team and found your way to the root causes or at least identified some real problems, now you have to do something about it, beyond the immediate fixes and workarounds that the team made recovering from the incident.&lt;br /&gt;&lt;br /&gt;There are straightforward things that you can do now – detective and corrective actions, quick fixes, low cost and low risk – so you do them. Fix a bug, plug a hole, add defensive coding, add some tests. Better logging and diagnostics and alerting, better error handling, better metrics – you can &lt;span style="font-weight: bold;"&gt;always&lt;/span&gt; do this stuff better – so that ops can see the problem coming or at least recognize it when it happens again. Better troubleshooting tools and training for ops.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Don’t stop with corrective actions either&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But it’s still not enough to recover from a failure and patch the holes and tighten things up, or even build a better incident management capability. You have to make sure to find the lessons in each failure, really learn about why the failure happened, how it relates to other failures or problems that you have; and about how you dealt with the failure when it happened, and what you need to do to do a better job the next time. Then you have to act to reduce the risk and cost of failures, take steps to make sure that failures like this one, and even failures that aren’t like this one, don’t happen again. And that when the next failure does happen, that the team is more prepared for it, that you can recover faster and with less stress and impact to the business.&lt;br /&gt;&lt;br /&gt;Some of these preventative actions are straightforward: training for developers and testers and ops, and better communications in and especially between teams, checklists, health checks and dependency checks, more disciplined change controls and deployment controls, and other safeties.&lt;br /&gt;&lt;br /&gt;But most preventative changes, the ones that make a real difference, are deeper, more fundamental: fixing architecture, culture, organization, or management weaknesses. Fixing these kinds of problems takes longer, involves more people, and costs more. Making changes to the architecture – switching out a core technology or implementing a partitioning strategy to contain failures and to scale up – can take months to work out and implement. Organizational and management changes are hard because this directly impacts people’s jobs. Changing culture is even harder and takes longer, especially to make the changes stick.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You can’t improve what you can’t see – you need data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These problems are also hard to see and understand. It’s naïve to think that you can recognize or prove the need for fundamental changes to architecture or organization or management controls or culture from a postmortem meeting – it takes time and perspective and experience with more than one failure to see this kind of problem. And because the fixes are fundamental and expensive, they can be hard to justify, hard to get management and the business and your own people to buy-in.&lt;br /&gt;&lt;br /&gt;You need data to help you understand what you’re doing wrong, what you need to change or what you need to stop doing – and what you’re doing right, what you need to keep doing, and to build a case for change. At &lt;a href="http://swreflections.blogspot.com/2010/06/velocity-2010-conference-take-aways.html"&gt;last year’s Velocity conference&lt;/a&gt;, John Allspaw explained how to &lt;a href="http://www.slideshare.net/jallspaw/ops-metametrics-the-currency-you-pay-for-change"&gt;use metrics to find patterns and trends in failures&lt;/a&gt;, to understand what’s hurting you the most, or hurting you the most often, what’s working well and what’s not. To find out what changes are safe, and what changes aren’t; what failures are cheap and easy to recover from, and what failures can take the company down.&lt;br /&gt;&lt;br /&gt;Metrics are important to help you see problems, and to help show if you are learning and getting better. Track the types and severity of failures, frequency of failures, your response to failures – time to detect and time to recover from failures; and the frequency and type and size of changes, and the correlation between changes and failures (by type and size of changes, by type and severity of failures). And make sure to track regressions – the number of times that you take a step backward.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Deciding what to fix, and what not to&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Metrics can also help you to decide what you can fix and change, and what’s not worth fixing or changing – at least not for now. You need to recognize when a problem is a true outlier, an isolated case that is unlikely to happen again and that you can accept and move forward. It’s important that you can see the difference between a problem that is a one-of, and a first-of –an indicator of something deeply wrong, a fundamental weakness in the way that the system was built or the way that you work. You don’t want to &lt;a href="http://www.joelonsoftware.com/items/2008/01/22.html"&gt;over-react to outliers&lt;/a&gt; but you also don’t can’t treat every problem as unique and miss seeing the patterns and connections, the underlying root causes.&lt;br /&gt;&lt;br /&gt;There is diminishing returns in preventing (or even reducing the probability) of some problems, trying to stop the unstoppable. Some problems are too rare, or too expensive or difficult to prevent – and trying to prevent these problems can introduce new complexities and new risks into the system. I agree with John Allspaw that there are situations when it makes more sense to focus on how to react and recover faster, on &lt;a href="http://www.kitchensoap.com/2010/11/07/mttr-mtbf-for-most-types-of-f/"&gt;improving MTTR rather than MTBF&lt;/a&gt;, but you need to know when to make that case.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Moving forward from Failures is real work and needs to be managed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;People don’t want to think about failures for long – they want to put the mistakes and confusion and badness behind them and move on. And the business and management want priorities back on day-to-day delivery as soon as possible. When failures happen, you need to act fast, get the most that you can out of the moment, make decisions and commitments and reinforce changes while the pain is still fresh.&lt;br /&gt;&lt;br /&gt;But fixing real problems in the system or the way that people are organized or the way that they work or the way that they think, can’t be done right away. Building &lt;a href="http://www.kitchensoap.com/2011/05/10/training-organizational-resilience-in-escalating-situations/"&gt;reliability and resilience&lt;/a&gt; and operability into how you work and how you think and how you build and test software and how you solve problems takes time and commitment and continuous reinforcement. Management, and the team, have to be made accountable for longer-term preventative actions, for making bigger changes and improvements.&lt;br /&gt;&lt;br /&gt;This work needs to be recognized by the business and management and the team and built in to the backlog, and actively managed. You need to remind people of the risks when you see them missing steps or trying to cut corners, or falling back into old patterns of thinking and acting. You’ll need to use metrics and cost data to drive behaviour and to drive change, and to decide how much to push and how often: are you changing too much too often, running too loose; or is change costing you too much, are you overcompensating?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Resilient system is a DevOps problem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Development can’t solve all of these problems on its own, and neither can Operations. It needs the commitment of development (and by development, I mean everyone responsible for designing, developing, testing, securing and releasing the software) and operations (everyone responsible for building and securing and running the infrastructure, deploying the code, and running and monitoring the system). This is a real DevOps problem: development and operations have to be aligned and work together, communicating and collaborating, sharing responsibilities and technology. This is one of the places where I see DevOps adding real value in any organization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-5371392677688940432?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/U_hVt5c6UNw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/5371392677688940432/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=5371392677688940432" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5371392677688940432?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5371392677688940432?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/U_hVt5c6UNw/moving-forward-from-failure.html" title="Moving forward from Failure" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/06/moving-forward-from-failure.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08AQ3gyeip7ImA9WhZbFko.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-2529997592010279788</id><published>2011-06-21T08:39:00.001-07:00</published><updated>2011-06-21T08:57:22.692-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-21T08:57:22.692-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Construx" /><category scheme="http://www.blogger.com/atom/ns#" term="project management" /><category scheme="http://www.blogger.com/atom/ns#" term="estimation" /><category scheme="http://www.blogger.com/atom/ns#" term="agile development" /><title>Estimation is not a Black Art</title><content type="html">Construx Software is one of the few companies that take the problems of &lt;a href="http://www.construx.com/Page.aspx?cid=630"&gt;estimation in software development&lt;/a&gt; seriously. Earlier this year I attended Steve McConnell’s &lt;a href="http://www.construx.com/Page.aspx?nid=17&amp;amp;id=32"&gt;Software Estimation in Depth&lt;/a&gt; course based on his book &lt;a href="http://www.stevemcconnell.com/est.htm"&gt;Software Estimation: Demystifying the Black Art&lt;/a&gt;. Two days reviewing factors in estimation and the causes of errors in estimating, the differences between estimates and targets and commitments, how to present estimates to the customer and to management, the importance of feedback and data, estimating techniques that work and why they work, and when and how to apply these techniques to different estimating problems.&lt;br /&gt;&lt;br /&gt;You can get a lot out of reading Steve’s book, but the course setting gives you a chance to work with other people and solve real problems in estimation and planning, dig deep into questions with the man himself, and it introduces new material and research not included in the book. The key takeways from this course for me were:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Basics&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Even simple techniques work much better than “expert judgment” (aka wild ass guesses). With training and using straightforward tools and simple mathematical models and following a bit of structure, you can get to 70-75% accuracy in estimating, which is good enough for most of us.&lt;br /&gt;&lt;br /&gt;Never estimate on the spot – it is professionally irresponsible, and you’re setting yourself, your team, and your customer up to fail. Always give the person who is doing the estimate time to think. Everyone knows this, but it’s important to be reminded of it, especially under pressure.&lt;br /&gt;&lt;br /&gt;People’s systemic error tendency is to underestimate. Many organizations underestimate by a factor of at least 2x. This also applies to comparing back to actual costs: a common mistake is to remember how much you estimated something would take, not how long it actually took.&lt;br /&gt;&lt;br /&gt;Estimates are always better if you can use real data to calibrate them: to compare estimates against evidence of how your organization has performed in the past. I knew this. But what I didn’t know is that you don’t need a lot of data points: even a few weeks of data can be useful, especially if it contradicts with judgment and forces you to question your assumptions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.stevemcconnell.com/EstimationQuickReference.pdf"&gt;Use different techniques&lt;/a&gt; at different stages as you move along a project’s &lt;a href="http://www.construx.com/Page.aspx?cid=1648"&gt;Cone of Uncertainty&lt;/a&gt;, depending on how much information you have available at the time, and how high the stakes are – what the cost of estimation errors could be to the business. If you need higher confidence or higher quality estimates, use multiple techniques and compare the results.&lt;br /&gt;&lt;br /&gt;I like T-Shirt sizing to help in planning and making a business case. Developers come up with a rough order of magnitude estimate on cost or effort (small, medium, large, extra-large) while the Customer/Product Owner/Product Manager does the same for the expected business value of a feature or change request. Then you match them up: Extra-Large business value and Small development cost gets a big thumbs-up. Small business value and Extra-Large cost gets a big thumbs down.&lt;br /&gt;&lt;br /&gt;Estimating by analogy – comparing the work that you need to estimate to something similar that you’ve done before – is a simple technique that we use a lot. It works well if you are adding “another screen”, writing “another report”, or building “another interface”. It’s a good fit for maintenance, if you’ve been working with the same code for a while and know most of the gotchas.&lt;br /&gt;&lt;br /&gt;Intact teams (like mine) tend to view problems in a similar way – ideas and experience converge. This is good if you work on similar problems, in maintenance or a long-running project, because you can make decisions quickly and confidently. But this is bad if you are confronted with new problems – you need techniques like &lt;a href="http://leansoftwareengineering.com/wideband-delphi/"&gt;Wideband Delphi&lt;/a&gt; to challenge people’s thinking patterns and let new ideas in.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Agile Estimating and Story Points and Velocity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We spent more time than I expected exploring issues in estimating Agile development work. Incremental and iterative planning in Agile development poses problems for a lot of organizations. The business/customer needs to know when the system will be ready and how much it will cost so that they can make their own commitments, but the team ideally wants to work this out iteratively, as they go. This means instead that they have to define the scope and cost as much as they can upfront, and then work out the details in each sprint – more like staged or spiral development methods. Once they have the backlog sized, they can plan out sprints based on forecast velocity or historical velocity - if they can figure this out.&lt;br /&gt;&lt;br /&gt;I’m still not convinced that Agile &lt;a href="http://stackoverflow.com/questions/1232281/what-are-estimate-points-story-points-and-how-to-measure-them-in-scrum"&gt;story point estimating&lt;/a&gt; is better than (or as good as) other techniques, or that programmers sitting around a table playing &lt;a href="http://www.codinghorror.com/blog/2007/10/lets-play-planning-poker.html"&gt;Planning Poker&lt;/a&gt; is really an effective alternative to thoughtful estimating. Story points create some problems in planning new project development, because they are &lt;a href="http://agile.dzone.com/news/should-your-dev-team-stop?mz=38541-devops"&gt;purposefully abstract&lt;/a&gt; – too abstract to be useful in helping to make commitments to the business. You might have an idea of how many story points give or take you have to deliver, but what’s a story point in the real world? People who use story points can’t seem to agree on &lt;a href="http://blog.mountaingoatsoftware.com/its-effort-not-complexity"&gt;how to define a story point&lt;/a&gt;, &lt;a href="http://www.infoq.com/news/2010/07/story-points-complexity-effort"&gt;what a story point means &lt;/a&gt;and &lt;a href="http://lookforwardconsulting.com/2008/04/29/why-i-use-points-for-estimating/"&gt;how&lt;/a&gt; or &lt;a href="http://blog.mountaingoatsoftware.com/why-i-dont-use-story-points-for-sprint-planning"&gt;when&lt;/a&gt; to use them in estimating.&lt;br /&gt;&lt;br /&gt;More fundamentally, you can’t know what a story point costs &lt;a href="http://www.scrum-breakfast.com/2008/02/explaining-story-points-to-management.html"&gt;until the team starts to deliver&lt;/a&gt;, by measuring the &lt;a href="http://www.netobjectives.com/blogs/agile-development-velocity-is-the-measure-you-want"&gt;team’s velocity&lt;/a&gt; (the actual story points completed in an iteration).This leaves you with &lt;a href="http://agile.dzone.com/news/some-thoughts-agile-planning"&gt;a bootstrapping problem&lt;/a&gt;: you can’t estimate how long it is going to take to do something until you do it. You can look at data from other projects (if you’ve tracked this data), but you’re &lt;a href="http://agilepainrelief.com/notesfromatooluser/2010/02/misuse-of-velocity-in-agile-projects.html"&gt;not supposed to compare story points across projects&lt;/a&gt; because each project and each team is unique, and their idea of story points may be different. So you have to make an educated guess as to how long it is going to take you to deliver what’s in front of you, and now we’re back to the “expert judgement” problem.&lt;br /&gt;&lt;br /&gt;The good news is that it won’t take long to calibrate Story Point estimates against evidence from the team’s actual velocity. Mike Cohn in &lt;a href="http://www.mountaingoatsoftware.com/books/7-succeeding-with-agile-software-development-using-scrum"&gt;Succeeding with Agile&lt;/a&gt; says that you need at least 5 iterations to establish confidence in a team’s velocity. But Construx has found that you can have a good understanding of a team’s velocity in as little as 2 iterations. That’s not a long time to wait for some kind of answer on how long it should take to get the work that you know that you have in front of you done.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;There is more to estimating&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is a lot more to estimating, and to this estimation course: details on different techniques and rules of thumb, models and software tools, how to measure estimation error, how to turn estimates into schedules, how to handle schedule compression and how to stay out of the Impossible Zone. To get a taste of the course, check out this webinar on the &lt;a href="http://construx.com/Page.aspx?cid=3018"&gt;10 Deadly Sins of Software Estimation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Software estimation, like other problems in managing software development, doesn’t require a lot of advanced technical knowledge. It comes down to relatively simple ideas and practices that need to be consistently applied; to fundamentals and discipline. That doesn’t mean that it is easy to do it right, but it’s not &lt;a href="http://harrypotter.wikia.com/wiki/Category:Dark_Magic"&gt;dark magic&lt;/a&gt; either.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-2529997592010279788?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/NQCy4Yx35i0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/2529997592010279788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=2529997592010279788" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2529997592010279788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/2529997592010279788?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/NQCy4Yx35i0/estimation-is-not-black-art.html" title="Estimation is not a Black Art" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/06/estimation-is-not-black-art.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIFQXs4cCp7ImA9WhZUE0o.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-7854236664794082275</id><published>2011-06-06T09:38:00.000-07:00</published><updated>2011-06-06T09:41:50.538-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-06T09:41:50.538-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OWASP" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Safer Software through Secure Frameworks</title><content type="html">&lt;p&gt;We have to make it easier for developers to build secure apps,  especially Web apps. We can't keep forcing everybody who builds an  application to understand and plug all of the stupid holes in how the  Web works on their own  — and to do this perfectly right every time.  What we need is implementation-level security issues taken care of at  the language and framework level. So that developers can focus on their  real jobs: solving design problems and writing code that works.&lt;/p&gt; Go to the &lt;a href="http://software-security.sans.org/blog/2011/06/06/safer-software-through-secure-frameworks"&gt;SANS Application Security Street Fighter&lt;/a&gt; for my latest post on how to write safer software using secure frameworks, and application frameworks that are secure. And to read more about the OWASP Developer Outreach.&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-7854236664794082275?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/X5F_G7GRxEM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/7854236664794082275/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=7854236664794082275" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7854236664794082275?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/7854236664794082275?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/X5F_G7GRxEM/safer-software-through-secure.html" title="Safer Software through Secure Frameworks" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/06/safer-software-through-secure.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YNSXgyeyp7ImA9WhZWFkk.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-6069798453676546812</id><published>2011-05-17T09:02:00.000-07:00</published><updated>2011-05-17T09:19:58.693-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-17T09:19:58.693-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quality" /><category scheme="http://www.blogger.com/atom/ns#" term="code reviews" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="static analysis" /><title>Not doing Code Reviews? What’s your excuse?</title><content type="html">All of us have known for a long time that code reviews find defects, and that reviews are cheaper and can be more effective than most kinds of testing. In &lt;a href="http://www.cc2e.com/"&gt;Code Complete&lt;/a&gt;, Steve McConnell builds an overwhelming case for code reviews: disciplined code inspections can find between 45%-70% of all defects in code, while even fast, informal reviews can find 20%-30%. Studies at IBM, HP, Microsoft and other places show that it is several times cheaper to find bugs in code reviews than through testing. And evidence keeps coming in to support that code reviews work.&lt;br /&gt;&lt;blockquote&gt;“Reviews catch more than half of a product’s defects regardless of the  domain, level of maturity of the organization, or lifecycle phase during  which they were applied”. &lt;a href="http://www.cs.umd.edu/%7Emvz/pub/eworkshop02.pdf"&gt;What We Have Learned About Fighting Defects&lt;/a&gt;&lt;br /&gt; &lt;/blockquote&gt;Recent research into code review practices and advances in  tools make reviews more effective and less expensive, and can change the  way that we think of code reviews and the way that we do them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lightweight code reviews work&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A lot of the literature on code reviews, including Code Complete, focus on formal, team-based code inspections, using a model defined by Michael Fagan at IBM in the 1970s. Heavyweight and high-ceremony, Fagan inspections typically involve a minimum of 4 people: the programmer, the reader, a moderator, and one or more reviewers. Each review meeting requires extensive preparation, lots of documentation, and can last several hours.&lt;br /&gt;&lt;br /&gt;More people now are having success with lightweight but still disciplined code reviews; a middle ground between informal “hey pal can you take a look at this” over-the-shoulder code walkthroughs, and expensive full-on Fagan inspections. In the Modern Code Review chapter of &lt;a href="http://www.amazon.com/Making-Software-Really-Works-Believe/dp/0596808321"&gt;Making Software, &lt;/a&gt;Jason Cohen explains that lightweight reviews can be almost as effective, and much less expensive than formal inspections. The formal review meeting in a Fagan inspection, which is expensive to run and difficult to arrange, is mostly a waste of time – 95% of defects are found before the meeting. The real purpose of the meeting is to communicate the findings and to make sure that the programmer understands them. If that’s the case, the meetings can be held in much less formal way, or not at all.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tool-assisted reviews&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reviewers today can rely on tools to help make their work more effective and efficient. Static Analysis bug checkers like &lt;a href="http://findbugs.sourceforge.net/"&gt;Findbugs&lt;/a&gt;, tools from &lt;a href="http://www.coverity.com/"&gt;Coverity&lt;/a&gt; and &lt;a href="http://www.klocwork.com/"&gt;Klocwork&lt;/a&gt;, and even checkers built-in to IDEs like &lt;a href="http://www.jetbrains.com/idea/documentation/static_code_analysis.html"&gt;IntelliJ Idea&lt;/a&gt; make the job of code reviewers easier and more valuable. These tools catch subtle bugs and common mistakes in coding that get past compilers and that can get past reviewers too, they highlight crappy or questionable code, and can enforce style conventions and best practices in coding. This means that reviewers can focus on more fundamental issues like correctness and error handling, and safety and security issues (and these tools, and others like &lt;a href="https://www.fortify.com/products/fortify360/source-code-analyzer.html"&gt;Fortify 360&lt;/a&gt; help find security vulnerabilities too).&lt;br /&gt;&lt;br /&gt;Formal review meetings are expensive and difficult to setup. A lot of smaller teams do reviews offline instead through email, with the occasional one-on-one meeting when the programmer or reviewer feels that it is necessary. Bigger, distributed teams can use peer review collaboration tools like &lt;a href="http://www.atlassian.com/software/crucible/"&gt;Crucible&lt;/a&gt; or &lt;a href="http://www.reviewboard.org/"&gt;Review Board&lt;/a&gt; or SmartBear’s &lt;a href="http://smartbear.com/products/development-tools/code-review/"&gt;CodeCollaborator&lt;/a&gt; or &lt;a href="http://www.google.com/enterprise/marketplace/viewListing?productListingId=5143210+12982233047309328439"&gt;Google Code Reviews&lt;/a&gt;  (aka &lt;a href="http://code.google.com/appengine/articles/rietveld.html"&gt;Rietveld&lt;/a&gt;) to share code review findings. These tools integrate with your version control system (and sometimes your bug tracker) and are especially useful if you are involving multiple reviewers in different locations and different timezones. Reviewers and the programmer can add annotations or comments directly in with the changes, cutting back on the need for review meetings.&lt;br /&gt;&lt;br /&gt;Some teams use these tools to ensure that code reviews are done, and prove that they are being done for compliance: they can enforce workflows (that reviews are done before code is committed to the main code line) and managers (and auditors) can see the results of code reviews. New programmers can look at the review history for code that they are working on to understand more about the code and about how to do an effective review, and programmers and managers can go back over the results of reviews and find ways to improve them. Some of these tools collect code review metrics, and others, like &lt;a href="http://www.klocwork.com/solutions/code-review/index.php"&gt;Klocwork Inspect&lt;/a&gt;, integrate reviewer findings and static analysis findings into the same review space.&lt;br /&gt;&lt;br /&gt;Another code review tool, this time to help with security reviews, is &lt;a href="http://sourceforge.net/projects/agnitiotool/files/v1.2/"&gt;Agnitio &lt;/a&gt;from David Rook, the &lt;a href="http://www.securityninja.co.uk/"&gt;Security Ninja. &lt;/a&gt;Agnitio serves a different purpose: rather than helping developers collaborate on a code review, it structures and guides a reviewer through a security review, following a detailed code and design review checklist, and then records the results of each review.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reviews find more than functional defects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reviews can find important and fundamental design and implementation problems. This includes subtle logic problems and operational safety weaknesses that testers may not find because they are hard to test for, and reviewers have the “white box advantage” that they can see problems or omissions in the code. And code reviews are important for finding security vulnerabilities – often the only way to find vulnerabilities, except through exhaustive and expensive pen testing. This is why code reviews are a fundamental part of secure SDLC’s like Microsoft’s &lt;a href="http://www.microsoft.com/sdl"&gt;SDL&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But there’s even more to reviews than finding bugs and security vulnerabilities. An interesting study by Mantyla and Lassenius in 2009 &lt;a href="http://portal.acm.org/citation.cfm?id=1592371"&gt;“What types of defects are really discovered in code reviews?”&lt;/a&gt; builds on earlier research by Siy and Votta at Bell Labs in the late 1990s, to show that the majority of problems found by reviewers are not functional mistakes, but what the reviewers call evolvability defects: issues that make code harder to understand and maintain, more fragile and more difficult to modify and fix.&lt;br /&gt;&lt;br /&gt;On average, between 60% and 75% of the defects found in code reviews fall into this class. Of these, around 1/3 are simple code clarity issues: improving element naming and comments, making sure that the code makes sense. Most of the rest of the findings are organizational problems where the code is poorly structured, or duplicate or unused code; or approach problems where the reviewer can see a much simpler and cleaner implementation, sometimes replacing hand-rolled code with built in language features or library calls. And reviewers can also find changes that don’t belong or aren’t required, copy-and-paste mistakes and inconsistencies.&lt;br /&gt;&lt;br /&gt;These defects or recommendations feed back into refactoring and are important for future maintenance of the software, reducing complexity and making it easier to change or fix the code in the future. But it’s more than this: many of these changes also reduce the technical risk of implementation, offering simpler and safer ways to solve the problem, and isolating changes or reducing the scope of a change, which in turn will reduce the number of defects that could be found in testing or escape into the wild.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So why aren’t more people reviewing code? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A study in 2005 found that &lt;a href="http://www.google.ca/url?sa=t&amp;amp;source=web&amp;amp;cd=3&amp;amp;ved=0CCEQFjAC&amp;amp;url=http%3A%2F%2Ftarpit.rmc.ca%2Fshepard%2F492%2Fppt%2Fppt18.ppt&amp;amp;ei=7wqrTaiWIIm6sQPopaj6DA&amp;amp;usg=AFQjCNGHouSN9riwKxu31JRVftHDQtOSEQ"&gt;less than half of development teams are following code reviews.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;WTF?&lt;br /&gt;&lt;br /&gt;Sure, reviews are hard. One of my colleagues who spends a lot of his time reviewing code finds it exhausting, much harder than writing code himself. To do a good review, you have to spend the time to understand the code and what the change was supposed to do, and then put yourself in to the mind of the programmer and work through the solution approach that they decided on. It takes time and it takes discipline. But the return on investment is clear.&lt;br /&gt;&lt;br /&gt;I’ll give a pass to XP-style teams that already follow disciplined pair programming – although the focus of pairing is on finding a good solution, rather than looking for problems, a lot of mistakes and structural issues will still be caught in pair programming. Other problems can be caught by a good static analysis tool. And most of these teams are also writing disciplined unit tests, probably following TDD. They’re not writing sloppy code.&lt;br /&gt;&lt;br /&gt;Solo programmers have an obvious problem: if you’re coding on your own, who’s going to review your code? You’re limited to self-reviews: setting the code aside for a while and then reviewing it on your own. This is more effective than you would expect. Jason Cohen says that programmers reviewing their own code can find as many as half of the issues that another reviewer would find, just by taking a second look. And solo programmers can also rely on static analysis tools to find some problems.&lt;br /&gt;&lt;br /&gt;Reviews don’t need to be a big deal, you don’t need formal review meetings. And there are tools to help make reviews cheaper, easier and more effective. So, what about the rest of you? Why aren’t you doing code reviews? What’s your excuse?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-6069798453676546812?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/vjTLLmtnItU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/6069798453676546812/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=6069798453676546812" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6069798453676546812?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/6069798453676546812?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/vjTLLmtnItU/not-doing-code-reviews-whats-your.html" title="Not doing Code Reviews? What’s your excuse?" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/05/not-doing-code-reviews-whats-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMMRngzeyp7ImA9WhZXFU8.&quot;"><id>tag:blogger.com,1999:blog-5028009537158799436.post-5156987273968248421</id><published>2011-05-04T08:26:00.000-07:00</published><updated>2011-05-04T08:38:07.683-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-04T08:38:07.683-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="devops" /><category scheme="http://www.blogger.com/atom/ns#" term="Continuous Deployment" /><title>Continuous Deployment is no Holy Grail</title><content type="html">In &lt;a href="http://www.agileweboperations.com/prerequisites-for-continuous-deployment"&gt;Prerequisites for Continuous Deployment&lt;/a&gt; Dan Ackerson asked “What are your major obstacles to deploying continuously to your live servers”?&lt;br /&gt;&lt;br /&gt;This must have been a rhetorical question, since my response is “awaiting moderation”. Why ask a question if you don’t want answers?&lt;br /&gt;&lt;br /&gt;There are a number of obstacles to deploying meaningful changes continuously to live production servers, besides having a working Continuous Integration environment and following disciplined development practices.&lt;br /&gt;&lt;br /&gt;Making interface changes and certifying them with partners. Making database schema and data changes. Security checks. Destructive testing and stress testing for performance-sensitive online transactional systems. And so on. Most of the changes that people talk about releasing continuously are trivial: minor tweaks, cosmetic fiddling or small bug fixes. Anything bigger has to be done more carefully.&lt;br /&gt;&lt;br /&gt;Schema changes can’t be made continuously. Bigger functional changes can’t and shouldn’t be made continuously, even with dark launching. Etsy for example (one of the companies used as a poster child for Continuous Deployment), doesn’t continuously deploy bigger public-facing features. They take their time and design them and prototype them and test them and review them and plan them out with operations and customer support and product management like any sane organization. See &lt;a href="http://omniti.com/surge/2010/speakers/john-allspaw"&gt;John Allspaw’s keynote at Surge last year&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Ackerson talks about “sufficient” automated test coverage. Automated testing isn’t enough for every (any?) system or every (any?) company, certainly not automated testing at 35% coverage which is much much lower than say Jez Humble recommends in &lt;a href="http://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912/ref=ntt_at_ep_dpt_1"&gt;Continuous Delivery&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You also have to account for code reviews and security checks, which could be done before check-in. This is how some companies are able to achieve Continuous Deployment – they move some of the necessary and responsible steps like code reviews up before check-in, so you know the code is already pretty good.&lt;br /&gt;&lt;br /&gt;Too many descriptions of Continuous Deployment make it sound too simple and too easy. It’s not, and even organizations that have a lot of experience with it continue to have security and reliability problems: Facebook, Wordpress, …&lt;br /&gt;&lt;br /&gt;Yes there’s a lot to learn from Continuous Deployment, about streamlining and simplifying release and deployment, and reducing risk by breaking work down into smaller and smaller pieces and tying all of this together with ops monitoring and metrics. But it’s not the “Holy Grail of Devops”, or at least it shouldn’t be. There's a lot more to DevOps than Continuous Deployment, which is a good thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5028009537158799436-5156987273968248421?l=swreflections.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BuildingRealSoftware/~4/wa0AkXob-1g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://swreflections.blogspot.com/feeds/5156987273968248421/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=5028009537158799436&amp;postID=5156987273968248421" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5156987273968248421?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5028009537158799436/posts/default/5156987273968248421?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BuildingRealSoftware/~3/wa0AkXob-1g/continuous-deployment-is-no-holy-grail.html" title="Continuous Deployment is no Holy Grail" /><author><name>Jim Bird</name><uri>http://www.blogger.com/profile/17371102366836131341</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://swreflections.blogspot.com/2011/05/continuous-deployment-is-no-holy-grail.html</feedburner:origLink></entry></feed>

