/*
* All building and making of things involves a fractal (recursive) process
* like this pseudo-code:
* Takes a set of Requirements and returns something new
*/
public Thing makeNewThing ( Requirements requirements ) {
Thing newThing = ();
while ( requirements.not_satisfied ) {
Things requiredPieces = requirements.whatCanWeMakeOneFrom;
Things piecesWeHave =
this.whatDoWeHaveAlready(requirements,requiredPieces);
Things piecesNeeded =
requiredPieces - piecesWehave;
newThing.assemblePieces(piecesWeHave);
foreach Thing neededPiece ( piecesNeeded ) {
piecesWeHave.add( makeSomething(neededPiece) );
newThing.assemblePieces(piecesWeHave);
}
requirements.check(newThing);
}
return newThing;
}
Technorati Tags: construction, programming, software development
No comments:
Post a Comment