Posted: October 15, 2012 at 5:54 pm
Philippe has been asking me to do a “system specification” for quite a long time now, and each time I think I’m doing it, I hear back from Philippe saying that I have not yet produced a specification. The idea of the specification is that it is the design of the whole system in as much detail as to allow implementation. The “specifications” I have been producing up to this point are natural language descriptions of modules and processes, with some math equations in areas that I have a concrete idea of what should be happening. For Philippe, this is not a specification because it lacks detail and natural language is too vague.
I have been using implementation as a tool to conceptualize and think through the system design. This is clearly quite slow in C++, and Philippe has mentioned that it could be often a waste of time because I’m implementing something that I don’t yet have a totally clear picture of. So on one hand we have the vague natural language description, and on the other hand the very precise implementation whose construction is too slow to be efficient.
For Philippe, specifying the model is using a language that has the same specificity as the implementation, but also a similar degree of flexibility and expressive power as natural language. In short, Philippe would like a mathematical, logical and algorithmic description of the whole system before I attempt to implement it. I have no essential problem with this, and the only reason why I have not done so already is that math and logic are not languages I’m fluent in. I can read them to some extent, but I’m constantly looking up symbols to understand what the meaning of an equation is. I’m basically left with learning a new language to think through in order to design and communicate the major aspects of the system.
This is extremely slow, as I don’t even have the vocabulary to help with how to describe ideas I know how to implement. For example it took far too long to figure out how to describe the length of a set, because there is a special term for the length of a set—cardinality—that I did not know. I still don’t know if I’m using the notation right, but I’ll be meeting Philippe in a couple hours to discuss my current attempt. A significant benefit of using math notation is that it is very concise, and a lot can be described in a relatively small space. Thus I will soldier on in my attempt to learn, and think through, this relatively new language. Also if the specification is sufficiently detailed (as is the goal) it can be handed off to someone else to implement, or at least help with aspects of implementation. It’s hard to know where to draw the line of what to express though, as many concepts come from high level OpenCV functions whose inner structure I don’t know. In those cases I’ve just been using math functions, but I’m still not clear on how much detail is really needed. The aim is not to allow someone to implement even the OpenCV functions, but my project using functions like those included in OpenCV.