Friday, December 23, 2011

The Code Christmas Tree



The Code Christmas Tree is a technique used to visualize the quality of your code. It is based on a treemap which is an information visualization technique to display hierarchical or tree-structured data as a set of nested rectangles. Branches are represented by rectangles and sub branches are represented by smaller rectangles and so on. The leaf node’s rectangle has an area and color proportional to a specified dimension of data. In the case of the Code Christmas Tree these can be lines of code, cyclomatic complexity, and test code coverage. The different colors and sizes make it easy to see patterns that would be difficult to spot in other ways. Looking at the tree you can quickly identify which code areas are clean and which ones need more tests or major refactoring.



The chart examples shown here were generated by Michael Kaiser and Guy Royse using a utility that displays Big Visible Metrics (BVM). It takes XML metrics generated by Sonar and parses the data and converts it to CSV data that is then consumable using the Microsoft Treemapper and Excell Add-in to generate these colorful charts. The size of the rectangle represents lines of code. The color represents cyclomatic complexity or test coverage. The large red rectangles are the code targets that need to be refactored or need increased code coverage. BVM is on GitHub and you can find out more about it here.


Adapted from The Code Christmas Tree @Agile2011

Tuesday, December 13, 2011

Draw me a picture

Draw me a picture is a retrospective technique that can be used when people are tired of the same old routine and when verbal communications are failing.

The process is as follows:
  1. Ask the attendees to silently reflect on the on the events of the last iteration or release 
  2. Ask them to draw a picture reflecting their feelings 
  3. Place the picture on the wall
  4. In turn, let each participant describe their picture and provide a title
  5. Try to observe patterns to highlight significant events or impediment


Adapted from: Putting the fun back in your retrospectives @ Agile2011

Tuesday, December 6, 2011

The 1st ever bug


In 1946, the 1st ever case of a bug was reported when an actual moth trapped in the relay of a Mark II caused it to malfunction. The bug was removed and taped into a log book and recorded as the 1st actual case of a bug being found! The log book (with attached moth) is on display at the Smithsonian National Museum of American History. How’s that for error tracking!


The term bug however was coined earlier as records show that Thomas Edison used it in 1878:

“It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise—this thing gives out and [it is] then that 'Bugs' — as such little faults and difficulties are called—show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached.”

Adapted from: Refactor your wetware @ Agile2011