1 software engineering prof. dr. colin atkinson 1 overview 1.find out why software engineering is...
TRANSCRIPT
1
Software EngineeringProf. Dr. Colin Atkinson 1
Overview
1. Find out why software engineering is important■ see some software engineering failures
2. Get acquainted with –■ the Chair of Software Engineering
■ the research
■ the people
■ the teaching
Accelerating Agile Development through Software Reuse
Colin Atkinson
Karlsruher EntwicklertagMay 9th, 2012
2
Software EngineeringProf. Dr. Colin Atkinson 2
Reconciling Agility and Reuse
■ software reuse and agile development have the same underlying goal -
■ to allow new applications to be built more rapidly andcost effectively
■ but they are usually not applied at the same time
■ agile processes almost exclusively focus on developing new software
■ Challenge ■ make reuse a central part of agile development
Analysis
DesignCode
Test
Reuse
3
Software EngineeringProf. Dr. Colin Atkinson 3
Component Reuse
■ Software Reuse■ “the process of creating software systems from existing software
rather than building software systems from scratch.” [Krueger 92]
■ software component markets famously proposed by McIlroy in 1968 [McIlroy 68]
■ the “holy grail” of software engineering, but has failed to take off to the extent expected or desired
■ Software Component■ any cohesive and compact unit of software functionality with a
well defined interface
■ includes simple programming language classes as well as more complex artefacts such as web services and EJBs
■ not focussed on “snippets”
4
Software EngineeringProf. Dr. Colin Atkinson 4
Why “Reuse” Did Dot Take Off
■ Historically, there were there main barriers to systematic component reuse
■ Not enough good components to reuse■ 200 was considered a lot of components in the golden
years of reuse research (1980s and 1990s)
■ Crude retrieval technology■ often returned a high proportion of unsuitable
components or missed many relevant ones
■ Unfavourable risk/effort balance■ chances of success through reuse too low to justify the
effort involved
5
Software EngineeringProf. Dr. Colin Atkinson 5
What’s Different Today
■ The situation has improved significantly since the turn of the millennium
■ Plenty of good components to reuse■ high bandwidth internet available to all
■ vast repositories of open source code
■ web service revolution
■ Advanced retrieval technology■ Lucene indexing engine
■ advanced retrieval algorithms
■ Radically different risk/effort balance■ unobtrusive component recommendation
tools becoming available
6
Software EngineeringProf. Dr. Colin Atkinson 6
Merobase
■ One of the largest software component search engines
■ more than 10 million components
■ Public Features
■ multiple component types
■ source code, binary code, web services, Android apps
■ hybrid search algorithms
■ keyword, name, interface, ..
■ lookup (library, documentation, ..)
■ service execution
■ metrics
■ ….
9
Software EngineeringProf. Dr. Colin Atkinson 9
Search Result Quality
■ The new generation of code search engines provides dramatically enhanced search quality
■ Average precision:
■ Signature-based search = 1%■ string-based search = 16%■ Name-based = 17%■ Interface-based = 54%
■ However, this is not enough to significantly change the “build or buy” trade-off
■ Probability of finding component that are really “fit for purpose” is too low compared to the effort involved in exploring reuse opportunities
Need higher precision■ Semantic search
10
Software EngineeringProf. Dr. Colin Atkinson 10
Test-Driven Search
■ most practical way of evaluating a component’s “fitness for purpose” is to test it -■ can deliver 100% precision
identify desiredinterface
compilecomponents
find matching components
establish acceptability
through tests
reuse
public void testTitleRetrieval () {
Movie movie = new Movie("Star Wars", 0);assertTrue(movie.getTitle ()
. equals("Star Wars"));}
public void testTitleRetrieval () {
Movie movie = new Movie("Star Wars", 0);assertTrue(movie.getTitle ()
. equals("Star Wars"));}
b)
c)
d)
e)
define desired semantics as tests
11
Software EngineeringProf. Dr. Colin Atkinson 11
Test Driven Search Example
■ desired interface
■ excerpt of JUnit test
public class Mortgage { public Mortgage(double rate, int years, double loan) {} public double MonthlyPayment() {} public double TotalPayment() {}}
public void testMortgage() { private Mortgage m = new Mortgage(4.5, 12, 250000); assertEquals(2250.02, m.MonthlyPayment(), 0.01);
private Mortgage m = new Mortgage(4.5, 12, 250000); assertEquals(324,002.94, m.TotalPayment(), 0.01); ….}
13
Software EngineeringProf. Dr. Colin Atkinson 13
Code Conjurer Eclipse Plugin
■ Seamlessly integrates Merobase driven search into the Eclipse development environment
■ Main Features
■ code-driven search
■ test-driven search JUnit test driven queries
■ unobtrusive (background) recommendation
■ component dependency resolution
■ interface recommendation
■ code metadata (metrics)
■ Interface adaptation
■ …
17
Software EngineeringProf. Dr. Colin Atkinson 17
Conclusion
■ Test-driven search fits naturally into agile, test driven development■ When used together with a test-driven development strategy like XP, test-driven
search makes the effort involved in finding suitable components almost zero
■ Is the key enabling technology for integrating reuse-oriented and agile development
■ can accelerate the agile development process
■ Get involved ..■ Code Conjurer http://www.code-conjurer.org/
■ use it, provide feedback, help enhance it (open source)■ make your own tools search-driven
■ publically accessible Merobase API■ create your own code search engine
■ merobase can crawl any content in CVS, SVN, .. repositories ■ Further information: [email protected]
18
Software EngineeringProf. Dr. Colin Atkinson 18
For Further reading
■ W. Janjic, M. Schumacher, Der Herr der Codes, Eclipse Magazin, 2.12, S&S Media GmbH, Frankfurt am Main, 2012
■ O Hummel, W Janjic, C Atkinson, Code conjurer: Pulling Reusable Software out of Thin Air, IEEE Software 25 (5), 2008