Monday, September 21, 2009

Legacy Adventures 1 -- Characterization Tests

Working with legacy code cannot be avoided. Even R & D and open-sourced projects tend to involve a lot of maintenance programming. Working with another programmer's code has become a rite of passage, and many find it tedious. I'm pretty sure any developer would rather write new code than work with old code.

For those of you with a more advanced understanding of programming, working with legacy code can be a rewarding exercise. For one thing, most legacy code tend to behave as expected. If you're fortunate enough to be maintaining something with unit tests, count yourself as lucky. However, if the code does not have tests, then it's time to write some.

Even if the legacy code already works, writing tests are still important. Your changes should not break existing functionality. Tests written this way are called characterization tests. Such tests will look like a waste of time at first, but at least you don't have to bother somebody from QA to know if something is awry.

For example, I recently had a project in VB6. The code generates XML from a formatted string. They wanted me to read the data in one set of nodes, look it up in a database, and then swap the data given a set of business rules. My characterization tests tested all the nodes that did not get their data swapped. I was now free to code the new functionality.

So, working with legacy code isn't really a bad thing. You can learn many lessons from legacy code. Assuming you're working with well-written code, you can learn how to program properly. And even if you're not working with properly written code, you can practice skills that will make you write better code, or at least learn which programming styles create headaches.

--Jon Abaca
Codelean programmer
and consultant

Friday, September 11, 2009

Codelean’s 2nd ScrumMaster Certification Course—Raising Awareness of Agile Software Development in the Country

Codelean, Inc.’s second ScrumMaster Certification Course, held recently at the Dusit Hotel in Makati City, continued to raise awareness of Agile software practices in the country. The course was an even bigger success than the first one, with 25 attendees from software companies of different industries. Once again, Dutch Agile expert Bas Vodde was on hand to lead the discussion for the two-day event, which featured a mix of lectures, discussions, and participatory exercises designed to instill the values and philosophies of Scrum among the attendees.

Ronaldo Rebenque of US Autoparts (Philippines) remarked that the course was “very informational.” He added, “It gave me the know-how, tools, techniques, and concepts that I can use in future projects.” Butch Landingin, CTO of Orange & Bronze, also gleaned a lot of practical knowledge from the course. “Bas has a lot of practical experience with Scrum and he’s been sharing a lot of those stories. I found those stories to be the most valuable part of the course,” said Landingin. “We will be changing some of our company’s practices because of what we’ve learned in the course. “

Both professionals highly recommend the course to other companies. “I would definitely recommend the course to everyone in software development teams, not just the project leaders, but the developers, testers, analysts, architects,” said Rebenque. “Because Scrum is about self-managing teams, everybody will be responsible for managing their work.”

With the aim of promoting Agile practices in the local software industry, CodeLean is set to hold two more Scrum courses soon: the Product Owner’s Course in December or January, and another ScrumMaster Course in February. CodeLean has also sponsored an initiative named Agile Philippines.

CodeLean is a training and consulting services company that specializes in technical training and coaching in Agile methodologies, as well as provides consulting to companies who need to improve the efficiency and management of their IT department .

For more information about CodeLean, visit www.codelean.com. The Agile Philippines web site is located at www.agile.ph.