Tuesday, July 24, 2007

Principles for a Fluid Concepts class library

What are the design guidelines for the fluid concepts class library?

Here are some:

  1. Closed for modification. The framework should, obviously, be closed for modification, once ready. This means that there must be a core set of underlying mechanisms which should not need to change in any other domain. This leads to the second requirement:
  2. Open for extension. The framework, though having a closed, fixed, core, should be extensible, and applicable to new domains. This is obtained through inheritance, composition, loose coupling, the Hollywood principle, and so forth.
  3. Information efficiency. It should be relatively easy to describe, in a high level, the workings of each part of the system. It should be possible for an astute observer to implement on their own the same ideas without having to look at our actual code.
  4. Elegant implementation. This is a hard to define one. The system should be elegant, in the sense of providing all needed functionality, all the while maintaining a sense of simplicity and neatness.
  5. Clean code. The code should be readable and understandable, without need for heavy (or even not-so-heavy) refactoring or heavy commenting.
  6. A test history kept at each step. So that others may follow a step-by-step approach to implementation and be certain they're on the right track, tests for each major class should be preserved, and maintained even in the first executable version of NUMBO.
  7. No globals. There is good evidence that there are no global variables in either the brain or the mind. So alternative approaches to global variables (such as temperature, the obvious candidate) should be strived for.
At one point in time, these posts might start to disappear from the blog, and go to a report, containing both a step-by-step how-to, analysis of the source code, and ideas on how to proceed in new domains. But that remains far in the horizon. For now, work proceeds gradually, for, today, a chunk has been born unto this world.

0 comments: