Tuesday, April 19, 2016

Programmers in MOBI

Sometime ago, I downloaded a PDF copy of Susan Lammers' book, "Programmers at work". Although it is possible to read PDF files on a Kindle, the result is generally unsatisfactory, which is why I decided to convert the file to MOBI format (the Kindle's native format). Unfortunately, the conversion was also not very satisfactory: formatting, especially bold text, comes out doubled and almost unreadable.

A few days ago, I wanted to read the chapters with Dan Bricklin and Bob Frankston, the writers of VisiCalc in order to see whether there was some background material suitable for my thesis. As reading the document was almost impossible, I decided to reformat the book (as I did a few months ago with an Ian Rankin novel). This time, I discovered some very useful tricks which greatly improved the format of the book; I want to share them here.

Chapters: we all know what a chapter is, but the conversion from PDF to MOBI (and thence to EPUB for editing) totally ignores them. The book was divided into nine arbitrary files, two of which contained metadata and seven the text. For a chapter to appear correctly in MOBI format, each chapter must be stored in its own file; the file should begin with metatext, which unfortunately I can't show here (as it doesn't display). This metatext does two things: it sets up an id statement which is needed for the table of contents and defines the style sheet (which enables formatting commands such as bold and italics). After editing, the book now contains twenty one files: two metadata (one is the table of contents) and nineteen containing text, one file per interviewee.

Search and replace - a very important function when the text is mangled - can be defined to work on all the files instead of only on the current file; this can save a great deal of time. There is also a command 'Beautify all files' which has no effect on the output, but can make the text files easier to read.

Once I completed the editing, I would be able to read the book properly, although I haven't actually done so yet. The little which I have read, however, is fascinating; one has to remember that the book is composed of interviews with leading computer programmers in 1985. Some of what they say is prophetic, but they completely missed several ideas. 

For example, there is an interview with John Warnock, who is the founder of Adobe Systems. Much of the interview is concerned with PostScript, which is (was?) a language for typesetting the output for laser printers. One of the main selling points of PostScript was that it was device independent. A few years later, Adobe would develop another language/product which also was device independent: the PDF document! There is no hint of this in Warnock's interview.

None of the interviewers mentioned the Internet, although several must had used an early version (the Arpanet) by the time of the interviews. The internet gave birth to another device independent markup language - HTML - which is more ubiquitous than PDF. Even the EPUB format for electronic books is basically HTML - this is how I edited the book.

The Internet also quashes another blossoming idea mentioned by several interviewees - the CD ROM. People talk about CD ROM encyclopedias and interactive games stored on a disk - again, superseded by the Internet. No one foresaw the disk on key or cheap storage.

Closer to where I am professionally, no one mentioned ERP systems or anything similar. There were a few database products mentioned, but no Oracle, no Postgres and no SQL Server. Only in the final chapters are Turbo Pascal and Windows mentioned.

Monday, April 11, 2016

Coda: Rome airport (2016/7)

On the way from Sorrento to Naples airport, our driver was talking about the evils of the smartphone. It was thus very amusing when we saw a lady driving and using two smartphones simultaneously.

Farewell to Sorrento (2016/6)

First off, a correction to yesterday's blog. I discovered that the very quiet courtyard which we visited actually belongs to the Conservatorio Scuola S.M. Delle Grazie - a school! - as can be seen from the picture which I took one evening, which clearly identifies the building. In retrospect, it's not surprising that the courtyard was empty, as we visited on a Saturday morning.


Today we walked to Piazza Angelina Lauro: this is approximately opposite the train station. We had been here before - we ate lunch here on the second day and I had walked through it one morning (almost every morning, I have taken a 3km speed walk through various places in Sorrento, both stretching my legs and scouting out locations), but we hadn't really looked at the garden which is at the 'far end' - the end closer to the sea - properly. This is another little garden paradise with a variety of trees, bushes and flowers, featuring the tree pictured on the right with its massive trunk.

This was an added bonus as we were only passing through this piazza, on the way to our destination: Museo Correale di Terranova.  As Wikipedia puts it, the museum is situated in a patrician villa, surrounded by a citrus grove, with a terrace of Belvedere that overlooks the Gulf of Naples. The villa is owned by Pompeo and Alfredo Correale, the last descendants of the family. The museum exhibits collections of Neapolitan painters dating from the 17th and 18th century. It contains valuable Capodimonte and Sèvres ceramics, Murano glassware, Bohemia crystals and a collection of watches [actually clocks]. There is also an archaeological collection. Some works date from the 19th century and the mansion displays tables, furnishings and finely inlaid jewel cases. In the library are works by Torquato Tasso. On the ground floor, there are a few rooms with exhibits from the beginning of the 20th century which are fascinating, as well as one room containing stonework originating from local villas dated the first and second century AD - similar to what we saw in the museum in Naples, but without frescoes.



There is also a very pleasant garden attached to the museum, which adjoins an area called L'Agruminato, which is a citrus garden. The skies had been somewhat overcast when we left the hotel in the morning (as a result of the overnight rain), but by the time we had finished in the museum and entered the garden, the weather had changed and had become sunny once more (albeit slightly cold). The day would get warmer and warmer, so that by 5pm, it was yet another sunny day in paradise.


From the gardens, we walked back - via a more scenic route - to the old town for lunch, escaping the more upmarket tourist traps (or so I think) in Piazza Tasso. For the past few days, I have been eating the local speciality - Gnocchi alla Sorrentina - for lunch; I have noticed that everyone prepares it slightly differently. Today, there was only one basil leaf on the dish whereas yesterday there were several; the Leone Rosso cooked the dish without cheese, which one added later.

I think that the winner of the informal contest for best Gnocchi was the English Inn, a fact which would no doubt surprise them as they aim for tasty but modest food. This is something that I can definitely cook at home, although whether anyone will eat it is another matter. I wrote a few months ago about cooking chicken breasts in tomato sauce; I will try and improve that dish by adding fresh basil.

The evening was very pleasant and the streets, especially Corso Italia (which becomes pedestrian at this hour), were full of locals taking their evening stroll (here and there I heard snippets of English). After walking around a few piazzas, I thought to head home, so I cut through some alleys and came across a group of young Italian girls, dancing folk dances. This was part of the 3 day mini-festival, which really only comes to life in the evening (and the previous evening had been washed out). I had come without my video camera so was forced to use my basic smartphone in order to film them. 


They compensated with enthusiasm what they lacked in skill: only the girl on the far left of the picture seemed to know what she was doing. The picture shows that all the other girls are looking to her for guidance. The small crowd which gathered were very appreciative. Further on, I came across a singer accompanied by a harpist, but every time I tried to take a picture, a photographer (who was either the event's official photographer or from the local paper) stood directly in front of me, thus ruining what I was filming. Most tourists show consideration for their fellow cameramen, allowing room for pictures and not getting in the way, but this man just barged in and stood wherever he wanted without paying attention to anyone else. Anyway, this was a fine ending to our second trip to Sorrento.

I think that this trip was better than the first one; the first time around, we made more trips but everything was new and I don't think that we made good use of all our time. Our location too was problematic then. This time, being in the centre of Sorrento helped greatly and we had the time to visit less obvious - but more fulfilling - attractions. As I put it, the old town alleyways attract tourists like moths are drawn to a flame - which is a shame, as there are better things to do with one's time, and especially with one's money.


Saturday, April 09, 2016

A few quiet places in Sorrento (2016/5)

Today we visited a few quiet places which are hidden in plain view. First off was Piazza S. Antonio - a doorway from this quiet square leads into a beautiful courtyard, whose purpose I have yet to establish (I think that it belongs to the town administration but it was empty this morning). No one would think to give this a second look as they pass though the piazza on their way to the port or elsewhere.


From there it was only a short walk to the cloisters of San Francesco; these are probably quite well known (as we were leaving, more people entered) but it's very easy to miss them as the small entrance is very subtly marked. For those who want to know, it's just before the gates of the Villa Comunale, which is a place worth visiting by itself for the lovely view over the gulf of Sorrento. The lift which takes one down to the marina a few hundred feet below is also to be found in this area.

Today there was a cruise ship in the harbour so there were many more people in the town today. In order to avoid them, we stuck to the less popular alleys of the old town. As morning tea time approached, we were walking down a lane which would lead us to the main road when we noticed a restaurant set in a large garden (not where we ate a few nights ago).


This is the Café Latino which was empty when we entered, thus allowing my wife a good opportunity to name all the flowers, bushes and trees in the garden. The picture on the left obviously shows the garden at night, but it's very pretty during the day as well. Although the tea was only 3 euro each and served with two biscuits (little touches mean a lot), the milk seemed to be UHT thus making the tea less tasty than it could have been. We sat for quite a while in the garden, enjoying the atmosphere and the sun which kept poking its head through the clouds. We thought it surprising that such a large restaurant would have such a modest entrance, but a few minutes later we discovered a much bigger entrance on the main road.

A bit further up on Corso Italia, at Piazza Andrea Veniero, we were surprised and pleased to see an antiques market. I had tried to find information about such markets as my wife very much likes them, but couldn't find out very much (basically nothing). There was a very wide range of objects on sale (including several manual typewriters, rotary telephones and even a Game Boy); I have no idea of the asking prices. Unusually, my wife came away empty handed. The market was almost devoid of patrons; probably all the cruise ship people were stuck in the old town alleys.

After that, we had lunch at the English Inn, which as always was reasonably cheap, tasty and amusing - a great deal of banter between Luigi, the owner, and my wife, with me chipping in with a few sardonic remarks. After that, we went back to the b'n'b for siesta, intending to get up at 5pm in order to participate in the "animated walk among the workshops and taverns of the historical centre" as the brochure puts it. This is a three day event in which the workshops are open to the general public. Unfortunately, it started raining at about 4:30pm, and instead of relenting after a few minutes, the rain seemed to get more and more intense. So no evening stroll tonight. I went to the supermarket and bought some provisions, keeping dry only by means of the umbrella which we had brought from home.

Friday, April 08, 2016

A day in Amalfi (2016/4)

Today we traveled by bus from Sorrento to Amalfi, via Positano. Two years ago, we made a similar trip with an organised coach, but this time we decided to make our own way. As a result, we made a leisurely start, catching a bus which left at 9:15am. There are buses every half hour, so we didn't have to target any particular bus. An all day ticket costs only 8 euro, much cheaper than an organised trip (although of course we had no guide nor pre-paid lunch).

As the ticket was unlimited for the day,  we considered getting off the bus at Positano, spending a little time there then continuing to Amalfi. But when the bus arrived at Positano, there seemed to be so little to do that we decided to spend all our time only in Amalfi. The bus took the route via St Agata which meant that one moment we could see the gulf of Sorrento, whereas the next moment we could see the gulf of Salerno, then back to the gulf of Sorrento. This also means that we didn't travel all the way along the famous coastal road, although we did have our share of hairpin bends and splendid views. As Rick Steves put it, the costal trip from Sorrento to Salerno will leave your mouth open and your film exposed. You'll gain respect for the Italian engineers who built the road - and even more respect for the bus drivers who drive it. As you hyperventilate, notice how the Mediterranean, a sheer 500-foot drop below, twinkles.

After morning tea, we walked up and down the tourist alley before stopping at a restaurant for lunch. As there are so many restaurants, choosing one seems very much to be a random event. This time, however, I think that we made a good choice: Il Tari. Once again, we had grilled sea bass, my wife with salad and I with grilled mixed vegetables (not included with the fish). Although the meal was 10 euro more expensive than last night's meal at Leone Rosso, we thoroughly enjoyed it.

After leaving the restaurant, we walked back down to the town's centre, stopping in a shop selling ceramics. There are as many shops selling ceramics in Amalfi as there are restaurants, but this one was special. It sells a line of specially made ceramics, designed by a local artist. The colours - mainly olive green - seem exclusive to this shop and we were sorely tempted by some of the items. Unfortunately, the quality and exclusivity are directly related to the prices, which were just too high to justify (45 Euro for a salt and pepper set).

After picking up a few more little pieces, we found ourselves at the bus stop, where there was a bus waiting to take us home to Sorrento. We arrived in Amalfi at 10:45 and left at 15:00: maybe only four hours, but those were very enjoyable four hours. We also had the fun of another bus ride along the Amalfi coast to look forward to.

In the evening, we bought little bits and pieces in the local shops - lemon soap, limoncello, lemon chocolate, etc - as gifts. I would also like to mention Guiliana Petagna, from whom we bought two sets of wooden coasters. Unfortunately, she doesn't appear to have much of a web presence, but her shop can be found at Via Tasso 24. 

Today started a three day 'festival', in which local artisans open up their workshops to the general public. Obviously we didn't see very much of this today, but tomorrow there should be a fuller report.

A few general remarks about Sorrento in early April: so far, the weather has been very good. The first two days were very hot but it has cooled a little. As I wrote before, yesterday it rained a little in the evening, and tonight a few drops of rain also fell. The forecast is for more rain, but every day it seems to be delayed by another day, so hopefully the next two days will stay dry.

There are far fewer people in Sorrento in early April than there are in June, which means that it's very easy to walk around the alleys of the old town. There were some groups today in Amalfi but they mysteriously disappeared in short order. The groups that we have seen in Sorrento seem to be composed of Italian schoolchildren; they've now gone, to spend the weekend at home, and  most of the people now walking along Corso Italia outside our window speak Italian.

I wrote the other day about the economics of the shops in the market. Today in Amalfi, I spoke with the sales lady of a dress shop in Amalfi (she was British and came to Italy about twenty years ago). I asked her whether the stock belonged to the shop or was on consignment (which means that the shop pays the suppliers only when something is bought): she surprised me by saying that the shop owns all the stock. She wished that it were on consignment - the stock represents a very large investment which may take a long time to pay back. I didn't see any other customers in the shop, and we were there for at least half an hour. The shop owner would like a quick turnover but it seems as if business is slow. Presumably the pace improves during May through September, which is when the bulk of the tourists come. It seemed impolite to ask many business related questions.

Interlude: Preventing CB messages on mobile phones (2016/4A)

I have just discovered something about mobile phones which I would like to pass on. Both times that we have been in Sorrento, we have received almost hourly messages from something called 'CB', normally with the enlightening text "Naples". Those who I have asked did not know what these meant. Today I received more messages from the same source, only with the content "Salerno", which is close to Amalfi. Upon returning home, I decided to see whether the Internet could shine any light on these messages, preferably telling me how to prevent receiving them. This is what I found.....

CB stands for Cell Broadcast and it is a chance of your provider to send messages to a group of smartphones, which are logged in a specific cell tower. Most messages received via Cell Broadcast are marketing messages of your mobile operator.
To stop receiving CB messages, go to Messaging then tap the Menu key menu key  and select Settings. Find CB activation and Uncheck it.

Presumably some phones have this option automatically cancelled, but neither my phone nor my wife's phone  had this option unset. Obviously we don't get these messages in Israel otherwise we would have changed the setting a long time ago. At least now we have been 'immunised'.

A day in Naples (2016/3)

I know that I skipped a day: on Wednesday, we didn't do much apart from walking up and down Sorrento and visiting places and shops where we hadn't been before.

Yesterday, we took the train to Naples; although it was about half full when leaving Sorrento, it filled up pretty quickly and it was standing room only for most of the journey. The trip takes about an hour: at times, the train goes quite fast, but there were also long stops (tunnels have only one set of rails, so there has to be synchronisation with trains coming the other way.

Naples train station is like an airport: it is very large and has many platforms. The Circumvesuvian platforms are at the far end of the station, so we had to walk a bit before finding anything. Tourist information is one floor up from the platform concourse so it took us some time to find it. I could see that in order to get to the National Archeological Museum, we could take the Line 1 metro, which saved having to negotiate above-ground Naples. The metro station is deep underground and is very modern.


Arriving at the 'Museo' station, it was only a short walk to the very imposing museum building. The best exhibit in the museum contained frescoes taken from buildings in Pompeii and surrounding area from the first and second century AD: these were astounding. The statues found from the villas in the same area were also very good, but then, we are used to seeing such good craftmanship (I don't mean to be blase).

Despite enjoying the exhibits, we began suffering from 'museum feet', the condition in which the soles of one's feet begin to hurt from too much standing around. So after spending some time trying to find an exit (I imagined us getting lost and spending weeks in the museum before someone found our bodies; even an attendant agreed that the exits were poorly signed), we managed to find our way down to the ground floor and into the expensive museum shop, where we bought a little book about the frescoes.


After finishing with the museum, we looked for somewhere to eat and found a funky and amusing hole in the wall opposite the museum (there wasn't much of a choice in where to eat). I had some kind of pastry with cheese and grilled vegetables, and to drink I decided to have something different: I think this was supposed to be hot chocolate, but it didn't really taste of anything. At least it wasn't fizzy.

After our cheap lunch, I noticed that there was a bus stop for those 'hop on, hop off' buses nearby. I realised that having a trip on one of these would give us a chance to see Naples, so we waited ... and waited ... and eventually a bus turned up. The price was 22 Euro each, which seems somewhat expensive (especially as the museum was only 13 euro each, and the public transport was exceedingly cheap). Anyway, we rode on this bus for about an hour, giving us the opportunity to realise that (as we had been told) Naples is not a very interesting place. Apparently it's much cleaner than it used to be, but that's about the only positive thing that one can write (the metro is good, though).

Joke: my wife wanted to buy a postcard of Naples, but we couldn't find one. This is because there is nothing pretty enough to put on a postcard.

When the ride finished (in front of a castle which is postcard pretty), we were told that there was another bus waiting which would take us on a second route around Naples. So we got off one bus, onto the other then off we drove. This ride was mainly around the port area and hills on the costal side of Naples; better than the first ride, but still nothing really worth writing home about.

When we got back to the castle, we were told that the final bus had left (we were intending to ride it back to the museum so that we could catch the metro back to Garibaldi Station), but fortunately there was another metro stop only about 200 metres away. We were back at the main station shortly then went down to the Circumvesuvian platforms, making sure that we were on the correct platform (there are four) for Sorrento. The train was packed, but slowly people got off, and after a few stops we were able to sit down. Incidentally, both my wife and I noticed that girls' spectacle frames were very thick - and to my eye, unattractive.


When we got back to Sorrento (about 7pm), it was raining lightly, so I suggested that we eat in the nearby Leone Rosso restaurant (one minute from the train station), which had received good reviews. The restaurant was about half full when we went in, but filled up as we ate; there was a very welcoming atmosphere. We had our regular grilled sea bream, which the waiter deboned for us. I don't know whether it was his handling or the way the fish was cooked, but I didn't enjoy it very much. All the reviews mention that something was given for free; we were served two small glasses of limoncello (wasted upon us) and also had two euros removed from our 45 euro bill. But we left a tip....

Tuesday, April 05, 2016

Sorrento shopping (2016/2)

As we had been awake from 1am yesterday, it's not surprising that towards the evening, we began to wilt. I went to bed at about 8pm, so of course, I was up at 6am Sorrento time. I decided to go out for a walk and film various places whilst no one is around. I started off at Piazza Tasso and walked around several back streets before I arrived at a place which I recognised. From there I walked up and down Corso Italia (the main street) before coming back to the hotel.

Breakfast is a peculiar affair: as we are staying what is technically a bed and breakfast place, there is no breakfast room. There is a small 'kitchen' in which food is laid out, we fill a tray with what we want then retire to our room to eat. Actually, apart from the lack of eggs, there is enough to eat: yoghurt, bread and cheese, jam and cakes. This kitchen area is open all day long, so one can have tea at any time, although I discovered in the afternoon that there was no milk; I popped out to a grocery store to buy half a litre which we keep in our fridge.

After breakfast, we went out to see the shops. Unlike the last time we were in Sorrento, there aren't too many tourists, and being in the centre of town, we could start much earlier. So the main market street was fairly empty and we had a good chance to look at the shops. One of the first places that we saw was a shoe shop: I want to buy a pair of light summer shoes, which cost here less than half of what they cost in Israel. I decided just to make a note of the shop and see whether there were any others.

I was trying to work out the economics of some of these shops: there must be at least fifty within a few hundred metres, each selling the same items (as pictured above): lemon soap, lemon biscuits, limoncello, olive oil and similar. The prices are almost all the same, so no one has any advantage. As far as I can figure it out, when the streets are crowded (especially in the early evening), every shop gets about the same number of clients, so everyone is happy.

My wife then got stuck in a nice shop selling self designed and produced cashmere and linen. We were very surprised to see there linen jackets for men - after the trouble that we had the previous time. Of course I didn't buy, but it was interesting to see. The jackets here were slightly more expensive than the one that I bought in Capri. My wife bought a lovely linen jacket, and elsewhere I bought a linen shirt which I intend to wear tomorrow.

We continued down the street, finding another shoe shop with cheaper shoes, but again filed it away for later. We were aiming for a shop which sells carved wood - again, we had purchased goods there last time. There was a reunion between Guiliana, the saleswoman, and my wife; we spent some time in there without buying anything. The rest of the morning was spent going up and down, looking at things but not buying.

After lunch, we went back to the second shoe shop and I tried on several pairs of shoes, discovering that my feet have apparently shrunk. I'm normally a size 43, but here a size 40 fitted me well. Unfortunately, the shoes didn't feel right and I decided not to buy.

After siesta, we had a cup of tea (see the earlier reference to milk) then went out to see a special event: seven pizza palaces were combining efforts in order to produce a 100 metre long pizza! Slices were to be sold, the profits going to raise funds for a public defibrillator. There was quite a crowd, but the event as a whole was slightly disappointing. I had naively thought that there would be seven very long pizzas strung together, but in reality, there were hundreds of small pizzas laid out on contiguous tables. As these were placed together at about 5pm, by 5:10pm they were already cold and less attractive. We left at around 6pm, by which time not one piece of pizza had been consumed.

So we had a lovely (and expensive) sea bream dinner in a garden restaurant by way of compensation.

Something which I forgot from yesterday: when I bought time for our Italian phones, the salesman told me that one has to buy time at least once a year, otherwise the numbers become invalid and one has to buy a new sim. So far, we have managed with this limitation but I doubt that that we will be returning to Italy in the next twelve months. 

Monday, April 04, 2016

Return to Sorrento (2016/1)

For various reasons, we decided to take a week's holiday at the beginning of April - not the usual touristy holiday time - and return to Sorrento. The idea is to have a rest and a good time - no day trips are planned!

So, after getting up at some unholy hour this morning, being driven to Ben Gurion airport, being flown to Rome and thence to Naples, and finally being driven (by a very nice driver) to Sorrento ... we haven't done very much except unpack and and eat lunch at the British Inn.

This time around, we're staying in the centre of Sorrento in Casa Sorrentino. With a big bedroom and a reasonably sized bathroom, we also have a small balcony overlooking Corso Italia, which is the main street. Walking down from our b'n'b to the English Inn, we remembered places from last time. As far as we can establish, we didn't normally walk as far as where we are now (which is one minute from Piazza Tasso).


The English Inn, home of fish and chips, poached egg on toast, etc

Thursday, March 24, 2016

Draining the ear

Since the end of February, I have been suffering from a continual infection of the throat and ear. The throat infection was cured by the course of antibiotics which started at the beginning of the month, but this did not cure the ear infection. I started a second course of antibiotics (a different type) last Wednesday which finished a few days ago. A few days after this infection began, my left ear filled with liquid which made hearing very difficult - I referred to this at the time. Whilst the antibiotics healed the infection, they didn't help in draining the liquid from my ear.

A week ago, I drove to Jerusalem for an urgent hearing test (the branch in Bet Shemesh could only offer me an appointment at the end of March); this showed that not only was my hearing greatly impaired by the liquid, there seemed to be some damage to the aural nerve.

I returned to the ENT doctor yesterday; upon seeing those results, he referred me immediately to the emergency room of a Jerusalem hospital. This greatly surprised me; he explained that he didn't have the equipment to effect the necessary treatment, and that going via the emergency room would ensure that I would get treated that same day, as opposed to making an appointment for the ENT clinic in the hospital which might not be for another week. He said that it was essential to get immediate treatment before the nerve damage becomes permanent. Apparently about 1% of all the throat/ear infections develop complications like mine had.

So after lunch, my wife drove me to Jerusalem (I could have driven myself, but I wasn't sure in what state I would be after the treatment; also, I don't like driving whereas she does and she wanted to be with me anyway). We arrived just before 3pm which was rather unfortunate as the ENT clinic formally closes at 3pm; we were assured that there would be a duty doctor who would take care of me. After about an hour of messing around, we finally met this duty doctor.

After taking my case history (despite it being noted by the local ENT doctor), he examined my ears, this time with a much bigger device than the normal one. Then he pushed a fibre optic camera up my left nostril in order to check that there were no problems in the area behind the ear drum where the liquid was (the Eustachian tube); it might have been that there was a blockage here which was preventing the liquid from being released. Everything was normal. This procedure wasn't exactly pleasant but it was very quick.


Once everything had become clear to the doctor, he explained that normally there is a waiting period of about three weeks in which the liquid is expected to drain itself; I said that those three weeks had already passed and that the liquid showed no signs of draining on its own. So we agreed on the treatment: first, a liquid local anaesthetic would be introduced into my ear, then after about fifteen minutes, a small (1 mm diameter) hole would be created in my ear drum with a laser.

The anaesthetic part was ok, the laser part was slightly uncomfortable (pressure in the ear canal) but only lasted a minute, and then the doctor suctioned off the liquid, which fortunately was clear, thus obviating the need for any more treatment.

Since then, the feeling in my ear has been very strange; to be more accurate, the feeling in my ear changes from minute to minute. At the moment, it seems like I can hear extremely well in my left ear (which makes me slightly anxious about my right ear) but some white noise has just returned. I have to shower with ear plugs for the next few days, in order to prevent water getting in the canal and possibly getting through the perforation. This was somewhat comical last night; hopefully tonight will be better.

I have to do another hearing test in about a week and a half and then see the local ENT doctor for final assessment. As it happens, in a week and a half, I will be in Sorrento for a week's holiday, so I have fixed the hearing test for the day after I come back. If there are any problems between now and going away, then I can always return to the emergency room; I hope that nothing develops while I am in Italy!

[Edit: I should point out that I received excellent treatment from the hospital doctor]

Wednesday, March 23, 2016

Composing a bolero

I was saddened to learn of the death of Keith Emerson a few weeks ago. Although I was never one of his listeners, the death - suicide - of any renowned musician is a sad event for me. In the 1970s, when Emerson was in his heyday, I had liked a few pieces that he had played with The Nice, but found Emerson, Lake and Palmer too bombastic for my tastes. After 40 years, I thought that I would try to listen to them again and so downloaded some albums via YouTube. My opinion hasn't changed very much: apart from 'Fanfare for the common man' and possibly 'Jerusalem', there isn't anything which I would like to hear again.

One of the tracks on the 'Trilogy' album is called "Abaddon's Bolero". The description of this tune intrigued me but I haven't really listened to the track itself. Probably the same night that I downloaded this, I started thinking about boleros, and into my mind popped a rhythm. This is not the standard bolero rhythm as I knew that it was in 4/4 (as opposed to 3/4) and the end was slightly different. My mind 'played' this rhythm for some time and I wondered how I would transcribe it; would I even remember it in the morning?

It took a few days for me to find the time and space to sit down and work out what the rhythm actually was. Here it is transcribed:


Having got that far, I wondered what should be played on top of that. First, I sequenced a bass guitar part with that rhythm, then added an oboe part, playing in the phrygian dominant scale. After a few days' work (no more than an hour a day) on this, I took a step back and started a revised version. This is basically composed of three sections: an A section (oboe lead, phrygian dominant in A), a B section (alto sax lead, 'normal' phrygian in E) and a link section of four bars playing Bb diminished in various inversions. A breakthrough came when I added a harmony part to the oboe tune.

Yesterday evening, I finished the piece, at least for the time being. Although I might have some more musical ideas, it is currently six minutes long and seems fairly complete. My major problem is with the orchestration, or more accurately, hearing the orchestration. I have barely hinted at this here, but since the beginning of March, I have been suffering from a blocked left ear (acute media otitis, to give it its proper name) along with both throat and ear infections. I've had two courses of antibiotics and seem to be past the worse - but I still can barely hear through that ear. More of that later. In honour of my medical condition, I am currently calling this composition "Half deaf bolero", although this may change in the future.

It seems that later on today I will undergo some form of surgical treatment for my ear, but I'll write about that after the event.

As it happens, I had great difficulty in transcribing those few bars presented above. My normal transcription program couldn't handle the triplets correctly; although the help text said that there is a 'triplets' command, I couldn't find it (maybe it exists only in the professional version). I then looked for an online transcription program; after importing the MIDI file, this too could not display the triplets properly. So I decided to transcribe the rhythm by hand; this online program (which I will not name) made this very difficult but eventually I succeeded. Maybe it would have helped had I used a 12/8 time signature instead of 4/4.



Monday, March 21, 2016

Zero values in Priority tables (2)

Whilst rereading my original post on this subject, an alternative solution suddenly popped into my head. As I wrote then, the way which I have found to solve this problem is to calculate how many records there are in the suptypes table before it is linked as a procedure, then do the same after the table has been linked. If the results are the same then the user wanted everything, but if they differ, then suppliers without a suptype should not be included. I presented the following snippet of code which checks how many supplier types there are in total and how many have been passed as in the parameter.
:LINKED = :UNLINKED = :SUP = :TYP = 0; SELECT COUNT (*) INTO :UNLINKED FROM SUPTYPES; LINK SUPTYPES TO :$.TYP; ERRMSG 1 WHERE :RETVAL <= 0; SELECT COUNT (*) INTO :LINKED FROM SUPTYPES;
It occurs to me now that there is a simpler solution to remove the zero values when they are not required: simply delete the zero record from the linked suptypes table:
GOTO 1 WHERE :LINKED = :UNLINKED; DELETE FROM SUPTYPES WHERE SUPTYPE = 0; LABEL 1;
This way, there's no need to check whether zeroes are required and whether the current record is a 'zero'. The result should be that the procedure runs slightly faster.

Edit from a few weeks later: this 'optimisation' does not work!

Saturday, March 19, 2016

Purchasing sound equipment

Over the past few months, I've slowly been acquiring gear for my electric guitar and amplifier. None of this equipment costs very much (the effects pedal was the most expensive, at about 150 NIS), which is fine for a stay-at-home hobbyist musician.

First off is a soi disant professional condenser microphone, which I bought from e-bay. This looks very good, but it's actually quite small. I doubt that it really can be professional as it only costs 11 australian dollars, but it's probably just as good - if not better - than any of my other microphones. I haven't had a chance to test it yet: since receiving it, I've barely been able to speak, let alone sing. I am hopeful that this will be a good purchase. The stand is a neat idea.

My amplifier - whilst coming with effects - only has one input. Let's say that I want to play with someone else or use the above microphone - to do this, I need to expand the number of inputs.

Enter the mixer. I used to have something like this when I was living in London, but that was really a cheap and nasty box. The Nady mixer is very solidly built, and comes with four controllable inputs, as well as echo (the two knobs on the right of the unit control the depth (dry/wet) and the delay time (0 - 250ms). This mixer looks impressive, but I was disappointed when I tried it out. Most of the top end (treble) was removed, leaving a very dull sound, and it was very easy to let the echo get out of control. There seemed to be a negative synergy between the mixer's echo and any effects which I might have used on the amplifier. As a result, I have decided not to use the mixer's echo (or at least, to be very sparing with it). The problem - which I realised only after receiving the unit - is that the echo applies to all the inputs, meaning that if two guitars and a microphone are plugged in, using echo will result in a sonic mess. An even better solution would be to have an extra knob for each channel, by which one could select how much echo each channel receives, but this would require extra circuitry, which would increase the price. So how can I obtain echo on one channel but not on another?

One possible solution  is an effects pedal (which would be used before plugging into the mixer): after looking around at DX, I came across the Mooer Pogo effects box. Despite the somewhat unpromising name, this box contains a large amount of functionality in a small space. 

Pros: This effects box is really two boxes in one: first, it's a guitar pedal with several options: chorus/phaser/tremolo/flanger, echo/reverb, gain, drive (clean/overdrive/distortion/crunch/fuzz/metal) and tone controls. Secondly, it's a drum box, with 40 predefined rhythms, whose tempo and volume can be selected. So this is a great little box for someone playing on their own - they can dial in a drummer and play to their heart's content. The box also comes with an AC adapter, which enables one to use the effects without batteries (2 AAAs). The instructions come in Chinese and English, and are written correctly (sometimes products come from China with mangled English which doesn't always make sense).

Cons: the AC adapter comes with a plug which might be unsuitable, thus requiring an adapter of its own. For some reason, although the drum speed can be controlled, it can't be specified in bpm. To quote the instructions, "The range of the displaying tempo value is 20-90, indicate (sic) the real tempo 60-270 bpm. Each rhythm has its own default tempo value". Would it have been too hard to have allowed real bpm values? 

All these devices means that I need some more guitar cables, so I took  the opportunity of ordering two with the pogo. This morning, I connected the guitar to the pogo, and the pogo to the amplifier (without effects). I should have plugged the pogo into the mixer and the mixer into the amplifier, thus I could have seen whether the tone control of the pogo overcomes the mixer's removal of tone. I had great fun with this unit: I forgot that I could play lead guitar! I think that it was the 'fuzz' setting which gave a good sustain, which is so necessary for lead. This unit obviates the need for the effects on the amplifier.

[SO: 4122; 4, 20, 38
MPP: 617; 1, 3, 6
ELL: 694; 0, 1, 6]

Sunday, March 13, 2016

Priority tip of the day

I wanted to write a report which showed to how many customers we were supplying on a given day. This number is not the same as the number of delivery notes, as a customer may have more than one delivery note on a given day. In standard SQL, this shouldn't be too great a problem, as one can use the 'COUNT' function with the customer number - select count (cust) from documents. This does not work in the Priority flavour of SQL.

What does work, however, is a variation on the above - count (distinct cust). So the query becomes (complete with parameters)
SELECT SQL.LINE, SUM (QPRICE), CURDATE, COUNT (DISTINCT CUST) FROM DOCUMENTS WHERE TYPE = 'D' AND FINAL = 'Y' AND CURDATE BETWEEN :$.FDT AND :$.TDT GROUP BY CURDATE;

Wednesday, March 09, 2016

Sir George Martin, RIP

One of the men who defined what a record producer really is. I learned a great deal from his book 'All you need is ears".

His legacy will live on.

Guardian obituary is here.

Saturday, March 05, 2016

Health/cooking/dvd

Last week, I wrote that "the latest [viral infection] has made it very painful to swallow, along with an occasional blocked nose and headache". On the fifth day, my situation was getting worse: my left ear hurt, I spent most of the night coughing and I was developing a fever. On the sixth day, I saw a doctor who took one look at my throat and one at my ear and immediately started me on antibiotics. It would seem that there was an initial viral infection which weakened me sufficiently to allow bacteria to start their own infection. 

It's now ten days since my throat started hurting and five since I started with the antibiotics: my throat doesn't hurt, I don't have a fever and I'm no longer weak. On the other hand, my left ear is completely blocked (I feel like I'm underwater and I can't hear very well), I have difficulty concentrating and I still have coughing fits. Tomorrow I will go back to work - I've been working from home for the last week - and I hope that my situation will continue to improve. Not hearing well is a mixed bag: on the one hand, it will make having phone conversations difficult, but on the other hand, I won't hear a great deal of the annoying noise (most of which emanates from one person) which fills my work place. No doubt being at work will force me to concentrate more.



I also wrote last week that I intended to cook a roast chicken shepherd's pie. This was something which I could easily accomplish, despite my reduced mental state. This time I remembered to take a picture, even though this reveals nothing about the taste.



My final task for the day was completing the DVD of our trip to Barcelona, London and Edinburgh from 2013, which I wrote about, nearly a year ago. Most of the clips were in place, but I discovered one clip from Capri lurking towards the end which needed to be removed, and I rearranged the order of several clips. I think it better that the clips be in logical order rather than stick lavishly to the order in which they were shot (this might lead to 'continuity errors', in which we're wearing one set of clothes in one shot, followed by another shot and different clothes; this doesn't happen much as we don't appear in most of the clips).

Once all the clips were arranged to my satisfaction, I added the transitions, then started adding music. I naturally used Catalonian tunes for the Barcelona scenes, some of which were simple arrangements for one acoustic guitar, and some of which were more up-tempo items. The first initial London scenes - Abbey Road - were set to "Come together"; the Covent Garden scenes had their own "soundtrack" and so didn't need any accompaniment. Most of the Edinburgh scenes received tastefully played traditional tunes, but I managed to sneak in Fotheringay's version of "Wild mountain thyme". Obviously, all scenes featuring bagpipe players provided their own music, as did the graduation ceremony.

This time around I discovered how to use sub-titles during the film, although some of these mysteriously disappeared at one stage. Using my original notes, I saw that I had to master the dvd. Until this stage, that blog had been very clear on what needed to be done, but this mastering section seemed very vague. I had to search high and low for the mastering software which I must have had before I remembered that it's a portable program stored on one of my usb sticks - DVD Styler. The version which I have seems very basic, but at least it gets the job done.

Unlike previous times, when I created an iso format file on the mobile computer, copied that to my main computer then burned the iso file to disk from there, this time I was able to utilise the external cd/dvd writer which I bought a few days ago (this connects to the mobile via USB). The dvd was successfully burned and I watched it on television. I was able to write all the raw video files to one dvd (via explorer): whilst this disk is readable on the mobile computer, it doesn't seem to be readable - or even recognised - on my main computer. Hmmm. This is something which I will have to explore further, before deleting those files from the mobile.

Saturday, February 27, 2016

Chicken breast in tomato sauce

I haven't blogged about cooking for some time. In fact, I haven't blogged for a couple of weeks, either. This has mainly been due to a series of viral infections; the latest has made it very painful to swallow, along with an occasional blocked nose and headache. As I say, I must be very popular with the viruses this year; they are queuing up to spend time with me. 

I decided a few days ago to cook chicken breasts today. Originally I was thinking along the lines of a marinade with olive oil and balsamic vinegar then grilling, but this hasn't been too popular. Then I considered a tomato based marinade (a commercial product), but this was very messy the last time I tried and not particularly tasty. Then I thought that I would make my spaghetti sauce (onions, tomatoes, ketchup and oregano), then cook the breasts in the sauce. This is what I did, and along with the grilled potatoes and boiled cauliflower, the entire meal turned out to be very tasty. So here's the recipe.

Sauce: one diced onion, two diced tomatoes. Fry the onion in oil (I used canola) until the pieces almost turn brown, then add the tomatoes. Continue frying for a few minutes whilst mixing. Add oregano and a 'healthy dollop' of ketchup. I also added a cup of boiling water, which in retrospect was too much. Let this mixture cook for a few minutes.

Slice chicken breasts into strips, then place the breasts into the sauce and simmer for about half an hour (I covered the wide pan).

The results were delicious - and that's not me talking but rather my fellow diners. This recipe will enter the Saturday rotation. Had I been a bit more attentive, I would have taken a picture of the food as it was cooking to show here.

Next up will probably be a variation on shepherd's pie, made from chicken. Next Friday, I'll roast a chicken, adding extra potatoes; as only my wife and I will be dining, we'll eat the legs and the breasts will be left over . On Saturday, I'll take left-over meat, cut it into small pieces and place them at the bottom of a casserole dish along with some chopped carrots and peas; above them I'll place mashed potatoes, some of which were roasted and some freshly boiled. This goes into the oven for about half an hour at 120C, with a few extra minutes under the grill so that the top gets a nice colour. Everyone enjoyed this the last time I made it.

I haven't made meat balls for some time. This is because we have a new supplier of frozen minced beef, and the one batch which I made with this new beef didn't taste very good. Maybe I should try fresh mince (gasp, horror!).

Monday, February 15, 2016

Two films

The second half of February is a time that I love as our satellite tv supplier broadcasts many films which were nominated for Oscars. Some of the films are new (nominations from 2014 onwards) and some are old (some are very old!), but they're all high quality. An example would be Casablanca: although I've seen this a few times (not surprising, considering that 'Play it again, Sam' is one of my favourite films), I haven't seen it for years, and this time I was able to record it for posterity.

Two films which I saw on Saturday had, at least on paper, several things in common:
  • Keira Knightley appears in both, as does Benedict Cumberbatch
  • Both are set in Britain during 1935-1945
  • Both are based on books
  • Both were nominated for Oscars
The first film was 'Atonement', which is based on a novel by Ian McEwan (which I have on my Kindle, but have not yet read), whereas the second, 'The imitation game' is based on the biography of Alan Turing, written by Andrew Hodges. I bought this book maybe 20 years ago and know it very well.

Atonement: I didn't have any expectations from this film, and to be honest, I didn't watch it very closely at first. After what might have been a dodgy start, the film turned out to be very good in several respects. There is a scene set on Dunkirk beach which lasts for about ten minutes which seems to be shot in one go (without edits or cuts): not the sort of thing one sees these days. I had a brief look at the book, and from the little that I have read so far, the film seems to be a fairly accurate translation of the book (obviously the book is deeper and delves into the characters' thoughts and motivations). I shall enjoy reading this book.

On the other hand, I was deeply disappointed by 'The imitation game'. Whilst the gross facts are correct (Turing is a mathematician who was educated at Sherborne School and Cambridge, then spent his war years at Bletchley Park and died in Manchester in the early 50s), almost everything else is wrong, wrong, WRONG! The scenes at Bletchley are extremely annoying as that's not how they happened. What annoys me is that someone who does not know the story will assume that this film is the truth - nothing could be more wrong.

The entire sequence of events is upside down: Turing almost immediately begins to build his decoding machine (with the opposition of his colleagues) and only later does the penny drop that the messages that they are trying to decode have words which repeat frequently ('Heil Hitler'), which could be used as cribs. In fact, the Poles had done some work before the war in decoding Enigma message via semi-mechanical means; all kinds of cribs were used in order to simplify the decoding work. Only later on were the bombes used to decode, and these were a joint effort, building on the original Polish work. If I were Hugh Alexander, I would be deeply offended by my portrayal in this film.

It's interesting to note that the actor playing Alexander - Matthew Goode - and the actor playing John Cairncross - Allen Leech - both appear in the sixth series of 'Downton Abbey', which is being broadcast here on Thursday nights. Cairncross may have been at Bletchley Park, but he didn't work with Turing and MI6 did not know until several years after the war's end that he was a Soviet spy.

In the film, Turing et al. discuss how much information they can release without raising the Germans' suspicions that Enigma has been broken. There is a documented case in which Prime Minister Churchill became aware of a planned bombing raid on Coventry via Enigma decrypts ("Ultra") but decided not to intervene in order to continue breaking and reading Enigma. I'm sure that Turing and his colleagues did not make any decisions regarding the distribution of the Ultra material: in fact, they didn't decode the messages themselves but rather figured out what the daily key was. There is  a crossover with Neal Stephenson's "Cryptonomicon", which features Turing as one of his many characters: unit 2882 was formed in order to disperse German suspicions that Enigma had been broken.

The film also ignores the fact that as the war progressed, Turing had less and less to do with Enigma. Instead, he developed with the help of Post Office engineers what would today be called  an Analog To Digital encoder, which eventually allowed Churchill and Roosevelt (later Attlee and Truman) to have discussions via the telephone in the knowledge that no one could eavesdrop. Such an encoder (and equivalent decoder) is in everyday use with our smartphones.

The IMDB goofs page lists several anachronisms in terms of speech; one which they missed was when Turing realises that Cairncross is a spy; Cairncross says to the other person present in the room "Can Alan and I have a minute, please". No one spoke like that in the 1940s.

Changing source material is a charge that I have previously laid at the feet of the producers of the DCI Banks TV show. The series has resumed being shown here and so far I have seen two complete stories: Strange Affair and Dry Bones That Dream (aka Final Account). Some of the changes are due to production decisions (such as which actors appear) and thus are acceptable, but some are completely gratuitous and make no sense (thus annoying me). For example: the fact that musician Pamela Jeffries is Bangladeshi in the book but white on television slightly rankles, but why did they change her instrument from viola to clarinet???The fact that she plays the viola only becomes important when the thugs beat her up and break two fingers in her right hand, the bowing hand (better than breaking two fingers in her left hand). So why the clarinet? What difference does it make? It's not as if she plays during the programme.

Saturday, February 13, 2016

ERP thoughts

Despite today being Saturday, my internal alarm clock woke me as usual at 5:30am. Also as usual, my mind was filled with abstract thoughts, initially about a question which had been asked on the 'English Language Learners' stack exchange site about the difference between 'I forgot' and 'I forget'. From there, it was only a short leap to thinking about my DBA submission (I suppose I should get used to calling it a thesis).

A few days ago, I wrote on a DBA forum that one should include - as I neglected to do - answers to the following questions:
  • What is this research about?
  • What does it hope to achieve?
  • What is its value?
From there, my mind started dealing with an expression which I sometimes use: ERP deals with the past whereas spreadsheets deal with the future. This sounds quite good, but it's not entirely accurate: ERP can deal with the future, whereas spreadsheets can deal with the conditional, or as I learned in Latin grammar so many years ago, the subjunctive.

Fired up, I went to the computer - this is at 5:45 am, before taking the dog for a walk - and wrote the following. It probably needs a little polishing for the thesis but it's clear enough for here. It's also a fragment and taken slightly out of context, so it may seem incomplete.



ERP systems excel at answering the question “What happened?”. They are also good at answering the question “What needs to be done?” (by customer, purchase and work orders). But they fail to answer the question “What if …”.

One reason for this is that ERP systems are fixed in terms of their programming and parameters, and it is unlikely that the programmer could be able to predict every parameter which a user would wish to change. An example: the researcher wrote a report which shows the cost of a manufactured product according to its bill of materials; the report shows the cost at which the constituent parts were purchased in the past. In order to answer the question “What if there is a change in the dollar or euro rate of exchange?”, parameters were added to the report allowing the user to define fictional rates of exchange, thus allowing the question to be answered.


But the report would not be able to answer the question “How much would this product cost if we used 10% fewer widgets, or reduced overhead by 15% overhead, or …”; such a question is open ended as the programmer cannot foresee which parameters need to be changed. The report could be changed ad hoc but this would require programming skills and also means that report runs could not be duplicated. Thus ‘what if’ questioning is traditionally found in the realm of EUC [End user computing, normally meaning spreadsheets].

Thursday, February 04, 2016

Intermediate submission not accepted

I don't seem to have written this specifically, but just over two weeks ago, I sent my 'intermediate submission' to the research committee. This document - just over 60 pages, not including references or questionnaires - contains the background to my research, the literature survey, the literature synthesis, hypotheses, methodology, pilot study and ethics. It will comprise at least 50% of the final thesis.

Like the research proposal, the submission is sent two weeks prior to a meeting of the research committee; two members read the document, make notes and present their findings to the committee which then decides whether to accept or reject the document. A candidate is allowed to submit this document three times; based on this, I adopted a strategy in which the first time I submit what I think is good but probably not good enough. Based on the feedback from the committee, I can see which areas need improvement, and so I can add whatever is necessary to create a better second submission. I expect the second version to be accepted, but even if it is not, I still have a third opportunity.

So, as per my expectations, the submission was not accepted. What did surprise me in the feedback was that the reviewers did not know what I was writing about. I quote one section ad verbatim: On page 42, more than half way through this intermediate submission it finally says "The major finding of the literature review with regard to the stated topic of this research, feral system usage in SMEs which have implemented ERP, is that this subject has not been studied." So at last we know what the research is about.I have gone to the effort of going back through the entire submission up to this point and while feral systems were mentioned in subsections up to this point there was no clear indication of where they fitted into the research, let alone that this was the topic of the research. One reviewer even mentioned that he did not know what the title of the thesis was.

Clearly, a certain amount of explanatory material will have to be copied from the research proposal to the intermediate submission; I think that one of the reviewers even suggested this. Obviously, this will not be a problem as the material has already been written.

The section on methodology needs to be strengthened; I'm not sure where to include it. There was also mention of the data analysis section; I will have to read the remarks closely in order to establish in my mind what needs to be done.

The next meeting of the research committee is in six and a half weeks' time (they meet once every seven weeks), and work has to be submitted two weeks in advance. So, if I want to make the next meeting, then I have about a month to improve the submission. There is no pressure on me to make this a solid deadline, so I will take however much time is necessary in order to improve the submission according to the reviewers' feedback.

I am continuing in my efforts to find companies who are willing to participate in the research. I will be meeting next Tuesday the CIO of a pharmaceutical company who use Priority (they are located next to our offices in Haifa bay, so getting there is no problem); this will be an interesting conversation. I am well aware that a pharmaceutical company should be extremely painstaking in its data collection which makes me wonder why they use spreadsheets.

Wednesday, February 03, 2016

Problems with blogging

I have been unable to access my Blogger account for the past few days from two of the three computers that I use (home and mobile computers). For some reason, the web page keeps trying to redirect and gets stuck in an infinite loop. This is not a problem of Blogger but rather some definition connected to my browser. I have tried with both Firefox and Chrome but the problem exists.

Fortunately, my work computer is not affected by this problem so I can happily blog away when I am at my usual work place. This week I traveled a few days which is why I noticed the problem.

Hopefully, normal service will soon be resumed.

Update:
The problem was fixed by changing the shortcut from http://www.blogger.com/blogger.g..... to https://. I am writing this from my mobile computer, so obviously I've fixed the problem.