{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Introduction\n", "\n", "Refactoring in software development is a very non-transparent thing for non-technical people. Especially big refactorings leave stakeholders like product owners or managers in uncertainty about the process of (well-needed) technical improvements.\n", "\n", "In this blog post, I want to sketch an idea how we as developer could possibly communicate the work \"under the hood\" by using visualization. \n", "\n", "We use jQAssistant/Neo4j and Pandas/pygal to report the status of technical improvements." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# The idea\n", "Thant to tools like jQAssistant, we have access to the underlying structures of our software. Almost every entity our software system consists of is connected with further entities via a relationship:\n", "* A Java class depends on a Java type\n", "* A class may declare fields that are written by a method\n", "* An interfaces might have been changed by a Git commit\n", "\n", "and so on. All this data is scanned by jQAssistant and stored into the Neo4j graph database.\n", "\n", "We can also associate problems (or \"refactoring opportunities\") with the entities of our software system. E. g. we can connect finding from FindBugs to classes, detect oven changing but buggy code or even create our own code smell detection algorithms for spotting ugly race conditions in our software.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Case Study\n", "In our scenario, we want to communicate the effort necessary to change the access to the database. We've decided that it is no longer a good way to communicate directly over a JDBC mechanism because there are already good alternatives out there like the Java Persistence API.\n" ] }, { "cell_type": "code", "execution_count": 68, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | class | \n", "count | \n", "fqn | \n", "lines | \n", "
---|---|---|---|---|
0 | \n", "org.springframework.samples.petclinic.Petclini... | \n", "0 | \n", "org.springframework.samples.petclinic.Petclini... | \n", "110 | \n", "
1 | \n", "org.springframework.samples.petclinic.model.Ba... | \n", "0 | \n", "org.springframework.samples.petclinic.model.Ba... | \n", "44 | \n", "
2 | \n", "org.springframework.samples.petclinic.model.Na... | \n", "0 | \n", "org.springframework.samples.petclinic.model.Na... | \n", "45 | \n", "
3 | \n", "org.springframework.samples.petclinic.model.Owner | \n", "1 | \n", "org.springframework.samples.petclinic.model.Owner | \n", "151 | \n", "
4 | \n", "org.springframework.samples.petclinic.model.Pe... | \n", "0 | \n", "org.springframework.samples.petclinic.model.Pe... | \n", "53 | \n", "