Sunday, April 29, 2012

Two films

I saw two films yesterday which couldn't have been more different in style and in content: 'The girl who played with fire' and 'Serious Moonlight'.

The first film ('GPF') is, of course, the second installment of the 'Millenium Trilogy', about which I seem to have written quite a lot. The film was in Swedish, but I'm used to reading sub-titles, so this wasn't a problem (Hollywood has only made a version of the first book so far). Fortunately, the film makers read the book and edited the multiple storylines into something much more understandable; the film runs for almost exactly two hours. In fact, I'm not sure whether the film makers dumbed down the book too much; knowing the story allows my mind to fill in any details which might have been missing from the film. Otherwise it was a faithful rendition of the story and was executed well. Not very much coffee drinking and protagonist Blom­k­vist didn't get much bedroom action.

The second film is a newish film (2009) of Meg Ryan. Co-starring is Timothy Hutton, who was Ryan's fiance in 'French Kiss'; maybe this film is the sequel to that earlier film - at least, had Ryan married Hutton, instead of Kevin Kline. The first hour of the film was tolerable, but after that it completely degenerated and finished a mere twenty minutes later. It's as if a whole section of the story had been left out. I felt short changed at the end of the film, and its good parts in no way compensate for the exceedingly weak ending. This is definitely not a film worth seeking! 

Ryan and Hutton are supposed to be a couple who have been married for thirteen years; at one stage, there is a flashback to their wedding party and some wedding photos are shown. Fair enough, but the two actors don't seem to have aged since their wedding (in other words, they look exactly the same in the flashbacks as they do 'today'). Had the producers bothered a bit more, they might have tried to get some pictures of Ryan and Hutton from their earlier film - they definitely look younger then!

Saturday, April 28, 2012

Indexing on a calculated field in a TClientDataSet

Two months ago I wrote about generic code for creating indexes (or indices, as I would prefer) on every field in a clientdataset. Yesterday I discovered two caveats to this code
  • An index is not created for a field which is not displayed
  • An index is not created for a calculated field - in fact, trying to create an index for such a field causes an error.
 I was working on a report whose query contains a field which returns a number which is then used as an index into an array ('cash', 'cheque', 'transfer'). It seems like too much overhead to define a table for means of payment when there are only three such means, so the program contains an array of strings, and certain tables contain values which index into this array. I want the report to display the name of the means of payment as opposed to the index, and so I have to use a calculated field. If the user should click on the grid's title bar, then the report is supposed to sort itself according to the chosen field; that's why there's an index for each field. But how is one supposed to create an index for the calculated field?

It took me a while to get to the correct answer. The first caveat above states that an index is not created for a field which is not displayed - but this does not mean that I can't manually create such an index. The calculated field's value is based on the value of the non-displayed field, so what I did was to create an index for the non-displayed field, but number it as if it were the calculated field.

I had to alter the 'BuildIndices' procedure so that it now reads like this
Procedure BuildIndices (cds: TClientDataSet);
var
 i, j: integer;
 alist: tstrings;

begin
 with cds do
  begin
   open;
   for i:= 0 to FieldCount - 1 do
    if fields[i].fieldkind <> fkCalculated then
     begin
      j:= i * 2;
      addindex ('idx' + inttostr (j), fieldlist.strings[i], [], '', '', 0);
      addindex ('idx' + inttostr (j+1), fieldlist.strings[i], [ixDescending], '', '', 0);
     end;
   alist:= tstringlist.create;
   getindexnames (alist);
   alist.free;
   close;
  end;
end;

Then I added two extra lines to the calling program; the calculated field is the sixth field so its indices are idx10 and idx11, and these values would have been skipped in the above code.
 BuildIndices (qReceiptsList);
 with qReceiptsList do
  begin
   open;
   addindex ('idx10', 'cash', [], '', '', 0);
   addindex ('idx11', 'cash', [ixDescending], '', '', 0);
   alist:= tstringlist.create;
   getindexnames (alist);
   alist.free;
  end;
This works very nicely.

Friday, April 27, 2012

Metonymy

This is an intellectual warming-up exercise for my proposed doctorate, discussing how the use of spreadsheets negatively affects the successful implementation of ERP programs. I literally woke up this morning thinking 'Excel', and then went over several points in my mind. The following material is probably written in an anecdotal style as opposed to an academic style, which means that this material probably won't find its way into the final product. 

 I first came across the word metonymy in David Lodge's excellent novel "Nice work". Here it is described as "substituting some attribute or cause or effect of the thing for the thing itself". Looking around on the Internet, I discover that two classical rhetoric terms, metonymy and synecdoche are almost the same thing, and at the moment I can't really distinguish between them. 

[I]t is often difficult to distinguish between metonymy and synecdoche. Plastic = credit card is a case of synecdoche because credit cards are made from plastic, but it is also metonymic because we use plastic to refer to the whole system of paying by means of a prearranged credit facility, not just the cards themselves. In fact, many scholars do not use synecdoche as a category or term at all." (Murray Knowles and Rosamund Moon, Introducing Metaphor. Routledge, 2006).

My examples of metonymy mainly come from the commercial world, in which a leading product comes to represent all the products in the same market
  • Can you hoover the carpet?
  • I'll just pop this cassette on my walkman
  • Let me google that
  • Send me some excels and I'll prepare an evaluation
Although this sort of thing doesn't happen so much in Israel, it certainly exists in the hi-tech world ("send me the excels"). I heard one lovely example of the television a few months ago during a news article discussing the affects of mobile phones on pre-teenagers: "What kind of Pelephone is your i-phone?".  Pelephone is a metonymy, as this was the name of the first mobile phone carrier in Israel (literally, miracle phone). Since then, more carriers have joined the market, but some people still refer to mobile phones in this manner.

I am sure that marketing managers would be very pleased when their product transcends the market and become the name for the market. Rowland Hanson was Microsoft's marketing manager in the early days, and he dictated that the product's name should be prefixed by "Microsoft" in order to enhance the Microsoft brand as opposed to the actual product name. His suggested name for Microsoft's spreadsheet program was 'Microsoft Plansheet', whereas other names considered were 'Number Buddy', 'Mr Spreadsheet' and 'Sigma'. 

Finally a district manager suggested Excel: Bingo!

Upon the program's release, Microsoft was promptly sued by Manufacturers Hanover Trust, which offered a computerised banking service under the same name. A settlement stipulated that use of the word was okay - as along as it was preceded by Microsoft. Rowland Hanson's revenge was complete.
(Stephen Manes and Paul Andrews, "Gates" (1994), pp 276-7.

All of the above is a long-winded explanation of why I will probably use the specific product name "Excel" in the doctorate's title as opposed to the generic 'spreadsheet'. You mean that there are other spreadsheet programs (cue a blog about the history of computer spreadsheet programs)?



Wednesday, April 25, 2012

Debt of Honour


Lately I've been struggling to read 'Debt of Honor' by Tom Clancy; reading this book is like putting one's life on hold for a few weeks. The printed version of the book weighs in at just over 900 pages; I can tell that it's a long book on the Kindle because I read and read, but the percentage meter stays at 10% (it's now at 82% which means that the end is in sight! Hurray!).

As with all of Clancy's books, it is in dire need of an editor to chop out all the extraneous sentences. It's a shame that Clancy devotes so much love to the military hardware - something with which most of his readers will have had no personal experience whatsoever - whilst devoting less attention to more familiar subjects, like characterisation.

I reflected at one point that it is a good thing that I have taken an MBA degree, as this book touches (sometimes at depth) on several of the subjects taught. There's a great deal of macro-economics and finance (spoiler: the Japanese try to take down Wall Street), there's probably project management, organisational behaviour and human resource management and there's certainly negotiation. Of course, the entire book is about strategic planning! The only things missing are accountancy and marketing.

Regarding negotiation, it was interesting to read what Clancy writes on the subject, now having completed a course in the subject. And by a neat coincidence, today the results of the negotiation exam arrived - 79! This means that supposedly negotiation is my second best subject, nestling between accountancy and project management. I will be the first to admit that my high mark is due to knowing how to answer the questions, and is not due to my extensive knowledge of negotiation. Maybe with a little practice, I might actually become a negotiator - but it's not my personality. Had I received another mark, I would have been in the 'X' grade ("A with distinction").

Friday, April 20, 2012

Levon Helm, RIP

Levon Helm, singer and drummer for the Band, died on April 19th in New York of throat cancer. He was 71. 

"He passed away peacefully at 1:30 this afternoon surrounded by his friends and bandmates," Helm's longtime guitarist Larry Campbell tells Rolling Stone. "All his friends were there, and it seemed like Levon was waiting for them. Ten minutes after they left we sat there and he just faded away. He did it with dignity. It was even two days ago they thought it would happen within hours, but he held on. It seems like he was Levon up to the end, doing it the way he wanted to do it. He loved us, we loved him."

Wednesday, April 18, 2012

Mixing and producing

Someone on the Peter Hammill mailing list asked a few weeks ago about the difference between mixing and producing (I don't recall what the background to this question was). I wrote an answer, most of which is quoted below. Unfortunately, there was no follow-up to the question, so I couldn't add any more material to my answer. But as I have a blog, I can expand as much as I want....

Mixing, in a nutshell, is balancing all the various sound sources together to make a coherent final product. This includes setting volume levels (which might change during the course of a song), panning, equalisation (tone), reverb (along with other effects), etc. This is generally done by the producer along with his engineer, although there are people who specialise in mixing songs which have been recorded by other people. The mixing stage takes tracks which have already been recorded, so the mixing engineer might have nothing to do with recording the tracks themselves. A good VdGG example would be Shel Talmy - according to The Book, Shel took the tracks which had been recorded by John Anthony for 'The least we can do' and mixed them, adding more treble.

Another good example of a mixing engineer working separately from the recording is the story of The Band's "Stage Fright". This was recorded by The Band themselves, so they can be considered to be the producers. They sent the tapes to two different producers, Glyn Johns and Todd Rundgren, and asked each of them to mix the album. The final product contains mixes by both producers, though no one seems to know who mixed what. As I have several different accounts of this process, I don't remember exactly who said the following phrase and where it was quoted, but this sums up the dilemma of the separate mixing engineer: There are four different guitar tracks. Which is the track that they wanted?

Originally, as someone else pointed out, a producer was the person who booked the session - the musicians and the studio - and liased with the record company (a good example of this would be Teo Maceo and the Miles Davis records that he produced). There would have been an A&R (artistes and repertoire) person who would have chosen the material to be recorded. In the early 60s, this situation began to change with the likes of Sir George Martin and Phil Spector, who became much more involved with the songs themselves. These days, there are several kinds of record producers: the kind that we know is someone who listens to a band demo recordings, comments on their structure, suggests instrumentation, oversees the recordings and picks the takes. Each producer has his own strengths and weaknesses, and of course his function is also dependent on whoever is being recorded. 

The best way for understanding a producer's contribution is to listen to the output of the same group with different producers - eg VdGG pre- and post- 1972. The earlier recordings (especially H to He and Pawn Hearts) have large numbers of overdubs and are quite theatrical, whereas from Godbluff onwards, there seems to be much less overdubbing and a more direct sound.

Try listening to 'House with no door' followed by 'My room' - two recordings with the same instrumentation: piano (Peter Hammill), bass (Hugh Banton), saxophone (David Jackson) and drums (Guy Evans). Listen especially to the difference in sound of the drums and vocals between the two songs: in the first song, the vocal is panned to one side and has a certain amount of reverb added to it, as do the drums. In the second song, the sound of all the instruments is dry (no reverb) and almost all the sounds (especially the vocal) are panned to the centre. In other words, John Anthony's productions are distinguished by their use of reverb and stereo. 

I'm not saying that JA's tracks are better or worse than the self produced tracks that came after the reformation in 1975 - they simply sound different. VdGG also took a producer's decision when they decided to 'dumb down' (my words) their sound when they issued 'World record', which is exceedingly simple, at least when compared to their earlier works. Of course, a real producer would have done something about the length of 'Meurglys 3'....

Obviously, the number of channels available when recording make a big difference. When a producer had only one or two tracks, there was very little that he could do regarding the technical side, so the sound would be mixed live and the producer would influence mood and rhythm. Even when there were eight tracks available (for example, 'The least we can do'), the producer was still somewhat limited, but sixteen, twenty four and thirty two tracks gave the producer much more room. Of course, in today's digital world, the number of tracks is basically unlimited, which can make the job of both the producer and the mixer very hard.

Most tracks, thankfully, are produced well, but there is the odd track which could have had a better production. I was listening to one such track today - 'Full moon' by Sandy Denny. Her first solo album was coproduced with John Wood and Richard Thompson, and features RT on every track. Whilst the sound may not be the best, it is certainly distinctive. Her second solo album, 'Sandy', was produced by husband to be Trevor Lucas, and is richer sounding and more even (I think that it's the best produced of all her records). But after that, Lucas' production skills declined (if ever he had any; Richard Thompson plays on all the 'Sandy' tracks and so counteracts any of TL's mistakes), and her final solo record, 'Rendezvous', was a complete hodge-podge.


'Full moon' is a good song: it has exquisite lyrics, a good tune but a so-so harmonic palette. The recording features one of Sandy's best vocals, improving on the written tune and providing excellent phrasing. But the arrangement - with or without the strings - is plodding and pedestrian. The string arrangement tries to be good, but it is very one dimensional. To be fair, there isn't much of a chord sequence with which to work. The only good part of the instrumental track is the clarinet solo, played by Acker Bilk (of all people). This is the work of a so-so producer.  The fact that there are five verses (four with words and one instrumental) necessitates variety in the arrangement, in order to maintain the listener's interest. Whilst Sandy's impeccable vocal certain catches the ear, the somewhat boring string arrangement and lumbering rhythm only serve to turn the user away. A good producer would have recognised that a different instrumental approach was necessary.

Tuesday, April 17, 2012

Strategic planning

As I've mentioned a few times before, my final course for the MBA degree is called 'Strategic planning'. For a variety of reasons, the flow of this semester has been problematic: frequently there has been a lecture one week but not the next. This has made it hard to get a handle on the course material. I spent some time, however, in the past week, going over the lecture notes and improving my understanding. There were only five or six lectures which dealt with source material, and most of these reiterated material which came from previous courses such as accountancy, economics, finance and marketing.

That said, a more appropriate name for the course might be 'Business Analysis': after finishing the source material lectures, we moved on to practicing examination questions, and these tend to require an analysis of a company on the basis of data provided in the question. I completed one of these exercises when I was ill and we went over it the last time we met (nearly two weeks ago).

The day following the lecture, I found myself in a meeting with one of the business units of my company, discussing their performance. This business unit behaves as if it were existing fifty years ago: there is only a nodding acquaintance with the ERP program, the manufacturing side tends to be ad hoc (every order is different and there are no real standard products) which means that purchasing similarly is haphazard. There are no real marketing forecasts and each project is manually analysed with the help of a spreadsheet. Their inventory management is a disgrace.

During the course of that meeting, our CEO performed an analysis as if he had been sitting in the lecture the previous night (he already has his MBA degree); obviously he didn't calculate financial ratios, but he was very strong on the conclusions and list of actions which have to be taken. As I commented to the CFO (my boss) afterwards, we should send all the business unit's managers to business school as it can only improve their understanding.

Since then, I've done a little work for them by giving tools for forecasts and costing, but it will take some time before they start using them (if at all). I have been trying for the past three years to get them to use the ERP program in order to run their production but this seems to be one huge up-hill climb. Until recently, I felt that there had been no progress whatsoever, but now it seems that the CEO is going to add his influence and be present at some of the future meetings, which means that changes might actually get implemented.

They performed a stock taking at the end of March and I have been working on some analyses the past few days (which is why I am reminded of my current course as I note failings and how to correct them). Today I came across a particularly egregious mistake which I thought that I would note here.

One of the standard (or almost standard) products that this business unit makes is the entire apparatus which holds the basket (see picture). I analysed the bill of materials for one such product before the holiday and discovered to my surprise and dismay that the final product was composed of 50 sub-assemblies! This means that for every such basket apparatus, 50 work orders have to be issued and there have to be 50 completions entered into the system. As at the moment, this business unit has difficulty in entering even one such completion, I can't see how they are going to enter fifty. Presumably changes will have to be made in the bill of materials in order to cut down the number of work orders.

But, even worse, today I discovered a problem with the inventory costing of this product. One of the sub-assemblies is made by a sub-contractor: we supply him with parts, he produces whatever he produces and issues an invoice for his work. So far, so good. But the good people in this business unit order from him the final assembly and not the sub-assembly which he makes - thus every time the sub-contractor issues an invoice (which we faithfully input into our system), we add another unit of the final product to our inventory. 

To use some figures: the sub-contractor charged 850 NIS for his work for one sub-assembly. But inventory recorded one complete assembly at a value of 6,000 NIS! At that moment, the value of our inventory was artificially inflated by 5,150 NIS - which of course improves our bottom line.

Ooops!

Sunday, April 15, 2012

I've sort of been on holiday for the past week and a half, which would explain the lack of blogging. It was the Passover week, during which the company in which I work is normally closed. My daily schedule was something like -
  • work - between one and two hours a day, although one day I did travel to Haifa bay, making that a full day's work
  • reading - between one and two hours a day
  • television - the Educational television ceased screening 'Spooks' a few weeks ago, reverting to 'Silent Witness'. I recorded several episodes before having the opportunity to watch even one episode, but I'm slowly working through the backlog
  • programming - I spent several hours a day at the beginning of the week working on programs for the Occupational Psychologist
  • sequencing - I've been working on sequencing a version of Van der Graaf Generator's song 'Pilgrims'. I've completed one version, but when I play it back, it gets boring towards the end. I need to find something interesting for the second chorus.
  • eating - probably too much. My weight stayed the same for the week, which I take as a good sign
Actually, the most interesting thing that happened took place before the holiday -  a week ago last Wednesday, I had a lecture in Strategic Planning, where the class discussed a problem that we had been set, which was about a company with several products, some of which were losing their way. The next day, I took part in a meeting at work about one of our business units which functions as if the computer had yet to be developed. I felt that the evening before, I had been going over the academic aspects of how to run a company, and that during the meeting, I was getting a practical lesson in running a company. My conclusion: the managers of this business unit ought to take a course in business studies!

If I'm talking MBA, then I have to report on our mystery visitor from a fortnight before. I talked with a student who had been hovering near the economics lecturer while he had been talking to the visitor, so she recalled who I meant. She didn't know who it was, but she was certain that it was not Professor Schechtman. The only real way of knowing is by asking the economics lecturer, but he has finished his series of lectures on a Wednesday evening and so I will never see him again (unless we have some form of graduation ceremony, but I doubt this).

Wednesday, April 04, 2012

Spring is in the air

April might be the cruellest month, but as far as I am concerned, it welcomes the arrival of Spring. The clocks went forward last Friday, giving us an extra hour of sunlight in the evening (but I'm walking the dog at dawn); the temperature has increased by a few degrees, causing me to change to my summer footwear (Crocs Santa Cruz), and all the worries which were shackling my feet for the past month have disappeared.

Spring is in the air!


It's also the time when thoughts turn towards summer holidays: I've tentatively started planning this year's adventure. Our destination will be Dubrovnik, where we will spend about ten days. Dubrovnik offers a wide range of self-catering apartments of various sizes, and these seem to be a cheaper but more conducive environment than hotels. These apartments also seem to be  reserved very quickly which is why I have already booked an apartment in the building whose picture appears on the left. We'll presumably have have half of the top floor.

The next most important factor after accommodation is transport; I spoke with our travel agent yesterday about flights from Tel Aviv to Vienna and thence to Dubrovnik, but she said that in the summer months there are direct flights from Tel Aviv to Dubrovnik. We'll get an update in the next few days.

I have probably written this before: sometimes it seems that I derive more satisfaction from arranging these trips than I do from actually taking them. This time I intend that we have time for evening strolls on the beaches or in the Old Town, a chance to relax and enjoy ourselves instead of a compulsive need to try and see as much as possible whilst utilising every minute to the maximum. I've been setting up a variety of day excursions (including visits to Montenegro and Mostar), although I haven't ordered these yet.

One thing of which we will have to beware is the vast number of day trippers who descend upon Dubrovnik (by staying over a week, we can morally look down on most of the tourists!) from the huge ships which ply the Adriatic. This will mean that most days we will take a trip out of Dubrovnik during the central hours of 10am - 4pm, then spending time in the city in the late afternoon/evening.