Sunday, December 30, 2012

Being a tourist in Israel: Ein Karem

Ein Karem is a village nestling in at the bottom of one of the hills leading to Jerusalem. I mentioned this village several years ago when I walked through it with my son's class on the way to Jerusalem. Yesterday we visited in order to celebrate my wife's birthday; we were far from alone - the village is a popular attraction for people looking for somewhere to eat. Abroad, such places seem to be two a penny, but here they are somewhat rare.

Here's a picture of the restaurant in which we ate: the name is 'Karma' but for some reason they chose an unusual spelling of the word.


One can't really see from the photograph but the restaurant (on two levels) is packed. We had the foresight to order a table in advance, but not everyone did so; as we entered, someone asked for a table for ten. "Have you ordered?" asked the maitre d'. "I didn't know we have to", answered the lady. "Then you'll have to wait...." 

There isn't that much to see in the village: there's a main "strip" with three of four restaurants, and a pedestrian lane running at right angles with small shops and cafes. Last time we walked along that lane, but as my father wasn't feeling too well yesterday, we had to cut our visit short.

In the distance, facing the restaurant, can be seen the mosque pictured below. There is also an imposing church in the village but I couldn't take a picture of it.


Visitors: beware: whilst there is parking space in the village, there are so many visitors on a Saturday lunchtime that those places get filled quickly. It is better to visit the village during the week when it is far less crowded.

The drive from the kibbutz to the village is maybe only 20km, but the scenery along the way is stunning. Who needs to travel abroad when there is this beauty in one's backyard? Indeed, there were plenty of cyclists and motorcyclists on the road, with many cars parked along the way.

A visitor from Britain is supposed to be coming to visit at the end of January: I hope that we will have the time and suitable weather in order to make the trip to Ein Karem.

Saturday, December 29, 2012

Sequencing "House with no door"

I see that blogging is a habit which has to be maintained: if one neglects it for a few days, it becomes harder and harder to return. This December has been a fairly barren month in terms of blogging probably because I've actually been more than busy at work although not with subjects which I can blog about (not because they're secret but rather they're either mundane or esoteric, requiring too much explanation). It's true that I did suffer a period of emptiness after the first doctoral exam which was at the beginning of the month, and it's true that for the past few days I've been suffering from some unspecified viral infection which has left me lethargic and suffering pain in my lower legs, but these are just excuses....

When looking for something to occupy my time, I decided to return to my continuing project of recording covers of Van der Graaf Generator songs. This project was curtailed in the summer when first I had great difficulty in recording vocals to my version of 'Pilgrims' and then almost permanently mothballed when it seemed that I would never sing again after the pertussis episode. But now, a few months later, my voice has returned and so has my appetite for recording. 

There has always been one song which I knew that I would probably record - 'House with no door'. After a few false starts (one promising version began with marimba arpeggios, a device which unfortunately I have used too often, especially in 'Pilgrims'), I plumped for an electric piano playing simple chords as the basis for the recording. I ended up with a version which sounds just like one of my songs, only even simpler, as the chord sequence is very scalar (this caused me problems with the solos - I like complicated chord sequences!).

During the sequencing process, my headphones stopped working properly so I had to buy a new pair. Perusing the headphones on sale in the local mall (two different shops), I discovered that the kind of 'phones (or 'cans' as Peter Hammill and the boys used to call them) which I had previously (closed with a generous amount of foam) were no longer being sold; there are closed 'phones (but not with a perfect seal) but they all come with microphones attached. This actually is not necessarily a bad thing. After connecting the 'phones and microphone to the computer and making a simple test recording, I was pleased to discover that the microphone actually has a very good frequency response and is very clean - no background hum or clicks.

Once I had my backing track ready, I commenced singing. Although I know the song very well, it still took a few takes to get a good recording - there was one line in particular with which I had trouble phrasing. After about an hour, I comped together three separate takes, performed the necessary note correction and then commenced the aurally exhausting process of mixing, with most of the time spent on getting a good vocal sound. I discovered two things about the headphones/microphone combination: very little equalisation (tone control) is necessary but unfortunately the insufficient closure of the headphones along with the adjacency of the microphone to the 'phones had caused a great deal of leakage - the microphone was recording the instrumental track along with the vocal. Normally this isn't too much of a problem, but there were many rim shots from the drums being picked up and these were causing phasing in the final mix. I cleaned as many of these as I could and made a final mix.

Listening to the track over the next few days whilst wearing my producer's hat, I became aware that the instrumental section was limping; in order to correct this, I recorded a new solo over the second half and also spiced up the drumming. This version was fairly intimate with an 'in the face' vocal (very little reverb or gimmickry) and was then deemed to be a winner.

Or maybe not: after a few more days of listening, I realised that there was a cognitive mismatch between the lyrics (somewhat sad and certainly detached) and the music (somewhat happy). A new, spacier, version was called for. I spent most of yesterday creating that version. I didn't have to add a single note (although I probably removed a few); instead I used different instrumentation and moved the parts around. I found a rather strange pad sound to be the basis of the sound and worked from there. 

The beauty of computer recording is that I don't have to record a new vocal track: as long as the new version is in the same key, at the same speed and of the same structure, the existing vocal will automatically sit correctly on top of the music. When mixing, I added a 2kb boost to my vocal along with a hefty amount of reverb. Unfortunately, the leakage which I mentioned previously came back in spades: although there was no drum track with which the phantom rim shots could phase, these phantom shots appeared out of nowhere, coming and going seemingly at random.

Last night I wasn't too convinced about the new version, but having listened to it several times this morning, I think that this will be 'the one'. Of course, I'll keep the original version - it will be a 'bonus track'.

Sunday, December 23, 2012

Doppelganger

Out of curiosity, today I googled my name (I used to do this quite frequently) and discovered that there's another No'am Newman living in Bet Shemesh, which is the town just across the road. There's even a film of my double playing the piano! Fortunately, I don't think that anyone is going to confuse us.

Sunday, December 09, 2012

Guitar stand

In lieu of something better to write, here are two pictures of the guitar stand which I bought the other day. Due to poor lighting, I took the pictures in the kitchen - not the normal location of the guitar. I admit that I was dubious about a stand which does not support from below, but this stand holds the guitar by its neck; the body rests against foam covered legs.


Wednesday, December 05, 2012

Post mortem on the Research Proposal exam

'The deductive approach is based on developing an understanding of how a logical chain of events can combine to produce a result, whereas the inductive approach is based on observing events, then explaining them'. This is the sentence which I memorised this morning whilst riding on the train to Tel Aviv, in order to take the Introduction to Business Research 1 (aka "The Research Proposal") exam. I felt that I had most of the material down cold, but last night I was looking at hypotheses and de/inductive approaches, thus making the above sentence as important as 'A paradigm is a series of beliefs and values about research'.

As I wrote before, the structure of the exam is very consistent, and there appear to be only a few questions which can be asked. The first question, 50% of the marks, is critiquing a research proposal; almost certainly the second question (25%) will be about research paradigms and how they relate to the case study and the third question (25%) would be about something else - managing time, methodology or hypotheses.

The case study which appeared in the exam was a very badly written proposal about success in new businesses. Although it took just over an hour to fill six pages of A4 paper, this question was technically very simple (provided that one knows the material, of course!). The proposal is composed of fourteen different sections, so one has to go through each section and offer comments. In a sense, I was fortunate that there was so much which was obviously missing as it made it easier to write the answers. Some of what I wrote was stock sentences (for example, the sections about ethics, deliverables, time needed after the viva and appendices were all stock answers) and some was pre-prepared, like noting that the number of companies to be questioned was not noted and that no sample questionnaire was appended.

The second question was, as I had guessed, about research paradigms and how they affect the case study. In the proposal, the candidate had written about quantitative analysis and standard statistical methods, meaning that he was writing about using the paradigm of positivism (although this word specifically did not appear in the text). My answer first explained what a research paradigm is, then showed the advantages and disadvantages of the two paradigms, positivism and phenomenology. This material was almost word for word the same essay which I wrote for practice the other night, although more concentrated and lacking all the anecdotal material which I thought was unnecessary. I then wrote that in my humble opinion, the research question called for the paradigm of phenomenology - and of course, explained why I thought so. I even wrote a little on how this would change the research.

The third question was how a candidate moves from a wide research area to a specific research question and hypotheses. This isn't material which I had actively revised, although by chance, I had skimmed over some of this material last night so it was fresh enough to enable me to describe competently what programmers call stepwise refinement (the text refers to this as building a work breakdown structure). Once I had built what should have been the candidate's research question (much more focused than the original vague statement), I then explained about null and alternative hypotheses, and even wrote down a few possible pairs (the null hypothesis is what the researcher is trying to prove, such as 'good cash-flow is an indication for success', whereas the alternative hypothesis is the negation, 'good cash-flow is not an indication for success'). At this point, I felt it was time to throw in the sentence about deduction and induction, pointing out the candidate was using induction to prove his case. This may well not have been in the scope of the question, but I had the time.

I finished the exam after two and a half hours of furious writing (interrupted only by a few toilet breaks). I think that I did very well in the exam. I'll probably only get the results towards the end of January - until then, I'm on "holiday": I'd like to know that I passed the first course before I start the second, which will only be examined  in June (hopefully before the graduation ceremony in Edinburgh!).

There were only four students in the examination room (including myself), but three invigilators. Each student was taking a different exam, so we couldn't have copied even had we tried.

It had rained heavily yesterday, so I came prepared with a thick coat and a large umbrella. Fortunately, I did not rain while I was in Tel Aviv, so I was able to walk from the hotel where the exam took place to the Dizengoff centre, where I bought a guitar stand in the music shop. I then walked from there to the train station, cursing my heavy coat and umbrella. But when I got to my local train station, it was raining heavily, so then I was pleased that I had the coat and umbrella. My wife was supposed to pick me up, but she had to go and help her brother and his wife look after their twins (they came home from hospital yesterday). I had to find a taxi.

Tuesday, December 04, 2012

Almost ready for my first Doctoral exam

One of the movie channels broadcast the newish Richard Gere film "The Double" the other night. I don't think that it's a good film, but today I'm not writing film criticism. At one stage, there is an FBI agent who starts rattling off a series of sentences in rapid fire about null hypotheses (he spoke so fast that I couldn't really understand what he was saying), that "Paul is not Cassius" (you'd have to watch the film to understand). My ears pricked up at the word 'hypothesis', because formulating null and alternative hypotheses is part of any research project and at the moment, my brain is almost obsessed with research projects.

The exam for the course 'Introduction to Business Research 1' is being held tomorrow (Wednesday), so obviously I am up to my ears in revision. Relaxing for an hour by watching 'The Double' reminds me that I have skimmed over the chapter about hypotheses, induction and deduction; these subjects don't seem to have appeared in recent exam questions.

I spent yesterday evening's revision session by writing an essay - without preparation - about the research paradigms of positivism and phenomenology. After writing for about half an hour and covering two pages of A4 paper, I checked my answer against the table which lists advantages of disadvantages of the two paradigms. I could see that my essay tended to the anecdotal and was also missing a few points. I then wrote another, shorter, essay which was straight to the point and covered all the points. By writing such essays, I can get the material into my mind, along with the correct English phrasing. This will be similar to the preparation for the Negotiation course, in which I had stock phrases stored in my mind.

I intend tonight to cover the hypotheses material, just to make sure that it's clear. I'll also check the previous exams to which I have access in order to see whether there were questions about this material and which angle was taken. Otherwise, I intend to have a quiet night. I am not one of the people who sleep during the course and then take the coursebook a week before the exam and burn the information into their brain; I prefer to read the coursebook from the very beginning, letting the information sink in slowly and then reinforcing the absorbed information by reading the material again and again. 

No last minute revision for me: if the material is not in my brain now, it never will be. What is important in these final hours is getting the mental material into a form in which it can be written effectively.

The exam will be held in the same hotel as the MBA exams were; I have been told that sitting with me (but not taking the same exam) will be students repeating MBA exams. I wonder whether I will see any familiar faces. Pyschologists recommend that students imagine the physical setting of the exam; this exercise is intended to prevent anxiety appearing in the critical minutes before and during the exam. The same exercise is recommended for athletes preparing for a race. Whilst I have no problem in visualising the setting, there are a few exams which I don't remember how they finished. For example, I have a memory of leaving the Economics exam and riding back to the bus station in the evening; after the Marketing exam, I walked along the sea front and then all the way to the bus station (quite a long walk!), but I don't have any memory of the Project Management exam. No, wait a minute: part of that memory of the Economics exam is actually the PM exam! Yes, I was sitting in a public taxi and figuring out alternative methods of crashing a project.

Probably some of the above is a bit more muddled than it need be, but that doesn't bother me. All I need is some more revision this evening, a good night's sleep and some light revision tomorrow morning - and then I'll be fit to take on the world!

Thursday, November 29, 2012

Uncle once more!


The last few weeks haven't been too good on a personal level; I seem to develop a dull headache on a daily basis, and the hour that the headache starts seems to be earlier every day. Coincidentally, I was asked to monitor my blood pressure a few days before the headaches started, and the high levels that I am seeing may have something to do with the headaches. Acupuncture helps relieve the ache but only for a few hours at most. My family doctor can be very elusive: I was supposed to see him today but now will only see him on Tuesday.

But there is good news - my sister in law gave birth to twins (a boy and a girl) two days ago! Here is a picture of the girl who weighed about 2.8 kg at birth. So far she hasn't shown much

enthusiasm for eating but hopefully that will change shortly. Her brother weighed only 1.9kg at birth and is currently with the premature/under-weight babies, although he's not in an incubator.

This is the sister-in-law which I wrote about five years ago when she gave birth for the first time to a premature baby who died after a week. The odds seem much better this time around! In the mean time, she has also married my brother in law (my wife's brother).

Sunday, November 18, 2012

Warming up for DBA exam

I see that I've hardly written anything about the first course in the DBA degree - Introduction to Business Research 1. This course gives an introduction to the structure of the doctoral degree then concentrates on the first piece of work that the candidate (we are no longer students!) has to produce - the research proposal. Chapters in the course discuss the background of the proposal (including a very interesting chapter on the philosophy of research), culminating in a chapter on the structure of the research proposal itself.

I had been reading the course material with great interest, always considering how the material applies to my chosen area (what is my research question? what are my hypotheses?). But as there are only six chapters to read, I found that I had read the whole course twice two months before the exam. As a result, I almost totally ignored the course for a month. A week ago, I awoke with a start and realised that soon I am to be examined on this material. It's time to get hard core.

The most important thought which I had a few days ago was that I am not to be examined on my research proposal but rather on how well I have learned the course: two completely different things. My first step, then, was to download a few previous exams and check both the examiners' solutions and selected students' solutions. After reading a few of these, I went back in time to the final stages of the Strategic Planning course, in which the lecturer would hand us an old exam and ask us for the solution, which was according to a template that he devised.

After examining a few papers, it became clear that the exam always consists of three questions: the first (50%) presents a research proposal and the examinee is to critique it. The other two questions (25% each) require essays on subjects such as research methodology, philosophy and time planning. The research proposal question can be answered by creating a template and then following it; the proposal consists of fourteen different sections (abstract, research question, research methodology, timetable, ethics, deliverables et al.) and most of these sections have a pre-defined structure. Thus it should be fairly easy to deliver a critique after memorising which points should be referenced in which section (the ethics, deliverables and appendix sections are particularly easy).

I spent most of my study time yesterday creating such a template and then answering - writing out in full - one such exam question according to the template. I intend to answer a few more questions in the next few days in order to fix the template in my mind. Writing the answer out in full hand is a very important aid to fixing the answer; I very rarely write anything by hand these days and certainly not two page essays. As opposed to the MBA courses, I don't attend lectures and write notes on the coursework, so at the moment I have no muscle memory; I consider this to be very important.

When I need some variety, I will look at the other questions in the exams and try to prepare answers in advance - for example, the course text devotes a few pages to the advantages and disadvantages of the positivism and phenomenology approaches (I will have to practice writing phenomenology and methodology!) and I imagine that there will be a need to discuss them at some point in the exam.

That said, there are some subjects which seem fairly obvious: I am sure that I could write a competent essay about time planning (Gantt charts, etc) without having to read the material again; I did achieve a high mark in Project Management, after all!

Thursday, November 15, 2012

Inside the DOCU program (3) - Saving screenshots

Whilst discussing the DOCU program last week, the Occupational Psychologist asked why she can't store screenshots along with the written documentation. I wasn't about to tell her that the program was implemented with a RichEdit component, which implies very strongly that only rich text can be saved, so I said that I would consider the options.

The simple part of the option which I found was to add a field in the database of 'blob' type; such a field can store anything as a sequence of bytes. Theoretically I know how to display jpg images stored in a database as one of our programs displays images, and even more theoretically I know how to save such an image into the database.

The solution actually required several items
  • adding a blob field to the database
  • learning how to save an image from the clipboard to a picture component in Delphi
  • saving that picture to the database
  • clearing a picture from the database
  • loading the contents of a blob field to a picture
  • creating a suitable form from the 'entry' form and closing it appropriately
From the outset, I decided that each entry in the database could have only one picture assigned to it; otherwise this would add complexity (Should the user choose which picture to display? Should all pictures be displayed for this entry? How to manage the pictures?). Thus I was able to add one icon to the toolbar (see yesterday's blog) instead of having to add an image choosing dialog.

My logic was as follows: if the entry has an assigned picture, then open a son form and display the picture. Otherwise, open a son form, copy into it whatever graphic is in the clipboard's memory, display it and save it to the database. There also should be an option to clear the picture in case a wrong graphic was saved.

Here's the code which does all of the above.


Procedure TDoPicture.Execute (const s: string; aleft, atop: longint);
var
 empty: boolean;
 bmp: TBitmap;
 ms: TMemoryStream;
 j: TJPEGImage;

begin
 caption:= s;
 left:= aleft;
 top:= atop;
 with qGetPicture do
  begin
   params[0].asinteger:= myentry;
   open;
   empty:= isempty;
   if not empty then
    begin
     j:= TJPEGImage.Create;
     try
      j.Assign (qGetPicturePIC);
      OnAssign (j)
     finally
      j.Free;
     end;
    end;
   close
  end;

 if empty and Clipboard.HasFormat (CF_PICTURE) then
  begin
   bmp:= TBitmap.Create;
   j:= TJPEGImage.Create;
   try
    bmp.Assign (Clipboard);
    j.Assign (bmp);
    OnAssign (j);
   finally
    bmp.Free;
    j.free
   end;

   ms:= TMemoryStream.Create;
   try
    Image1.Picture.Graphic.SaveToStream (ms);
    ms.Position:= 0;
    with qSavePicture do
     begin
      parambyname ('p1').asinteger:= myentry;
      ParamByName('p2').LoadFromStream (ms, ftGraphic);
      execsql
     end;
   finally
    ms.Free;
   end
  end;
 show
end;

procedure TDoPicture.OnAssign (j: TJPEGImage);
begin
 Image1.picture.assign (j);
 image1.autosize:= true;
 // resize the form to be slightly larger than the stored image
 width:= image1.Width + 16;
 height:= image1.Height + 48;
end;
Looking at the above now, it all seems so obvious, but it wasn't when I was writing the program! Taking it bit by bit:
  • the first few lines are concerned with setting up the form with the correct caption; the form is placed at the same height and to the right of the calling form
  • a query is then opened which checks whether there is an assigned picture. If the query is empty, then the 'empty' variable becomes true. If not empty, then the next few lines show how to read a blob from the database, store it in a temporary variable and then cause the blob to be displayed as a jpg image. The 'OnAssign' procedure resizes the form to be slightly larger than the image.
  • If there is no assigned picture, then the program checks to see whether the clipboard holds graphic data. If so, the image is first saved in a temporary bitmap (bmp) and then converted into jpg format, which is then displayed. Afterwards, the image is saved to the database, an action which requires the use of a stream.
As I wanted to have the user interface as simple as possible (ie no user interface at all), I was stumped at first how I was going to allow the user to remove the stored graphic. Then I remembered that I have been using the system menu frequently for such actions; the code became very simple to write.
At the beginning of the form, the following adds an option to the system menu
const
 SC_Original = WM_USER + 2;

procedure TDoPicture.FormCreate (Sender: TObject);
var
 SysMenu: HMenu;

begin
 SysMenu:= GetSystemMenu (Handle, FALSE);
 AppendMenu (SysMenu, MF_STRING, SC_Original, 'Clear picture');
end;

And this is how a click on that menu option is handled

procedure TDoPicture.WMSysCommand (var Msg: TWMSysCommand);
begin
 if Msg.CmdType = SC_Original then
  begin
   qClear.params[0].asinteger:= myentry;
   qClear.ExecSQL;
   image1.picture:= nil;
   close
  end
 else inherited;
end;
In an MDI application, the program 'knows' about its child forms because they are 'stored' in the MDIChildren array. As DOCU is not an MDI program, another solution is required; Delphi stores all on screen forms in the 'forms' property of the 'screen' variable. So closing the picture form when its parent form is closed requires the following code
 for i:= 1 to screen.FormCount do
  if screen.forms[i-1] is TDoPicture
   then if TDoPicture (screen.forms[i-1]).myentry = entry
    then screen.forms[i-1].close;
Here's a pretty useless screenshot of an entry form along with its graphic; what would seem to be WinAmp playing in a window is actually a screenshot of WinAmp captured and stored in Docu.

Inside the DOCU program (2) - saving and loading rich text

Yesterday I discussed the gross structure of the DOCU program; today I am going to concentrate on the 'entry' form.
Originally, the form contained a dbMemo component whose font was fixed at compile time. Obviously at some stage I received a request to change the component so that coloured and or bolded text could be stored. The dbMemo component doesn't allow this but the dbRichEdit component does. Fortunately for me, one of the demo programs which comes with Delphi is an editor based around a rich edit component, so I was able to extract from this demo most of the necessary interface code. With the use of the tool buttons, the user is able to choose type face, font size, bolding, italics, underlining and colour as well as numeration.

If everything were as easy as this, then I would be out of a job. The problems began when I wrote the code to store the text in the database; when the saved text was restored from the database, all the richness (ie fonts and colours) had been lost!

The answer is to be found here; unfortunately, there is no real explanation of why the code succeeds whereas the naive code fails. 

For loading the rtf text:

//Get the data from the database as AnsiString
rtfString:= sql.FieldByName ('rtftext').AsAnsiString;

//Write the string into a stream
stream:= TMemoryStream.Create;
stream.Clear;
stream.Write (PAnsiChar(rtfString)^, Length(rtfString));
stream.Position:= 0;

//Load the stream into the RichEdit
RichEdit.PlainText:= False;
RichEdit.Lines.LoadFromStream (stream);

stream.Free;

For saving the rtf text:
//Save to stream
stream:= TMemoryStream.Create;

stream.Clear;

RichEdit.Lines.SaveToStream (stream);
stream.Position:= 0;

//Read from the stream into an AnsiString (rtfString)
if (stream.Size >= 0) then
 begin
   SetLength(rtfString, stream.Size);
   if (stream.Read(rtfString[1], stream.Size) <= 0) then
   raise EStreamError.CreateFmt('End of stream reached with %d bytes left to read.', [stream.Size]);
end;

stream.Free;

//Save to database
sql.FieldByName('rtftext').AsAnsiString := rtfString;

Wednesday, November 14, 2012

Inside the DOCU program (1)

I haven't abandoned this blog; I've simply been going through a few weeks of nothing much interesting happening so there's been little to write about. Over the weekend, I added an interesting twist to an existing program of mine, so I've going to devote a few blog entries to this program.

A year or so ago, the Occupational Psychologist (OP) with whom I work and I had a discussion about program documentation, probably after she asked for some feature and I had told her that I had already added that feature and explained to her how it worked (this happened again a few weeks ago when I was asked to add a feature which I had added in March). Out of this discussion was born the DOCU (as in documentation) program.

From a bottom up point of view, this program can store 'entries' which are connected to 'subjects' which are connected to 'programs'. From the top down point of view, a program - such as the management program - might have several subjects (such as customer calls), and each subject can have several entries (printing the text of a call, creating a linked call, etc). The main form of the program is simply a dialog box with three different grids (one grid per table) which are of course synchronised. There is nothing revolutionary about this so far.

The first interesting twist in the program came as an attempt to find a solution which utilised the Stack Overflow gurus' dislike of MDI programs (such as the management program). It turns out that this was simpler than I had expected. Whilst the main program has two modal sub-forms (one for adding programs to the database and one for adding subjects; under the hood, they're the same form), the 'add entry' form is non-modal. This means that any number of such forms can be displayed on the screen at the same time, when each form can be derived from a different subject. The main form's size is fixed (because it is built on three grids); had I used MDI, then the 'add entry' forms would have been constrained to the area of the main window (which in practical terms means that the main window has to be maximised). Using a non-MDI main form, the non-modal 'add entry' forms can appear anywhere on the screen.

As per the maxim that one picture is worth a thousand words, here is a compressed screenshot of my computer screen with the program running and three 'add entry' forms displayed. As most readers won't be able to read Hebrew, it may be difficult to recognise which is the main form and which are the child forms; the form with three grids is the main form.


Monday, October 29, 2012

Remixing songs and playing live

As my throat still won't allow me to sing - there are times when I can barely talk, either - I haven't been able to create very much music lately. What I have been doing whenever I feel the urge to be musical is take a previously recorded song and remix it. This remixing can be at any one of several levels
  • Changing the balance and effects on a recorded vocal to improve the final result
  • Running the vocal tracks through a very clever program which can autotune the vocals. I am very happy when this works, but I have noticed that in some cases, the tuned vocals are worse than they were before. In such cases, I leave the vocals as they were.
  • Changing the music track slightly, normally by syncopating some notes, but also by changing parts slightly
  • Creating a new music track
A song which I mentioned before, 'The road to Antibes', underwent the first three treatments and now sounds even better than it did before. Unfortunately, some of my older work was not backed up correctly, meaning that I don't have separate vocal and music tracks. No separate tracks means that I can't remix them.

I played a gig on Saturday! A friend (who has a beautiful voice) was arranging her father's 75th birthday party and asked me to accompany her and her family on some songs. In the end, I played six different songs and attended several different rehearsals. It was really good playing live again - this time, I used the semi-acoustic Washburn guitar which is easier to hold and easier to play than the acoustic Ovation. My amplifier also helped in the process - I added chorus and a slight delay in order to produce a fuller sound. My friend asked at the beginning how I was managing to sound as if I were playing two guitars.

To my slight surprise, I fingerpicked all the songs: I even left the plectrum at home! Some of the songs were picked and some strummed, but somehow using the plectrum didn't feel right. I also took a leaf out of the Robert Fripp school of guitar playing and played sitting down.

It was very interesting to look at the songs that I played from a harmonic point of view, as opposed to my songs. The chord sequences were fairly straight forward: one lovely song had either a minor i-iv-v sequence or a major I-IV-V sequence, where the minor was the relative minor of the major (in other words, Em-Am-Bm and G-C-D). Another was also based G-C-D, but then had a familiar B-Em-Am-D sequence. One tune was a jazzy waltz based on the chords Bm-E, but this too had a sequence of dominants (from E to A and thence to D, also C#-F#-Bm).

My songs, on the other hand, tend not to have dominants at all; to an extent, this is done on purpose, but it tends to happen automatically. I prefer 'chord streams' - Em-F#m-G-F#m or rather stranger sequences.

Sunday, October 14, 2012

Friday is cooking day

I almost always eat fish for lunch on Friday: I'm at home and can cook myself something nutritious. The meal has undergone a few changes over the years: at first it was a grilled fillet of hake along with chips and salad, stuffed into a pita. I cut out the chips after my daughter pointed out that it wasn't good to eat chips if I was supposed to be dieting, and shortly after I cut out the pita, for the same reason. I stopped eating salad after I managed to spill the olive oil from the salad dressing onto my shirt, something which happened a few times, before I realised that I had better find a replacement for the salad.

In the last month or so, I've frequently been preparing antipasti - a mixture of red bell peppers, yellow bell peppers, tomatoes and onions, all cut into strips, over which I drizzle olive oil. The vegetables are then baked in the oven (175 degrees Centigrade for 30-35 minutes). 

On the left is a slightly blurred picture of the vegetables prior to their being placed in the oven. I find it best to place them on a sheet of baking paper as this keeps the tray clean.

After the thirty minutes is up, I then place on top of the vegetables a few hake fillets and spray them lightly with cooking oil (this stage may be unnecessary as I'm not grilling the fish) and put the tray back in the oven. After about five minutes, I turn down the heat in the oven - the food keeps on cooking but of course I save on electricity. 

After another ten minutes, I take the tray out and serve the fish and vegetables (see picture below).


Completing the cooking theme, here is a picture of my new slow cooker, filled with vegetables and chicken pieces. The vegetables are underneath the chicken and so can't be seen. This picture was taken very early on in the cooking process, which is why there is no steam nor water droplets visible. My daughter doesn't like spices on the chicken which is why the pieces are 'naked'; I could add parsley or paprika to make things slightly more interesting, but to be honest, I too prefer the natural flavour of the chicken and the vegetables (onion, courgette, carrot).

Friday, October 12, 2012

A new season, a new team

A new season began last night in the Euroleague Basketball Tournament and Maccabi Tel Aviv opened that season with a new team. It used to be that each season Maccabi would keep the core of its team, replacing two or three players with names new to Europe, but in the past few years that tradition has no longer been maintained. 

From last year's team, only three Israelis and one American remain; the rest have gone due to retirement (two), enticement by larger contracts (two) or simply let go (two). As a result, an almost completely new team has been constructed this summer - I don't write 'built' for the players have yet to coalesce into a whole, the team has yet to be built. And of these new players, whilst some are new to Europe, there are two who played for other teams in the Euroleague last year whilst at least one other played in a lower grade European tournament. As it happens, the American who remains from last year underwent an operation in the summer and has yet to make an appearance in any of the practice games. Thus Maccabi opened last night with four players who I've never seen before; unsurprisingly, the three Israelis made very important contributions.

These constant changes, including faces who last year were opponents, makes building a team identity very difficult. Of course, there are problems on the professional side but I'm not really writing about that but rather about the difficulty of an average fan to identify with his team. As I have written before, I am an armchair fan of Maccabi and there have been times when I have preferred to spend my Thursday evenings doing something else than watching an Israeli team being taken apart. But on the whole, Maccabi manages to supply teams whose performance exceeds what one might expect from their dry statistics, and these performances can bring a little joy into my life.

As per last the last few seasons, Maccabi opened with an away game in Spain (Malaga), but this time managed to win the game; towards the end of the first half, they even had a 16 or 18 point lead, which unfortunately evaporated in the third quarter, only to be partially restored in the final quarter. Such is the nature of the early stages of the tournament that this away win may be enough to secure Maccabi the first place in their group: most of the other teams (bar Malaga) are minnows and Maccabi will be expected to beat them. Thus beating the strongest other team in the group in an away game will be the 'something extra' needed in order to achieve first place. 

But this year, the structure of the Euroleague top 16 stage has been changed, adding more games; thus finishing first in the first stage has less meaning this year than it has done in previous years.

Don't worry: this is not going to turn into a sporting blog; I doubt that I will have any more to write about Maccabi for the next few months.

Thursday, October 04, 2012

Blues for S

I'm currently in one of those periods when I can't really concentrate on anything; I think it's due to the fact that Israel is in the high holiday period. We work a day, have four days off, work three days, have four days off, work three days, have two days off. I have all this time in which I could do anything but I don't seem to do much. This blog entry itself is going to be a bit of a hodge-podge in itself.

Last Friday, my trusted slow cooker developed a leak - I became aware of this when I smelt something burning. It turns out that there was a huge crack down one side, through which were leaking the juices of the chicken pieces I was cooking. The leaked juices were heated by the heating element and burnt, hence the smell. Whilst the food that I was cooking in the pot turned out ok (slightly underdone by my standards), I realised that there was no option but to throw the pot away. I have bought a new one but have yet to use it.

We had our first rain on Sunday evening; all day had been humid and by mid-afternoon I wasn't feeling too well. The weather as usual has been affecting me and I've been coughing much more in the past few days. I am considering resuming acupuncture treatments, this time in the hope of improving my immune system. Apparently, people who have had whooping cough are more susceptible to simple colds and chills, and have stronger reactions. That's not very good news for me.

I did a certain amount of programming - playing around with adding items to the system menu and discovering how I can sum a column in a query's result set without either iterating through the result set or using a separate query. I needed this technique in a few places in my programs but discovered that it didn't always work - it seemed impossible to sum a column which is in itself a calculated column. The answer to that is here.

Of course, I devoted some time to studying: I have completed my first pass through the 'Introduction to Business Research 1' text and have now started the second pass.

About the only thing that I did in the past week of which I am proud is that I managed to record a new instrumental! I was fiddling around on the guitar, playing a slightly unusual chord - F#m7add11; this name sounds weird but it's a simple guitar chord, played (from the bottom) x44200 - an F#m chord with the top two strings left open. Picking this chord in a simple arpeggio, combined with the effects setting on my amp (a small amount of phasing), produced an interesting sound. I started playing around with possible chord sequences and melody lines and evolved an interesting piece which seemed partially derived from a 12 bar blues sequence (although I doubt that anyone would guess this). I then went to the computer, sequenced the guitar arpeggio (with a certain amount of randomness) and continued from there - bass, drums and tune. I found an excellent guitar patch in Reason, which really 'makes' the track.

The piece itself is slightly strange as 'verses' 1, 2 and 5 differ from 'verses' 3 and 4 in their length (3 and 4 are elongated) and chord sequence (1,2 and 5 have a Em6 chord leading to C#9, whereas 3 and 4 have C#9, D9, C#9), although I don't know how many listeners will pick up on this. As befitting a jazzy-ish piece, the 'tune' undergoes a certain amount of development, along with changes in the instrumentation.

I had been listening to Miles Davis'  'Kind of blue' a few weeks ago and I think that some of that seminal recording's influence had rubbed off on me, for the main instrument in my piece is a muted trumpet. Of course, the 'playing' is somewhat stilted and nowhere near as fluent as Davis and his sidemen.

The piece is called 'Blues for S' and can be found at my SoundClick page. I hope that you'll listen and enjoy it.

Saturday, September 29, 2012

Watching the dark


The phrase "watching the dark" means different things to different people. As far as I am concerned, until recently WTD meant a Richard Thompson box set of three cds, which contained some fairly rare material. I am not aware of any previous use of WTD; the phrase would seem to come from the sleeve notes written by Greil Marcus.

But these days, it also means the title of a new book by Peter Robinson (in the DCI Banks series) - which internally refers in passing to the Thompson compilation. Frequent readers of this blog will know that I enjoy the police procedurals of Robinson, and the Thompson links are simply icing on the cake.


This book starts off with a murder in a police rehabilitation centre which DCI Banks begins to investigate; long time sidekick DI Annie Cabot returns to the team after having been shot in the previous book, "Bad boy", which enables Banks to travel to Tallinn (the capital of Estonia) in order to investigate a thread raised by the initial murder. As I considering a short trip to Tallinn combined with my projected visit to Edinburgh next summer, this section was very interesting (and to be honest is one of the reasons why I read novels - one can always learn about different places and jobs).


The first time through the book, I thought that there was too little active investigation; a fair amount of information fell into the detectives' hands through no intervention of their own - a passive technique which used to be frowned upon (in terms of literature; I am sure that most policemen would be only too pleased if vital information would fall on its own into their hands). But a second run through revealed that the detectives were somewhat more active than I had originally thought - although again, one key witness falls into their hands by default.

I wrote two years ago about the previous Banks novel, "Bad boy", and about editing mistakes (Robinson published a novel last year as is his habit but it was outside the Banks canon). This time around, I could only find three mistakes, one of which being a mistake in English grammar, one a debatable point and one definite mistake.

The grammatical mistake is towards the beginning of the book (location 2453 in my Kindle edition): "... and the most unattractive of the two [detectives]". If there are only two detectives, then the text should read "and the more unattractive". The superlative "most" implies at least three items whereas the comparative "more" means that only two items are being compared.

Chapter 7 begins with the sentence "Banks and Joanna were barely talking when they got to the hotel". To me, this implies that they had a row (on their way from Eastvale to Tallinn), but no such row occurred. Banks spent the flight listening to music whereas Joanna "had sat beside him with her laptop ... working on a report".  Whilst it's true that there wasn't much conversation, the opening sentence implies that they were actively not talking to each other. To me, this sentence implies that the tension between the two is at a much higher level than events would seem to show. As I wrote above, this point is debatable; I think that this sentence could have been safely deleted, as I was expecting some terrific row on the journey.

The third mistake occurs in the third part of chapter 10 and was very subtle: Banks and Joanna are talking to someone in the spa town Haapsalu; at one stage, the person says "Here in Tallinn" - but they're not in Tallinn! This mistake, of course, is hardly important but it shows a lack of copy editing.

Monday, September 24, 2012

Being a tourist in Israel: Tel Aviv

As both my wife and I had errands to run in Tel Aviv, we decided to run them together on Friday morning and then act as tourists by going to the Nachlat Binyamin street fair. The train to Tel Aviv was fairly empty (who travels at 9:30 on a Friday morning?), but the streets in the metropolis were bustling.

Once we had completed our errands, we traveled to the street fair. This is open twice a week (Tuesdays and Fridays) in a pedestrian only area. As much as I appreciate the fact that this fair makes one feel as if one is abroad, I have to point out that none of the stalls sold anything which could be described as 'useful'. Most of the items on sale were artistic artifacts - ashtrays, doorplates, ceramics with the occasional item of clothing. Colourful but not useful.


The only stall which remotely interested me was one selling musical instruments - wooden flutes, ocarinas and what might be termed a hammer dulcimer. This instrument was tuned something like D, C, A, G, F, D (I have very good relative pitch but not absolute pitch, and anyway it was difficult to hear with all the noise) which seems slightly limited. Playing each string in turn reminded me of a riff which took a few minutes to identify - it's towards the beginning of the long instrumental break in Richard and Linda Thompson's song "Civilisation".

It was pleasant being able to feel as if we were on holiday abroad without having to go to the effort of actually traveling abroad.

Saturday, September 15, 2012

My father's 90th birthday

It's my father's 90th birthday today and in a few hours we'll be going to a restaurant in the renovated Tel Aviv harbour district in order to celebrate with family and friends. My wife has been imploring me to write something for his birthday card, and whereas normally the words just flow (I'm having no difficulty in writing this...), I can't find a suitable place from which to start.

This being the Internet Age, I initially scanned many sites looking for ideas. There seem to be three approaches, none of which seem too appropriate
  • The witty/pithy approach: "Old age isn't so bad when you consider the alternative", "Life can only be understood backwards, but it must be lived forwards"
  • The deprecating approach: "You have reached that certain age/Where it’s acceptable to be/Grumpy and complaining/About everything you see"
  • Seeing things from my point of view: "90 years!/What a treat and a privilege for me/To have you hold my hand as I walked by your side/down life's pathways/for most of them"
My wife says to write something from the heart, but then it sounds like a eulogy, which is what I definitely don't want to write. I have the following line in my head "It's been an honour and a privilege to have known you for all my life", but the past tense implies that he is no longer with us. How can I phrase that in the present tense? "It's an honour and a privilege to know you for all of my life"? "To know you" implies something which is happening now, whereas "all of my life" is something which has happened over many years (albeit still happening).

It's an honour and a privilege 
To have a father such as you
Always caring about his fellow man
With barely a thought for himself
The values you have instilled in me
Are the best a son could ever wish
The only way to repay you
Is to wish you all the best on this
Birthday of Birthdays

Friday, September 14, 2012

Thursday, September 13, 2012

The Ministry of Health enquires about MY health

I wrote a few weeks ago that I received the results of the blood test for Pertussis (whooping cough) which I did on Sunday. Here are the results
Test value
Bord.Pertussis IgG 64 IU/ml
Bord.Pertussis IgA Positive
Bord.Pertussis IgM Negative

What does this mean? I haven't been able to find a suitable reference which explains the above in clear and simple English, but as far as I can gather, the IgA level means that I definitely had pertussis. My doctor may order a repeat test in another week or so; the Ministry of Health might also be interested in these results.



Today I got that phone call from the public health department of the Ministry of Health (well, they actually called my home phone number a few days ago and left a message; I returned their call today) who, as I imagined, contact everyone with a positive Pertussis result. The above results show that there are some remaining antibodies from my original vaccination (that's the IgG level which is on the low side) and that I have new antibodies (that's the IgA test - positive means that I did have pertussis). The lady on the other side of the phone didn't explain exactly what the IgM test is, but pointed out that some doctors refer to this as the deciding factor, whereas the MOH had issued an instruction three years ago that the IgA test was the most important.

This might explain why I received a note from the clinic saying that I didn't have pertussis - my doctor presumably was reporting the IgM test and not the IgA test.

The lady from the department of public health talked me through my symptoms, which of course match those of pertussis. She asked whether I had been abroad and I told her about Croatia. She also asked about other family members, but none of them were affected. Obviously the disease has run its course, but I still have the occasional severe coughing attack (the last one was exactly one week ago whilst sitting in my office and working on the computer); the lady advised me to keep my throat moist. I've been going to sleep with a Strepsil in my mouth for the past ten nights; the only night which I missed was the night I had an attack.

My voice is coming back to its former strength but it's still not there, and prolonged talking causes my mouth to dry which then causes the gag reflex to kick in which then causes me to cough. Fortunately, I don't generally talk that much at work (I communicate primarily by writing) but it's a problem when I attend meetings or give training sessions. I might even be able to resume singing soon.

Monday, September 10, 2012

PDF games

I've been looking for some time for programs which will convert PDF files into something else - either text or pictures (jpg). I need the latter for work with Priority - I was asked recently to alter a procedure which prints a work order for parts to be produced; the printout should also contain any files which have been linked to the parts. This is a very good idea and should save a great deal of time so I was enthusiastic about it, but I discovered that if the linked file is in PDF format, the PDF reader which we have installed on the servers stays in memory. A more elegant solution was to convert the PDF (generally a blueprint)  to JPG and then have the JPG printed. It transpires that the PDF reader which I prefer - the lightweight PDF X-change viewer from Tracker Software - has an option to do this ("export to image").

I have also been looking for a tool which will extract the text from PDF files - the recent posts here about the DBA degree could easily have been prepared using such a tool. The acceptance letter was created by creating a JPG file from the PDF letter which I received (see above), whereas the text about PhD vs DBA was extracted by marking the text (with Adobe Reader 9) and saving the marked text to a text file. Michael Covington has again opened my eyes by pointing out that Adobe Reader has a 'Save to Text' option on its main menu! D'oh!.

Sunday, September 09, 2012

What's the difference between a Ph.D. and a D.B.A.?

After having been accepted to the DBA programme, there was a little bureaucracy to be attended to; then I was able to download the text to the first required course, "Introduction to Business Research 1". Initially I downloaded in Kindle format (mobi) but later downloaded as PDF. I am considering whether to order the printed version as in the past I have had difficulty in reading course texts on the Kindle - one can only see a small amount of 'page' and I have found it easier to read the large, printed text (not because of the font size but because one can see more at the same time, including diagrams). I looked at the PDF version a few minutes ago and this is much easier to read than on the Kindle, but I baulk at printing some 350 pages.

One of the first things discussed in the text is the difference between the degrees PhD and DBA: I thought it worthwhile to quote that text here:

The aim of the DBA is to produce applied business research professionals who can use their doctoral-level skills at senior executive level in a business environment. The term ‘research professional’ should be clearly understood. It could be said that a Doctor of Philosophy (PhD) programme produces a graduate who is a professional researcher. He or she has developed a detailed theory or hypothesis in order to evaluate a specific piece of theoretical research. The hypothesis, or theory, could be concerned with almost any area, from molecular structure to particle beam physics. In many cases, there may be no direct application of the hypothesis or theory. To gain a PhD degree it is necessary only to demonstrate an original contribution to the knowledge base. A large proportion of PhD graduates continue their research either in academia or in non-academic organisations such as private companies and the public sector. The EBS DBA programme, in contrast, aims to produce research professionals. EBS DBA graduates are typically professional managers who are also researchers. The majority of DBA graduates will go on to work in a non-academic environment, primarily as senior managers who will not only retain their doctoral research skills but will also use them in a real and applied capacity within their organisations.

Friday, August 31, 2012

Fomer school friend knighted

I don't know quite why the urge arrived, but just now I googled an old school friend of mine, Timothy Holroyde. To be honest, I don't quite remember how we were friends as he was a year in front of me; I seem to recall that he lived nearby and was a classical scholar. I once hosted a fairly boring party at my house and he was a guest of honour.

I've tried googling other old friends, but apart from finding one person who seems to work for the Board of Education, I've only drawn blanks.

Anyway, Google started returning links to a Timothy Holroyde who had been knighted and appointed to be a Justice of the High Court. Could this be the same Tim that I knew, head boy of Bristol Grammar School in 1973?

The Queen has been pleased to approve that the honour of Knighthood be conferred upon Timothy Victor Holroyde Esq. Q.C and His Honour Judge Gary Robert Hickinbottom on their appointments as Justices of the High Court.
Notes for Editors
Timothy Victor Holroyde: Born in 1955 and educated at Bristol Grammar School; Wadham College, Oxford. Called to the Bar, Middle Temple, 1977; A Recorder since 1997; Bencher, 2005.

And this story is from January 2009! Well done, Sir! 

Thursday, August 30, 2012

Three emails

Yesterday evening I received three very interesting personal emails. I should point out that I subscribe to four music-related mailing lists so I normally receive anywhere between 30-60 emails a day; interesting personal emails are rare.

The first was from a lady who I met (in the new, virtual sense) via the Robert Silverberg mailing list several years ago. At first, her enthusiasm caught my eye; then I noticed that she was writing from an Israeli email address and so I had to contact her. After a few exchanges of personal email, I invited her to the kibbutz for a harvest festival which she and her daughter enjoyed. We started collaborating on Silverberg related material in Israel when our contact was abruptly terminated: she informed the mailing list that she was ill and would have to cease posting. Putting two and two together, I guessed that she was probably suffering from breast cancer. 

Anyway, she has now recovered and whilst she hasn't posted to the mailing list yet, she has written to me and we are renewing our connection. She writes that she was in contact with RS and his wife during the period and that they were very supportive of her.



The second email contained the results of the blood test for Pertussis (whooping cough) which I did on Sunday. Here are the results

Test value
Bord.Pertussis IgG 64 IU/ml
Bord.Pertussis IgA Positive
Bord.Pertussis IgM Negative

What does this mean? I haven't been able to find a suitable reference which explains the above in clear and simple English, but as far as I can gather, the IgA level means that I definitely had pertussis. My doctor may order a repeat test in another week or so; the Ministry of Health might also be interested in these results.

There exists a certain amount of dissatisfaction with the doctor who treated me during July and August: my regular doctor (who ordered the blood test) was abroad for several weeks and so I had to see his replacement. I get the feeling that she (the replacement) had never seen a case of pertussis before (although the kibbutz nurse guessed correctly!) and wasn't too sure what to do, so she covered all the bases. In her defense, I should note that the illness is very difficult to diagnose in the early stages and that once it has taken hold, there is very little which can be done save let nature (and antibiotics) take its course. She could have ordered the blood test which I did on Sunday, which would have at least helped me psychologically (I always maintain that people feel better when they are diagnosed with an illness, no matter how severe, than to suffer from undiagnosable aches and pains). She also wasn't very supportive in her manner, as opposed to the regular doctor who goes out of his way to make his patients feel that he cares.



The third email came from Heriot Watt University. I took my final exam for the MBA degree at the beginning of June and expected to receive the results by the end of July (I tacked on the cubicle wall facing me certificates from previous exams and note that the relevant ones from previous years are dated 19 July and 22 July). All through August, I checked the university's website looking for the results, but none appeared. Eventually I decided to write to the university and ask what was happening - this mail obtained an immediate result, this third email which I am writing about. I was informed (without apology, I think) that my results had not been linked to my file and that I would see the results "tomorrow" (ie today). This, I suppose, is the digital age version of 'the cheque is in the post'. Of course, almost the first thing that I did this morning was to log onto the website and check my mark.

Well, I passed the exam with a mark of 60%. This is lower than I would have liked but as I wrote before, "From the grading guides which I have seen, it is very difficult to achieve an outstanding mark in this exam. It is also quite difficult to fail - as long as one uses the analysis format (which has been drummed into our heads) and one mentions the process method enough times. So it's clear that I passed although I have no idea what the final mark will be." 

This means that I have now completed all my scholastic obligations and so am entitled to the MBA degree to be awarded in next year. Documentation which I have from the university says that "Students will be contacted about a month after the completion of all the obligations with an information pack about graduation". Theoretically this month has already passed so I shall contact the local college where the lectures were held to see whether such an information pack has arrived for me.  

Somehow I feel almost numb about these results; whilst I am pleased that I have passed, it doesn't seem to affect me at all. Maybe I'm starting to worry that my marks aren't good enough to be accepted into the doctoral programme - although I can say that most of the courses which I took were completely divorced from my working life, whereas my proposed doctoral research is something which sits at the centre of my job.

Tuesday, August 28, 2012

Disappointing blood test results

Way back in February and January, I wrote about a dairy drink called Danacol, which is supposed to reduce blood cholesterol levels. I had a blood test done at the beginning of February in order to establish a base level and had another yesterday in order to see how six months of Danacol have influenced my cholesterol levels. Here are the tabled results of my last three blood tests:

Date cholesterol triglycerides HDL (good) LDL (bad) ratio
15/08/11 205 149 39 137 5.26
03/02/12 188 135 44 117 4.27
26/08/12 207 197 44 124 4.70

All of the numbers - save the HDL - should be as low as possible. It's clear to see that apart from maintaining the HDL level, all the other values have deteriorated! In other words, assuming that everything else has remained the same, Danacol had no effect on me!

Of course, as a scientific experiment, there are several problems. 
  1. I am basing my data on one measurement point (ideally the values should be measured weekly, or at least monthly)
  2. I am assuming that the food that I eat has remained the same (not too difficult, seeing as I almost always eat the same) - for example, I might have been eating more 27% fat cheese than before, as opposed to 9% or even 5% fat. I certainly have been drinking more milk (although mainly 1%) in the past six months (Spring/Summer) than in the previous six months (Autumn/Winter).
  3. I am assuming that my recent illness has had no effect on the lipid levels
  4. The body is not a perfect machine
 My immediate decision is to stop buying Danacol! Your mileage may vary.



Some of the blood which was taken on Sunday will be tested for Pertussis (whooping cough) antibodies. Apparently it is possible to determine whether there are any 'old' antibodies remaining from when I was inoculated as a child and whether there are any new antibodies which were created in the past few weeks. If there are new antibodies - then I did suffer from Pertussis. The results have yet to arrive.

Wednesday, August 22, 2012

The first step (in solving problems) is the hardest

Continuing a very erratic series of blogs about problem solving, I want to describe a real life problem which I faced and how I solved it. The psychological aspects of this story are more interesting than the problem itself.

First, a little history. I have described before how my company is actually an amalgamation of two (if not three, four or even five) previously existing companies, each with its own specific product line and way of doing things. In terms of our ERP program, the two main companies each have their own environment; whilst many things are the same between those environments, certain things (some crucial) are different.

The Board of Directors decided that as from 01/01/13, we will all work in one environment. Such a decision was made a year ago as well, but was rescinded almost immediately. I've been working on creating a joint environment for the past month or so and have solutions for almost everything (MRP is going to be a real problem!). We decided that initially the development work would concern itself with changing what needed to be changed in order to allow the two companies to co-exist; only later would efforts be made to change those work habits which I consider to be worth improving.

On Monday, I was informed that the merging of the environments is to be postponed for another year and that I was to stop all development work (some of which was contracted out to our ERP consulting company). I would give equal odds that the joint environment will not be active on 01/01/14, but that's irrelevant.

One small issue in the merging process was that of part prices. Our ERP program allows two mutually incompatible approaches: supplier price lists or 'only one price per part'. Naturally, one company uses the price list approach whereas the other uses the 'one price' approach. As far as I am concerned, the price list approach is far superior, for it allows one to manage several prices for the same part (one price per supplier), to allow quantity discounts (one can define a price for amounts 1-249, a separate price for amounts 250-499 and a third price for 500+; these quantities are not fixed, so a second part might have one price for quantities under 1000 and a second price for quantities over 1000), and of course a proper history of prices is maintained. Tools exist for automatically updating the supplier's price list should prices be increased by a given percentage.

I can't really see any advantages in using the 'one price per part' approach, although I might be blinkered. I think that this approach's supporters would probably say that they only ever have one supplier per part and so don't need the flexibility. I think that they're wrong.

Anyway, we had to make a decision as to which approach would be used in the single environment and supplier price list was the choice. I had informed the people in the purchasing departments that use the single price approach that they would have to begin preparing themselves for the change before I knew that the project was abandoned (or postponed), so theoretically I could now tell them that they could continue working in the same manner to which they were accustomed. Whilst this might be considered a violation of the Prime Directive - don't change work habits which don't need to be changed - I considered this an opportunity too good to be missed.

I considered the problem of implementing the change. Each part has a defined purchase price and a designated supplier; my intention was to take this information and build price lists for each designated supplier. But when I tried to define a price list manually, the program informed me that I could not do so as the environment was working by part prices. When I tried to change the system variable which determined by which approach the program worked, I was told that I can't change the variable as there are extant part prices.

I felt that I was facing a chicken and egg problem - I need the part prices to create the price lists but I can't create price lists without deleting all the prices - and of course, if I do that, then I will have no prices with which to create the price lists!

How would you solve this problem?

After humming and hawing for a bit, I outlined a four stage strategy
  1. Write a procedure which will take the existing prices and output them to an external file in a format which will be conducive to reading them back in again 
  2. Delete the existing prices
  3. Change the system variable
  4. Create an interface program which will read the file back and create the price lists
The first three stages went smoothly, but I had difficulty in reading the data in the file, so much so that I was unable to create a single price list (there were also problems with the file itself, but that's irrelevant).

Of course, now I was left with a test database bereft of all the part prices so I couldn't continue with anything. My next step was to copy part prices from the production database into the test database - for around 16 thousand parts! Whilst this step would have taken about fifteen minutes in good circumstances, it transpired that there were at least thirty parts defined so badly that one is unable to update them. This caused my rate of copying to be severely compromised, taking maybe an hour to do so (and some part prices I didn't bother copying). 

Taking the time allowed me to think a little about what I was doing. I vowed that before doing anything else, I would copy the price parts to a separate location within the database so that I would be able to repeat the conversion process if things went wrong without having the same problem of manually copying  all those prices and getting stuck with problem parts. As it happened, there was a vacant field in the parts table which I could utilise for this purpose.

Then the penny dropped. The prices were stored in a field called purprice, and the system variable was checking whether there were any values greater than zero in this field. Copying the prices from purprice to a field (which I'll call savedprice) allowed me to zero purprice - and thus change the system variable - whilst maintaining the price in savedprice. I could write a procedure which would build the price lists from the saved prices. In other words:
  1. Save price in new field and zero old price
  2. Change system variable
  3. Run procedure which reads the prices from the new field and creates supplier price lists
The program needed in stage 3 here was much simpler than the program required in the previous stage 1 and utilised an interface which already exists (no need to write a new interface program which proved problematic). I was able to write the program - and painfully debug it - in about an hour; converting the test database from one approach to the other took about fifteen minutes with a minimum of pain.


As I wrote at the beginning, I am more interested in how I arrived at the insight necessary to solve the problem and less in how I actually solved the problem. It has been my experience that the solution to many problems are simple to implement/code once a suitable approach has been adopted; the problem is finding the suitable approach.

I had so blinkered myself with the chicken and egg aspect that I couldn't see at first how the simple initial step of saving the required data (prices) in a different place would enable me to solve the problem. Cat Stevens once wrote a song called 'The first cut is the deepest' (initially recorded by P.P. Arnold and then possibly by Rod Stewart); in problem solving, I would say that 'The first step is the hardest'.

I noticed this same blinkering effect with people trying to find an optimum solution for the puzzle in which four people have to cross a river with a two person canoe. Those who started with the slowest person crossing first (Andrew and David in my example) had great difficulty in finding the optimum solution, whereas those who had the two fastest people (Andrew and Brian) had less difficulty.

The lesson to be learnt from this example is how to convert what seems to be a chicken and egg problem into something more simple. We'll see whether I've learnt anything the next time such a situation arises.