Only Software matters

Experiences in software development

Archive for September, 2013

SonarQube meets scm statistics

Posted by Patroklos Papapetrou on September 21, 2013


Software quality is about a lot more than slinging good code. As a developer you use numerous tools, techniques, frameworks, and processes as you write, organize, build, test, refactor, and continuously improve your applications. SonarQube (Sonar), a free and open source quality platform, makes it radically easier to track, manage, and enhance the overall quality of your code. It leverages respected tools like Findbugs, PMD, and Checkstyle, and implements well-established best practices to provide a full-featured, robust platform for code quality measurement, review, and remediation. Originally Java-only, SonarQube now works with many other languages.

On the other hand your source code is (or at least should be) placed at a repository. Have you ever wondered who’s the developer that performs most commits or what time of the day dev-teams use to commit their changes back to the code base. These are some of the questions you can get by analyzing scm change logs. There are a few well-known open source tools (http://www.statsvn.org/,  http://gitstats.sourceforge.net/http://statcvs.sourceforge.net/ ) for that purpose but each one of them handles only one scm type and all seem to be somehow deprecated. But the need of getting statistics about your code base still exists.

So some months ago I decided to start implementing the SonarQube SCM Stats plugin that gathers statistics from project’s source control repository and graphically display them in various ways. Currently the plugin – already in its third release –  focuses on collecting change logs for the most famous repository types. Git, Subversion, CVS, Mercurial , Perforce are partially or fully supported and after proper manipulation the plugin displays a SonarQube dashboard with the following graphs :

  • Commits / Author : displays only the top 10 authors ( list and pie chart views)
  • Authors activity : displays a stacked 3D bar chart about top 10 authors activities types : New files, modifications and / or deletions(red)
  • Commits / Hour :  displays in a bar chart the number of commits per clock hour
  • Commits / Day : displays in a bar chart the number of commits per week day
  • Commits / Month : displays in a bar chart the number of commits per month

And that’s only the beginning. In the next couple of months I intend to add some more graphs about file types, authors activities and of course improve and extend the coverage of other scm types.

If you already use SonarQube for tracking the quality of your source code, then SCM Stats plugin is a useful add-on that let you discover the secret statistics of your code base. Why don’t you give it a try?

 

Don’t forget to follow me at Twitter or connect with me at LinkedIn or subscribe to this blog’s RSS feed.

Advertisements

Posted in software, sonar | 1 Comment »

Books and Conference talks about SonarQube and Technical Debt

Posted by Patroklos Papapetrou on September 21, 2013


As some of you may already know, I have the chance to be one of the SonarQube ( ex-Sonar ) in Action book authors. All these months, writing this book was a great experience. I got to know many people from our publisher ( Manning Co. ) and learn from the best how to write easy-to-read technical books. 

SonarQube in Action is a couple of weeks before printing and I’d like to grab this opportunity to let you know some of the events that are with one or another way related to this book. 

Starting from this week (24th of September), SonarQube in Action will be the promoted book from Java Ranch . Join the conversation, ask questions to the book authors, and you might be one of the five winners that will be given a free e-book copy.  I’ll be very glad to answer to all your questions about software quality and how SonarQube can make your life easier.

Next stop is Sweden and Oredev conference first week of November. I’ll give a speech about tracking and improving Software Quality with SonarQube and both authors of the book will hold a SonarQube workshop. This one-day course, is the ideal hands-on workshop to learn the core concepts of source code quality and how to eventually adopt continuous inspection in any software development lifecycle, using SonarQube. It is intended to teach developers, testers and software architects how to use this open-source tool to continuously track and improve the quality of their source code. I’m really excited about these two events and I can’t wait to visit Sweden and talk to other developers about software quality.  

At the end of the month, I’ll be visiting for the first time, Riga, to give another talk about SonarQube during Riga Java day event and introduce to the Baltic people the beauty of SonarQube 😉 

Last but not least, since my first-ever book will hit the shelves in a few days, I’ll started thinking about a new book concept related to technical debt. I decided to use the Leanpub website for a quicker and “leaner” book publishing. Time will show if this is a wise choice.

As you can see, I’m really excited about all these events and I really hope that this is just the beginning.

Don’t forget to follow me at Twitter or connect with me at LinkedIn or subscribe to this blog’s RSS feed.

Posted in software | Leave a Comment »

 
%d bloggers like this: