Wednesday, September 04, 2013

Welcome to the Beehive - My gap year, part 2

As this evening we will be celebrating the Jewish New Year, it seems only fitting to wish all my readers a happy and healthy New Year!!

Going back 40 years: we lived in two rows of huts, where each row had five rooms. Boys were two or three to a room, girls two. Conditions were what might be termed spartan, but somehow it didn't seem to bother us too much. The communal showers unfortunately weren't close to our huts, which would be problematic later on in the winter.

One day in the 'early' period,  I was walking between the two rows when an effervescent guitar riff (as I was later to term it) caught my ear. When I asked what I was hearing, I was given a cassette copy of the 'Poogy Tales' album by the Israeli group Kaveret ('Beehive' in English). I was very impressed by the sound, even though the whole cassette seemed to be one continuous song. Later on, of course, the songs separated into individual units and it became clear which songs were excellent and which were merely very good.

This music was to accompany me for the entire year: at the end of year party, I was to perform one of the songs in front of the entire kibbutz.

The record started with a short introduction which basically was the words 'one can learn from Poogy Tales'. What exactly one could learn was never specified; presumably everyone would learn their own lesson. What I learnt from those songs was the Hebrew language; obviously it took a lot of work, but like a long lost mosaic, bits and pieces of those lyrics were slowly deciphered, assimilated and understood. As it happens, I was listening to this record again the other day and was explaining one of the puns to my wife.

But - initially, at least - the words were not the attraction for me. Even today, whilst I appreciate lyrics to songs, I'm really listening and reacting to the music. There was something very special about the first Kaveret album, something which had yet to be heard in Israeli music. Their sound was built on contrasts or pairs: there was a pair of lead vocalists (one high, one low), there were two lead guitarists (both very good), and there was a keyboardist who could take things in his own direction away from the others. The arrangements were exciting and at times, unexpected, combining disparate elements to forge a unique sound.

Almost all the songs (words and music) for the first album were written by one person, guitarist Danny Sanderson. Their second album also was mainly written by Sanderson, not surprising as it was based on leftovers from the first album. But their third - and final - album featured a wide spread of writing credits and musical styles. This was the beginning of the end: there was a vast explosion of talent which the group structure could not contain and so the best Israeli group ever called it day after only three or four years of activity.

Every ten years or so, they would get together for a reunion, which would mean a few open air concerts and possibly a live album - but always the same songs (this sounds remarkably like Fairport Convention in the 80s). This year (2013), they reunited for what they call the final time; there were five concerts, each attended by 20-30,000 people. Commentators performed cost analyses and reckoned that each member of the group (and they are seven) walked away with anything between one to two million shekels. Not bad for a few weeks' work. This probably was final compensation for the early years.

Unsurprisingly, a box collection has just been released. My initial thought that the box would contain the original albums and one or two reunion concerts, but it transpires that this box set has been two years in the making and almost all of it is unheard material. There are six cds and two dvds; bar one dvd, all the material is from 1971-6. As one might infer, I am listening to one of the discs now.

The first disc contains three rock operas, recorded before the group had only five members; the second disc contains their comedy skits (of which there were a lot). The third and fourth discs document a live performance held in Jerusalem some time in 1974 (I can't find the actual date), which means that this would be very similar to the performance which I saw in May 1974. The fifth is a live in the studio run though the songs on their third album and the sixth is a collection of alternate versions and oddities, like English language versions of a few well known songs, and a few English-only songs which were written at the end of their career and trying to get a recording contract in America.

The first dvd is a television concert performance from 1975 (black and white!) whereas the second is from their first reunion in 1981. The box set is packaged very well and is completed by a one hundred page booklet which contains a large amount of information as well as the texts to some of the skits.

This monster package has a price list of 329 NIS (about $90): expensive, but value for money. I was prepared to pay this amount, but as it happens .... I received as a New Year present, the third book by Dan Arieli which has just been published in its Hebrew translation. As I purchased the book - in its Kindle edition - a year ago, I was able to return the book to the shop from which it was purchased and obtain a credit towards the box set. In the shop, I was told that normally one couldn't credit a returned book towards a cd, but that they would make an exception in this case (maybe because it was a box set? maybe as a gesture towards the New Year?). So strike 96 NIS from the price. The sales girl told me that I would have to pay 153 NIS. As I signed the credit card slip, something about the arithmetic gnawed at me: it turns out that there was an extra 80 NIS credit which they had given, presumably to reduce the expensive 329 NIS price tag down to a more reasonable 249 NIS.

In the past few days, I had been intending to write about New Year in Israel, 1973, but I seem to have been somewhat sidetracked. I'll continue this subject tomorrow.

It was 40 years ago today - My gap year, part 1

4 September 1973 marked the beginning of the most important year of my life. It was the year in which I changed from a youth into a man and the year in which I learnt the meaning of the word 'responsibility'. These days, such a year would be called a gap year, but this term had yet to be invented in 1973.

-- some historical background
Until a few years beforehand, the Zionist youth movement 'Habonim' maintained a farm in Sussex which served as a training establishment for young men and women before they emigrated from Britain to Israel. This farm was supposed to give them experience before they settled in the primarily agricultural kibbutzim of the 1960s. I was too young to know much about this farm, but I did spend a week there in the winter of 1966 (aged 10). The farm was probably closed down at the end of the 60s because of financial reasons, but there were other changes happening. The number of senior Habonim members who were students had increased - so there were far fewer older members who could go and work on a farm - and air fares from Britain to Israel had become affordable, meaning that one could go to Israel and experience 'the real thing'.

A programme was started in 1970 called 'Shnat Hachshara' (a year of preparation), in which school leavers could spend a year on kibbutz, preparing for eventual emigration. Although most of the year was dedicated to working, time was also spent learning the Hebrew language and learning about Israel.

I was in the fourth group to participate in this programme. As this was still fairly new, there were all kinds of people around who were free to participate, not necessarily only those who had just left school. So my course was very heterogenous, whereas in following years, the groups were much more homogenous. In my group, there were three barely seventeen year olds (myself and two Scottish youths - in those days, Scottish youth finished school a year earlier than their English brethren), there were eighteen year olds who had finished school, and there were several older youths who had left school much earlier and had been working at various jobs, marking time. This heterogenity would be a problem throughout the year.

I wrote earlier this summer about finishing school with underwhelming results. Had I been anyone else, it would have been a good idea to stay another year at school (or a sixth form college), but I was dead set on participating in this programme and nothing could change my mind.

We were supposed to travel on 3 September - a historical date in itself - but there were problems with the aircraft, and after a few delays, we spent the night in an airport hotel (at the airline's cost) and eventually left 24 hours later than intended.

My group - as the three previous groups - would spend the year in Kibbutz Bet Ha'emek, near Nahariyya, in the north western part of Israel, a very tranquil area. This kibbutz had been founded by a group of British Habonim members in 1948/9 although over the years it had taken in members from many countries. Thus while Hebrew was the official language, most people there could speak English as well as other languages (French and Dutch spring to mind). The original settlers had children about the same age as my group, which aided our integration.

In those days, the ability to work well was considered to be the most important facet of a kibbutz member, so I had devoted some time to thinking about where I would like to work. I had some discussions on the subject with a good friend of mine who had been in the third group: working in the fields didn't sound appealing, and milking cows certainly didn't attract me. He told me about one branch which seemed very intriguing: a hatchery for chickens. I decided that I would try and work there.

The first few days after arrival were very confusing, as one might imagine. We elected a member of the group to be our work organiser - he would meet every evening with the kibbutz work organiser, learn how many people were needed in each branch of the kibbutz then assign group members to those branches. I imagine that we all aspired to working permanently in a branch, but first we had to become acquainted with the branches, and secondly we were dependent on the needs of the kibbutz.

I was told that there was no vacancy in the hatchery, but that I would work in one of the chicken runs. So on my first day of work (probably our third day on the kibbutz), I was woken at around 5:40 in the morning and staggered off to where the chicken runs were (someone might well have taken me because I had yet to visit that area). I remember that we (someone else from our group was assigned here as well) sat around in a stone building for about fifteen minutes, drinking tea and being told in broken English what we were expected to do. Then we were launched into our careers - or thrown in at the deep end, depending on which metaphor one prefers.

As opposed to most chicken runs, where the chickens are grown for meat, these runs were for breeding chickens: the eggs were fertile and would be collected to that they could be transferred to the hatchery. Our job was simply to walk up and down the runs, collecting the eggs. Just to put things in perspective, these chicken runs were upto 100 metres in length and maybe ten metres wide, so doing a complete collection took a few hours. There were several runs in the complex.

Down the center of each run were wooden structures into which the hens would enter so that they could lay their eggs. We had to walk down the run, poking our hands into these structures (like pigeon holes), feel around for eggs (the holes were filled with sawdust so it was never clear whether one would find an egg) then extract them and put them in the trays which we were carrying (30 eggs per layer). Sounds simple. Unfortunately, it would happen that a chicken sitting in a pigeon hole would peck the tentative hand reaching into the structure, causing the recipient to jump in shock. Also, the floors of the runs were covered with chickens (naturally), and the cockerels didn't take well to young, well brought up British youths wandering about. So these cockerels used to charge at these youths - run at them and flutter their not inconsiderable wings. 

I found this very difficult to take; I was told to walk as confidently as possible so that the chickens would automatically get out of the way, but I couldn't handle this easily and so lasted there for only a few days. I did work one or two days during this period in the chicken hatchery, but I didn't really understand what I was expected to do and so probably didn't make much of an impression. 

September was the time of the cotton harvest and I remember spending a few days on my own in a large container. Every now and then, a tractor would come along and dump a load of freshly picked cotton into the container. It was my job to jump up and down on the cotton, thus compressing it and allowing more cotton to be added. Of course, these days there is a machine which does this work.

We would work one day then learn Hebrew the next; I think that this was a better arrangement that the previous year, when they would learn Hebrew for a few hours then work for a few hours. Being good at languages - and having learnt Latin - I didn't have much of a problem learning simple Hebrew, whereas my companions had problems with tenses and declensions. Of course, we were also learning Hebrew at work - the first words which I learnt were "Bo le'echol"  (come and eat) - which I was told at regular intervals.

We were assigned 'kibbutz parents': we became adopted by a family and would go there for tea most days. These meetings allowed us to ask about the kibbutz and all the strange things that were happening to us. Later on, we used to visit other people for tea, thus getting to know more and more kibbutz members. For some reason, the family which was supposed to adopt me couldn't, so after a few weeks of being an orphan, another family adopted me.

The first few weeks between our arrival and Rosh HaShana (the Jewish New Year, which that year would have fallen around 28 September) were thus spent getting to know our new environment. Little did we know what was about to happen.....

Tuesday, September 03, 2013

Frederik Pohl, 26/11/1919-02/09/2013

I was saddened to read this morning about the death of Frederik Pohl, who was one of the leading science fiction writers. According to his website, Fred went to the hospital in respiratory distress yesterday morning and died yesterday afternoon.

I first became aware of Fred Pohl in the summer of 1973 when I found one of his stories in an SF anthology. I didn't particularly care for the story, and neither did I care for the famous collaboration, "The Space Merchants", when I read it sometime in the 70s. Pohl had a chapter in the book "Hell's cartographers", which was composed of six autobiographical essays of science fiction writers (I bought it for the Robert Silverberg chapter). Again, I wasn't over impressed by what I read, but the very fact that Pohl was included in the book meant that he was a force to be reckoned with.

At the end of the 80s, I picked up a second hand copy of his book "Heechee Rendezvous" in a street market in Jerusalem, not knowing that this was the third part of a continuing series. At first, I had great difficulty understanding the plot of the book, but after I bought the initial books of the 'Gateway' series (and the final installment), I not only understood the third book, but also developed a deep appreciation for the 'Gateway' series and Mr Pohl himself.

Presumably in the early 90s I found a copy of Pohl's autobiography, "The way the future was", which was certainly interesting, although a great deal of it was about times long past (the twenties to the forties) and not particularly relevant to its date of publication.

I have read several other Pohl books, including "Jem", "The coming of the quantum cats" and "Man plus", but none of them seem as gripping nor as funny as the Gateway series. Maybe the fault lies with me.

Anyway, Pohl had a generous innings, falling shortly before his 94th birthday.

Monday, September 02, 2013

The Magic of Belle Isle

I saw this film the other night on television and thoroughly enjoyed it. I doubt that anyone would claim that it is a major piece of art, but it gave me a good feeling. True, some parts of it were perfunctory and could have been expanded, but I'm not complaining.

I found a very interesting interview with director Rob Reiner, which explains all kinds of things about the film. The budget for the entire film was five million dollars (Julia Roberts gets/got 20 million per film!) and it was shot over only 25 days.

Wednesday, August 28, 2013

Nothing more


A few weeks ago, I was listening to my take on the traditional Irish tune, "Killarney Boys of Pleasure", during my evening perambulations. As this song followed my versions of some Sandy Denny songs on my mp3 playlist, I was still thinking about which additional Sandy songs I could sequence. It struck me that I could use the basis of "Killarney" for "Nothing more", the song which opens the eponymous Fotheringay album.

True, the chord sequences are slightly different: "Killarney" is Em/Bm whereas "Nothing more" is Em/C, but that wouldn't be a problem. The real problem of "Nothing more" is that its harmonic palette is so limited - it's composed of six verses, three of which are Em/C and three are C/Em, as well as another two instrumental verses of Em/C. At the end of each verse, there are two repeats of D/Em. So it was clear that any arrangement would have to rely on stylistic and intensity variations as opposed to harmonic variations.

I did "cheat" by changing the chords in the instrumental sections to Bm/A but that doesn't seem to make that much difference.

Anyway, I started of with a very quiet verse, with acoustic bass and a mixed pad, then slowly built up the sound with cor anglais, soprano saxophone, clarinet, cello and arrpegiated harp. I really like the clarinet lines. When I had finished the arrangement - and listened to it for a week, tweaking here and there - it was time to record the vocal.

As far as I remember, this went fairly quickly: there were several false starts, as usual, and I had to repeat the final verse, but otherwise there were no problems. It took me several hours to find a vocal sound with which I was happy (equalisation and reverb). After a few more days of listening, I decided to make a copy of the vocal for a few verses, then with the help of my vocal tuner program, I was able to create a simple harmony vocal track. This was mixed in stereo, and placed 'behind' the main vocal.

I very much liked the result, so I decided to place it on the Internet and share it with the Sandy Denny mailing list. True, I have received only two responses, but they were both very favourable:
  • I like the composition, the instrumentation, and your voice, too. Will be in my iTunes library.
  • Thanks for the cover. It's beautiful.
You can make up your own mind by listening to the song.

Appendum: after writing the above, I went for my evening walk. Nick Drake was first up on the mp3 player and I thrilled to the sound of his guitar and the restrained arrangements of the late Robert Kirby. When I came home, I found an excellent midi arrangement of Drake's "Day is done" on the Internet. I liberated a few bars of the guitar part, switched the notes around slightly, then added them to my arrangement of "Nothing more" in place of the pad. The resulting track has more space between the instruments and is slightly less mechanical (one of the advantages of playing a 'pointillist' part through the NN-19 sampler is that the stereo position of each note can be random). I'll have to listen to this version several times before I decide which will become the "official" version. I'll also have a deeper look at "Day is done", especially at the strings.

Tuesday, August 27, 2013

Children of the revolution

The end of August means that there is a new Inspector Banks novel available, written by Peter Robinson. This novel, in keeping with the partial tradition with Robinson has established, is named after a song, in this case one by T. Rex. The song itself was not particularly good; it is not referenced in the novel (can one imagine Banks listening to T. Rex? Maybe to their predecessor, Tyrannosaurus Rex, but not the teenybopper music that Marc Bolan made from 1971 onwards).

This year, I bought the Kindle version of the book: I clicked on the payment form on Amazon, connected the Kindle to my wifi, and a few minutes later the book was available for reading. Amazing!

The novel itself is not so amazing. Whilst I had difficulty in putting it down (I read it over the course of a weekend), I wouldn't class this book amongst his best. I've been trying to think of reasons why ...
  1. A body is found after heavy rain, thus there are no forensics.
  2. There doesn't seem to be any real motive for the death - it isn't even clear whether the death was caused by murder, manslaughter, accident or suicide.
  3. Banks' team investigates only one death, thus there's none of the two pronged attack (Banks on one side, Annie Cabot on the other) which make some of the later books so good.
  4. Annie's characterisation is making her more bitter and less attractive as the years go by. Sergeant Winsome Jackson - who could have been a star - is given more inner dialogue than in previous books and turns out to be a prude. It's very hard to identify with her.
  5. Hints are tossed out at the beginning of the story that Banks is due for retirement (he is approaching 60) but may be promoted instead. I expected that the story would end with some reference to this, but no.
  6. Similarly, it seems that Banks may have found a new romantic relationship, but there's no development.
So, due to the lack of forensics, the team (only four people) work on the meagre leads that they have. Banks is warned off one lead as this involves a friend of the Chief Constable - of course, by the end of the book, one sees that this was the correct path. The whole investigation seems to be arbitrary, and it's only by chance that a solution is found. I doubt that this would happen in real life.

I'll give the novel another read but I doubt that I'll be more impressed. At least I didn't notice any mistakes - Robinson thanks several people for copy editing.

At the end of the novel, there was an advert for 'other books that you may enjoy', including a new Ian Rankin novel. It seems that Rebus has rejoined the police after the retirement age has been increased, and he investigates something along with DI Fox. That book will be published in another few months. So it seems that Rankin hasn't started writing books with Siobhan Clarke as his main protagonist. 

Throwing in hints about Banks retiring is taking a page out of the Rebus universe. I can understand why the police might be raising the retirement age - people's life expectancy is growing and there isn't enough money in the retirement funds to keep people for twenty years.

Monday, August 26, 2013

Chaining functionality

I see that I've hardly written any blog posts this month; it's not because I've been sunning myself in the Bahamas without access to the Internet, but rather because I've been too busy at work with all sorts of activities which aren't of much interest here.

As it happens, there was a nice coincidence of events the other day: the same procedural issue reared itself both at work and also with the Occupational Psychologist, so I feel that I can write about it here.

At work, there was someone who wanted that orders be marked after she had printed labels for that order. I asked her how she printed the labels and here was the explanation (my words):
  1. I run program A which extracts data from the order and places them in a temporary table
  2. I run program B which prints labels from that temporary table
  3. I run program C which deletes all my entries from that temporary table.
The OP had something similar:
  1. Change status in a docket
  2. Add default meetings to that docket
  3. Print the checklist of exams for that docket (based to a certain extent on the meetings for that docket)
In both cases, I was able to suggest a change in their work-habits which reduced the amount of overhead: I suggested that they chain their activities. Of course, such chaining is dependent of the programmer and not the user. In the first case, I added to the beginning of program A the command to delete entries from the temporary table, and at the end of the program, I added the command to print the entries in that table. I also suggested to the user that she run the program from within the order screen itself, which saves having to input the order number to the program. All she has to do now is press a button and the labels print automatically.

In the OP's case, changing the docket's status to a certain status will now cause the default meetings to be added to that docket, and adding the default meetings will cause the checklist to be printed (or more accurately, displayed in Word, prior to printing).

In both situations, the original programmer concentrated on atomic activities: this is correct, but can be improved. In the work situation, there are many programs which have to print labels and it is advised always to clear the temporary table before adding new values. So these activities are written once and called many times. But chaining these activities together didn't require me to "reinvent the wheel": printing the labels is accomplished by adding a print stage to the original program, and cleaning the user table is a one line SQL command.

I have noticed that users tend to have a very data-centric or atomic view of their activities whereas I tend to have a more process-centric view which works at a higher level. Hopefully, adding these two higher level programs will open the eyes of the users to the fact that with a little glue, one can work at a higher level, achieve more in less time, and minimise the overhead.

Sunday, August 25, 2013

Research questionnaire

Over several instances of taking the dog for a walk, I've been thinking about the questionnaire which I will be using for my doctoral research. In the background, there is also the work which I am currently doing for the Occupational Psychologist regarding our aptitude exam - calculating standard deviations and item analysis. 

It became clear to me the other day that the questionnaire can be divided into two logical sections: the first section gets data regarding the various dimensions that I wish to check (ie person's age, experience with ERP, level of formal education, department) and the second level gets data regarding the user's work habits. At the end, I intend to run correlation analyses on the work habits to see which dimensions cause an affect in the work habits. I realised a few days ago that I need to formalise the work habits section by giving a score which would reflect the level of 'end user computing' (EUC). I haven't checked the questions which I have developed so far, but I think that they don't give me a quantitative value but rather qualitative data.

Developing this thread; I thought that it would be a good idea to try and incorporate within the research questionnaires a competency exam for Excel. Instead of having questions like 'Do you use the IF function in your spreadsheets (yes/no)?', I could have a question like
When you enter data into a cell and press the Enter key on the keyboard, the cursor will move to ...
  1. The cell below the cell where you entered the data
  2. The cell to the right of the cell where you entered the data
  3. It will not move
  4. The formula bar so that you can check your data
  5. Not sure
Having such questions in the questionnaire will allow me to assign a value to the user's competency in Excel, and then I can see whether there is any correlation between this value and the user's personal data.

Yesterday evening, after walking the dog, I started googling 'excel competency test' and found several interesting sites. I continued looking until I found a multiple choice questionnaire which was exactly what I was looking for (the above question comes from this questionnaire).

I'm not sure whether I took the test purposely giving wrong answers (so that the feedback to the exam would give me the correct answers) or whether I tried to answer the exam honestly. Anyway, I achieved a score of 10 out of 17, which is possibly higher than I had expected, although maybe I was confusing this test with another which I tried, in which I didn't get a single question correct. This second questionnaire wouldn't be very useful for my purposes, as I need a spread of values, but the first questionnaire seems at first sight to be good.

I will translate the questions into Hebrew, put them into a program and then test them out on people at work. This way I can fine tune the competency part of my research questionnaire.

The above question reminds me of another piece of the puzzle that is called a thesis: at some stage, I want to include some historical data regarding spreadsheets. 'Everybody' knows that the first computer spreadsheet program was called 'VisiCalc' which was written around 1978 (or was it 1976?) for the Apple 2 computer (in fact, it was the 'killer app' for this computer and caused millions to buy the computer). The developers weren't able to port VisiCalc successfully to the IBM PC; the original spreadsheet leader was Lotus 1-2-3. Excel's birth and success are linked to that of Windows which didn't really take off until 1986-9. I remembered that on the PDP-11, we had some kind of spreadsheet program in about 1984 which was called 'Saturn-Calc'. I went looking for clues about this program the other day and actually managed to locate its author, with whom I have exchanged a few emails. Anyway, I came across the author in a mail which he sent to the development team of Open Office, detailing an option in Saturn-Calc which allowed the user to choose to which cell the cursor would go after pressing 'Enter'; the developers thought that this would confuse users so decided to go with Excel's behaviour, which is to go to the cell below the cell where the data had been entered. 

So the answer to the above question is 1.

Friday, August 23, 2013

My first visit to America

Whilst looking for my old diaries, I came across old passports and so discovered that I first visited America on August 23, 1978. When I blogged earlier about this visit, I wrote that I couldn't remember anything about the days before flying, but now the memories have returned.

As I wrote before, I was living in Cardiff over that summer. On Friday, 21 August, I took the train to London and as I had nothing better to do, I went to the cinema to see the film 'House Calls'  (with Walter Matthau and Glenda Jackson) which had just been released. The next day I was with a group of friends and we decided to go to the cinema; by default we ended up watching 'House Calls'! The film on the plane to Newark was ... 'House Calls'!! The film itself was quite good but not worthy of watching three times in three days.

My hosts in San Francisco were my best friend's sister and the sister's husband. I had met them a few months earlier when they had come to London; as a gesture to my best friend, I took them around a few sights in the city then had dinner with them in the sort of restaurant which I would never visit (touristy and very expensive). I remember arriving at SF airport at midnight (which for me was 8am - I had been traveling for 24 hours) then phoning my hosts, expecting them to collect me and not realising how far the airport was from the city. They told me to take a bus to the bus terminal which I did; they collected me from there.

They lived in an apartment on Seventh Avenue, near Golden Gate Park. On my first day, after clearing the cobwebs in my head, I set out for the park and rambled. For me, this was the first of several historic sites: the first 'Be-In' was held here in January 1967; only eleven years previously but it seemed like a lifetime. From the park I walked down to the Haight, bought a book and a record which I was looking for, then retired to eat lunch under a tree in the park (in those days, I still ate in MacDonalds).

After having eaten my burger, I took stock of the situation and quickly realised that I didn't have enough money for my three week trip if I continued spending at the same rate as I had started. This simple fact cast a pall over the entire trip and prevented me from enjoying it more.

I don't remember now all the things that I did in San Francisco and certainly not in which order they occurred so I'll simply list what I do remember. After a week, my hosts 'cast me out' and I had to move to a cheap boarding house for another week. I misled the owner about exchange rates sterling to dollar which he wasn't too pleased about. Places I visited in the city were the Golden Gate Bridge (of course), North Beach, Sausalito, Chinatown, the Pacific shore line (I walked what seemed like a hundred blocks in order to get there!), Fisherman's Wharf and the Embarcadero (there was a jazz group playing on the grass) and Berkeley University, across the bay. One day I took a combined boat and bus trip to various places in Marin County, simply to see something new.

I remember attending a service at a synagogue on a Saturday and hanging around outside hoping that someone would notice me and invite me to dinner. I was too shy to approach anyone directly, and as a result no one invited me.

On my final day, I wasted some precious dollars by traveling to Candlestick Park to watch a baseball game; director and actor Ron Howard threw the first ball. I very much enjoyed the day and bought a 'SF' baseball cap which I wore for the rest of my trip. It seemed that San Francisco was divided into two parts: the side where I stayed which was sunny whereas 'the other side' (including Candlestick Park)  seemed to be in perpetual cloud.

My primary influences had been 'On the road' by Jack Kerouac and 'The electric kool-aid acid test' by Tom Wolfe.

After two weeks in San Francisco, I took the Greyhound bus to New York: my plane ticket was to San Francisco but my return was from New York. I had planned this in advance so that I could see both cities. The bus left at midnight and went via Sacramento on its way to Reno, Nevada (cue song). I awoke here after a muddled sleep and thought that there was a half hour stop, so I got off the bus to stretch my legs. The bus drove off almost immediately after I disembarked, so I was stuck in Reno for twelve hours with no money and only my copy of John Le Carre's "Honourable Schoolboy" (which I had bought in Heathrow on my way to America) to keep me company. As the Americans say, bummer.

Once back on the bus, I tried to make the best of my situation. The bus would stop every few hours so that people could eat and/or visit toilets. The Americans always serve big portions but charge accordingly, which I couldn't really afford. At least once, someone paid for me to have a meal at a diner. One morning, in some mid-West town, I looked for a grocery store where I bought a loaf of bread, a jar of peanut butter and a carton of chocolate milk: I ate peanut buffer sandwiches for the rest of the journey. I was hoping that my rucksack would have got lost (it was traveling on the first bus) so that I could claim compensation, but the rucksack was waiting for me in the Port Authority building.

Once in New York, I thought that I would be able to stay with members of Habonim. After all, in London, we frequently hosted people who were passing through. Unfortunately (yet again), my expectations didn't match reality; every night I had to find new lodgings which weren't always conducive (I had no money for a hotel). For the last few nights of my visit, I stayed with a family in a comfortable house - but this was in Long Island, so I had to spend money on trains into and out of the city. 

Due to me wearing the SF baseball hat, more than once people thought that I was from San Francisco rather than from Britain, although one woman in Central Park who drew my portrait without me asking to do so complained about 'hoity toity Brits' after I declined to purchase the portrait (no money).

The only things that I remember (at the moment) of this visit were Central Park,'Guernica' at the Museum of Metropolitan Art (where I saw the first non-comedic Woody Allen film, 'Interiors'), and pinching a book* from the New York public library, a book which I had been unable to find in the myriad second hand bookshops which line Manhattan. Obviously, my lack of money ruined my stay and prevented me from remembering much. On the final day, I mosied around the city, trying to delay the inevitable, but eventually I came to the Port Authority and took the shuttle bus to JFK where I spent the night (I had done this a few times in Israel as well, after arriving there late at night). 

In Heathrow, my parents met me and took me back to Cardiff where I spent a week or so before making the final trip to London prior to emigration.

* The book was called "The boy who could make himself disappear" by Kin Platt; I had become aware of the book as I had seen the film 'Baxter' (based on the book) a few weeks previously and had been deeply impressed. To quote a review of the book, "I first read this book thirty years ago and literally thousands of books later I still vividly remember the impact it made on me. I think I started crying about page fifty and didn't stop until the end. The subject matter, child abuse and willful neglect, is ugly, but the telling is done with such subtlety and delicacy that to this day this book still sits on my shelf. I've recommended it to quite a few young teens who I knew were strong enough to take it and virtually all of them loved the book. Even the fact that the ending is hopeful rather than happy doesn't put them off. Kids are realists more than we think and I believe they appreciate the author not taking the nicer and therefore easier way out with this work. They can get all the cute and sweet stuff they want from Disney, Kin Platt wrote about the real world where happily ever after doesn't always happen. Sometimes it's good to remember that." 

I couldn't put it better myself.

Monday, August 12, 2013

Puzzle

Once upon a time, Jews in Israel (and everywhere else) had strong, Biblical names. Boys were named Abraham, Isaac, Jacob, Joseph, Adam, David or Jonathan, whereas girls where named Sarah, Leah, Rachel, Miriam, Rebecca or Hannah. Why, even my grandparents were called David, Rebecca, Joseph and Sarah; my mother was called Hannah. But such days are long past, and nowadays children get all kinds of names; the best names are qualities (No'am = pleasantness) or abstract nouns (Shai = gift, Raz = secret, Vered = rose), whereas some are compound words (Or-Li = light to me) and others are just sounds (Kai).

Whereas at one time a name indicated its owner's gender, these days names tend to be unisex. I know both males and females called No'am, males and females called Shai, and males and females called Raz. In this spirit of unisex names, I present the following puzzle.

Gal, Yuval and Amit* are all in the same family (no incestual relationships). One of the three is the father of Gal; one is the only daughter of Yuval, and one is the sibling of Amit. Amit's sibling is neither the father of Gal nor the daughter of Yuval.

Who is the odd one out in terms of gender?

*These three names are indeed unisex and unfortunately are used by both genders.

Tuesday, July 30, 2013

Synchronicity

One of the satellite tv stations in Israel has been showing reruns of 'The West Wing' for the past few months. I've seen the first three series and the last two, but had never seen series four and five before, so I was very pleased when these were broadcast. Season four was very good, season five less so.

The schedule has now got up to the beginning of series 6, which begins with a two parter about peace talks held between Israelis and Palestinians at Camp David. It is with some pleasure that I note that in real life, peace talks are (once again) being held between Israelis and Palestinians at Camp David.

One can take one's choice of expression: either plus ca change, plus ca meme chose, or life imitates art. I imagine that in real life, the results of such talks will be much less clear cut than those of the television series.

Monday, July 29, 2013

Transferring more cassettes

I spent a few evenings last week transferring to computer then editing a 60 minute cassette recording of songs which I made with my friend Robert in Feb/March 1973. At first, I had planned to write a detailed review of the material but then I realised that no one is ever going to hear these songs. Even so....

It seems as if I had the same criticisms of my first cassette forty years ago as I did now, as the second cassette answers so many issues that I raised. Gone is the dreadful percussion,  the strongly strummed acoustic guitar and the samey-ness of the songs. Instead I'm playing piano on a few songs, opening the sound out, Robert's guitar playing and time keeping have improved, and the songs themselves vary from the ambitious and fully developed to the quick, forgettable, one-offs. There's even a 12-bar rock'n'roll song presumably entitled 'The Captain Murdo blues', which contains the immortal lines
Hello pretty woman, I'm out at sea
I'm as perky as sailors can be
Playing darts halfway up the mast
I can drink grog till I can see in the fog
I've got my cap on my head
And my head's in bed
I've got the Captain Murdo blues
Unfortunately, we weren't able to execute the more ambitious (some might call it pretentious) material very well so it sounds somewhat lame now. I'm hoping that I'll be able to salvage upto half an hour of reasonably performed songs and forget about the rest.

Sunday, July 28, 2013

A neat hack: right clicking a grid's title bar

In Priority, our ERP program, there is a neat function that enables one to right click on the title of a numeric column;  the total of that column is then displayed. I was reminded of this the other day when I sat with the Occupational Psychologist, looking at a list of dockets which had yet to be paid.

After looking into the matter, it turns out that one has to use the grid's OnMouseDown event and not the OnTitleClick event, as one might naively assume. A dbGrid has the useful function MouseCoord which returns on which line the mouse was when it was clicked, and in which column; the title bar of the mouse is row 0. The first line in the code below checks to see that it was the right button which was clicked on the mouse and that the click was on the title bar. Once this has been checked, we can get on with calculating the total of one of the columns. In the form where I used this procedure, columns 4, 5 and 6 - as they appear on the screen - have numerical data. As far as the underlying dataset (qDockets, a clientdataset) is concerned, these are actually fields 3, 4 and 5; the extra screen column (0) would appear to be the row indicator column. Originally I was going to use two case statements, one for choosing which field had to be summed and one for the message at the end, but I realised that I could access the dataset's fields array and save an expensive case statement.

For those that understand these things, I think that the code below is fairly self-explanatory. The "format ('%1.0m')" is a way of getting a number like 1234 to display as 1,234, as well as adding the currency symbol. As the defined width of the string is 1, there will be no extra white space between the number and the equals sign.

procedure TDoDocketsA.grDocketsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var total, old: longint; col: integer; begin if (button= mbRight) and (grDockets.MouseCoord(X,Y).Y = 0) then begin total:= 0; col:= grDockets.MouseCoord(X,Y).x; if col in [4,5,6] then begin old:= qDocketsID.asinteger; with qDockets do try disablecontrols; first; while not eof do begin inc (total, qDockets.fields[col-1].asinteger); next end; finally locate ('id', old, []); // go back to where we were enablecontrols end; hebcontdlg (qDockets.fields[col-1].displaylabel + ' = ' + format ('%1.0m', [total + 0.0])); end end end;
It would be nice to make the above routine as general as possible but that involves knowing which fields are numerical which means traversing the fields array at the beginning of the procedure and checking each field's type. At the moment, I don't know whether I am going to use this routine in other forms so I am not going to generalise it.

Monday, July 22, 2013

Transferring cassettes

The latest gadget which I have bought from DX is a cassette player with a USB interface: this allows cassettes to be played without batteries and imported into a sound editing program on the computer.


I initially tried to connect the player to my desktop computer but the latter wouldn't recognise the device, so I connected it to my mobile computer. The device comes with the Audacity program, which has the means to decipher data being sent on a USB line as music.

Naturally, the first cassette to be transferred was the first cassette I ever recorded. My friend Robert received a cassette player as a gift at the end of 1972, probably for Christmas, and it didn't take long for me to press the player into use as a recording device. I was teaching Robert how to play the guitar at the time, but he was only at the first stages. We recorded nearly sixty minutes of music in January 1973, me playing crappy acoustic guitar and singing, whereas Robert played bits of guitar and hit found percussion. I doubt whether I have heard these recordings much since they were made, and certainly not in the past 30 years.

I have to separate the listening experience into four: the songs themselves (mainly written by me), the playing, the singing and the recording. Some of the songs have remained in the repertoire until this day and have been sequenced for MIDI; some of those in the pre-Reason days and some in the Reason era. In other words, some of the songs I consider to be good by any standard. Other songs are not so good, and generally display a lack of development. Already my harmonic palette had been formed; there are no 'three chord wonders' and few full cadences (ie V -> I). All the songs are in 4/4.

My rhythm guitar playing is enthusiastic but not particularly subtle. Certainly, I'm not banging out four strums to a bar, but the strumming pattern seems to be almost the same on every song. Most songs display no dynamic variation whatsoever, and obviously I had yet to hear about finger picking. Robert's contributions are enthusiastic but unfortunately only rarely add something to the performance; most serve to distract. There's one instrumental which sounds like he was playing the chords (probably DMaj7 and Em7) whereas I'm playing lead guitar. Unfortunately, it sounds like Robert was playing a 6/8 rhythm whereas I was playing a 4/4 line and we weren't sophisticated enough (we weren't sophisticated at all) to make this sound good. It sounds as if we are out of time with each other and makes it extremely hard to listen to this mess. Now I know why our mothers complained.

The singing is surprisingly good. My voice is higher and thinner than it is now, but I'm belting out the songs with confidence and enthusiasm. It sounds like the higher notes are lacking in accuracy, but in those days we didn't have autotune and so were less used to perfect vocals.

The tape recorder had a built-in microphone so obviously this picked up a certain amount of hum. I suppose if I wanted to be a really good engineer, I would isolate the frequency of this hum and then equalise it out, using a very narrow band. The recorder also had a slide volume control which we used to fade recordings in and out; sometimes these fades worked well and sometimes not. Although we had the 'luxury' of recording second and third takes, these were done by recording over a previous recording, so there are multiple clicks before and after songs. After I transferred the recordings to the computer, I was able to edit these out; I also fixed the fades, sometimes by editing out material at the beginning and end of songs.

I'm pleased that I manage to salvage these recordings - I'll transfer them to disc shortly - but I very much doubt that I'll ever listen to them again. We were at the bottom of a learning curve, and hopefully things can only get better from here. Next to be transferred is a cassette from a few months later: I remember that I played piano on several songs and hopefully Robert improved as a guitarist, so presumably the songs will sound better. On the other hand, I'm not too sure about the songs.

Wednesday, July 17, 2013

A radical change in our ERP program

Priority, our ERP program, prides itself on having a very strong MRP module. This is a program which scans all the open customer orders then issues work orders according to when the goods' delivery dates; it can combine work orders if the same part is needed for several orders and can also issue purchase recommendations. In a sense, it is the basis of any manufacturing ERP system and ours is very good.

In the chair division, there is a clear separation between parts which can be produced in bulk and parts which can be produced individually. If there is an order for 100 chairs with a metal frame, 10 chairs per colour, then the metalworkers can produce 100 frames at one go, but the upholsterers have to produce ten sets of different upholstery. Thus it makes sense for the metalworkers to produce items in bulk and store them in inventory, whereas the upholsterers and the final assemblers work only on ordered items. For a bulk part, we define a minimum quantity and a bulk quantity: when the quantity of the part falls beneath the minimum amount, the MRP program is clever enough to issue one work order for the bulk quantity (if not more). Obviously such work orders are issued maybe once a week. In order to do so, the MRP program has to check inventory and outstanding purchase orders, which takes time.

But in the furniture division where everything seems to be bespoke, there is no concept of producing bulk items for inventory. When a customer order comes in, work orders have to be issued for every single part which has to be manufactured. So here one doesn't need a very clever MRP program.

Unfortunately, for reasons which I have never understood completely, the man who runs the production facility in the furniture division (let's call him Vladimir - ruler of the world in Russian - but not his real name) was running MRP maybe ten times a day. This requires a large amount of computer processing, but more importantly prevents anyone else from running MRP at the same time. There is a third division which uses the same database as the furniture division; until recently, they have been "ERP free", but finally they seem to be moving into the computer age. These multiple runs of MRP are causing them havoc.

At the moment, the furniture and chair divisions work on separate databases but there are moves afoot to combine them into one humongous database. When this was first mooted two years ago, I did a feasibility study and saw that there was only one real problem which could prevent the integration - MRP.

Talking this over with my consultant, he suggested writing a work order generator which would function outside of MRP; it would issue work orders but not check inventory levels or anything clever. Several times I have tried to get this suggestion adopted but have never succeeded. I felt that the major reason for my failure was that the word 'change' does not exist in Vladimir's vocabulary. He seems to be content to run things 'the way that they have always been run', whether or not that is correct. Systems and goals change, but Vladimir keeps on in his groove. God forbid we should change how work orders are created - we might not output the correct work orders! [I should note that I suspect that some parts are produced without work orders, so this apparently strict adherence to the need for work orders seems strange at times. There are also plenty of furniture parts which don't have a bill of materials and so don't have work orders at all.]

I had written a simple work order generator for the third division which was sufficient for their needs but not enough for the furniture division.

The company's CEO heard rumours of problems running MRP and so called a meeting; Vladimir and his manager tried to cancel it. I don't know whether this was done innocently, believing that there was no problem, or deliberately in order to maintain the status quo. Whatever, the CEO ruled that the meeting be held and held it was. First, Vladimir explained how he works at the moment, after which I said, "Yes, this is how they work. It doesn't mean that they work correctly". I explained how the proposed work order generator would function, and the representative of the third division said that his simple generator works well.

I must have been persuasive enough for the CEO to decide that we would try to work with the work order generator! To be fair, Vladimir and his manager took the decision well and didn't try any stalling tactics which might be understood to imply that they had ulterior motives - or in other words, maybe the word 'change' does exist in Vladimir's vocabulary after all.

After the meeting I looked at the simple generator which I had already written and saw that I would have to extend it to handle multiple orders. This took a few hours of false starts and problems but this morning I had a program which I could test. I tried it out on a few simple examples, finding a few problems and fixing them. Then I tried it out on a more complex example and the generator passed with flying colours. At this stage, I passed it on to Vladimir for further testing. He found some problems, most of which were due to bad data (parts which had some wrong definitions); I fixed each problem and returned the generator for further scrutiny.

During the test process, I saw how I could simplify matters in the future; this requires a new field in one of the tables, so tonight I'll add the field (I can't do this when people are working) and tomorrow I'll update the generator to use this new field.

During the day, the CEO mailed us asking Vladimir when he would put the generator into production use (the CEO has little patience at times, but he also might have thought that the generator was ready for use instead of being debugged). About an hour ago, Vladimir wrote in reply: after a number of tests in our test database, I have begun to use the generator in our production database. If I find any strange behaviour [ie bugs - NN], I will pass them on to No'am for checking and correction. Generally speaking, it works very well indeed and I haven't come across any serious problems.

Who would have thought it? Vladimir actually going on record about a change (and a fairly radical one at that) working very well and almost instantly embracing it! Maybe I misread the person after all. But it all goes to show that change will be embraced when the user realises that the change is designed to make his job easier as well as everyone else's.

As far as I am concerned, this is one of the most radical changes which I have ever made in the way that we use Priority, and I'm pleased that the political side was so easy. Of course, it does help that Priority is so flexible....

Monday, July 15, 2013

My academic failures

In light of my recent academic success, the casual reader might think that things have always been this way. I'm going to let you into a little secret: unfortunately, they weren't.

In Bristol during the 1960s, there were three 'direct grant' schools for boys and four similar schools for girls; such schools received money directly from the local authority but could spend it how they liked. These schools generally demanded fees from their pupils and were considered elitist; students had to pass an entrance exam, which effectively replaced the dreaded 'eleven plus'. Alongside these schools existed a system of comprehensive schools to which were open for all. I should point out at this stage that the entrance exam was optional (as opposed to the eleven plus), so those who chose not to take it automatically went to a comprehensive. 

I like to jest that I was at the height of my intellectual prowess at the age of eleven. At that time, I was very quick in understanding problems and had a very good memory: these tools were sufficient for my then academic demands. I took the entrance exam for the direct grant schools and did so well that I was awarded a free scholarship for my school of choice, Bristol Grammar School. Those who did well were awarded partial scholarships or fee paying places at their school of choice; those who did less well were offered fee paying places at whichever school had room, and those who failed went to the comprehensives.

I did very well academically in my first year at BGS but my marks began to slip over the next few years. In my fourth year, I took my O-level exams and performed much worse than I should have done. I passed only four subjects and failed four (or possibly even five). I remember a painful meeting with my headmaster a few days before the autumn term of 1971 was to begin: I was about to ascend to the sixth form, but it wasn't clear whether I was going to study sciences or 'arts' (I had two passes in each). In retrospect, I should have repeated that academic year, but I don't remember that option being on the table. It might well have been offered, but I was too cocky at the time to even consider such an option and the loss of face would have been extreme; had there been such an offer, I probably would have ignored it and then would have forgotten about it. I was so young that even had I repeated a year, I would still be leaving school eventually before my eighteenth birthday.

So in 1971 I entered the sixth form, studying chemistry, biology and physics with maths, thus creating a precedent (as my form master put it) for studying a subject at A-level which I had failed at O-level (biology). My A-level exams in June 1973 weren't much better: I passed the first two subjects (albeit with low grades) but failed biology; I received a complementary O-level pass.

Again, in retrospect, I should have repeated that academic year, but now it was almost impossible as my parents had returned to Cardiff (thus I would lose the scholarship) and anyway I was dead set on going to Israel for a year (more of this later). Even had I gone to some sixth form college in Cardiff, a small event in October 1973 would have terminated this option (again, more of this later).

In June 1975, I sat my first year exams in university. Out of shame, I have never told anyone that I failed two of the five. I then spent two months in Israel and came back to resit those two exams. I did spend some time revising, but concentrated on areas which hadn't been covered in the first exams. Unfortunately, the resit exams were basically the same as the originals, so I didn't do well in these either. During the latter half of the second exam, I basically broke down and starting writing a letter to my examiners, pleading my case. Obviously I must have been sufficiently persuasive (or considered having sufficient potential) as I was allowed to continue my studies. I note that one other fellow student was passed onto a diploma course (ie downgraded) and one was dismissed altogether.

I then spent the next six months working for in the central analytic laboratory of Schweppes in Hendon, north west London (Sept 1975-March 1976). This period was very important to me as it allowed me to both do a job which I enjoyed and also gain some intellectual confidence. A lecturer said to me after my return to academia that all the students return confident after their first period working in industry.

The equivalent to my second year exams where held in March 1977, and for the first time in the decade, I felt confident and more importantly, prepared for them. I don't remember whether we received actual marks for those exams but I know that I did well. I haven't failed an exam since.

My final exams at university were in March 1978; again, I did well, but the final degree class was dependent upon course work as well as exams. Included in this were reports about five seminars which we attended; at the time, I don't think I realised that we would be expected to write reports which would count towards our final marks and so I didn't make many notes. I have a vague memory of sitting at my parents' new home in Cardiff and trying to write these reports several months after the events happened.

Anyway, I was awarded my B.Sc. (Honours) in Food Science, 1978, with the mark 'lower second class', which means an average of 60%. No one in the history of the department had ever been awarded a first class degree, 70% average. One student in my class was awarded a third class degree after he went to pieces in one of the final exams. I write 'awarded', but we never had a ceremony like in Heriot Watt. 

As I wrote at the beginning of this blog, I was very quick in understanding problems and had a very good memory: these tools were sufficient for my then academic demands. Unfortunately, I didn't realise for some years than being quick and having a good memory weren't sufficient; one has to learn how to synthesize the knowledge that one has in order to create something new and/or original (this sounds like some of the early material from my doctoral studies). In other words, I wasn't taught how to learn. No one was, but I imagine that those who had to work hard in order to understand the material that they were taught in primary school had fewer problems in studying at higher levels. I absorbed everything like a sponge in primary school with absolutely no effort, so I simply wasn't used to having to learn. It took me several years to achieve this, the 'seven years of darkness' as I call them, from about 1969-1976.

Saturday, July 06, 2013

35 years ago

In September 1974, aged barely 18, I moved from Cardiff to London in order to start my university studies. My course was called 'a sandwich course in Food Science' - my father humourously put it that I was being taught how to make sandwiches. What this really meant was that the course was structured with one year of studies, six months working in the food industry, one year of studies, another six months of work and then a final year of study. The final term of the final year was spent in the laboratory, carrying out a research project. As opposed to most graduates, the graduates of this course emerged with both a degree and with valuable work experience.

My final exams had been in March 1978, after which I had a short holiday then commenced work on my project, trying to find new methods of detecting the chemical xylitol in food (with little success, I might add). I can't find my old diaries so I can't be specific about dates, but I remember that sometime in June 1978 I packed up in London and moved to my parent's house in Cardiff (not my childhood home). I would be there for only a few months as I was scheduled to emigrate to Israel in September. This had to be after my 22nd birthday which fell at the beginning of August 1978; this would mean that I would serve only 18 months in the army, whereas if I would emigrate before my 22nd birthday, I would have to serve 24 months. It was worth waiting for a few weeks in order to save six months of army service.

As a newly minted Food Science graduate with a year's experience, I was able to find a summer job in an analytical laboratory in nearby Newport. It wasn't a very demanding job: I remember that there was one lady who was occupied with water analyses and two men who were experts in coal analysis; I helped the chief analyst with the food analyses. 

Two analyses have stayed in my mind: one day, someone came in with a package of fish and chips and wanted to know whether we could determine how old the oil used to fry the fish was. The chief analyst and I sat on opposite sides of a table with the fish and chips between us. He ate a chip, I ate a chip. I said that the older the oil was, the higher the concentration of free radicals (this is what one gets when water molecules are placed in very hot oil; they are very destructive). I ate a piece of fish, the analyst had another chip. Basically we had no means of determining the concentration of free radicals, but we had to admit that the fish and chips tasted fine. We enjoyed our lunch.

The other event was when someone came in with about ten punnets of blackcurrants (or maybe blackberries); the person had spent a day on a farm picking (and eating) the currants after which he had diarrhoea. I was of the opinion that the diarrhoea probably resulted from eating too many currants. I think that we made a half hearted attempt at checking whether there were any pesticides on the berries but we didn't really have the equipment. I took the punnets home and enjoyed blackcurrant cakes for the summer (blackcurrants are one of my favourite fruits).

Every weekend I would take the train to London where I would spend a sad weekend in the commune where I used to live. Almost all of my friends had dispersed so there was virtually no one with whom I could spend the time, although it was still better than spending the weekends in Cardiff where I knew nobody. Also, most of my belongings had been packed up prior to being sent to Israel in a container so I had no books nor music. Thus I couldn't really occupy myself by reading or by listening to music; I think that I used to borrow books from the public library in Swiss Cottage on one visit then return them on the next visit.

I would eat Friday evening dinner with a religious family who lived nearby. The first time that I went, the father threw a piece of challa at me after blessing the food. As a veteran cricketer,  I caught the bread instinctively but I was very surprised. After I (and everyone else) ate the challa, they explained to me that the idea was that no words should come between the blessing and the eating; normally I would have said "thank you" after receiving the bread, but one does not normally thank after having food thrown at one.

I was saving the money from my summer job in order to fulfill the one dream which I had before emigrating to Israel: to visit San Francisco. In the middle of August, I flew from London to San Francisco. Whilst I can remember details about the flight (the first leg was from London to Newark, then a wait and finally a flight to San Francisco arriving at midnight local time, but 24 hours after leaving), I don't remember how I got to Heathrow. Thinking about it now, I probably traveled on the train from Cardiff to London the day before, then took the underground to Heathrow. I'll write about this at a later date.

Friday, July 05, 2013

Doug Engelbart, inventor of computer mouse, dies at 88

Read the obituary here.

I first head of Engelbart years ago when I read Stephen Levy's seminal book 'Hackers'. I came to the computer revolution relatively late as far as the events in the book, but reasonably early compared to most people.

I first worked with a computer at the beginning of 1983: a terminal (typewriter and printer) which was connected by landline to a PDP/11 computer some 20km away. A few years later, we got screens and keyboards along with our own PDP/11 which was a huge improvement. In around 1984, I was teaching programming in Pascal on Apple computers using the UCSD system and eventually wrote my own 'book' called Pascalgraphics. I bought my first IBM clone in 1985 (1986?) and remember taking a university class in Prolog at the same time.


Saturday, June 29, 2013

Checking whether emails have actually been sent to Gmail

In the management program which I wrote for the Occupational Psychologist, emails are sent to customers and contacts via Gmail. Normally this works very well, but every now and then the program sends an email which does not arrive at Gmail, hence does not arrive at the customer. These missing emails cause no small amount of frustration. We were discussing this problem yesterday and I came up with a theoretical solution: for every email which the program sends, check after a minute or two whether the email is in the 'sent items' folder of the Gmail account. If it isn't, send it again. A very simple solution but very hard to implement.

First of all, I had to learn how to access the 'sent items' folder of the account. It turns out that this is done with the IdIMAP4 component - see my question on Stack Exchange. The name of the folder is actually language dependent, so I had to change it to Hebrew. The code given uses the UIDRetrieveAllEnvelopes method, which downloads all of the messages in the folder. As no one is actively deleting messages in the folder, this means that every message which the program has sent is in this folder, some 650 messages. Obviously, a method of downloading only the most recent messages must be found.

After fiddling around for a bit, I hit on the following method

today:= datetostr (date);
 with imap do
  begin
   Username:= 'whatever@gmail.com';
   Password:= ....;
   Connect;
   if SelectMailBox('[Gmail]/sent items') then
    begin
     i:= MailBox.TotalMsgs;
     retrieve (i, email);
     while datetostr (email.date) = today do
      begin
       lb.items.add (email.subject + ' ' + datetostr (email.date));
       dec (i);
       retrieve (i, email)
      end 
    end;
   Disconnect;
  end; 

At the moment the above works, but I don't know whether the number of messages (ie mailbox.TotalMsgs) will always refer me to the most recent message. Now that I have the most recent messages, I have to check whether a specific message is to be found. In order to do this, I am using the references field in the email; I didn't know that such a field exists but it seems to be perfect for my needs. To quote some documentation, References is a String property that contains a list of message identifiers for which the message is a reply. References contains the value for the RFC message header 'References'. References is used by NNTP newsreader applications to create a threaded article display.

As the actual email is sent via a thread, I will check it with another thread whose execution will be delayed by two minutes. This second thread will receive the reference number; it will access the sent items folder and check that there is an email which has been sent today with the given reference number. If there is such an email, then first the thread will update the email log table to show that the email has been checked and then it will delete the actual data of the email which is sitting in a file on the hard disk. If no email is found, then the send an email thread will be called again to resend the email. I may have to revise my logging strategy.

Thursday, June 27, 2013

New mobile computer

After two years with an IBM X61 computer which served me very well, I have been upgraded to a Dell XPS Ultrabook running Windows 8. There's going to be a learning curve with this machine:
  • I have to learn how to use the keyboard (it's not clear to me at the moment how to activate the pgup/pgdn/home/end keys as these are doubled on the arrow keys (I've just discovered that one has to press the function key along with the specific key)
  • There are few sockets on the computer. I've been given a network to USB convertor so that I can plug the computer into a wired network, which will be very useful, but there is no VGA socket (instead, there's a mini VGA socket). This means that I won't be able to connect the computer to a projector: this is going to be a problem as I need this capability at least three times a month
  • It will take me some time to get used to Windows 8! Fortunately, I don't need many applications on the mobile so this shouldn't be too much of a problem, but low level functions are going to be problematic.
  • The 'mouse' is proving to be problematic: I have had difficulty trying to create a right click, and sometimes options get selected on their own (although this may be a Win8 problem).

The big wins are of course the computer's weight, the fact that it has a large solid state disk and its battery capacity. Like my previous computer, this one too has no dvd drive, but it also doesn't have a docking station with a drive. I need an external drive which will connect via USB if I want to upload anything which comes on disk (or I could copy the disk to my thumb drive). I like how the keyboard is lit from underneath: I don't know how useful this is going to be but it definitely looks cool.

Now I won't be embarrassed when I work with my mobile computer on the train!