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.