Thursday, July 24, 2014

Improving the In-basket

Four years ago, I wrote a series of blog entries about an exam which the Occupational Psychologist uses called 'The In-basket'. A few weeks ago, we had a discussion about this exam in which she outlined a few changes/improvements which she wished made. There is, unfortunately, no correlation between the apparent simplicity of each change and the simplicity of implementing each change: frequently, seemingly simple changes are hard to implement whereas seemingly complicated changes are easy to implement.

So it was this time. The hardest change to implement was probably the addition of tags (or labels) to each post; the initial idea was that the examinee would go over the items in the inbox, define a tag for each item, sort according to the tags then deal with each item. The implementation required several hours spread over a number of days before it was bug-free. The addition of such tags (and other new fields) required changes in the structure of the file which is written holding a log of all the examinee's action - and of course, the parser which later reads this file has to be changed and the program which prints out the results in human form also has to be changed.

As the exam itself is quite complicated and certainly not structured like a regular, multiple choice, questionnaire, it took some time to remember exactly how the program works and how the output is defined. Only then could I start adding new functionality. One of the side effects of my rewriting parts of the program is that the file structure is now documented.

Originally, the results program used to create its output via Word automation, laboriously sending line after line to the Word object which was created at the beginning of the routine. Apart from being slow, this approach also suffers from the problem that should the program fail during the output stage, an invocation of Word would be left orphaned in memory. These days, I create the output using HTML which is faster and safer, then insert the complete HTML code into Word. Sometimes the Word code can be converted very quickly into HTML, but in this case, it took about an hour and a half to rewrite the code, which is about ten times as long as it normally takes. 

I have now passed the program onto the OP for her final testing before we deploy the new versions. I hope that there won't be much to correct or improve, although now my renewed understanding of the program is much deeper than it was a week ago.

Tuesday, July 22, 2014

And now for something completely different

Our satellite film channel decided to hold a mini-Monty Python festival on Saturday, presumably in recognition of the comedy troupe returning to the stage after 40 years. They showed the following films
  • Eric the Viking
  • And now for something completely different
  • A fish called Wanda
  • A liar's autobiography
  • The meaning of life
Apart from "A liar's autobiography", I have seen all the others, although not for many years. I bought the book on which "Liar" is based many years ago.

I've seen "A fish called Wanda" several times and have always enjoyed it. I didn't bother watching or recording it on Saturday as I have previously recorded it.

Yesterday I watched "And now ...", which is a collage of sketches which were originally broadcast on the TV show. I'm sure that 40 years ago (1971-73), I found some of this material hilarious, but yesterday I was left totally cold. The last five minutes of the film featured some of the strongest (or most well-known) sketches - the dead parrot, the lumberjack's song and blackmail - but only the latter succeeded in raising the thinnest of smiles on my lips. The film simply wasn't funny.

Whilst it's possible that I have become what the film depicts, again in one of its final sketches, an accountant and thus per se extremely dull, I think that it's more that the material hasn't weathered well over the years. MP was a breath of fresh air at the time, with its surreal humour, general irreverence and snappy pace (cutting to a new sketch when the old one became tired, even before the punch line - or maybe there was no punch line), but now we're accustomed to these tricks. Which means that the material - as opposed to its presentation - wasn't particularly funny even then. 

I was never partial to the slapstick, such as the Ministry of Silly Walks (which thankfully didn't make the film) or the Upper Class Twit of the Year award. Maybe I was primed by reading an article in a newspaper's web site (unfortunately I can't find it now) which also didn't think much of their legacy.

Rice and beans

This is a recipe which I saw displayed on Jamie Oliver's tv show a few weeks ago.

Ingredients
1 can of mixed beans
2 cups of cooked rice
a pinch of cumin
fresh lemon juice

Empty the can of beans into a colander, then wash to remove excess sauce. Place them in a frying pan which has been pre-heated with a little olive oil. Fry the beans for about five minutes. Add a pinch of cumin at some stage. When the beans are dry and hot (in Jamie's programme, the skin of the beans cracks open), add the rice and a dash of lemon juice. Stop heating then mix well before serving.

I tried this out a few days ago and my experience was slightly different. Firstly, I couldn't find a can of mixed beans so I bough one can each of three different types of bean (black, white and brown (kidney)), mixed them together then used part of the resulting mixture (the rest is now stored in the fridge). I also didn't have any cooked rice handy, so first I had to cook some rice before I could start with the beans. Other than that - the dish is very easy to make and tastes very nice. I probably added too much lemon juice but that wasn't a fatal flaw.