Thursday, 18 January 2007

TDD helps developing the ODBMS

As our ODBMS approaches the beta status I've found the memory footprint on disk is still relative high. The reasons have been very simple:
  • the object identifiers have been GUIDs, which are very long,
  • the full qualified type have been stored with each instance and
  • technical timestamps have been stored in a human readable format.
So the solutions seems realy simple: change that. *smile* And it has been done in just five net hours.

To do this I've decided to change the root name management into a common database control that additionally generates individual object identifiers and provides a registry for the persisted classes. It has to realize a storrage mechanism which should work like the stores. Everything has to be integrated into the transaction class, the analyzer, the file I/O utility, the base file I/O strategy, the entities and the value holder.

What has helped me to do these changes are the powerful Smalltalk development environment and the fact that I'm doing TDD.

The Smalltalk environment with the integrated refactoring browser helped to easily perform renamings, find senders and implementors, add almost similar new methods through editing an existing one and submit it with a new name (as an intermediate step without breaking implemented behaviour), starting the unit tests, switch direct into the debugger for failed tests and to change the code immediately in the debugger. Together with the very simple language and the missing overhead of static typing everything has been done very fluently.

As allready said above I'm doing TDD. Not the kind of writing tests first for each and everything. But with the time I devised a good feeling for a very practical approach of what to test. Those tests accompanied me and growed the whole development time of the Tideland SOS. Without them many design changes - like above - or refactorings would have been much harder.

Both together, Smalltalk and TDD, are a very strong pair.

0 Comments: