How it works Static code analysis Technical paper

Choose a category:

Glitch Watch - Wal-Mart gift card confusion

December 28th, 2007 by Nigel Cheshire. Posted in Glitch Watch

Some Cincinnati city workers got a Christmas bonus in their pay packets this week, while others were left short during the gift giving season. A problem with the city’s payroll system meant that some employees had their salary deposited twice into their bank accounts, whereas others received no pay at all. Employees usually get paid on Tuesdays, and according to city spokesperson Meg Olberding, the city was “trying to be nice” by giving employees access to their money before Christmas.

Meanwhile, in Melbourne, Australia, the city’s famous “Nylex” clock will not be telling the time until the new year. According to the Melbourne Herald Sun, corroded electrical circuits somehow caused a software failure, stopping the digital clock. Although the hardware can be fixed, the company responsible for fixing the software is closed for the holidays.

nylex.jpg

Finally, some people who received Wal-Mart gift cards from Santa have been having problems redeeming them. Some cards did not work at all, while others needed a few attempts before they would be accepted. Wal-Mart blamed the problem on a software glitch with an unnamed supplier who is responsible for verification of the cards.Happy new year to all - see you in 2008.

Video: Formal Metrics Programs

December 27th, 2007 by Rich Sharpe. Posted in Enerjy.tv, Process Improvement, Software Quality, Software Quality Metrics

Last week, an article on sqazone reported on the results of an independent study commissioned by Forrester Consulting into large development organizations. The conclusion, in a nutshell, was that “the cost and complexity of metrics collection, and the reliance on superficial metrics – conspire to deter application development organizations from attempting to improve their metrics programs.”

This is a sad but true observation on an area we have been evangelizing about for a few years now. Implementing a metrics and measurement program is not easy, and interpreting the data and feeding it back into the SDLC in a meaningful way is harder still.

Coincidently, I asked several speakers at the Agile Development Practices Conference in Orlando, FL, why they thought organizations were slow to create or adopt a formalized metrics program. Here are their thoughts.


Video thumbnail. Click to play
Click To Play

Glitch Watch - Whole Foods a model for others to follow

December 21st, 2007 by Nigel Cheshire. Posted in Glitch Watch

Glitch Watch takes us to the Norwegian city of Trondheim this week, where motorists who used their bank debit cards to pay for parking in municipal spots were charged anywhere between $37,000 and $148,000. Apparently the amount of time they parked was being multiplied by 10,000. Parking official Steinar Myhr said, “I’m sure some saw the humor in it.” Perhaps they did.Meanwhile, in Oregon, there were at least 200 reports of Turbotax software erroneously diverting taxpayers’ state kicker rebates into a voluntary contribution to the state school fund. After filing their returns, instead of receiving a check, Oregonians have been receiving thank-you letters from the state. The state’s reaction? “There is no provision in law to reverse the donations.”

This Whole Foods store is in New York City

Our favorite story of the week comes from Hartford, CT. It’s a heart warming tale of a big company oozing Christmas spirit, or at least doing the right thing in the face of a software glitch. When the system controlling the cash registers crashed last week on a busy afternoon, the store manager quietly allowed shoppers to check out without paying. Manager Kimberly Hall said: “It was clearly a snafu on our end, and it didn’t seem right to punish the customers by making them wait.” Doesn’t that warm the cockles of your heart?Happy holidays to all.

A unit testing stocking stuffer

December 19th, 2007 by Rich Sharpe. Posted in Books, Software Quality, Unit Testing

The relatively recently released ‘Next Generation Java Testing – TestNG and Advanced Concepts’ by Buest and Suleiman deserves a place on any self respecting developer’s bookshelf, and I personally think this is one of the best-written technical books of the year.

Obviously, this book is about TestNG (co-created by Beust) but even if you use a different unit testing framework like JUnit, the concepts and ideas are very relevant and worthwhile. Unlike some other books that feature specific tools, I was pleasantly surprised that the authors didn’t just try to ram TestNG down the reader’s throat.

The book starts with reasons why TestNG was created and some discussion of the shortcomings of JUnit, although my interpretation of the “Next Generation” part of the title is because TestNG incorporates some aspects of Integration Testing rather than pure Unit Testing which is the focus of JUnit.

Arguments for and against certain testing techniques are prevalent throughout the book, leaving the reader to determine which is best for their own situation. A good example is the authors’ opinion on TDD. Buest and Suleiman suggest that one of the potential pitfalls of TDD is that it promotes micro-design over macro-design but at the same time promotes developers thinking about exit criteria of their code.

One of the more advanced topics covered is JEE testing, and the book shows design patterns on how to test in-container applications (including EJB3) and how to eliminate troublesome aspects of existing code that are hard to test, and which you do not need to test anyway – such as JNDI and JDBC APIs.

All examples start simple and then move on to explain and demonstrate how the idea would work in a real situation. And, as I already noted, the examples are not confined to just the TestNG tool. There are good definitions of various code coverage tools and the different way they work as well as introductions to testing using different frameworks such as Spring, Guice, Selenium and various xUnit frameworks.

The authors’ view on emergent tests is interesting since, coincidently, this was a theme common with the speakers on our ‘Unit Testing a Large Legacy Code Base’ video:

“Unit tests do not have to be written before any other test…they can be derived from functional tests…Some functional tests will be written from requirements and satisfy a core piece of functionality. Over time these tests can be broken up into smaller Unit Tests to narrow down bugs.”

The final chapter, Digressions, I believe is something that should be covered in every technical book. This contains topics that are somewhat connected to the title of the book but not close enough to warrant their own detailed chapter, and also makes a very enjoyable read.

There is a rather large disclaimer at the start of the chapter stating that it is the authors’ opinion only. I found myself either nodding my head in complete agreement with their opinions or gnashing my teeth in complete disagreement.

Their opinion on pair programming is that an expert/novice pairing is unlikely to work, as the expert will get bored and lose motivation quickly. This is surprising to me as, personally, I believe that there is an argument for pair programming to be used as a mentoring technique and a way for expert programmers to help novices.

I can see this book becoming a regular fixture on developers’ desks in the future, regardless of whether they use TestNG or not. I feel this book is more suited to developers who are already unit testing and want to increase their skill set in this area and need some help on more complicated areas to test. If you currently do not perform unit testing then ‘Pragmatic Unit Testing in Java with JUnit’ by Hunt and Thomas is my recommended place to start - or you can wait for my upcoming blog post on a comparison of JUnit, TestNG and FIT.

Unhelpful error messages - number 327

December 18th, 2007 by Nigel Cheshire. Posted in Software Quality, Unhelpful Error Messages

Couldn’t resist posting this one, that appeared this morning when I fired up Photoshop. I clicked “OK”, and everything continued as normal. Except I am left with a slight queasy feeling.

Photoshop Error Message

Video: Unit Testing Legacy Code

December 17th, 2007 by Nigel Cheshire. Posted in Enerjy.tv

Rich is on the trail of industry luminaries again, this time asking them their advice on unit testing large legacy code bases.


Glitch Watch - Integer overflow edition

December 14th, 2007 by Nigel Cheshire. Posted in Glitch Watch

Nearly 300 jurors in Norfolk, VA were being tracked down this week after it was discovered that they had been paid twice for jury duty back in November, owing to a glitch. The checks were for either $30 or $60, and apparently couldn’t be cashed in any case.

Now to Guam, where the Guam Power Authority announced that about 1,300 customers who paid their bills online had been charged twice. Apparently an error message appeared after the card had been charged, and when the user closed out the message, their card was charged again. By the way, if, like me, you are wondering where Guam is, it’s a U.S. territory in the western Pacific, pretty much due north of Australia. So now you know.

Guam

Finally, our favorite story in this week’s mailbag was from the much less exotic Baltimore, MD, where the state Department of Human Resources just announced that about 2,400 people who do not qualify may have received public aid payouts. The Baltimore Sun reports:

The agency is required to routinely compare its database against deaths, lists of inmates in local detention centers and prisons and the public assistance rolls in other states. But because of a quirk in the agency’s software, auditors found, the periodic checks were comparing the external databases to only 65,000 names, not the full 800,000.

Hmm… I wonder why it would cut off at 65,000…

More on Agile Practices conference

December 12th, 2007 by Rich Sharpe. Posted in Software Quality

Every session I attended at the Agile Development Practices conference last week was excellent! My favorite was J.B. Rainsberger’s “Refactoring; where do I start?” He discussed how just 30 minutes practice a day refactoring can increase your productivity ten-fold in the future.

The content of Andy Hunt’s closing Keynote ‘”Looking toward the Future of Agile” was something I was not expecting. Hunt discussed how traits in different generations are cyclical, and that the way people approach problems and the way they act will change the way applications are worked on in the future. For example, the Millennium Generation (1982-2005) has traits that lean towards teamwork while the Generation-X’ers (1962-1982) are “ferociously individualistic,” possibly leading to the eradication of the stereotypical “hermit” developer locked in a windowless office for 14 hours a day. Of course there are always exceptions ;-). This talk was recorded and I really hope that it appears on the web as it is definitely worth an hour of anybody’s time.

It wasn’t only the sessions that were great. Open Spaces was a session in which anyone could stand up and discuss any topic that the audience could comment/agree with/challenge [delete as applicable]. Also, many conversations were held all around the main conference hall and in pockets up and down the main corridor. Rob Myers had some great comments on TDD which I wasn’t fast enough to capture on video - maybe next time.

My only critique of the conference would be that many of the sessions were based on more general overview topics that I would expect to see at Agile 200X. As this was the “Development Practices” conference, I had hoped there would be more sessions that include actual code examples, or more case studies about what happened at retrospective meetings between iterations, and if the results improved during the next Iteration.

Stay tuned for more mini-interviews from the conference as I get around to splicing them together.

Video: Agile Development Practices 2007

December 10th, 2007 by Rich Sharpe. Posted in Enerjy.tv, Software Quality

Last week, I attended the Agile Development Practices conference in Orlando, Florida. This was the inaugural conference and appeared to be based on a merging of Agile 2007 and SD Best Practices.

I went armed (and dangerous) with a small video camera and I tracked down a few speakers and other influential ‘Agileists’ for a new concept for our blog – Enerjy TV.

I would like to thank everyone who agreed to be interviewed; including Alan Shalloway, J.B. Raisberger, Jean Tabaka, Rob Myers, Jared Richardson, Chris Spagnuolo, Tom and Mary Poppendeick, James Shore, Rachel Watson and Ken Pugh.

Over the next few weeks I’ll be slicing and dicing the raw footage to bring together these experts’ opinions on various topics such as unit testing, legacy code and why they believe the industry is slow to adopt formal metrics and measurement.

As this was an Agile Conference my first question was; ‘What Part of the Agile Process do you think gives the developer the greatest benefit?’ Here’s what they had to say:

Glitch Watch Extra - Microsoft kills Santa

December 7th, 2007 by Nigel Cheshire. Posted in Glitch Watch

Somehow, I forgot to include this story in this week’s Glitch Watch. Microsoft killed its “artificial intelligence” based Santa-bot this week after it was discovered that the bot was prone to talking dirty to children. Caveat: there’s some ripe language behind that link!