3. Reverse engineering is analyzing a subject system to:
identify components and their relationships, and
create more abstract representations.
Chikofky & Cross, 90
20. How large is your project?
1’000’000 lines of code
21. How large is your project?
1’000’000 lines of code
* 2 = 2’000’000 seconds
22. How large is your project?
1’000’000 lines of code
* 2 = 2’000’000 seconds
/ 3600 = 560 hours
23. How large is your project?
1’000’000 lines of code
* 2 = 2’000’000 seconds
/ 3600 = 560 hours
/ 8 = 70 days
24. How large is your project?
1’000’000 lines of code
* 2 = 2’000’000 seconds
/ 3600 = 560 hours
/ 8 = 70 days
/ 20 = 3 months
25. How development happens
fo
rw
ar
d
en
gin
ee
rin
g
{ {
{ { { {
} { {
}
} actual development } }
} { } } }
26. Reengineering is needed to regain control
fo
rw
g
rin
ar
ee
d
gin
en
gin
en
ee
se
rin
erv
g
re
{ {
{ { { {
} { {
}
} program transformation } }
} { } } }
27. Reverse engineering is creating high level views
g
rin
ee
gin
en
se
erv
re
{ {
{ {
}
}
}
} { }
28. Legacy
a sum of money, or a specified article, given to
another by will;
anything handed down by an ancestor or predecessor.
Oxford English Dictionary
29. A legacy system is piece of software that
you have inherited, and
is valuable to you.
30. Reverse engineering is creating high level views
g
rin
ee
gin
en
se
erv
re
{ {
{ {
}
}
}
} { }
31. Setting direction
First contact
g
rin
ee
gin
Initial understanding
en
se
Detailed model capture
erv
re
33. Setting direction
g
First contact
rin
ee
gin
Initial understanding
en
se
er
Detailed model capture
v
re
34. You got to be careful
if you don't know
where you're going,
because you might not
get there.
Yogi Berra
35. Setting direction patterns
Set Where
direction to start
Agree Most valuable
on maxims first
Maintain Coordinate What not What
direction direction to do to do
Appoint Speak to the If it ain’t broke Fix problems
a navigator round table don’t fix it not symptoms
How to do
Keep it simple
36. Setting direction
First contact
g
rin
ee
gin
Initial understanding
en
se
er
Detailed model capture
v
re
37. First contact patterns
Talk with Talk with
developers users
Talk
Chat with Interview about it
maintainers during demo
Verify what Read Read about Compile
you hear the code the code the code
Read all code Skim Do a mock
in one hour documentation installation
38. Interview Chat
during demo with maintainers
What is the usage? What is the history?
Users complain Developers
Users are enthusiastic protect their job
Who to choose? What to ask?
39. Interview Chat
during demo with maintainers
What is the usage? What is the history?
Users complain Developers
Users are enthusiastic protect their job
Who to choose? What to ask?
Remember, they are all humans :)
40. What to ask a maintainer?
How long was your project going on?
Who worked on the project?
What was the most interesting bug you had to fix?
Why was the reengineering effort started?
How do you release?
How do you plan what to do?
How do you test?
46. Setting direction
First contact
g
rin
ee
gin
Initial understanding
en
se
er
Detailed model capture
v
re
47. Initial understanding patterns
Top down
Recover
design
Speculate
about design
Iteration
Analyze Study
persistent data exceptional entities
Recover Identify
database problems
Bottom up
51. Setting direction
First contact
g
rin
ee
gin
Initial understanding
en
se
Detailed model capture
erv
re
52. Detailed model capture patterns
Tie code and
questions
Track your Expose
understanding design
Refactor
to understand
Expose Encode
collaborations assumptions
Step through Write tests
execution to understand
Expose
contracts Expose
evolution
Look for Learn from
the contracts the past