Wednesday, September 24, 2014

Happy New Year!

שנה טובה ומתוקה


Tuesday, September 23, 2014

Literature review

I see that I haven't written anything about my current stage in the DBA, writing the literature review. This is primarily because I had a great deal of difficulty getting started with it. I felt burnt out after the efforts of the research proposal, then I had to deal with continual headaches, a computer which felt the same way as I did and extreme heat. Fortunately I pulled myself together and for the past two weeks I've been working quite hard on the survey.

I am still a bit unclear as to what I am supposed to be doing which is why I am going to read the relevant parts of the IBR2 text again in the next few days. I actually started off by pulling together a history of ERP (and where it is headed) in a similar format to the research proposal. This is material needed for the thesis but not for the literature review. Once this material was completed (at least, to a certain extent), I could then concentrate on the review.

According to my current level of understanding, I am to find as many papers as possible about ERP and feral systems, then write about them critically. I started off with literature surveys, as I already had four papers in my 'library' on this subject. Then I moved onto case studies of ERP implementations - so far, I've found about eight or nine - and then I'll write about case studies of feral systems. Today I found an interesting paper which details an implementation failure. At some stage, I will also have to write about the papers dealing with the psychological aspects.

Fortunately, we are now entering the High Holydays period of the Jewish calendar so I have plenty of time to write about all the papers and get the review into a decent state.

Sunday, September 21, 2014

Grilled chicken breast

A new dish - at least, for me - made its debut on the menu over the weekend: grilled chicken breast. I'm not sure from where the inspiration for this came as it's not something which Jamie Oliver has shown on his programme. On Thursday, I looked for some recipes and found a suitable marinade. The problem with chicken breast is that it becomes dry even when it's slightly overcooked, which is why my wife doesn't like it very much; the marinade infuses the breast with liquid which prevents the meat from drying when cooked. Of course, one has to cook for only a short time.

I made this for myself for Friday lunch and was so pleased with the results that I repeated it for Saturday lunch, where it was greatly appreciated.

I had expected to buy chicken breasts then flatten them myself, but I was able to buy pre-sliced chicken 'shnitzel' which was exactly what I wanted.

Marinade:
½ cup olive oil
¼ cup balsamic vinegar
one chicken oxo cube

This makes a large volume of marinade but it can be used several times. I placed the pieces of chicken in the marinade for about two hours - one hour is the minimum. When it was time to cook, I grilled the pieces under the oven grill for ten minutes on one side and five on the other. Perfect.

Ideas which I want to try in the future:
  1. Cooking with the griddle pan instead of the oven grill - this will create char lines
  2. Brushing a little honey onto the meat before cooking - for the Maillard reaction (browning)
The marinade recipe came from this site; reading the recipe again, I see that I forgot to cut slits in the meat. I also forgot to serve with lemon slices. Better luck next time.

Friday, September 19, 2014

The dead lie down (Sophie Hannah 2)

I wrote about discovering crime novelist Sophie Hannah just over a year ago. A few weeks ago, I decided to give her books another chance, chose a book at random then reread 'The truth teller's lie'. It was quite good, although my opinions as noted in the earlier blog haven't changed: I don't like the chapter division, I don't like the characters and the police don't seem to detect anything professionally.

I saw a few days ago that another book had been dramatised and would be shown on television, using the same cast. This was broadcast last night, and with no preconceptions, I watched - and generally enjoyed - "The dead lie down". I am always going to be pleased by anything in which Olivia Williams appears so I suppose I am somewhat biased. But my wife joined me after I had watched the first half hour on my own and she stayed till the end, meaning that the programme was good, even without the presence of Ms Williams.

On the detection level, the entire case seemed to hang around fingerprints on a letter and some CCTV footage. On a personal level, it was exceedingly unclear what the relationship between DS Zailer (Williams) and DC Waterhouse (Darren Boyd) was supposed to be; it was totally clear that Zailer was extremely jealous of a relationship (which was probably imaginary) between Waterhouse and a female DC ... but how this resulted in Zailer bedding Waterhouse overnight is beyond me.

I suppose that I'll read this book next and discover that everything has been changed, apart from the names. I admire someone who can take a book which might not be too well written and turn it into a coherent television script.

...

After dragging myself through two chapters of the book, I can safely say that everything has been changed except for the names of the participants.

Thursday, September 18, 2014

Walking with the GPS

After getting settled with my new mobile phone, I realised that I could probably use an Android app which would measure the distance and time of my evening power walk. So I downloaded something called 'MapMyWalk', entered some initial definitions then started walking. When I came home, I looked at the results and discovered that I had walked 0 km in 40 minutes. Obviously something was wrong.

I rationalised this by suspecting that the GPS was having difficulty in discerning my movements, considering that I was effectively 'walking around the block', a distance which might be beyond the powers of the GPS to resolve. I deleted the app from my phone (thus learning how to delete unnecessary apps).

A few days later, I was riding in a car with someone who also received a new phone (although this one replaced an earlier smartphone); he was using Waze to discover the fastest route home from Tel Aviv that day (and just as well he did because we avoided a traffic jam which could easily have added 30 minutes to our travel time). The first thing that he did was activate the GPS on the mobile phone.

The penny dropped: I had to activate the GPS before the walking app would work. It seems painfully obvious in retrospect, but I had assumed that the app was capable of turning on the GPS by itself and had actually done so. 

So last night I downloaded the app again, turned on the GPS and set off for my walk. I have to walk about 100 metres before I get to my starting point; I use this time to warm up. Coming back, I turned the app off when I reached the end point instead of waiting till I got home. Whilst this means that the distance walked will be slightly wrong, I will get a better indication of what was happening during the power walk itself. Whilst I was walking, I vaguely heard the phone 'talking' to me but I didn't catch what was being said.

At home, I looked at the screen and discovered that I had walked 3.38 km in 32:39 minutes at a pace of 9.4 mins/km (or more familiarly, 6.38 km/hour) and had burned 255 calories. I think that the calorie total is misleading as the walk isn't intended primarily to burn calories but rather to get the metabolism moving and that the total calorie count will be higher. I'm surprised that I was walking so fast as I start off fairly slowly (at least for me; I've always been a fast walker) and I know what 6 km/hour is like on the treadmill.

Now that I have some data, I can track my progress. I've discovered that I can also access this data via the app's website which is much easier than via the phone, and that I can get a weekly activity report sent to my email address.

Incidentally, I weighed myself last Friday morning - 79.2 kg. I walked on Friday and Saturday night and also swam 16 lengths on Saturday morning. My weight on Sunday morning was 78.7 kg, which is almost a record. I hope that I can keep my weight below 79 kg - if not lower. I also did a blood test on Sunday and my cholesterol levels are getting lower: "cholesterol" is now 171 mg/dL, triglycerides 154 mg/dL and HDL 42 mg/dL.

Friday, September 12, 2014

Importing a csv file into a multi-sheet workbook with automation

There hasn't been a blog about programming for some time. This isn't because I haven't been programming but rather because I haven't come across any new techniques which are worth describing here. Today, of course, is different.

I was tasked with exporting data from the Occupational Psychologist's management program to Excel; I have done this many times previously. But the twist was that two sets of data were to be exported, preferably to separate sheets within one Excel workbook. My first solution was to use 100% automation - create the workbook, add a sheet, add the data, add another sheet, add the data, then finalise. Technically, this is fine but it's slow.

I then looked at my favourite solution for speeding up Excel automation: outputting the data into a csv file then importing this file into Excel. Whilst my standard code handles this without difficulty, I couldn't see how I could import data into the second sheet. The solution came after an interim version in which I imported both sets of data into the same sheet.

All I had to do was create a new sheet, cut the required data from one sheet then paste it into the new sheet. Voila - this way I could have my cake and eat it. I performed the task manually once whilst recording it into a macro so that later I could duplicate the macro code with automation.

The following code starts after the data has been stored in a tstringlist called 'csv'. During the export, I noted how many lines were needed for the first data set ('start') and how many for the second set ('stop').
 s:= mydirname + inttostr (gettickcount) + '.csv';
 with csv do
  begin
   savetofile (s);
   free
  end;

  xlApp:= CreateOleObject ('Excel.Application');
  xlApp.visible:= false;
  xlApp.workbooks.open (s);  // this imports the csv file into the spreadsheet

  xlApp.Range['A' + inttostr (start) + ':F' + inttostr (stop)].Select;  // this builds a string like A12:F46
  xlApp.Selection.Cut;                   // cut the data
  sheet:= XLApp.Sheets.Add;              // add a new sheet to the workbook  
  sheet.select;                          // select the new sheet
  xlApp.activesheet.paste;               // paste the data
 
  xlApp.sheets[2].select;                // go back to the first sheet 
  xlApp.activesheet.Range['A2'].Select;  // remove the selected area after the cut

  xlApp.visible:= true;
  sheet:= unassigned;
  XLApp:= unassigned;
All I had to do was lose the preconception that data from one query had to be imported into one sheet and data from the second into the second sheet. Once I had the interim solution of both data sets in the same sheet, the solution became clear.

Thursday, September 11, 2014

Last of the Luddites

My lack of blogging over the past few weeks has not been due to the problems which I had with my home computer, but rather a combination of deadly headaches, loss of motivation, over-heating and nothing much to write about.

On 19 May, 2011 - just over three years ago - I wrote about receiving a new mobile phone, a Nokia 3710 fold. This was hardly top of the line at the time, but now it's a fossil. There had been rumours that my company would be replacing the old, dumb, mobile phones but I didn't pay much attention. On Sunday, out of the blue, I was asked which model I wanted (i-Phone 5 was the immediate and joking reply), out of a choice of two: Samsung Galaxy Trend Plus or Nokia 802. After some inter-family consultation, I plumped for the Samsung.

Today I received it and this evening I will set it up (or rather, my daughter, who worked for a year for one of Israel's mobile carriers, will do so). Then I will try and learn how to use this new object. I've been looking at the user manual for the past few days and it actually doesn't seem to be too daunting. Of course, I'm not particularly interested in the advanced, 'smart', abilities of the phone; all I want, at least at the beginning, is to make and receive phone calls along with managing my contacts.

This review has been very helpful to me. I don't see any irony in the fact that I receive my first smartphone almost the same day as the i-Phone 6 is announced. I am a Luddite in terms of mobile telephony and have no need for all the whizz-bang functionality (nor the cost) of a top-line phone. One advantage of this model - as opposed to the Nokia - is that "The Samsung Galaxy Trend Plus does not take micro SIM cards as many smartphones do today. Instead, it works with the old-school standard-sized SIM cards, aka mini SIM cards." So I can take the SIM out of my old phone, place it in the new, and immediately start calling all my contacts, without the need of any data transfers.

"On the front of the device is located a VGA camera for selfies and video calls. Image quality is poor, but having a front-facing camera is better than not having one at all" - this, of course, is very important to me (not!), likewise "Technically, the Samsung Galaxy Trend Plus is capable of recording 720p video, but it isn't very good at it. Footage is grainy and low on detail, as if someone has stretched a 480p video to fit into a 720p frame. Indoor and low-light videos are even worse – barely usable, we'd say". It's like stereo separates: if I want to film video, then I'll use a video camera.

Apparently my mobile plan includes 50Mb data so I can be connected to Whatsapp all day long. I doubt very much that I'll ever use the phone in order to surf the Internet as I have a computer at home, another computer at work and a third, mobile, computer, all of which are connected to the Internet. 

[MPP: 514; 0, 1, 6]