Report - Back to School II - software re-engineering using visualization

14-06-2011

This report is written by Galina Slavova(@Galinas). Many thanks Galina!

(The official language of this meeting was English. So is this report ;-))

Designing and implementing software systems is more like building a whole city infrastructure and not just a house. And sometimes there are systems that have been expansively developed and maintained for more than 15 years. The scale of the latter is comparable with that of a mega polis!

Tonight we are in building “36” of Delft University of Technology, indulging ourselves with a warm meal and chatting with each other at this new Devnology meeting. A decent group of around 35 people had come for the lecture of Assistant Professor Martin Pinzger. Topic is software evolution, reengineering and data visualization of source code.

The focus of this lecture is on “brown-field” development and the challenges of a growing code base, that is subject to continuous changes and maintenance. Picture this: some 50 to 75% of the time is spent on maintenance where 60% of the whole is spent on just understanding the source code. Here comes a dilemma: what is more expensive – redesign and restructuring of the system or letting it be as is?

Big and wildly growing software systems are very common and if one accepts the task to understand such a system by means of reverse engineering then there are several maxims and techniques that can be handy to use: 

  • communicate with developers and end users and verify what has been said
  • read the code in 1 hour e.g. look for contracts and scan the larger structures, classes with a huge “fan-out”, and eventually, abstract methods that are high in the hierarchy
  • skim documentation, tie code and questions
  • compile the code and do a mock installation, and debug
  • refactor some of the code in a lab environment in order to understand it 
  • understand the code evolution by looking in the source repository

Known tools for code visualization in height, width and color are CodeCity and X-Ray. JDeodorant is good for detection of “code smells”.

Martin goes on with his cordial lecture that invokes questions and leads to discussions in the audience. Some people find it good enough to have “red giant” classes that stay stable especially when they “work” and the budget doesn’t allow redesigning. So if the code “smells” is it a must to go and refactor immediately? If not, then when does the engineer come to the point that he really badly needs to refactor? Note stakeholders do not pay for refactoring!

The evening continues with the usual “fishbowl” discussion. Imagine two circles: one small with four chairs and one big around it. Sitting in the small circle gives the privilege to talk. The outer circle is listening.

What stays in the heart of the discussion is: how should metric tools be interpreted? Of course they point to some abnormalities like too many lines of code or “day fly” classes (which appear in the source control repository one day and the next day they are gone). These metrics tell a story about the development process and the behavior of the team in the code evolution. They are arbitrary and do not necessarily express whether the team works efficiently or not.

Anyway, if it comes to pair programming or just sharing a programmed solution to a particular problem with a fellow developer on the other side of the world then writing a small and disciplined piece of code repays the effort and shows the elegance of this craft.

Thanks to Devnology for the well organized and interesting evening!

{artsexylightbox flickrNumberOfImages="54" flickr="Devnology" flickrSet="72157626795870687"} {/artsexylightbox}

News @devnologynl

@michielovereem @JoyOfCoding OOOOPS! It is June 30th!

21-03-2017 at 09:20

RT @JoyOfCoding: Very early bird tickets available for the fifth anniversary conference! Check out our new web site and order yours https:/…

09-03-2017 at 08:47

@JeroenSoeters The jury’s still out on that one. Come and talk to us in April :)

06-03-2017 at 15:27

Qwan 5dff39510bacfcefb54e89f953eddfc1a7a21185b7128d96ff6b466f56acb6d9
Macaw 06e9331a5321067b592bf45ea39db7df6792dc976000d24d3ee4043d99203514
Finalist e304343cdbeb0996cc1e7a26527993a5fa2db87ca53a81fb15dca22a35d7f28c

Devnology is a non-profit organisation and thus depends on sponsors. Thanks to our wonderful sponsors all Devnology events are free!