Hi all,\n\nI have a slightly embarassingly naive question or set of questions.(I\nam not posting the code because this iteration is in Python-\-but Ruby\nis next and you all are better OO folks too.)\n\nI am writing a class to do Lee Carter demographic projection of\nmortality (write me if you care about the details): basically involves\na bunch of 30 x 100 x 18 float matrices, a little linear algebra, and\nsome simple monte carlo simulation.\n\nHere are parts of the problem:\n\n* We need to organize storage of a bunch of 3-d matrices and derived\nparameters (which take lots of time to calculate, so want to retain\nthem for later). Various dimensions of the matrices correspond to\nvarious things, like years of step ahead, age, simulation run, etc, so\nkeeping track of that would be good too. I think this stuff belongs in\nan instance class.\n\n* We have several parameter-finding and simulation-running algorithms,\ntaking big matrices and returning big matrices. I think these should\nbe written as functions which don't retain state across calls-\-then\nthey are more testable since they don't require an instantiation of\nanything.\n\n* Each instance needs to display itself in a number of different views\nincluding graphics and text, often for webservers (so in html), but\nalso text for command line use.\n\n* Long term storage, both for command line playing and to put into part\nof a web service (probably run as part of a queue and stored for later\nviewing).\n\n* The basic sequence of interaction is: 1, store some death rates. 2,\ninfer some parameters from them. 3, run some simulations. 4, infer\nsome more parameters from those simulations. 5, display it all in a\ncouple of different ways.\n\nAnyway, I was wondering if anyone has done anything that they liked\nwith a situation like this, and could share a pattern or two. The\nclosest design problem might be analysing and simulating genetic\nsequences, if that matters.