MactoCreating The Model
Actually, starting with the model is usually a bad idea, it ties you to a particular representation of the application, usually as codified in the database schema / UML diagrams. Instead, I rather like to talk about responsibilities.
In the case of Macto, we need to figure out what the system is actually doing. It is an incarceration system, and it seems pretty clear that the root of everything in a prison is in the Inmate, right?
Not so fast!
As a matter of fact, the prison care very much about the Inmate, but Macto? Not so much. That is because we need to make a distinction between what happens in the Real World and what actions are required by our system. In the case of Macto, we are actually managing the Inmate’s Dossier. I thought about calling this a File, but I thought it would be a confusing term, considering how often we use this term technically.
Why is the Dossier so interesting? Because from a IT system perspective, it is the only thing that actually happens in a prison that can be captured inside a computer. For example, does it make sense to make a system for managing garbage removal from the cells?
Sure, if we could RFID all of the inmates, that would give us great IT experience (and save a lot of time and effort), but I am going to assume a prison where this isn’t possible, where most of the actual interactions with the inmates is actually happening by real live people. That means that what we actually care about for Macto is a fairly narrow aspect of what it means to manage a prison, the Inmate’s Dossier.
And after talking so long about why we care only about it, lets talk about what it is. The Inmate’s Dossier is the folder in the registration desk where all of the relevant information about a particular inmate is kept. Here is how it looks like:
What is stored inside that dossier? Well, all the really important aspects of being an Inmate. First and foremost, we have the chain of lawful authority for incarceration. What is that?
Let us take a very simple case, of a guy caught vandalizing a car. The chain of lawful authority for incarceration would be something like:
- 27 June 2011 20:52 – Arrest by Sargent Azulay for car vandalizing.
- 28 June 2011 14:52 – Detention, 8 days by Judge Judy
- 5 July 2011 – Remanded in Custody by Judge Thachil Oti
- 14 Aug 2011 – Sentenced, 3 months by Judge Koev Li
- 27 Sep 2011 – Released at end of sentence
What does all of this mean? Well, a lot, actually. At #1, we had a guy that was arrested by the police, we then have 24 hours to bring him in front of a judge, to make a determination about the case (a small matter of Habeas Corpus). At #2, the judge gave us 8 days to complete the investigation while the guy is still incarcerated. At #3, we showed up in front of a judge and convinced him that we have a strong enough case to keep the guy in jail until sentencing. At #4, we got the final sentence, but calculating it takes some thinking, it is a sentence from the time of the incarceration, which means that the guy spent a total of 3 months in jail, not 3 months from sentencing.
The chain of lawful authority for incarceration is incredibly important, because without it, you are Unlawfully Incarcerating and that is a Bad Thing.
Please note that I am drawing off the experience of prisons that I was at, mostly high security military prisons for terrorists. In a civilian prison, you have to worry about additional things, like work release programs, rehabilitation efforts, etc. I am not going to touch those issues in Macto, though.
What other things are going to go into the Dossier, the ability to answer quo warranto inquiries is probably the most important one, but there are other things going on there as well. For example, we track where is the Inmate located (not a trivial matter, actually). We need to track Reports on the Inmate (aggressive, suicidal, etc).
There are probably more than that, but I think that this is enough for now. You may have noticed that so far, I haven’t shown you any UML nor have I started with the database schema. To be perfectly frank, it is not relevant at this stage at all. On the next post, I’ll start talking about the basics of CRUD operations.
More posts in "Macto" series:
- (17 Aug 2011) Looking at warrants
- (15 Aug 2011) Talking to nasty people
- (11 Aug 2011) Counting is The Holy Grail
- (10 Aug 2011) Getting Started, you never forget your first Inmate
- (08 Aug 2011) The Main Screen
- (03 Aug 2011) Warrants are for fools
- (01 Aug 2011) Non functional concerns, you are a legal system
- (28 Jul 2011) And it goes on your permanent record, too!
- (27 Jul 2011) Once more from the top, I swear I had a few more over there
- (26 Jul 2011) Day to day life
- (22 Jul 2011) Where is the Inmate anyway?
- (19 Jul 2011) Let’s CREATE an Inmate
- (12 Jul 2011) Creating The Model
- (05 Jul 2011) The boundaries of a prison
- (25 Jul 2009) An end to end sample