Monitoring code quality

Posted by Mike Haller on Sunday, April 26. 2009 at 13:35 in Java
I've been looking for tools to measure and visualize code quality for some time now. Every once in a while, there's some tool which aggregates results from quality measurements and monitoring tools like PMD, Findbugs, Checkstyle etc. but I haven't yet found something which attracted my interest.

Read on to find out about Codehaus' Sonar.

Codehaus Sonar for code quality showing Hotspots
Codehaus Sonar for code quality

Java Class Popularity

Posted by Mike Haller on Friday, April 17. 2009 at 08:00 in Java
Taken from a heap dump of a JBoss Application Server with some applications deployed, i've look at the number of objects in the heap and compiled a 'popularity list' accordingly:

java.util
1. ArrayList
2. HashMap
3. TreeMap
4. Vector
5. Hashtable
6. LinkedList
7. HashSet
8. WeakHashMap
9. TreeSet

Read on to see the full list. I've marked some classes which I find interesting enough to have a second look on them. Know your library.

Date ranges in Lucene

Posted by Mike Haller on Saturday, April 4. 2009 at 13:23 in Java
Lucene is a very efficient and fast Java search engine. Once indexed, any object can be found by looking for attribute matches. An object in Lucene is called Document and its attributes are called Fields. Lucene uses Query and Filter objects to narrow down the search to what the user wants to find. A Query makes the amount of data to be searched smaller while a Filter is used for more fine-grained control over what a search result shall include. Queries are more memory-hungry than filters, but for the usual use cases, both are very good.

In this post, I'd like to show how you can search for Date and Time ranges, for example modification dates of files. I'd like to find all files on my local file system which were modified in April 2009.

About

My name is Mike Haller and I'm a software developer and architect at Bosch Software Innovations in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development. Stack Overflow profile for mhaller

Quicksearch

Archives