Thursday, January 28, 2021

Cormoran Strike

A few weeks ago, I saw that one of our TV channels was showing a short drama series about a private detective in London, so I decided to record the series 'on spec': if it's not good, then I can delete it, and if it's good, then I'll have something to watch. I admit that at first my interest wasn't particularly deep, but as the series continued (there are seven episodes, where the first three cover one story; the other two stories required two episodes each), I found myself more and more drawn into the series. The book cover on the left is obviously from a post-tv edition; earlier editions were suitably vague.

Some fuss was made of the fact that the executive producer was J. K. Rowling of Harry Potter 'fame', although this by itself shouldn't mean that much. It transpires that the series is based on three books written by Rowling under a pseudonym. I found these on the Internet along with two more books (apparently the fourth book will constitute the second series, over four episodes) and I've been reading them on and off over the past few weeks.

First of all, I give a nod of recognition to the Television Tropes and Idioms site that has made me aware of all kinds of things. There is a page devoted to this series on the site, but it doesn't say that much. First, I will note that the series is fairly faithful to the books: obviously a great deal has been left out, but nothing has been added (something that always annoys me). A few tropes that I've noticed in the books are unresolved sexual tension (UST) between the eponymous Strike and his work partner Robin Ellacott, especially in the light of the latter's failing marriage (this is stronger on the written page than on the screen); Robin often plays the part of 'The Watson': Strike explains things to her, and so author Rowling achieves the story's exposition; the first meeting between the two protagonists is an example of 'Meet Cute', that happens in the first pages of the first book, but is delayed somewhat in the first tv episode.

As for the books: maybe it's the lack of a new DS Banks this year (maybe he or his author was ill with Covid-19), but I find myself comparing favourably Strike to Banks. True, Strike doesn't have his music or his books (things that I find charming with Banks) and is also younger (not yet 40, meaning that we don't read memories of the 60s) but he is an intriguing character. Like the younger Banks, he drinks and smokes far too much, despite the occasional attempt at a diet. 

Strike is a private detective, meaning that his job is sometimes easier and sometimes harder than a policeman's. Whilst a policeman can interview people and detain suspects, no one has to speak to a private detective if they don't want to. On the other hand, not being a policeman allows Strike opportunities that are semi-legal and thus denied to the police. Strike also has a varied, though not meaningful, love life, as per Banks at one stage.

I am definitely reading these books too fast, or at least, in not a sufficiently concentrated form. I especially want to revisit the first book (both the written word and its screen translation) as there is a motivation that I missed.

One final note (for the time being): being somewhat prudish or old-fashioned, I find the language unnecessarily strong and coarse. Maybe standards have changed. I note that Robin restricts herself to mild cussing in the first three books, but gives as good as she gets in the fourth book.

I also (briefly) considered writing a song lyric based on Robin's view of her husband, but I've decided against this as I've already written two recent lyrics on a similar basis, and one more would simply be overkill. But it does reiterate the notion that we love the image that we make of our partners, and not the partner themselves.

Sunday, January 24, 2021

Winter sun (new song) - and musings on Carole King and obscure chords

I've been listening on and off for the past few months to some of Carole King's early 70s output, including the best selling 'Tapestry' album. I have to admit that I don't like most of the songs, but then I'm not in the target demographic for them. There is one song that I admire, that sounds to me as somewhat atypical for CK: "Song of long ago", from her "Music" album. 

This song features a few interesting chords, so in order to assuage my curiosity, I looked at an online chord chart that included the obscure A11 chord. As I couldn't match what I was hearing to the chord chart, I found a midi file of this song and looked at the voicing of this chord: A (in the bass) G (a seventh above) B D. If one considers the A to be the root of the chord, then G is the 7th, B the 9th and D the 11th, and so A11 is an accurate description. But when I played this on the piano and looked at it, I saw a G chord with A in the bass, aka G/A. Neither of these chords sound to me like what is being played; it was only when I rethought the chord did I understand: it's a D chord second inversion (that's the A) with a suspended 4th (G) and an added 6th (B): Dsus4sus6. Anyway.... Another partially interesting song of CK's is "So far away"; at least, the first line is interesting, with a 9th in the melody. 

I actually saw Carole King in concert in July (?) 1971, along with James Taylor and their joint backing band that probably included Danny Kortchmar, Leland Sklar and Russ Kunkel - top session men. I only remember a few things about this concert: every song would be ended by the guitarists jumping in to the air then playing the final chord. It was very hot that evening.

Back to the new song: I thought it was time to write a slow shuffle and I wanted to play around with some of these harmonic ideas. I too began the melody with a 9th (a D over a C chord) but with differences to "So far away". I played around with various melodies and chords until I had something interesting, then started sequencing. Later on, I realised that one melody line is the same as part of the piano coda of "Layla", albeit set to different chords. Much later on, I noticed that one section of four bars has the same changes as Peter Green's "Man of the world" - this was completely accidental and coincidental. In the end, my kind of song is based on chord changes, and there are only so many ways of combining them. I aim for interesting 'building bricks' and these can't always be unique. Another part of the song has a Newman cliché in it (Dm Em F Em): see, I'm copying from myself.

I was aiming for a cool, minimalistic, slow shuffle, but it took some time to get there. The first complete version was a good start but not minimalistic enough; after a walk with the dog, I realised that I had to spread the instrumentation out more. Once I had the music track down, it was time to start writing words. Years ago I wrote a few lines about the winter sun, but these didn't lead anywhere. I thought that it would be a good idea to contrast the sun with the full moon that we recently had, but I couldn't come up with any lines that fit the song's rhythm. At one stage it seemed that the lyrics might go in a completely different direction, but again I had problems in stringing more than a few lines together.

The other day, when listening to the instrumental track with the flute playing the melody, I improvised a new line that certainly was interesting. On this basis, I managed to concentrate long enough in order to write the 27 lines (three verses of nine lines each) required. I then took the dog for a walk and saw the sun 'sliding under the horizon'; coming back, I changed maybe 60% of the lyrics. I'm not going to quote them here because they're not something that I'm particularly proud of, and they certainly don't have "me" in them.

Yesterday I spent some time recording the vocals, then even more time mixing the vocals to approximate the sound that I had in my head. I didn't get all the way, but it's still pretty good. This is probably the slowest song that I've ever sequenced, at a bare 64 bpm (beats per minute); when I first started sequencing, songs were at a speed of 120 bpm, then they slowed down to around 100 bpm. Most of my recent songs have been around 90 bpm, but 64 bpm is ... really ... slow. Interestingly, when singing I found the song to be too slow, but it sounds all right when listening to it. There was a song a few years ago that I found to be too fast when singing, but again the final track sounds all right.

That makes six new songs that I've written and recorded since last January. There aren't any old songs that I'm interested in rerecording, either because the songs don't talk to me anymore or else because I think that I can't improve on the existing recordings. 


 Here's the winter sun setting in all its glory.

Saturday, January 23, 2021

Porting an application to Windows 10/Delphi 10.2 (part 4)

Continuing ...

The main form with its grid now displays correctly, but I discovered that another unit that displays data initially in a twebbrowser and thence into Word does not work correctly.

The data is extracted from the database and stored in a tstringlist containing raw HTML tags; this stringlist is saved as a file then read into the web browser. The HTML itself is defined as Utf-8 as a result of my standard header code that includes the command "charset=UTF-8". The web browser would display a impressing number of diamonds, a clear sign that there were translation problems. Ironically, right clicking on the browser, choosing the 'Encoding' option and changing this to 'Hebrew (Windows)' would cause the Hebrew text to display correctly, but the data that contained Russian (the whole point of porting the application) would be displayed as question marks. Obviously this is wrong.

After about another hour of banging my head against a wall, the solution finally came to me - and it's something that I had already used, albeit not in this program: the stringlist is saved to a file; add the second parameter to the 'saveasfile' procedure.

savetofile (fn, TEncoding.UTF8);

Now everything works correctly on my development computer. Will it work on the target computer? Not quite: after moving five steps forward, I'm back to a basic problem, that the program can't find its database.

[Edit: I don't know what the actual problem was. I recompiled the program on the target computer and it started working properly, both inside and outside of Delphi. I'm going to keep the Delphi installation on the target computer; it will help solve future problems.]

Porting an application to Windows 10/Delphi 10.2 (part 3)

I thought that I was long done with this activity, but I was overly optimistic. The OP bought a new computer that will function as their server; as this is running Windows 10, I had to ensure that my new unicode program would work properly on this computer. Obviously it doesn't, as otherwise I wouldn't be writing this.

Every attempt to run the program on the OP's computer would bring up the error message 'Unable to load dbxfb.dll (error code 193). It may be missing from the system path'.  First of all, I had to find the dbxfb file; I looked high and low before I found it on my mobile computer in one of the many directories that Delphi had installed. I then copied the file to the OP's computer but this made no difference. 'System path'? I found where Windows maintains its environment variables (a hold over from DOS) and updated the 'path' variable to point to directories where I had copied the file. Still no luck. I considered this issue for some time and came to a tentative conclusion that installing Delphi on the target computer would help; I did this but with no change.

This left me with no option but to turn the question over to Stack Exchange. The first answer had me bewildered: it said that I was using a 64 bit dll with a 32 bit program or vice versa. After digging around a bit more, I discovered that indeed there were two different versions of dbxfb.dll in the Delphi directories: one in a directory called bin64 and one in a directory called bin. Either by design or mistake, I had copied the 64 bit version; replacing this with the 32 bit version improved matters slightly: the original error message had disappeared. But now there was a different error message!

A comment to the SE question suggested that I look at the SQL connection component; there I found the reference to dbxfb. But now, running the program on my own computer would bring up gibberish in the a certain place. I added a definition 'utf8' to the 'server charset' parameter of the connection's params array and redefined the strings that appear in the affected grid: finally the strings appear in Hebrew. I quickly copied this version of the program to the target computer - and it worked!

Unfortunately I didn't manage today's work in a scientific manner so I'm not sure exactly what the magical invocation was that made everything work. My tasks now are to complete redefining the strings displayed on the grid (the 'utf8' definition seems to have caused changes), copy the program to the target computer and check everything there. 

Monday, January 18, 2021

Covid-19 vaccination (3)

Today we had our second Covid-19 vaccination. As opposed to the first which took place three weeks ago amid constant sunshine, today was a more dismal event: it rained heavily during the night, and it's been raining on and off during the day. Again, as opposed to the sights that we see on television, there was hardly anybody waiting to be vaccinated in the regional health centre;  we waited for a few minutes (the nurses had to finish lunch) and then we were shown into a room to have the vaccination.

The only side effect from the first vaccination was a slightly sore arm; I couldn't raise my arm above my head. But that disappeared after 24 hours and that was that. They say that there are more side effects with the second vaccination, but I'll wait and see about that.

Thursday, January 07, 2021

I haven't disappeared

I haven't disappeared: I've simply been keeping quiet for the past few weeks. The problems with my blood pressure and the medication that I have been taking for it have been occupying my mind no small amount, but it seems that there is a mild improvement that started a day or so ago, not coincidentally because I doubled the dosage of the new medication that I am taking. I note that this doubling was the advice of my GP, who told me to start with a small dose then double it after a week. It also helps that I have found an analgesic that handles the headaches that the new medication creates - even if this pain killer is banned in several countries.

I find it interesting that my personal medical problems are far more interesting to me than the havoc that the Covid-19 virus is wreaking on Israel (and of course, elsewhere in the world). Although theoretically the country has been locked down for two weeks, few people have observed this and so infection rates have doubled and tripled. A more stringent lock down will start tonight for a few weeks. To me, it doesn't matter much as I've been working from home for the last two weeks and will continue to do so for however long it takes.


A few weeks ago, before my medical problems got out of hand, I devoted some time to the wreckage of my doctoral thesis. My understanding of the feedback that I received is that basically the whole thing has to be redone and rewritten, so I thought it prudent to start with the literature review. I spent one evening looking for advice on how to write a critical literature review, which is when I stumbled on the following:

Let us make one thing very clear. A PhD literature review isn’t just a summary of existing literature. That’s an annotated bibliography and that isn’t what a PhD literature review is about. This is the mistake I see most frequently in the PhDs I proofread. Not only will your examiners send this back for corrections, but it may mean the whole PhD thesis is problematic because it isn’t grounded in a critical review of the literature. A PhD literature review is a critical assessment of the literature in your field and related to your specific research topic. When discussing each relevant piece of literature, the review must highlight where the gaps are and what the strengths and weaknesses are of particular studies, papers, books, etc. Also, different pieces of literature are compared and contrasted with one another so that themes and relationships are highlighted. [link]

Well, yes, that's exactly what I did - I served up an annotated bibliography, although to be fair, I did add criticism. So I had to start from scratch, looking for themes then writing about them without going into any detail of the papers themselves. Thus maybe eight pages of text were condensed into one paragraph (!) as follows ...

This richness of literature regarding CSFs [Critical Success Factor] means that there is not total agreement as to what constitutes a CSF; each author apparently feels obligated to find new CFS.  For example, there is dispute in the literature as to whether modifying the ERP system (misfit strategy 4, as adopted by this thesis) is a CSF and so should be avoided; the tendency is to avoid modification in large organisations (Bergeron et al., 2004; Esteves and Pastor, 2005; Kang et al., 2008; Parhizkar, 2016; Barth and Koch, 2019) and to embrace it in SMEs (Zach and Munkvold, 2012; Beijsterveld and Groenendaal, 2015; Huang et al., 2018). The view that modification is a CSF is upheld by Barth and Koch (2019, p. 667) who examine CSFs in upgrade projects, remarking that "due to the high complexity of ERP systems, upgrades can only be conducted within comprehensive projects and require significant personal and financial resources as well as a high degree of ERP know-how". Their conclusion was based on twelve interviews with leading personnel from differing companies, all using SAP. This conclusion is not necessarily valid when a company uses a different ERP system more amenable to modification.

I sent the above to my supervisor a few weeks ago who only belatedly replied to me on Monday, writing that this is exactly what needs to be done. He also suggested a few terms to search for, such as 'software enhancement'. Today I had the time and temperament to start working on this; I found a few papers that were discussing misfits in the AutoCAD program. I realised that AutoCAD is another example of what I term 'diagonal software', so I could write a little about this. Unfortunately, the papers themselves are written in very bad English and don't appear to yield very much for me, but under the new regime, all I need to do is note that there is a small amount of literature in this field that is parallel to mine.

I then spent a few hours creating the template for my new thesis. The first chapter, the introduction, was imported with no change save to delete a few paragraphs at the end that discuss the thesis structure. The second chapter, about ERP systems, was bolstered by a few paragraphs that I wrote immediately after the viva that explain why I focused on the four systems that I mentioned. I added another paragraph or two about AutoCAD then threw out almost everything about horizontal software. The few pages that begin the new literature review, along with a page about search techniques, became the beginning of the third chapter. I then went through these three chapters and created a new bibliography to which I will be adding as I write more material.

I also spent a frustrating hour trying to get Word to format headings in the way that I want them. I am linking an interesting article on the topic, but I'm not sure that I managed to define the styles as the article explains. Correct formatting leads to an automatic table of contents, which is one reason why it is so important.

I will have plenty of time over the next two days to continue working on the literature review, and it's about time that I stopped procrastinating and got back down to work.