Erik Petersen's blog
De-smelling by refactor or rewrite: some thoughts
Submitted by Erik Petersen on Sun, 17/01/2010 - 02:14. design & developmentIs there a tipping point when rewriting code should be favored over refactoring ? It is often hard to decide. There are some important factors that can help. Code smells cluster, whether as bugs that are detected, or potential failures lurking in immature code that may break during future updates or maintenance. Steve McConnell wrote (in “Rapid Development”) that “Error prone modules tend to be more complex than other modules in the system, less structured and unusually large. They often were developed under excessive schedule pressure and were not fully tested”. He also quotes indicative studies that these modules are much more expensive to develop. Steve’s metric is 10 defect per 1000 lines of code to mark a module for further work. If it appears to be an error prone module, he advises rewriting it. Other indicators are large concentrations of bugs, large number of checkins, or large amounts of fix time spent in comparison to similar modules. While error-prone modules are typical in traditional development, agile practices like well executed TDD should minimize them. High cyclomatic complexity of code is also a good indicator of the need for simplification.
The hard thing is determining the tipping point between refactor and rebuild. The easy thing is that because of clustering, there is often a lot of low hanging fruit, and focused effort on a small portion of the code should have a massive impact on the code quality.
For more on bug clusters and other productivity ideas, see my Google tech talk “Building Software Smarter”, http://www.tinyurl.com/80-20-rules
Severity One outage - on a golf course??!!
Submitted by Erik Petersen on Sun, 06/12/2009 - 09:39. acceptance testing | events | metaphors | usability testingI never really realized the parallels between software development and golf course layout. Both have a technical component, and a reliance on usability. The Australian (Golf) Open moves from city to city each year, and has a hiccup every so often. This year they had a five hour outage.
How do you get an outage in golf? While not in the infamous class , this years competition was held at a cliff top course in Sydney overlooking the ocean. Spectacular but windy. A savage wind blowing balls the width of the green had players blowing par just with their putters. A 5.5 hour delay to play was called by which time the wind speed had halved. The outage confused the local players who said those conditions were typical and just “par for the course”. The greens were all very fast, 10.5 based on their stimpometer score, much higher than the 8 recommended by some players before the tournament started. While the golf club staff ignored the advice, they had tried to slow 4 of the faster holes. The rest of the tournament was played sucessfully in windy conditions that kept the flags taut but didn’t move the balls.
If you could only follow one agile practice, what would it be?
Submitted by Erik Petersen on Thu, 19/11/2009 - 12:55. agileAt the MXUG meeting this week, Steve Hayes was volunteered into giving a lightning talk. He asked for a suggested topic, and someone said “If you could only follow one agile practice, what would it be?” My instant comment was “Standups”. Later on Steve spoke about Kent Beck’s revised agile values condensed down to the trio of Accountability, Responsibility, and Transparency (which has good and bad aspects he said). Any practice that supported this would be good, but Steve chose retrospectives. I added my 2 cents worth that I would choose standups if quality was a major goal, as studies have shown that lack of communication in groups creates bugs particularly in larger teams. Linda Hayes has written about this, as has Mike Cohn in Chapter 10 of his new book . Standups also function as mini-retrospectives as well. They start conversations that continue after the meeting to help team members get better understanding of what they are delivering.
Standups have now moved beyond software development and are infiltrating other industries; I recall reading about the new HQ of an advertising company that has meeting rooms without chairs and bar counter tables to only allow standups (and cocktail parties!)
Cool Tools - for customer data etc
Submitted by Erik Petersen on Thu, 05/11/2009 - 07:40. functional testing | test automationTest data is often a bottleneck on testing projects. Security and privacy issues can require complex massaging of existing information, Today, there are tools to make it easy to create it from scratch! I find two in particular quite useful.
I’ve been telling people about generatedata.com for several years. It is an amazing tool for generating data for customers or other items, including items chosen from lists and data ranges. It is free, customizable and can even be run off a USB (after it is customized for the computer and database etc).
Lewis Hamilton, agile tester?
Submitted by Erik Petersen on Tue, 28/07/2009 - 01:56. acceptance testing | agile | metaphorsLewis Hamilton became the youngest Formula One racing car champion last year, in spectacular circumstances with a last gasp fifth place in the last race. This year, as tabloid headlines screamed “hero to zero”, his success has been measured by trying to avoid being lapped by the leaders and ending a five race drought without winning a point.
Apollo 11 glitches: the alarming 1202, the 4 sec fastforward and the soft landing bug
Submitted by Erik Petersen on Mon, 20/07/2009 - 08:33. events | perspectivesSluggish starts slow subsequently successful Service screening streams
Submitted by Erik Petersen on Thu, 09/07/2009 - 07:24. events | non-functional testing | perspectivesBreaking News breaks records across the net
Submitted by Erik Petersen on Fri, 03/07/2009 - 07:18. events | non-functional testing | performance testing | perspectivesThe website TMZ.com broke the story 20 minutes after his passing, then went down briefly under the load. The LA Times was the first news site, and it fell over soon after. Online news services saw a 20% increase in traffic, but the availability of popular web news sites dropped from 100% to 86% and didn't return for another 4 hours.
