Saturday, December 31, 2022

Gaslit, Watergate ... and more ranting about Israel's new government

I have been watching the Gaslit tv series for the past few weeks and have been finding it very interesting. Even though it is primarily about the private lives of Martha Mitchell (played by Julia Roberts) and John Dean (Dan Stevens), it also shows the Watergate scandal as it happens and from different angles than from its usual projection. I had quite a surprise in the fifth episode when the music that accompanied John and Mo Dean to their 'honeymoon' at Camp David was 'I want to see the bright lights tonight', by none other than Richard and Linda Thompson. Slightly anachronistic, I thought, as the song would only be recorded a few months after the event that it accompanied. The song was played again during the long credits sequence, although it itself was not credited.

I suppose that I knew about Watergate, but I was more involved with other matters at the time, and like the Vietnam war, it passed me by. Watching this series sparked my interest, so I had to find more authoritive material that would explain Watergate in depth. First off was 'Fear and loathing on the campaign trail 72' by Hunter S. Thompson; whilst this was written contemporaneously with Watergate, it was more about the George McGovern campaign for the Democratic nomination. I actually read this book about 40 years ago (when even then it was 10 years old), but it didn't leave too much of an impression then. 


This led me to a much more informative book, "King Richard: Nixon and Watergate, an American tragedy", by Michael Dobbs. Whilst this book limits itself to the hundred days following Nixon's inauguration in January 1973, and similarly limits its point of view to Nixon, it also gives a great deal of background to Watergate and explains how the entire house of cards fell down. The book contains many pictures of the main characters in the Watergate saga, and it is quite amusing to see how closely the actors in 'Gaslit' resemble their real life counterparts. Julia Roberts really looks like Martha Mitchell; Dan Stevens resembles John Dean quite well, and the actress playing his wife does look like Dean's wife. Sean Penn was unrecognisable as John Mitchell, but has been made up to resemble him very closely. Similarly Gordon Liddy. Going back to 'Gaslit', I wish that they could have toned the language down a bit. Did public figures really swear so freely then, or is it the 2020s informing the 1970s?

Of course, reading about Nixon and how far his henchmen/cronies/supporters were willing to go brings up painful memories of Donald Trump and his belief in an alternate history. Lost an election? Declare election fraud and claim that you won. There was yet another example of this a few weeks ago: a Republican candidate for a governership lost, but she took her case to the supreme court of the state, citing election fraud. The judge stated that the evidence presented showed no signs whatsoever of tampering or fraud, and that the suit was baseless. I forget now who the plaintiff was and in which state this happened: after all, I'm not a student of American election fraud.

This, unfortunately, brings us (once again) to the newly sworn in government of Israel. Of course, there was no election fraud, but claims that "the people spoke" are somewhat contentious when the actual margin was so thin. But that's as may be; what worries us 'bleeding heart liberals' is that the victors believe that they can do whatever they like (as per Nixon et al.), such as dismantling the entire judicial system. Something doesn't suit them? Pass a law allowing it. Where else do you have a minister responsible for the police and the border police who himself has been convicted for various crimes? 

As a commentator said on television last night, "They [the government] say that it will be like in America, where politicians nominate the judges for the supreme court. What they are forgetting is that in America there are three separate branches of government: executive, legislative and judicial. In Israel, there is no separation between the executive and legislative branches, and if this joint branch nominates the judicial branch, then there is no separation whatsover. So no, Israel is not like America".

One outrageous statement was made by one of the extremist ministers (Orit Strook) at the beginning of the week: doctors will be empowered to refuse treatment to patients if the patient's qualities (sex, sexual orientation, ethnic origin) are against the doctor's beliefs. Fortunately this has been condemned by everyone, including Strook's coalition partners, so it looks like this piece of megalomania will not get very far.

On Thursday, the Supreme Court will decide (whilst it still has the power) whether one of the senior ministers is fit to serve, considering that he was imprisoned over seven years ago for fraud (the 'cooling off period' for that sentence has passed) and that he was convicted once again last year for tax evasion. In a plea bargain, he received a suspended sentence and promised to leave politics. Whilst he did resign from the Knesset at the time, he contends that the condition referred only to the then-current Knesset, not to future elections. Others would beg to differ. Some say that he should be held in contempt of court and should not only resign again from the Knesset but should also serve the prison time that was previously suspended. As no doubt he would say (quoting Humpty Dumpty from 'Alice through the looking glass'), 'words mean what I want them to mean' - not necessarily what is written in a dictionary. 

There is no doubt that the Supreme Court's decision (whatever it will be) will be decisive for the months and years to come.



This day in history:

Blog #DateTitleTags
99931/12/2016Farewell 2016 - a summary of the year from my idiosyncratic viewpointDBA, Health, Personal, Obituary, Song writing, Theanine
110231/12/2017End of an eraTV series
119231/12/2018Love is all you need (film)Films, Sorrento, Italy

I have been thinking over the past few days about writing a summary for 2022, but feel that now is not an appropriate end point. 

Tuesday, December 27, 2022

Belated discovery about menu short cuts (Things I never knew about delphi, part 2)

In my blogs database program, I added at the beginning of the month some functionality to the 'show entries' form, to remove (i.e. stop displaying) an entry and to show the tags connected to an entry; these were implemented by means of a popup menu, something that I've done many times before.

Over the past few weeks, whilst entering old blogs from 2012/3, I realised that using this functionality requires two clicks (one right click to bring up the menu, one left click to choose the option). I wondered whether I could achieve the same result with one key press. In the 'manager' program, there's some arcane code using accelerator tables, used probably because I wanted this code to be in an ancestor form, from which other forms inherit these definitions. I tried to copy what I did then but couldn't get the code to work.

Then I googled 'delphi accelerator' and discovered that there was a simple solution under my fingertips. All I had to do was set the 'short cut' property of the menu item (i.e. mnRemove, mnShowtags) to a key such as F8 or F9. Once I did this, not only did this key name attach itself to the menu caption, but pressing it activated the menu option.

I might have known this once but if so, I must have forgotten years ago. Another belated discovery.



This day in history:

Blog #DateTitleTags
22227/12/2009Dollhouse 2TV series, Olivia Williams, Dollhouse
66327/12/2013Song festival - the producer speaksMIDI, Kibbutz, Song writing
78927/12/2014Sebaceous cyst and other health issuesHealth
99627/12/2016PuzzlePuzzles

Saturday, December 17, 2022

Doctoral thesis extension granted

Following the exchange of emails with my doctoral supervisor a few days ago, I received a formal note from the manager of the doctoral programme, saying that the [external] examiners have agreed to grant me an extension for a few months in order to collect additional data that should bolster my research findings. I now have to submit no later than early April, although I imagine that I won't wait until the final day. I also have to fork out for half a year's tuition fee, although I suppose that it's only fair.

Early this morning whilst walking the dog, I had the idea of updating the 'time line of events' table for the new case study with specific references to my proposed model. For example, the first entry was 'Letter explaining the general idea' - this has now been extended to 'Letter explaining the general idea, setting forth the mission statement', where 'phrasing the mission statement' is the first step in the model. It occurs to me as I write these words that this is yet another forward reference (as it is called in the formal definition of the Pascal programming language), as the time line appears in section 7.4 whereas the model appears in the following chapter, section 8.4.

I also expanded what I had written a few days ago in describing the new enhancement by referring to the Kanban model and even including a few academic references. There are many papers that I could have chosen from; I suppose that I should read more than a few lines of one of these papers in order to find the canonical reference.

On Wednesday I wrote most of the 'work order reporter' program that will take a 'kanban number' and optional quantity and report the production. I had a problem trying to figure out what the current quantity should be if there is only a partial report (i.e. not the entire quantity of the work orders). Fortunately my test work orders had an example where the quantity of the work order was not the same as the quantity of the work order for the kanban part, so I could test my program fully. I only solved the problem when I printed out the program and worked on it away from the computer.

I still have one program to write; this will be part of the general work order generator (not the kanban generator), where a kanban part will be substituted for a parallel part that the configurator has built. This probably won't mean much to anyone outside of my company, and I'm not sure that anyone inside will understand either. It's a hairy problem, but definitely feasible. I wrote something similar in our previous ERP program 20 years ago. I hope that I will have suitable data tomorrow so that I can work on this prior to the development committee's next meeting on Monday.



This day in history:

Blog #Date TitleTags
2117/12/2005The Brief and The BookTV series, Van der Graaf Generator
78617/12/2014Seasonal greetingsJewish holidays
156717/12/2022Doctoral thesis extension grantedDBA

Wednesday, December 14, 2022

Another case study for the DBA - that can validate my model

About ten days ago, I received a letter at work, than when translated into colloquial English, said something along the lines of The CEO mentioned in a meeting, in a way that some might have taken to be an off-the-cuff remark that he envisages a factory, or at least a department with the existing factory, "Legs Inc", that manufactures four parts only (plain metal legs). These would be used by OffFurnCo for colour plating or even sold to outside manufacturers.

My immediate reaction was One might imagine that this is not difficult to do, but unfortunately manufacture for inventory is not the standard method of operation for OffFurnCo! There are two major challenges created by the current standard method of operation: (1) creation and management of work orders that are not connected to customer orders; (2) the configurator is liable to create duplicate parts to the plain metal legs – these will have to be managed somehow.

We had a meeting on the topic last Wednesday; in the middle of the meeting, I realised that this would be an excellent opportunity for my doctoral research. This is a new enhancement that can be managed on the basis of the model that my research proposes, and in fact will serve as a validation study, something that has been lacking.

As beholds an enhancement managed according to the model, I wrote a specification on Thursday, as full as I could make it for the time, and noting where there were areas that I was not sure what should be (primarily the two challenges that I note in the second paragraph above). On Sunday, I was sent the number of a part that would be suitable for manufacture by this new system; on the basis of my specification, I built a new son part for the part that I was sent, and defined it accordingly. I wrote a simple work order generator for this new system and fully debugged it.

I also wrote a note to my doctoral supervisor telling him about developments, and whether the thesis should be submitted now (I am supposed to submit by the end of the year) with a note to say that another test case in under way, or request an extension that would allow the enhancement to be completed and for me to research it.

We had another meeting on Monday, where the engineering department, working in parallel to me, had defined their own test part. Unfortunately for them, this part is not one that is intended to be manufactured by the new system, but we did learn from this example that there were definitions that need to be added to the part that I had defined. During the next few days, they will add the engineering definitions to my simple test part and then we can make a test run that will examine how the configurator works in this new situation.

In the mean-time, I received no word from my supervisor, and whilst showering yesterday evening, I considered my options. Fortunately this morning I received a note from him (I would like to say that my thinking about him in the shower caused him to write, but I can see from the time stamp that he wrote to me yesterday morning. As he writes, We shouldn't be submitting the thesis when suggesting the research is still not complete. If this enhancement is relevant and important to the research then I would suggest you wait until it concludes and then include it into the Thesis. To be honest you cannot really say there is additional research data pending... it's either in or it's out.

So with that clarified, I am going to be working on the enhancement at work, whilst at home I will be revising whatever needs to be rewritten in the thesis, and adding what needs to be added. I expect that everything will be over by the end of January.

Tuesday, December 13, 2022

Mint chocolate ice cream

At the beginning of the year, I was very happy to discover that a new ice cream emporium was selling mint chocolate ice cream. Unfortunately, after that first visit (and maybe a second), that flavour has yet to reappear. Obviously fewer people like it than I thought.

A few months ago it seemed as if there were an ice cream shortage in Israel. When I mentioned this to a friend, he told me about a shop that sells ice cream at very low prices. As this shop is around the corner from the health food shop where I buy rice milk regularly, I popped in there on my next visit. Apart from regular ice cream, they also had one freezer of Ben and Jerry's, and amongst the various flavours I found a container of mint chocolate cookie ice cream that I immediately bought. They have forgone the traditional green colour of this type of ice cream, and I could have done without the cookies, but otherwise I very much enjoyed eating this ice cream.

Since then I've been in that shop a few times but each time there was no mint chocolate flavoured ice cream to be found (in fact, the freezer was almost empty). I went to the health food shop on Friday, and as usual I went to the ice cream shop to discover that this time the B&J freezer was now full of different flavoured ice cream. I went through the various cartons until I found what I was looking for. I asked the salesman why this flavour hadn't been stocked for some time, and he said that every now and then a B&J representative comes and fills the freezer. I asked that they always bring some cartons of this specific flavour.

The price? If one buys only one carton then it costs 20 NIS; two cost 17.5 NIS each (ie 35 together), and three cost 17 NIS each. I don't need three at the moment, and as the price difference is minimal between 2 and 3 cartons, I bought two. Each carton weighs 500g, so I bought 1 kg ice cream for 35 NIS. Golda charge 102-106 NIS for a kilo (I don't remember the exact price). Why pay inflated prices when one can get a similar product at a fraction of the price?

I very much doubt that I will finish even one carton before my next visit to the health shop. As the days are quite short and cool, this isn't optimal ice cream eating weather, so I'm only eating a small portion now and then.

Monday, December 12, 2022

Caffeine

My current non-fiction reading is 'This is your mind on plants' by Michael Pollan, in which the author writes about three alkaloids - opium, caffeine and mescaline - that are produced by plants and affect our body. This is the third book that I have read by Pollan (it's a shame his name isn't Pollen, for this would make an excellent pun), all of which basically are about the influence of plants on humans and how they have used us to ensure the survival of their species.

At the moment, I'm in the middle of the chapter about caffeine, and who should enter the discourse but Matthew Walker, whose book about sleep I finished last week. Here Pollan reiterates what Walker wrote about 'sleep pressure' and caffein, as follows.... 

Within the body there is a molecule called adenosine that is very familiar to me as in the form of adenosine triphosphate (ATP) in which the body stores energy derived from the tricyclic acid cycle, otherwise known as how the body derives energy from the metabolism of glucose. Adenosine builds up during the day and binds to receptors, causing us to feel sleepy. As one web site explains it, Because adenosine is continuously metabolized by the enzyme adenosine desaminase, the decline in adenosine production during sleep quickly causes a general decline in adenosine concentrations in the brain, eventually producing conditions more favourable to awakening.

Caffeine is an antagonist of adenosine, meaning that it binds more strongly to those receptors than does adenosine. In consequence, caffeine prevents us from feeling sleepy, or in other words, 'gives us more energy'. But the concentration of free adenosine within the body is still increasing during the day: when the caffeine is released from the receptors, the sudden influx of adenosine causes one to feel very tired ... so another cup of coffee is called for. This is how addiction and tolerance are built up. 

As Pollan writes, Here’s what’s uniquely insidious about caffeine: the drug is not only a leading cause of our sleep deprivation; it is also the principal tool we rely on to remedy the problem. Most of the caffeine consumed today is being used to compensate for the lousy sleep that caffeine causes. Which means that caffeine is helping to hide from our awareness the very problem that caffeine creates.

Another effect of caffeine is that it causes reinforcement. Pollan quotes Roland Griffiths, a Johns Hopkins drug researcher, who says "It’s like saying ‘I like the taste of Scotch.’ No! This is an acquired, conditioned taste preference. When you pair a taste with a reinforcer like alcohol or caffeine, you will confer a specific preference for that taste". So, combined with the addiction and tolerance, one can see how insidious are the effects of caffeine on the body.

I admit that books of this ilk are about the topics that I find most intriguing: basically, how our body works and how its function can be improved or impaired.



This day in history:

Blog #DateTitleTags
21912/12/2009Displaying tabs on the right of a TTabControlDelphi, right-to-left
136412/12/2020How could I have known? (new song)Song writing, Home recording
144712/12/2021Darwin and Covid-19Covid-19

Sunday, December 11, 2022

Could it be that it's over? A rant about current Israeli politics.

About 50 years ago, Yehonatan Geffen wrote a song with the above title (except that it was in Hebrew, of course). In the song, he says that life was 'beautiful' before he was born: he is writing about the period before the state of Israel was declared, primarily the years 1910-35 (approximately). In those days, there was so much to do: virgin land to be cultivated, marshes to be dried and a state to build. Geffen bemoans the fact that 'now' there seems to be nothing big left to do. 50 years later, whilst there may not have been so many 'big things' done in that period, the state has definitely grown and prospered. 

There's a line in the song that doesn't translate well into English that was one of the rallying cries of the 'original' immigrants in 1910-20: we came to build and to be built. Even though I emigrated at a much later stage when such cries were embarrassing, I appreciate the sentiment: I too came to build and to be built (i.e. develop my personality). 

<Hereon a rant>

And I (and I am not alone in this) feel now that everything that has happened to Israel and to me personally is about to be taken away by the extremist government that is in the process of being formed as I write these words. The juidicial system, the education system, the police ... everything that screams 'democracy' is now considered to be 'undemocratic' and has to be replaced. "We have a clear majority", the extremists claim, and whilst they have a clear parliamentary majority, these parties received only 30,000 more votes; in other words, allocating parliamentary seats by a straight allocation of the popular vote (instead of the complicated system in use) would have resulted in a much smaller majority. 

The irony is that the non-democratic factors are suddenly the bastions of democracy and redefining what it means. I am reminded of Orwell's 1984 and the claim that 'we have always been at war with Eurasia' is replaced with 'we have always been at war with Eastasia'. What will happen to the "people's army" in which will serve only the sons and daughters of the new "anti-democrats", whilst the new "democrats" sit at home and get rich on the taxes paid by the "anti-democrats"? 

Maybe Robert Heinlein had it right in 'Starship troopers', where only those who performed some kind of national service became franchised to vote. I never liked this approach - not socialist or equal enough for my tastes - but maybe that's what we need now.

As much as I have never liked Bibi Netanyahu, unfortunately Israel's longest serving prime minister, I have always recognised his intelligence. But in the agreements made with the extremist parties in order to form a coalition (and quite possibly to save his skin from being sentenced to jail because of bribery and misconduct, etc), he seems to have signed away his - and my - birthright. Finally members of his own party are waking up to discover that the ministerial posts that are being offered to them have been gutted of content: the education ministry appears to be have been divided into four, as has the defence ministry. Who wants to be minister of education when one is barely responsible for anything? 

My only hope is that the Likud back-benchers (or equivalent) will stage a mini-revolution, Netanyahu won't be able to present a government, there will be new elections, and in these, enough people will change their votes such that the resulting government will be far more moderate.

I have barely been able to watch the evening news for the past month because it so angers me. Yes, I think that it's over, and that we are going to enter four or five black years that will set Israel back at least 50 years because of the damage that these "democrats" will wreak.



This day in history:

Blog #DateTitleTags
43411/12/201150 words for snow - Kate BushKate Bush
99111/12/2016Repairing the KindleKindle
109811/12/2017More on Delphi 7/Hebrew/Win 10Programming, Delphi, Unicode
144611/12/2021Mike Nesmith, RIPObituary

Friday, December 09, 2022

Yitzchak Klepter, 1950-2022

Not only British musicians, but also Israeli musicians are mortal and unfortunately the time has come to say goodbye to one who was (at one stage) one of Israel's top guitarists: Yitzchak Klepter, aged 72. 

I first became aware of Klepter in 1973-4, when he was lead guitarists in Kaveret, along with Danny Sanderson. He wrote the music for several of their songs, especially on their third and last album, as well as taking lead vocals on one (let's say that his singing was less impressive than his guitar playing).

Throughout the 70s, his playing and songwriting were part of the Israeli music scene and I was well aware of his contributions. In the early 80s, like Yoni Rechter before him, Arik Einstein recorded two albums with Klepter; his songs were always interesting and often had unexpected twists in the chord sequences.

After about 1985, he disappeared off my radar, and it was only in the (financially profitable) reunions of Kaveret that I ever saw him. He suffered from COPD and in this guise he made an unexpected appearance in a television show that showed the lives of five doctors ; he was one of the patients.

Last night, he was the leading item in the news; this shows how well he was regarded as there are so many things to report these days, such as political news (that I cannot bear to hear), tales of road rage and price increases across the board.


As it happens, I was in Tel Aviv yesterday, and my path took me past a musical instruments shop run by another lead guitarist active in Israel between 1976-1990, Shmulik Budagov. I used to see him every week as part of a quartet called Brosh (poplar) on a television show that supposedly was for children (Zehu zeh), but I suspect that more adults than children used to watch. He was one of the six members of a group called Sheshet (that can be translated either as 'sextet' or 'Man Friday'; four of the group achieved various levels of success afterwards, from moderately famous (Budagov) to extremely famous (Yehudit Ravitz). I don't know whether this group ever played live or how even they came about, but I enjoy their eponymous record that I first bought in 1978/9.

After retiring from active playing, he opened a guitar shop in Petach Tikva, and I read an article about him somewhere a few years ago about how he was developing his own brand of guitars. There were a few in his shop window: a telecaster copy, an acoustic and another electric guitar, but no prices (not that I intend to buy yet another guitar!). A sign in the window said that opening hours were from 10am; I was there at 10:05 and the doors were firmly locked. At some stage I have to return to that area, so I'll try to time it after 11am.



This day in history:

Blog #DateTitleTags
11309/12/2007UncleUncle
21809/12/2009After the accounting examMBA
65909/12/2013Gymnopedie Number 3?Woody Allen, Satie
90709/12/2015Margin call and redundancyFilms, Business novel
98909/12/2016Greg Lake, RIPObituary, King Crimson
109709/12/2017Delphi 7/Hebrew programs running on Windows 10Programming, Delphi, Unicode

Sunday, December 04, 2022

Upgrading the 'blogs' program

I wrote a month ago about redesigning my 'blogs database' program. Since then, I've been religiously entering old blogs, a month at a time (I'm now at the end of October 2011), as well as entering the new blogs as they are written.

I've also been working on the functionality of the program. Mostly this has just been fixing bits and pieces here and there, but yesterday I devoted several hours to improving the functionality. First off was the ability to retrieve blogs connected to multiple tags (called an 'or' query in logic despite that in everyday language it's an 'and' query); I had included the possibility of retrieving blogs that are connected to either one tag or a second tag, along with the possibility of negating this (i.e. connected to one tag and not to a specific second tag). This is what lead me to the possibility of including Venn diagrams; I found an example of how to draw a circle but not how to draw two intersecting circles, so this has been quietly forgotten. I'm not a graphical programmer but rather a database programmer, so this type of programming is not easy for me.

But I wanted to allow the possibility of retrieving blogs that were connected to several blogs (i.e. connected to tag A or tag B or tag C or tag D). I had laid some groundwork for this in the past and I thought that I had implemented this multiple retrieval, but either it didn't work properly or I had simply left it for when I would have more time. So yesterday I continued the work; this required some short-circuiting of the usual 'blog retrieval' query but the resulting query was simpler than the query for two tags.

Then I worked on the 'singleton tag' query, namely tags that were connected to one blog only. I had written a complicated query for this some time ago, but realised at some stage that it would be much easier to adapt the 'number of entries per tag' query to show only those with one entry. So this was quite simple.

Another idea that came to me whilst improving the program was simplifying the code generation of the 'this day in history' table. Originally this simply output the necessary HTML code into a file; whenever I needed this, I would have to open the file with Notepad, copy the contents and paste them into the HTML interface of Blogger. It would be simpler to create a new window with the HTML text waiting to be copied and pasted, so this I did. I also discovered that the code was missing one angle bracket that explained why Blogger told me every time that there was a problem with my HTML code.

An additional idea was reusing the 'choose tags' dialog in order to show which tags were connected to a specific entry in a 'read only' manner. 

Finally, I picked up an idea that I had written about previously: Another idea for a report was taking one popular tag (e.g. programming) and seeing how many times different tags have been paired with this tag. Then I could retrieve the entries that have the chosen combination of tags and show them in the the 'show entries' form. I had no idea of how complicated this would be! There were three and a half stages to this: the first half was choosing a 'base' tag - I already had a dialog box for this. Then I had to find all the tags that had joint entries with this one tag and store their identity numbers in the temporary 'linked' table. This required quite a hairy sql statement. Then the 'show tags' dialog (pre-existing) had to be extended in order to show this list of tags and calculate the number of joint entries with the base tag. I couldn't do this in the previous stage because there I only wanted the tag ids because that's all the temporary table has - an id and an instance number. It occurs to me now that I could extend this easily by adding another field to the table, 'payload', that would contain whatever needed to be passed. It would certainly make the second stage easier! 

This is another example of rubber duck debugging: explaining the problem to the duck brings up ideas to simplify the solution.

The final stage was to allow double clicking on one of the joint tabs in order to see what the joint entries were. For example, let's say that the base tag was 1970; there are seven tags that are joined to an entry that is also connected to '1970'. One of these is 'Nice enough to eat' - three common entries; doubling clicking on this line should open a new 'show entries' window with the three specific entries. The window would open but it was empty. I checked the query time and time again; I ran it in my 'db management' program where it worked perfectly. I checked the parameters time after time and they were correct. So why was I getting no results?

Normally when this happens in Priority, I check the primary keys of what I am trying to insert - are these values duplicate? No. After banging my head against a wall for at least an hour, I decided to sleep on the problem. I won't say that I awoke with the solution at my fingertips, but I did decide on a new approach to the problem. I created a new temporary table and tried inserting to this table - no difference. Then I tried adding the parameters directly into the sql query, by what is known as 'sql injection' - this is considered a bad technique. Still no luck. Then I looked at the sql query being passed to the database engine - the value of the base tag was 0 instead of 98, explaining why there was no data being transferred. It took a few minutes to realise how this could be; I had checked several times that the value of the 'tag' parameter was 98.

Then it hit me: the code is as follows:

with qInsert do begin sql.text:= ....... params[0].asinteger:= tag; execsql end
The query was using the 'tag' property of qInsert, whose value is 0 by default, instead of the variable defined in the unit, 'tag'. Bitten by the 'with' bug!! A simple name change was required; once this was done, finally I could see the three entries that had both the '1970' and 'Nice enough to eat' tags! 

That's it. My bag of ideas to be implemented is now empty (although I'll consider that idea of adding a payload to the temporary table and how it can help me).



This day in history:

Blog #DateTitleTags
14904/12/2008Learning to walkHealth, Robert Silverberg
65404/12/2013The least we can do is wave to each otherVan der Graaf Generator
78204/12/2014My army service - part fourHealth, Israel, Personal

Saturday, December 03, 2022

Why we sleep (book)

I am currently reading this fascinating book, that is described as follows: Neuroscientist and sleep expert Matthew Walker provides a revolutionary exploration of sleep, examining how it affects every aspect of our physical and mental well-being. Charting the most cutting-edge scientific breakthroughs, and marshalling his decades of research and clinical practice, Walker explains how we can harness sleep to improve learning, mood and energy levels, regulate hormones, prevent cancer, Alzheimer's and diabetes, slow the effects of aging, and increase longevity. He also provides actionable steps towards getting a better night's sleep every night.

I am seriously considering preparing a talk based on this book for the English speakers OAP group on the kibbutz (for whom I delivered a talk about British folk songs). In fact, every time that I meet the group's organiser, she asks when I am going to give another talk. I was considering doing something along the lines of music synthesis, but talking about the value of sleep is much better. I can also add my experience of sleep disorders.

Today I came across this sentence, that extols the value of REM sleep: We can awake the next morning with new solutions to previously intractable problems or even be infused with radically new and original ideas. Yes! This almost exactly describes what I wrote a few days ago, about waking up with 'revelations'.

If I do decide to give a talk on this subject, then I'll have to read it closely and make notes, which is not my normal style of reading. On the other hand, I could use the informative Wiki page about the book, that also notes criticisms of the ideas, and especially data, that are presented in the book. Well, I'm not going to be giving a scientific talk but something much more general. 

I'm in the middle of chapter 4, so I haven't come across much contentious material yet, although Walker does hypothesize about how REM sleep started - he suggests that the tree-to-ground reengineering of sleep was a key trigger that rocketed Homo sapiens to the top of evolution’s lofty pyramid. This is only an idea, a hypothesis that can't really be tested. A salient fact about REM sleep that is completely accepted is that muscles loose their tone when people are in REM sleep; other sources say that 'bodies are paralysed'. It is hypothesised that this is so that people are unable to act out what they are dreaming. The point about hominids moving from sleeping in trees to sleeping on the ground is that they were very likely to fall out of the trees where they were sleeping when they entered REM sleep!



This day in history:

Blog #DateTitleTags
21603/12/2009Swedish Fly GirlsSandy Denny
78103/12/2014My army service - part threeIsrael, Personal
136303/12/2020Train journeyPersonal, Trains, Covid-19

Friday, December 02, 2022

MTB shoes

Every few months someone organises an exhibition of shoes on the kibbutz. For the seller, it's a good chance to sell some stock and possibly get rid of some old stock, whereas for the kibbutz members (especially the older ones), it's a chance to try on some new shoes. As it happens, the nearby mall has several shoe shops, but never mind.

The advance notice said that there would be shoes of the Lumberjack brand, amongst others; the very comfortable shoes that I bought in Bari were of this make, so I was hoping that I could find a similar shoe. I had looked at the Lumberjack website but couldn't see my shoe, which was somewhat disappointing.

Not surprisingly, the seller didn't have what I was looking for specifically, but he did have some other interesting shoes. The one on the left is made by MTB, a Swiss firm. Apparently these shoes are "physiological professional sports shoes from MBT Switzerland. The shoe has a unique structure originating from the Maasai tribe from East Africa that transfers the load center to the front of the foot and actually simulates the way runners run". I'm not going to be running in these shoes, but I do note that they have a gel filled sole that is extremely comfortable. They are also the correct size! My wife was there and she approved the purchase. A mere snip at 400 NIS (that's quite expensive).

Back home, I looked online for these shoes, primarily to see if I had paid an extortionate price. To my surprise, I found an Israeli site selling exactly the same shoe (I have the box with the catalogue number and size stuck on it - very helpful). They're selling the shoe for 349 NIS, including free delivery, paid in five installments, so I ordered another pair. Maybe I pay slightly over the odds for the shoes here, but I also had the benefit of trying them on. I need shoes sized 42; as can be seen from the label below, '42' is not mentioned!




This day in history:

Blog #DateTitleTags
31402/12/2010Chanuka through the yearsJewish holidays
78002/12/2014My army service - part twoIsrael, Personal
155902/12/2022MTB shoesShoes

Thursday, December 01, 2022

Christine McVie, RIP

Fleetwood Mac’s Christine McVie died aged 79, "after a short illness". I don't think that I have a single record on which Christine appears, but there are a few songs of hers that I will remember.

She first crossed my horizon whilst in Chicken Shack, singing "I'd rather go blind" at the end of the 60s, although this wasn't very much my taste in music. A year later, she moved on to Fleetwood Mac, bolstering their sound after Peter Green left. Several years later I became enamoured of her song "You make loving fun" from "Rumours".

I liked the post-1975 version of Fleetwood Mac less than earlier versions, so basically almost 50 years of Christine's career have passed me by. Even so, I would like to remember her as a name from my musical past.



This day in history:

Blog #DateTitleTags
11101/12/2007SleepApnea, Anaemia
65301/12/2013Critical weekDBA
77901/12/2014My army service - part oneIsrael, Personal
136101/12/2020E-hour minus 4DBA
136201/12/2020Viva resultDBA
144401/12/2021My body is like a barometerWeather
155801/12/2022Christine McVie, RIPObituary, Fleetwood Mac

Wednesday, November 30, 2022

Mid-night revelations

Unfortunately, I often wake up twice during the night: the first time is normally two hours after having gone to bed and the second time is an hour or two later. I awake due to nocturia, that is caused by the various blood pressure medications that I take. After visiting the toilet, once back in bed I normally fall asleep almost immediately. 

Every now and then, I awake with a revelation on my tongue. This is normally due to the right hemisphere of my brain chewing on a problem and suddenly spits out the answer. It has happened that I have awoken with the (correct) reason as to why some program that I was writing wasn't working. 

Last night (or more accurately, early this morning), I awoke with the words 'ERP enhancement management' (EEM) on my tongue. This is a concept from my doctoral thesis, and is in fact one of the tenets of the thesis: I am trying to show that there is a need for this concept. What it means to me, though, is that I used this concept in the introduction chapter and in the conclusions chapter, but not in the middle of the thesis. More frequently I used the term 'development and deployment of enhancements'. I realised that I should replace this phrase whenever possible with EEM. 

I'm thinking that the examiners might see that I've defined this concept at the beginning then ignore it for the rest of the thesis until I suddenly pull it out of my hat again for the end. I should refer to this more often.



This day in history:

Blog # Date Title Tags
148 30/11/2008 Criminal Justice TV series
652 30/11/2013 Arik Einstein Israel, Obituary
988 30/11/2016 Backing up data Computer
1557 30/11/2022 Mid-night revelations DBA

Sunday, November 27, 2022

Communal grief

It's a very sad aspect of kibbutz life, but nothing brings us more together than communal grief, when a kibbutz member dies. Most of the time, it's the elderly that pass away, and more often than not this can be a relief for the family. But sometimes, when an unexpected death occurs ... it's a shock that everybody feels.

About 20 years ago, if not more, one kibbutz member died in a car crash on a Friday morning. He was a member in high standing, probably as old then as I am now. I hadn't had much contact with him, but as it happened, a few days before his death, I was showing him how to use the spreadsheet Paradox (that was later overtaken by Excel) in order to prepare budgets. His family organised an evening in his memory, itself an unusual event that shows how highly regarded he was. I volunteered to play a sad song, but before I did, I took the opportunity to speak to the audience about how in the days before his death, I had been working with him. On the Saturday night I had a dream (as I told the audience) that I was sitting with the kibbutz treasurer and wondering how we would complete the work of this member, from where we would find the data. Then he (the member who died) came into the dream and said that everything would be ok, and that we would manage without him. Then I tried to play the song, but my hands were so slippery that I probably didn't play too well.

Why am I writing all this now? Because we were informed about an hour ago that a 32 year old member and 'son of the kibbutz' had died. He had a growth in his brain; we had been given to understand that his health had improved, but hearing the sad news has knocked everyone for six. He was married and had two small children; they will grow up without knowing their father (a situation that has unfortunately not been infrequent in Israel). I personally didn't know him, but I know his parents and used to work with his grandparents before they retired.

There was supposed to be a joint meeting of three very important committees (I'm a member of one) this evening, but unsurprisingly it has been cancelled. No date has been announced yet for the funeral (it would normally be tomorrow, but there must be some reason for its delay) but I am sure that it is going to be a traumatic event.



This day in history:

Blog #DateTitleTags
14727/11/2008AchievementsProgramming, ERP
118727/11/2018Intermediate thesis accepted!!DBA
127627/11/2019Song festival 2019 - 2Song writing
135927/11/2020Preparing for the DBA vivaDBA
155627/11/2022GriefObituary, Kibbutz

Monday, November 21, 2022

Using the steam basket

Two weeks ago I wrote about purchasing a steam basket, or as it's called in Hebrew translated into English, a 'collapsible steamer lily'. Today was the first chance that I had to use it, in order to cook pearl barley with chicken, but keeping the barley separate.

This is the cooking tray with the basket and the chicken. On the chicken has been poured fig syrup and I've scattered on them purple onion slices that are supposed to be slightly sweeter than the regular onion (although they cost the same). In the top left hand corner is the steam basket and if one looks closely, the pearl barley can be seen inside the basket.

After adding liquid and cooking for 2.5 hours, the chicken was sublime, but I was more interested in the pearl barley. It seems that I put too much barley in the basket as the upper layer wasn't cooked. OK, I'll remember this for next time. Also, the chicken wasn't particularly brown as it was a few weeks ago. It seems that rolling the chicken in 'date honey' (ie 'honey' derived from dates) and olive oil is preferable to simply pouring the date honey and olive oil on top. This time I forgot the almonds.

Here's the same tray after cooking. It can be seen that the barley has risen higher in the basket, as the lower grains have swelled with the cooking liquid, but the top most grains are uncooked. After taking the basket out of the tray and transferring the barley to a normal pyrex dish, I added more liquid in the hope that over the next few days the under-cooked grains will continue to absorb liquid and improve. Taste wise, the barley was fine, but not as spectacular as the first time when I tried this (without the basket).

I wonder which is better from a nutrional point of view, pearl barley or quinoa. This site sets out various comparisons:

  • Quinoa provides a higher percentage of protein, vitamins and minerals.
  • Barley is lower in calories than quinoa.
  • Barley provides more fiber than quinoa.
  • Barley has a better glycemic index than quinoa.
More importantly for me, it appears that raw pearl barley has half the potassium content of raw quinoa on an equal weight basis (it also has only half the iron and magnesium, so it's not a complete win). So it looks like I'm going to switch to pearl barley whilst still cooking quinoa for my wife (whom I've converted) and family, or maybe I'll eat both at the same time.



This day in history:

Blog #DateTitleTags
2021/11/2005Hello again (Kate Bush)Kate Bush
30721/11/2010Improving the dual list box dialogProgramming, SQL, Dual list box
109121/11/2017Joe CoolGrandfather
127521/11/2019Thesis updateDBA, Health

Sunday, November 20, 2022

Belated discovery about indices and ClientDataSets

In my blogs database program, I wanted that one query would display a list of all tags, ordered by the number of appearances and by name. The number of appearances has to have descending sort, so that the first tag appearing is the most popular, whereas the last tag is the least popular. On the other hand, there are many tags that appear only once and it would be nice if these tags could be sorted in alphabetical order. In terms of SQL, this would be

select tags.name, count (*) as id from tags inner join tag2entry on tag2entry.tag = tags.id group by 1 order by 2 desc, 1
but because of the way that the indices are defined in Delphi, I am using the AddIndex call in the following manner:
qTags.addindex ('idx', 'id', [ixdescending], '', '', 0);
Whilst this gives me a descending index on 'id', it doesn't explain how to have one field sorted in descending order and one in ascending order. Maybe I have never come across this situation before, previously having allowed the user to sort by one field only, either ascending or descending.

After poking around a little, I found the answer here; this involves one of the mysterious parameters that are passed as empty strings to AddIndex. It turns out that one leaves the options set empty, then adds in the first string the name(s) of the field(s) that are to be sorted in descending order (the name of this parameter is 'DescFields', making it more explicit). The second string parameter is called 'CaseInsFields', controlling which fields are sorted by case and which not. In Hebrew this doesn't make any sense (which is probably why I've never come across this problem before), but in the blogs program, it would make 'At' come before 'as'. The command that I am using is
qTags.addindex ('idx', 'id;name', [], 'id', '', 0);


This day in history:

Blog #DateTitleTags
64920/11/2013More song festivalMIDI, Kibbutz, Song writing
65020/11/2013Stack OverflowProgramming

Saturday, November 19, 2022

DBA update

Just over a month ago, I sent an updated version of my thesis to my supervisor, and since then I've been waiting for his response. In the mean time, I learnt how to create an automatic list of tables and of figures, in a similar manner to the automatic table of contents. I also added some more material, especially to the 'conclusions from the data' section of the thesis. Since then, I've been waiting....

The supervisor's response came on Tuesday, so on Wednesday I set about implementing most of the changes that he requested. These were primarily writing about how I mitigated biases in the research and moving one section from the concluding chapter to a new 'research design' section in the methodology chapter. This new section also received new material about how each case study is going to be conducted, i.e. a description, a list of documents, a list of interviews and the interviews themselves. This allowed me to use a word that is new to me - quadripartite

I also completely excised a section in the results chapter that examined the pilot study in terms of the model that had been developed from the case studies. I understand his point of view, but there were also some interesting points that arose from the pilot case study.

Today I devoted some time to creating a document that listed the changes requested after my unsuccessful viva examination. I had most of the answers at my fingertips, but there was a request to discuss the interview questions and their development in the methodology chapter. I had done this a few days earlier in response to a similar request from my supervisor ('moving one section from the concluding chapter' that I wrote a few paragraphs ago alludes to this), but it leaves me somewhat uneasy. The final development of the interview questions was carried out after the pilot study, so to me this seems to be putting the cart before the horse. 

Reflecting on this now, what I think they mean is 'discuss where you got the ideas from for the original interview questions'. Using the 'rubber duck debugging' technique, I now realise that there were two sources: one was my original thesis (although I think that it would be a good idea not to mention this) and the second was the five models of engineering change that appear in the literature review. I will add this now to the thesis and the 'changes document'.

I hope that I will get a quick turnaround from my supervisor as time is running out.


This day in history
 
Blog #DateTitleTags
64819/11/2013What's in a name?Israel, Personal
90419/11/2015Even dogs in the wildIan Rankin
118619/11/2018E dorianSong writing, Music theory
127419/11/2019The luxury of digital recordingMIDI, Kibbutz, Song writing
144119/11/2021Tables in Word documents opened in a threadProgramming, Delphi, Office automation
155319/11/2022DBA updateDBA

Friday, November 18, 2022

Fairport news

I've been so busy with my own life in the past few months (and rightly so) that I missed a few items of Fairport news.

First off: Gerry Conway, the drummer since 1998, has announced his retirement: "I never expected to still be playing at 75, my Mum was always asking me when I’d retire! Well, I’m not retiring but looking forward to some new adventures. Thanks Fairport, we had some great times". It appears that Fairport might be returning to the acoustic four piece (i.e. no drums), but also that the great Dave Mattacks will be returning!

Secondly, today was published a book called "Gonna see all my friends - a people's history of Fairport Convention", that is described as a fully authorised history of Fairport Convention as told through over 300 fan memories. This is published as a 384 page limited edition hardback, meaning that it's going to be heavy (man) and that the postage is going to be expensive. I wonder whether I should delay ordering this, so that I can read what others have to say about it, or order straight away. The 'limited edition' phrase worries me, but it doesn't say how many copies will be printed, so 'limited' may mean that there will not be a reprint.