Tuesday, July 14, 2009

Code City

Today I was reading a book about software metrics called "Object-Oriented Metrics in Practice" by Michele Lanza and Radu Marinescu. It's abouth things like "Design Harmony" and so on.

Some of the ideas are debatable, for example on page 46 they say:
...you cannot understand the beauty of a painting by measuring its frame or understand the depth of a poem by counting the lines...

...metrics can help to evaluate and improve designs, but those have to be meaningful metrics that are put in a context of design harmony...
But at the same time it's obvious that you won't see the beauty of the poem looking on it's grammar, syntax or verse structure (these are more-or-less analogues for software design metrics), without actually reading and understanding the sense. That's why my conclusion is that for creating a harmonious software design it's necessary (but not sufficient) for the metrics to be harmonious, too.

What I liked most of all was the concept of visualizing software projects as cities. The metaphor includes classes as buildings and packages as districts. It is implemented in a tool called CodeCity. Some results of its work can be seen on Richard Wettel's page, who actually wrote it. Here is just one of them:



Though, there are few things which I think can make it even better:
  • It would be great to see a color scheme based on the developers responsible for changes, for example, using svn blame (it can be useful for both "normal" and "timeline" views).
  • Building base should be Sqrt(NOA), not just NOA - it will look more realistic. It also should have an option to scale building height to Log(NOM).
  • Color scheme should be configurable - for example, it's hard to see some "outdated" buildings on the dark backgrounds.
Nevertheless, thank you very much for giving really interesting food for my mind :)

Monday, July 13, 2009

A way to stress-test GUI

What to do if you need to test the performance of your client-server application, which is not on the Web? For example, some kind of Lotus Notes one. The problem is - you can't even execute several Lotus instances on a single machine, so it's quite a tricky task to simulate multiple simultaneous users.

Virtualization is what you can use in this case. There's an example of working stress testing system consisting of Citrix XenApp terminal server running 10 Lotus Notes instances (eating 50 Mb of RAM each), and a load generator running IBM Rational Performance Tester (which is just a very advanced point-and-click thing), which can safely simulate 20 - 40 concurrent users.

Major bottlenecks of this setup are:
  1. RAM on Terminal Server (it's better to use 64 bit solution)
  2. Network bandwidth (at least 1 Gbit Ethernet)
  3. It takes much longer (up to 4 times) to implement and debug such test cases, compared to usual web testing scenarios

XML Appliances

I was surprised to find some hardware XML processors, called XML Appliances. They can do XSLT,validation, encryption and many more. Implemented as a separate network device it can be useful in SOA.

Sunday, June 7, 2009

Things we should add to our build process

I want to try some of these and see what happens:
  1. Use Sonar for tracking various metrics (it uses all well-known Open Source tools like PMD, Checkstyle, etc. and compatible with Hudson, which we already use in our projects);
  2. Use Cirr to document public API changes (to know when something really important has changed);
  3. Use Macker (btw, its' FAQ is really informative, thanks!) to keep dependencies between different modules under control. It first requires some modeling, after which it can break builds in case someone breaks convention;
Also, what I want to do in the nearest future is some kind of retrospective metrics analysis tool. It will consist of (maybe) set of shell scripts checking out revisions from Subversion repository, compiling code, running JDepend and others against it, applying some XSLTs to its results to combine it altogether into single big XML, putting it then into some kind of 3D storage (Revision * Metric * Module), like OLAP cube in order to analyse it. Theoretically, such tool can generate a great amount of information, and what's interesting is how useful it could actually be.

The idea was inspired by one of the reports on Software Engineering Forum 2009 (link in Russian).

TeamCity by JetBrains: yet another great CI solution

After some excitement about Rational Team Concert features, here comes another one about TeamCity, by JetBrains, the same company which gave us IntelliJ IDEA and ReShaper.

So, TeamCity is an all-included solution supporting tons of really advanced features, among which there are:
You can try and actually use it for free until your project is huge enough. It takes just 225 Mb to download and 3 minutes to install.

Friday, June 5, 2009

Nice short article about IBM Rational Team Concert

Here it is. Seems that RTC is even better than I thought... Among cool things mentioned, there are:
  • Support for Agile methodology out of the box
  • Original approach to SCM, based on the concept of "streams" (which are essentially branches)
  • Advanced build system, automatically collecting all supporting artifacts, such as change sets, fixed defects, etc.
  • A lot of great documentation (like Getting Started with Jazz Source Control)
What I can add from my personal experience, is that the Major Huge Advantage of RTC is that you get all these features integrated altogether out of the box. Installed it today on Windows 2003 Server - it took just 15 minutes (!) to install and configure a complete team collaboration solution. It normally takes few days to configure something like Trac + Subversion + Hudson, and even longer if you'd like to replace Trac with Redmine or Bugzilla on Linux, etc.

Client JavaScript data storage

Cross-browser data storage made easy using PersistJS. It supports a lot of different ways of storing data on client browser, falling back to plain old cookies, when necessary. The library itself is really minimalistic and standalone (opposed to Dojo Storage, for example). Also, it can be integrated with another lightweight runtime storage solution called "Taffy DB", which will enable almost SQL-like queries in JavaScript. Looks very nice to store some user-related info, session data, etc.