Welcome to TechnologyProfessional.Org

Advance the profession. Advance your career.

Login now!

Member Login

Lost your password?

Automating Fine Grained Software Reuse

May 21, 2009

Accelerating software development through code reuse has been a goal of IT since the invention of the subroutine. More recently, the technology industry has taken many approaches to reuse including object-oriented development and software as a service (SaaS). In Accelerating Agile Development through Software Reuse, Janjic, Hummel, and Atkinson discuss a tool designed to promote fine grained component reuse by matching test specifications against a code repository to find reuse candidates. The authors describe several ways that Code Conjurer can promote reuse with almost no impact to the way developers normally work.

The authors describe an interesting problem:

By minimizing superfluous activities and artefacts such as models and documentation and focusing developers’ efforts on coding, agile methods increase productivity and reduce overall development time. However, this focus on coding also has a down side—it means that new applications are typically written entirely from scratch.(Janjic, Hummel & Atkinson, 2009)

As an editorial note, the authors use the British spelling of several words which, out of respect for my British mother, I will not denote with “[sic].” I do not know of any data to support their claim, but it is an intriguing possibility that development methodologies encourage development and that focusing on development can subtly discourage reuse.

Fortunately, characteristics of the Agile methodology make it suitable for improvement:

Agile projects stand to benefit the most because they specialise in development at the level of fine grained components, and they offer the same basic value proposition as software reuse—accelerated development. They also emphasise the description of what components should do (i.e., tests) before the description of how they should do it (i.e., implementation) providing a ready made opportunity to search for potential reusable components before they are implemented from scratch. In short, there is a high potential synergy between agile development and software reuse which can further accelerate the software development process and lower costs. (Janjic, Hummel & Atkinson, 2009)

The fundamental point is that Agile is focused on developing systems in small increments, so it is well matched to reuse approaches that find opportunities to reuse small pieces of code.

Code Conjurer

Code Conjurer is a plug-in for the Eclipse development framework designed to address the challenge of software reuse in Agile by transparently matching test cases against existing code to find code that could pass the specified test. It is a radical concept that developers no longer need to think about reuse—the system finds opportunities for reuse as the developers work. It operates in the background and leverages search technology that is not dependent on a specific format or metadata, so the creation and maintenance of a code repository does not require additional work. Most documentation that is not automatically generated quickly becomes outdated, so this advantage is important. In short, Code Conjurer minimizes work and minimizes changes for the developer.

Code Conjurer works with test cases and presents benefits in an Agile or Extreme Programming environment. Code Conjurer encourages Test Driven Development (TDD). Beginning with requirements, designing tests to ensure the requirements are met, developing code to pass those tests, and then verifying the code through testing is a method to ensure traceability of requirements from the beginning to the end. Proponents of TDD also suggest that it generates the least amount of code, since you only write the code absolutely necessary to pass the required tests. In the TDD context, Code Conjurer saves a significant amount of work because it finds opportunities for reuse before detailed design of the fine grained modules is done.

For those wishing to learn more, access the Code Conjurer home page. Also, Janjic, Hummel, and Atkinson have written a more extensive introduction to the tool for the IEEE Computer Society. I would love to hear any hands-on experience with Code Conjurer from our readers.

A Fool with a Tool

A friend made an important caveat: The authors were assuming some characteristics of Agile that are not necessarily inherent in the Agile Manifesto. In other words, the Agile approach is not prone to limited reuse, but some implementations may be or some teams may be. I suppose that was a polite way of saying “a fool with a tool is still a fool.” Agile aside, technology leaders need other resources in addition to methodology to improve efficiency by maximizing reuse. Tools like Code Conjurer are one possibility, and in a follow-on article, I will discuss approaches to large-scale reuse.

One Response to “ Automating Fine Grained Software Reuse ”

  1. Jan on May 31, 2009 at 11:17 am

    In software test mechanization reuse of code is crucial, which means that planning, design and a good understanding of where reuse will and will not work are the keys to making reuse work. A main point that the article focuses on is scope; if you were to look at application development with rationalization regarding reuse, you will undoubtedly discover that there are parts that are clearly unique to given parts of the application.

Leave a Reply