Tuesday, December 28, 2021

Memory upgrade

Five and a half years ago, I wrote about purchasing a mobile computer; I'm surprised that it's so long ago (in computer terms). Since I started working at home, I've been using this computer as opposed to the mobile that I have from work, as mine has a bigger screen. I keep the other mobile ready in case I have problems; at one stage I used to keep one computer connected to work and use the other for Teams conversations.

I've noticed in the past few days that it's becoming more and more difficult to work with my home computer: it's slow in switching from one program to another. I use Remote Desktop Manager and Teams and Whatsapp and Chrome ... and there isn't enough memory for all of them. So Windows swaps out memory to disk, and it transpires that the disk is considered slow (at least, when compared to SSD). So these memory swaps make the computer seem even slower.

I got fed up with this. The original configuration had 6 GB memory installed - I went to my local computer hardware man and asked him to enlarge the memory as much as possible. The computer has 4 GB on board and another slot in which the extra 2 GB was installed, so the maximum that he could add was 2 GB (replacing the 2 GB memory chip with a 4 GB chip). So now the computer has 8 GB.

And it flies! Today was a real pleasure working with the computer. It seems that I was using the maximum possible, and a small increase in memory size brought a huge improvement in performance. A worthwhile enhancement. 

8 GB memory! I remember enlarging the memory of my first clone computer from 512 KB to 640 KB and feeling pleased. According to my calculations, 8 GB is more than 16,000 times larger that the memory in that first computer. 

Friday, December 24, 2021

Joan Didion, RIP

A formal obituary can be found here.

I first became aware of Joan Didion in the mid-70s: she was another author who appeared in Tom Wolfe's "New Journalism" anthology. I'm not sure that the word "enjoyed" can be applied to her chapter in the book about San Francisco in early 1967, but I found it very enlightening in historical terms, having been slightly too young to have read about that period when it occurred in real time.

Shortly after, I found her collection of articles, "Slouching towards Jerusalem": this definitely was enlightening. Of all the articles, the most interesting was "On keeping a notebook", written in 1966 but referring to events that happened a few years earlier. This was a most personal article and at the time this was exactly the sort of material that I was looking for. 

We forget all too soon the things we thought we could never forget. We forget the loves and the betrayals alike, forget what we whispered and what we screamed, forget who we were. I have already lost touch with a couple of people I used to be; one of them, a seventeen-year-old, presents little threat, although it would be of some interest to me to know again what it feels like to sit on a river levee drinking vodka-and-orange-juice and listening to Les Paul and Mary Ford and their echoes sing “How High the Moon” on the car radio. (You see I still have the scenes, but I no longer perceive myself among those present, no longer could even improvise the dialogue.) The other one, a twenty-three-year-old, bothers me more. She was always a good deal of trouble, and I suspect she will reappear when I least want to see her, skirts too long, shy to the point of aggravation, always the injured party, full of recriminations and little hurts and stories I do not want to hear again, at once saddening me and angering me with her vulnerability and ignorance, an apparition all the more insistent for being so long banished.

Whilst I did not sit on a river levee drinking vodka-and-orange-juice at the age of seventeen, I can very much appreciate the sentiment, especially about the twenty-three-year-old me. Whilst I never kept a notebook or a journal, I used to be a copious letter writer. Unfortunately, what I remember as hundreds of letters that I wrote before about 1985 are lost; sometime in the mid-80s, I started writing letters via a computer and so I have copies of all those letters. Then I moved on to blogging, which in many ways is simply the modern variant of a journal, except that here, blogs have a start, a middle and an end. They are not random jottings but are about something.

In the early 80s, I bought a copy of her latest book (as it was then), "The white album". This collection piqued my interest less: there was a chapter about Jim Morrison and the Doors and there was another chapter containing some information about amitryptiline, but otherwise I was left untouched. I bought a copy of one of her novels (I think this was "River Run") in the second-hand bookshop in Rehovot that I used to frequent, but I found this opaque.

Still, I found Joan to be a very intriguing person. I never had a clear mental picture of what she looked like so here is one from 1972.


Joan Didion in Vogue in 1972. Photograph: Henry Clarke/Condé Nast/Shutterstock


 

Wednesday, December 22, 2021

Janis Ian

When I emigrated, one of our group had the LP "Between the lines" by Janis Ian. In those days I was quite the magpie regarding music (as if I'm not, now) and so I taped the record. Over the years I came to love most of the songs on the album, and some time in the 1990s I bought the cd.

"At seventeen" was a very good song then, and even now, I greatly appreciate its lyrics. Janis writes in her autobiography: I was alone in the apartment, absentmindedly playing a little samba part on the guitar while I read an article about debutantes. The woman who’d written it was talking about her coming-out party, how excited she’d been before it, how flat she’d felt in the aftermath. The opening line was “I learned the truth at eighteen.” Interesting line, I thought. Might be a song in there somewhere. I hunted around for a melody to go with my samba lick, and tried the line. Nope, it didn’t scan. I needed another syllable. I learned the truth at seventeen, I sang to myself.... I stared at the paper. How could I write about high school girls, or prom night and homecoming queens? I hadn’t had any of those experiences. I thought about that for a while. There were plenty of other school things I had experienced. I knew what it was like to never be asked out on a date. I knew the sinking feeling when everyone else in class came in to find a valentine on their desk, and yours was empty. And I sure as heck knew what it was to feel clumsy and ugly. I could write this song, I was sure of it.

But to be honest, I love the opening two songs (including "At seventeen") and I love the last two songs, especially the closing song ("Lover's lullaby") but not so much the songs inbetween. The music theorist inside of me has to point out that the first two verses of "Lover's lullaby" are in 4/4 time but the rest is in 3/4.

At some stage I had on cassette a few more songs ("Jesse", "Stars") along with another album that included "Hopper painting" (that's the only name that I remember; maybe I only had this one song). Scouring YouTube didn't bring up many other songs, if at all. About a month ago, I went on a Janis Ian kick and discovered most, if not all, of her discography; certainly all of the pre-1990 records. I listened to most but didn't connect with them, especially her first albums (with her breakthrough hit, "Society's child").

On the other hand, a record that might be called "Janis Ian II" captured me: this is the album that contained the aforementioned "Hopper painting", as well as several more songs that seemed extremely familiar. I find now that I am preferring this record to "Between the lines", although of course there has to be one song that I don't particularly like ("Hotels and one night stands"). Janis herself doesn't care for this album, writing It was painful, hearing songs that had seemed vibrant when I’d demo’d them reduced to flat, uninteresting recordings. Joe [the producer] was from Los Angeles, and my album ended up reflecting the current L.A. sound, over-smooth and dulled around the edges. I hated it. When I heard the mastered record Janis Ian II, I wanted to throw it out and start over again.

I beg to disagree. I very much like the piano based songs.

Below appears Janis as she looks today (or, at least recently).


Saturday, December 18, 2021

Further thoughts on running Excel from a background thread

As I'm on a thinking roll this morning, I thought that I would document some thoughts that I have about code that I wrote just under a month ago that runs Excel in a background thread. Specifically, I want to address the problem of passing two discrete ranges to Excel, where each range has to have a different format (for example, E:F should be integers and G:H should be floats). At the moment I can pass E:F,G:H (i.e. two ranges) but they will both receive the same format.

It seems that what is needed is to pass a stringlist, where the first string would be something like E:F,i and the second would be G:H,f. In other words, each string would be composed of two parts separated by a comma: first a range then a character indicating what the format should be (i=integer, f=float, of course).

That's a good idea.

A fruitful day, part three: continuing work on PrioXRef

I devoted about an hour and a half in the evening working on my Priority Cross-referencer and syntax checker. The details can be found on the other blog so I'm not going to write about them here. I just wanted to say that these hours were a bonus on top of what had turned out to be a very successful and fruitful day.

There are innumerous blues songs that start off with the words "I woke up this morning"; a quick search revealed "I woke up this morning/The blues all around my bed" (link); "I woke up this morning, feeling round for my shoes" (link); and "I woke up this morning with a awful aching head" (link). On the other hand, there's the perky song "You were on my mind" that also starts with "Well I woke up this morning and you were on my mind".

If I were writing such a song, it would start "I woke up this morning with ideas in my head"; it seems that the intellectual aspects of yesterday had passed from my left brain to the right, that started  ruminating on them, a process that lasted all night. As a result, my walk with the dog (and prior to that) had me thinking of

  • A replacement line for the new song "Building the life"
  • What to write in the latest draft thesis version
  • That I hadn't considered all the possible cases of 'LOOP' appearing in a Priority procedure. 
And now that I write that line about LOOP, I realise that there is also a case where RETVAL can occur outside of a cursor (after a 'select ... into' statement). Oops.

A fruitful day, part two: A conversation with my doctoral supervisor

As I noted about a week ago, my DBA supervisor had been ill with Covid-19 and then an ear infection took advantage of his weakened immune system, so it was a few weeks before we could talk about my last draft thesis version. He sent me some comments about a week ago that were easy to incorporate and  suggested that we talk on Friday about the problems that I saw with analysing the data from the pilot study.

As I told him, these conversations are always very valuable as they include a certain amount of brain-storming as well as giving me a push to continue work on this seemingly never-ending work (at this point I should state that I have exactly one more year to go - if I don't finish by December 2022 then that's that. I also paid tuition for this final year, a process that I don't want to go through again). The conversation brought up two new topics to be looked at - more material for the literature review - but more importantly shone a light on the direction of the research. It is so easy to concentrate on discovering whether and why the enhancements being studied succeeded, but that's not the real question, which is ...

How does the process of developing the enhancement affect the degree of success? Or in other words, would a failed enhancement have succeeded had the process been different/better? What could be done to improve the process in order to improve the probability of creating a successful enhancement?

The above three questions are really one; they're just phrased differently. And anyway, I'll have to translate them into Hebrew before asking them, so the subtleties may get lost (the subjunctive mood barely exists in Hebrew).

This morning, whilst walking the dog, I considered yesterday's conversation. At one stage I was tempted to run another pilot study that would include the above questions, but by our walk's end, I realised that the pilot did what it was supposed to do: check the methodology and suggest questions that weren't asked. The new questions can be asked in the 'real' research.

I'll probably work a few hours today and in the following days incorporating this new material and direction into the thesis. There will also be the new topics to research and possibly write about.


A fruitful day, part one: "Building the life" (new song)

Yesterday (Friday) didn't start off very promising - there was a light drizzle that doesn't help the plants but gets me wet. Weather like this always semi-paralyses me: I had to make a conscious effort to do things and not sit back and wallow in the dismal scene. I can see that this is going to be a very long blog so I'm going to split it into three, so readers that are interested in one topic don't have to read about something completely different.

Friday mornings generally start with a conversation with the Occupational Psychologist; following our hour-long conversation I generally spend two or three hours working on our programs - either a new module has to be added to the management program or there is a bug to be fixed. Yesterday our conversation was short and the programming was even shorter: there were a few bugs in a routine that I wrote several years ago. The bugs were easy to fix, which makes me wonder how many other land-mines are waiting to be triggered. Obviously I don't aim to write code with bugs and I do test my code, but it happens that I don't test sufficiently. Anyway, by 9 am I had finished with the OP (as opposed to 12 am or later on most Fridays).

What to do next? I have been working on a song for the past few weeks; like most (if not all) new songs, I think that this one is good. Over the weeks I've been adding little bits and pieces; on Thursday I added a bridge section - until then there had only been three verses. Unfortunately the bridge didn't connect well to the instrumental part that came after and I experimented with several chords until I found something that worked ... except that this required that the instrumental be lowered by a tone. Not a problem. The instrumental itself causes a very subtle modulation at its end, going up by a semitone - so now the final verse was a semitone lower than the first verse. Yesterday I dropped the entire song by two semitones as the tune (deliberately simple after the spider-like melodies that I've been writing lately) was pitched too high. As a result, I'm not really sure what chords are being played towards the end, making it difficult should I need to add anything. But no: as far as I'm concerned, the music is finished.

On the other hand, there were no words, as usual. I had a few blithe phrases that would fit the opening lines but I had no idea what the song was to be about, and without knowing, I couldn't write anything. I should note here that a few weeks ago I read the autobiography of Janis Ian and felt encouraged/challenged to improve the level of my lyrics, so knowing what the song was to be about was important. Another book which I have just finished reading (for the second time) is 'What Alice forgot' by Liane Moriarty (I wrote about this here). I realised that I could write lyrics about the problems that Alice and Nick (her estranged husband) face; the following paragraph was the catalyst.

“I’d be at work, where people respected my opinions,” said Nick. “And then I’d come home and it was like I was the village idiot. I’d pack the dishwasher the wrong way. I’d pick the wrong clothes for the children. I stopped offering to help. It wasn’t worth the criticism.”

I know how he feels, although I'm not as bad as he is in the house (after all, I'm the cook). As I had the time yesterday, I started work on writing the lyrics to a song that is now called 'Building the life'. Once I had them complete, I tried singing them (this is where lowering the key of the song came in), and a few phrases were changed. There was still one line that I wasn't completely comfortable with: it didn't express the exact sentiment that I wanted, but whilst walking the dog this morning, the perfect line entered my head.

At work he's considered a star in the making His word always carries weight He's thought as an asset, delivering value Embodying good as a trait He understands He recommends His opinion is highly treasured by all At 8 in the evening, he closes his laptop And heads out into the night His wife is not happy: he’s missed their son’s party There’s nothing he can do right He’s lost in thought She’s practical She is getting impatient with his failings When she is down, he is up When she is up, he is down When she is happy, he cries When she is smiling, he frowns Where is the balance between these two people? What compromise can be made? They both acknowledge their failures as partners But can their marriage be saved? He contributes She must accept
They together can build the life that they want

I can't stress enough that these lyrics are imagined! They are not about my wife and I even though the couplet "He’s lost in thought/She’s practical" is more about us than they are about Alice and Nick (so is the first verse).

On the technical side, I note once more how easy it can be to write lyrics once I know what I'm writing about; for example, the bridge section ('when she is down ...') came to me when I was on my way to my daughter's flat, not while I was sitting down and physically writing the words. In other words, once I'm in 'writing mode', the words can come quickly.

Sunday, December 12, 2021

Darwin and Covid-19

I thought that I had written that so far no one has made the connection between Darwin's survival of the fittest and the various Covid variants: surely each variant that 'catches fire' (the latest being omicron) should proliferate more than other variants - that's why it's the current variant to cause everyone worry. Presumably I had this insight after reading 'The planet of viruses' but I can't see that I wrote it there. Now I remember that I wrote it in a message to my doctoral supervisor after he told me that he had suffered from Covid.

Today I read the following: The mechanism was laid out by Charles Darwin more than 150 years ago: evolution through natural selection. If a person is infected with Covid but mounts a weak immune response, the infection can persist for months. In that time, antibodies neutralise some of the virus, but not the versions they bind to less well. These surviving viruses proliferate, mutate and undergo further selection – potentially leading to variants that evade immune defences. [source

One study showed that a particular sample of coronavirus [was traced] to a 36-year-old woman who was not receiving effective antiviral therapy. Tests revealed that she had harboured the Covid virus for 216 days, in which time it accumulated 32 mutations, making it similar to the vaccine-evading Beta variant.

The article goes on to consider that the variants are being established in people with weakened immune systems, such as those undergoing treatment for cancer or for HIV.

Saturday, December 11, 2021

Mike Nesmith, RIP

It's early 1967 and the 10 year old me is watching 'The Monkees' TV show and listening to their first record (along with a Jewish 10 year old girl who lived vaguely near me). Whilst I appreciated Micky Dolenz's singing voice (that's him in the background of the photo, 'playing' drums), I didn't like his on-screen persona; the Monkee I most identified with is Mike Nesmith: guitarist (note the electric 12 string guitar!), singer and songwriter. He is the third Monkee to die (yesterday?), leaving Dolenz as the sole survivor.

I find it intriguing now to note what were the qualities that attracted me: the musical parts (Nesmith was a 'real' musician) but also the somewhat shy and introspective character that he played. I remember very much liking the song "Papa Gene's blues" that got played a few times in the series and was on their debut record - this was a song that Nesmith wrote.

Of course, writing about The Monkees requires that one describe how the group was put together, what the goals of the producers were, how they were considered to be manufactured and how the group members expressed their dissatisfaction with all this, but I'm not going to go into this.

Several years ago, I looked for the Monkees' songs; there are a few on the first album  (especially "Take a giant step") that I think are very good and stand up well today, but for me, the most interesting song was written by Nesmith, entitled "You just may be the one": the rhythm of the opening verse lines is not exactly the simple fare for which the group are supposedly known. A tape of the recording sessions can be heard here: this is a fascinating audio documented about how the song was recorded and produced (by Nesmith). This version shows that the time signature of the song is 4/4; the opening lines are placed at odd places over the instrumental rhythm.

I listened somewhat to Nesmith's post-Monkees music but this was in a style that did not appeal to me. An obituary can be found here.

Sunday, December 05, 2021

The week of the virus

Last week started off with me reading a book called 'A planet of viruses' by Carl Zimmer. The version that I have was published in 2011, probably making it the first edition; I understand that there is now a third edition of the book. It's a good book in that it explains very well what a virus is and gives examples of several types of virus (because the book was published ten years ago, Coronavirus is mentioned briefly at the end in connection with SARS). But I found that it didn't go far enough in explaining things and found myself somewhat dissatisfied by the end. There also seems to be some confusion (maybe on my part) whether 'ten million viruses' means ten million separate virus entities (like ten million people) or ten million types of virus. There is a huge difference between the two. I imagine that the third edition is probably much better.

After completing that, I received a message from my DBA mentor, that he had been ill with Covid-19, "flat on his back for ten days" ... despite having been vaccinated twice.

As I noted in my previous blog entry, 'my body is like a barometer', I noticed that it was getting painful to swallow on Wednesday. By the evening, I was feeling much worse which is when I realised that I had been the recipient of a visit from my good friend the rhinovirus. I have just completed three days of feeling about 50% competent: either my throat aches or my nose drips (fortunately, not the two at the same time). I'm glad that this happened over the weekend as it didn't affect my professional life very much (I took Thursday off for personal reasons not connected with my health, but in retrospect, I'm pleased that I did). 

The worst part of this viral visit was at night: over the past few months I've been getting up about three or four times a night due to the diuretic effect of one of my medications, but the last few nights have seen me getting up six or seven times a night; this may be due to the increased amount of tea that I've been drinking, even though I try not to drink after about 6:30 pm. To add to my problems, last night I also had a mild nosebleed from my right nostril. This wouldn't be considered a problem, but having a nosebleed whilst wearing a CPAP mask is problematic. 

I've just looked at the CPAP data for the past few days (the last day with data is currently Friday); to my surprise, there were no apnea for the past three days, and the amount of deep sleep has been encouraging. The usage time is getting longer - Friday night had just over 10 hours - but as I always note, this isn't sleep time but rather the amount of time that the machine is working. On the other hand, my blood pressure has gone up.

Thursday morning was the date of my long awaited appointment with the new female sleep doctor. It turned out that the doctor was male, and that he is a 'lung doctor', not a sleep doctor. He was more interested in the pleural effusions that I had in late May/early June than anything to do with my sleep. Apart from a referral for a new chest x-ray that I was supposed to have done several months ago, and a partial referral to the sleep clinic in Hadassa hospital, the only thing that I learned from this appointment was not to place any value in the 'deep sleep' data provided by the CPAP machine. On the other hand, the apnea data is very good.

Following the doctor's observation about the deep sleep, I decided not to bother with headphones and binaural beats one evening. Funnily enough, after a few minutes of lying in bed, I began to feel 'lonely': I missed the noise! So I put the headphones back on and they do seem to help.

Wednesday, December 01, 2021

My body is like a barometer

I've discovered that I don't need a barometer or weather forecasts: my body tells me when it's hot or cold. The past few days have been very hot in Israel and as a result, my normally dry skin has become even dryer, making it very itchy. I checked the outside temperature, and our combined barometer/thermometer showed a maximum of 32.5°C; this explained why my legs were so itchy. I tried as much as possible not to scratch, but it's hard not to give in to temptation. I attempted to soothe/hydrate the skin on my legs with a variety of creams that were only partially successful.

Fortunately I was saved from the constant scratching by a change in the weather. Some time during the night I became aware that it was slightly painful for me to swallow, a condition that has yet to be alleviated by constant cups of tea. The reason for the pain is that it started raining just after 7 am (my half hour walk with the dog had me home at 6 am) and has been raining on and off since then.

I of course prefer neither hot nor cold weather, so that my body doesn't react.

Friday, November 26, 2021

Opening Excel from a thread and displaying a file

Three weeks ago, I wrote about programming a thread that would activate Word (in the background, of course) and cause it to display a file that was preprogrammed as an HTML page. I wrote then "the next step is to write similar code that will open Excel in a thread". Well, I wrote the Excel code; this was easy to do once I had the Word example.

Today I came across an example where the simple 'open Excel in a thread' code is not sufficient: it often happens that I want to format certain columns as integers or as dates (although as I documented a year ago, it's better not to format date columns) after the data had been passed to Excel. I would do this with the following two lines:

xlApp.Columns['B:F'].Select; xlApp.Selection.NumberFormat:= XLIntFormat;

I could not do this with the simple thread code as the xlApp variable is not visible to the calling program. The simple solution would be to add an optional parameter to the code that creates the thread; this parameter would be passed down the chain and used after the data had been inserted into Excel. A complication would be that there might be two ranges of columns that need to be formatted. 

Here's a further complication: normally I freeze the top line of an Excel file with the following code:

sheet.Range['A2'].Select; xlApp.ActiveWindow.FreezePanes:= true;

In a certain case, I wanted to freeze the top two lines, meaning that the range would have to be A3 and not A2. Could I do this with another optional parameter? It is my understanding (probably wrong) that there can only be one optional parameter per procedure. This was exacerbated when I thought that I would also have to pass another string parameter denoting which columns should be dates (in the end, I didn't need this). So I decided to use overloaded procedure definitions, a first for me.

I now have the following:

Procedure ThreadExcel (const AFileName: string); overload; Procedure ThreadExcel (const AFileName, intformat: string); overload; Procedure ThreadExcel (const AFileName, intformat: string; freeze: integer); overload; ... Procedure ThreadExcel (const AFileName: string); begin TExcelThread.Create (AFileName, '', 2); end; Procedure ThreadExcel (const AFileName, intformat: string); begin TExcelThread.Create (AFileName, intformat, 2); end; Procedure ThreadExcel (const AFileName, intformat: string; freeze: integer); begin TExcelThread.Create (AFileName, intformat, freeze); end;

I suppose that I also need a variation where there are no columns to be formatted, but a different 'freeze number' is required but I'll cross that bridge when I come to it (actually this could be done by passing afilename, a blank string and the freeze number). The possibility that there might be different types of format passed and/or multiple column selections is handled in the following code:

Procedure DoFormat (const fmt: string; aformat: string); var i: integer; cols: string; begin repeat i:= pos (',', aformat); if i = 0 then begin cols:= aformat; aformat:= ''; end else begin cols:= copy (aformat, 1, i - 1); aformat:= copy (aformat, i + 1, length (aformat)); end; xlApp.Columns[cols].Select; xlApp.Selection.NumberFormat:= fmt; until aformat = ''; end; ... if intformat <> '' then DoFormat (XLIntFormat, intformat);

Intformat could be 'A:B,E:F' in order to format two column ranges. Passing the format string as a parameter enables formats other than XLIntFormat ('#,##0') to be used. This procedure uses what might be termed 'old style' programming; modern day coders would probably use a stringlist in the following manner (this is unchecked code, so it may be wrong):

var i: integer; alist: tstringlist; begin alist:= tstringlist.create; alist.delimiter:= ','; alist.delimitedtext:= aformat; for i:= 0 to alist.count - 1 do begin xlApp.Columns[alist[i]].Select; xlApp.Selection.NumberFormat:= fmt; end; alist.free; end;
I wonder whether I need to add a comma at the end of the list.

Wednesday, November 24, 2021

Amitriptyline reduces the amount of deep sleep

After a week of excellent numbers for deep sleep, the data has reverted to a few minutes' deep sleep each night. I've noticed that sometimes my headphones aren't on my ears but have moved slightly; I have no way of discovering whether this is important. I've also noticed that frequently I wake up at around 11:30 pm with reflux arising from GERD, which I handle with omeprazole (a wonder drug). The reflux may arise from my evening medication, two of which can cause reflux. So yesterday I took the medication at 6 pm, a few hours earlier than my usual time.

This morning I read that amitriptyline, a medication that I take in a very low dose to prevent migraines might be causing sleep problems, as well as reflux. According to this site, Amitriptyline also reduces the amount of deep, slow-wave sleep (SWS), also referred to as ‘deep sleep’. During SWS our bodies are in housekeeping mode: our muscles repair themselves and new tissue is grown.

Like many of my medical problems, it all seems like a problem in balance,  where one medication improves something but causes something else. I'll try taking amitriptyline once every other day; I doubt that this will cause the migraines to reappear, but it might increase the amount of deep sleep. I wonder how long it takes the body to metabolise the drug: if I don't take it tonight, will last night's dose still remain in my body?

I have an appointment with a sleep doctor next Thursday; I intended to bring up the subject of increasing the amount of deep sleep even before I read the information about amitriptyline. Maybe she'll reduce the dosage (I see that there are pills with 10 mg - I take 25 mg pills, where 250 mg is the dosage for depression).

Friday, November 19, 2021

Tables in Word documents opened in a thread

Earlier in the month, I wrote about opening Word in a background thread. Today I had reason to revisit the code, as the Occupational Psychologist wanted a few bells and whistles. The first request was to add a flag to cause the document to be displayed in landscape mode - simple. 

The second request was harder: should the document display a table, then that table should have the 'Repeat table header on subsequent pages' flag set. I know how to do this in a live document (I need it for my doctoral thesis) so it was quite easy to create a macro that would set the flag. Unfortunately, it wasn't clear which object within Word executes (Selection.Rows.HeadingFormat = wdToggle); is 'selection' a table? Is it something else? I had the idea to iterate over any tables that might be found within the Word document but not only was this difficult, it also didn't work.

I decided to leave this request for later, but serendipity played its part: one Word document that the management program created was now displayed horizontally, but more importantly, the table header repeated on the second and third pages! How did this happen, I asked myself, as I hadn't figured out how to do this yet. I looked at the HTML code that the program creates and that Word displays: along with the <table> tag, I had also used the <thead> tag. Somewhere along the line, I had defined a style in which the font in the header section is one colour, and the font in the <tbody> section is a different colour. It appears that this tag also causes Word to display the table with repeating header sections!  This saved me a great deal of head scratching.

Sunday, November 14, 2021

Sleeping even more deeply

Of course, after writing my previous blog entry on this topic, there were three days with no deep sleep whatsoever. When I saw this about a week ago, I considered the situation and realised that I had loaded four pieces onto the mp3 player. Only two were 'aimed' at increasing the number of delta waves, with the other two intended for increasing 'happiness' (I'm not sure which wave that is or even whether there is a 'happiness' wave). So I deleted the two 'offending' pieces from the player and slept several nights hearing only the two delta wave pieces (that sound like humpback whales - it's not music).

I looked at the data today: since 05/11/21, the numbers have been 45, 31, 2, 20, 0, 55 and 46 minutes respectively. I think that the 2 minutes night was the day that I deleted the pieces (last Monday); there is no explanation yet for Wednesday's poor showing (0 minutes). That night also had a high number of apneic events.

I could have reasonably expected that Thursday's figures would be poor as I went to bed late and was up in the middle of the night with a blocked nose. The usage time agrees with this - only 402 minutes as opposed to 495 minutes the day before - but strangely there were no apneic events at all, along with 55 minutes deep sleep. On Friday night/Saturday morning I 'slept in' - 549 minutes, the longest since 1/10 - but again no apneic events and 46 minutes deep sleep.

So it looks like I've hit on a winning formula to increase the amount of deep sleep that I get.

Tuesday, November 09, 2021

The Department of Bright Ideas

At work, I introduced the concept of Engineering Changes (an existing module in Priority) several years ago in order to aid communication between sales (who sometimes sell products that have not yet been designed) and engineering (who have to design those products). Over the past few years, this chain has been extended to production, who have to manufacture those products. The traditional way of informing production was to print a copy of the product's blueprint and send it to production.

Someone - not me - suggested putting a terminal on the shop floor so that the workers could scan a bar code on the product, where this bar code contains the EC number. Magically the blueprint would appear on the computer's screen. This is fairly easy to do within Priority, as the bar code would lead directly to the EC record, where the path to the blueprint is stored. Then someone asked whether this could be done outside of Priority: my initial thought was that this would not be possible, as the required files are stored in a labyrinthic directory structure, where the target files are several directories deep. 

Then the penny dropped: I could write a program that receives a barcode for input then performs a recursive search starting with the top level directory in order to find the required file (displaying the file at the end is trivial). This would not be fast but at least it would work. Writing this recursive search was slightly tricky, as most of the examples that I found of recursive directory search simply create a list of all matching files as opposed to looking for one specific file. Another hurdle was that within one terminal directory there could be several files for the same EC - the most recent version is the target (coding this turned out to be much simpler than I originally thought).

So I wrote the program, going through several revisions, tested it at home with a much simpler directory structure and a barcode reader, then tested it at work. The program fulfils its requirements, although it's slow - because of the search.

Last night I was walking the dog when I had another bright idea: instead of constantly performing a recursive search for one target file, I could write a program that performs a complete recursive search, saving its results in a file, then update the current program to search the file (that is loaded into the program's memory via a stringlist). This of course is very fast. Should the target not be found in the stringlist, the original recursive search algorithm gets called; this would happen if a new EC has been created since the directory structure was last mapped.

Writing the mapping program was very easy, being based on the original program, but without the user interface and without the complications of looking for a specific file. I had trepidations about the amount of time that this program would required to create a complete map, but had I thought more deeply about it, I would have realised that it wouldn't require much more time than the current program required to find one file. True, I am 'pruning the search tree' the moment the target file is found, meaning that the original program doesn't have to search the entire directory tree, but I get the feeling that all the target files that are searched appear towards the end of the recursive search, so pruning doesn't save that much time.

But 'the proof is in the pudding': after writing the mapping program (and testing it at home), I ran it at work. The program required two or three minutes to build the directory tree! I had been thinking that it would take half an hour or more. Once I had the directory tree map/index, it was a simple matter to include this in the original program that now works very fast. It's not instantaneous, but I think that the slight delay is due to executing the PDF viewer.

Moral of the story: walking the dog provides one with time for unconstrained thought. As always, these bright ideas seem so simple in retrospect that makes me wonder why I don't think of them earlier. The reason is that we are curtailed, 'blinkered', restrained, in our thinking, and one has to get out of the work environment (by walking the dog) in order to free oneself of the restraints.

Monday, November 08, 2021

DBA update

I last wrote on this topic exactly one month ago, after having interviewed the CEO and after transcribing that interview. I quickly followed this up with another three interviews, each person with his own opinion of the enhancement's success. On the basis of how long it took me to transcribe the first interview, I took my supervisor's advice and sent the other three interviews to a company that specialises in court transcriptions.

After being told that the transcriptions would take about a week (they're not urgent) and paying (415 NIS, which is equivalent at the moment to about $130, the dollar being extremely weak against the shekel), I am still waiting. I have received various excuses and I'm getting to the point of wondering whether I've been defrauded.

Despite not having the transcriptions, I know basically what was said (and I can always listen to the interviews again, should I want to) and so was able to write my first round of conclusions: not only about the enhancement itself, but also (and more importantly) about the pilot study methodology.

I also read a few interesting papers two weeks ago; one is theoretical and the other builds on the theoretical basis to carry out research. The topic is beneficial non-compliance brought about by the use of workarounds. The author of the first paper (who is a contributor to the second paper) proposes that at times, non-compliance of company standards can actually be beneficial. Yes, I know that this sounds like an oxymoron but it is also an interesting idea in itself, and also something that I can use myself. In the case where the use of a workaround mean that the work gets done better, the idea and/or methods of the workaround should be incorporated into the fabric of the ERP system so that the standard procedure (that presumably is lacking in some respect or is too difficult to comply with) can be updated to something that works.

I feel like the Borg: you will be assimilated!

So I added at least a page on beneficial non-compliance (including a table) and wrote about ten pages on the pilot study before sending off this version to my supervisor. I know that the pilot study chapter is not complete, but I'm not sure what I should add. Hopefully now I can maintain momentum with the thesis.

Sunday, November 07, 2021

La Rossa

I'm still very high on my discovery of the 5/4 bars in VdGG's "La Rossa". The elongated bars make perfect sense when looking at the prosodic elements of the song as these bars highlight the 'if we made love now' lines. 

I wondered whether these flourishes are maintained in performance; I don't have handy a recording of this song from its time period, but at the moment the three piece band are touring in Scandinavia, and as luck would have it, a version of "La Rossa" was posted a few days ago. 

I have to admit that I don't like live VdGG very much; Hammill especially seems to ruin the songs that were so carefully wrought. 'Fortunately' his contributions to LR are almost inaudible, with Hugh and Guy putting out a tremendous sound. 

I listened closely to the middle section, and as far as I can tell, they played the rhythmic structure as it appears on record. I found it easier to identify the different bar lengths, and maybe I'll be able to transcribe this portion of the song, after all.

Saturday, November 06, 2021

Opening Word from a thread and displaying a file

I wrote eight and a half years ago (!) the following:  As I have noted, I have spent no small amount of time updating and expanding the use of email in the Occupational Psychologist's management program. Email is now sent via GMail and works very nicely ... except for one not so small problem: when one is sending an email with an attached file, the program apparently stops working for a minute or so. The solution to this problem is to send the email via a separate thread but until now I have lacked the programming knowledge to implement this.

Today I can rephrase this statement as follows:  As I have noted, output from the Occupational Psychologist's management program is frequently sent to Microsoft Word (and even more frequently to Microsoft Excel). There is one not so small problem with this: when one is running a report whose output is displayed by Word, the program apparently stops working for a minute or so. The solution to this problem is to open Word in a separate thread but until now I have lacked the programming knowledge to implement this.

I have tried this in the past but not succeeded. As it was so long ago, I have no idea what I did then, but now it was fairly simple to write the necessary code that worked the first time that I tried it! I think that I missed using CoInitialise/CoUnInitialise in the Execute procedure. The next step is to write similar code that will open Excel in a thread: there are many more places that call Excel to display data.

Here is the code:

unit Manage08at; interface uses Windows, SysUtils, Classes, MyOffice, ComObj, ActiveX, Variants; Procedure ThreadWord (const AFileName: string); implementation type TWordThread = class (TThread) private FFilename: string; procedure Execute; override; public constructor Create (const AFileName: string); reintroduce; end; constructor TWordThread.Create (const AFileName: string); begin inherited Create (False); FreeOnTerminate:= True; FFilename:= afilename; end; procedure TWordThread.Execute; var wrdApp, wrdDoc, wrdSel: variant; begin CoInitialize (nil); wrdApp:= GetWordObject; wrdDoc:= wrdApp.Documents.Add (wrdApp.Options.DefaultFilePath[wdUserTemplatesPath] + '\q400.dot'); wrdDoc.Select; wrdSel:= wrdApp.Selection; wrdSel.InsertFile (ffilename); deletefile (ffilename); wrdSel.WholeStory; wrdSel.Font.Name:= 'Arial'; wrdSel.Font.Size:= 11; wrdSel.homekey (wdStory); wrdapp.visible:= true; wrdSel:= unassigned; wrdDoc:= unassigned; wrdApp:= unassigned; CoUnInitialize; end; Procedure ThreadWord (const AFileName: string); begin TWordThread.Create (AFileName); end; end.
The only thing that is personal development in this code is the MyOffice unit that includes a procedure called GetWordObject that opens an instance of Word.

Friday, November 05, 2021

Counting beats with Van der Graaf Generator (3)

Twelve years ago, I wrote: "Yesterday, I heard "La Rossa" as a slow 12/8, and on that basis, the middle section became very interesting ("if we made love now..."): a bar of 3/4 followed by two of 4/4, repeated several times (that could be written as 9/8 followed by two bars of 12/8, to make the triplet beat clear)."

I was listening to the 2021 remix of the song (the only differences that I can hear is a guitar line in the introduction that isn't audible in the version familiar to me from 1976; along with one in the saxophone solo at the end where there are a few new phrases as well as some guitar 'chunks' at the very end) when suddenly I noticed yet another metrical peculiarity of this song, especially the middle section that I referenced above. This either displays metric modulation (three beats in the space of two) or something similar, but that isn't anything new for me.

What caught my attention was ironically the 'if we made love now' phrase at about 4:17 in the song: after having triplets and fours scattered around, that specific line (and its corresponding repeat at 5:22/3) has a five beat bar. The word 'now' is the first beat of five before the next chord change. The same thing happens at the end of the phrase 'it will change all there is yet to be': 'it will change' is one triplet, 'all there is' another triplet, and 'be' is the first beat of a five beat bar. Wow. 

The resources available to me now are more extensive than they were 12 years ago, and I'm going to try and bring this song to the interest one of the YouTubers who relish odd rhythmic constructions.

By chance, today is Peter Hammill's birthday.

Thursday, November 04, 2021

Sleeping deeply

I've been continuing my attempts to increase the amount of deep sleep that I get each night by means of listening to 'binaural beats'. 

I wrote a few days ago that "Last night [Friday 30/10] was much better in terms of sleep quality; I also awoke an hour earlier than I intended but still feeling refreshed". That's interesting as apparently I had only 5 minutes of deep sleep that night. I haven't felt any change over the past few weeks, but then I'm a 'morning man' and generally wake with a sharp mind. I often have good ideas whilst walking the dog at 5:45 am.

Since my last blog on the subject, I've been changing the conditions somewhat. I had switched to the 'over the ear' headphones from the swimming mp3 player, but after these kept on falling out, I decided to switch to a headset pair that I found in my spare parts drawer. As opposed to the first two sets of earplugs, these sit outside of the ear; I find that I get better sound quality this way than earplugs that have to be inserted at the correct angle. This headset is quite rigid, meaning that sleeping on my side is not too comfortable. 

I also switched mp3 players: I had written before that the swimming mp3 player is difficult to control. Either it got turned off one night or ran out of battery, but it wasn't working one morning. Despite charging it, I haven't been able to turn it on again. The night after this, I used my mobile phone, but the earphone plug didn't make a good connection. Belatedly I realised that I don't need to keep my 'good' mp3 player reserved for when I travel on the train - as I barely travel on the train these days. The player has built-in memory as well as an SD card, so I cleaned out the built-in memory then transferred my three pieces of binaural beats to the player. I set the player to play from its memory and reduced the volume somewhat. Since then this has been working well, although I must remember to charge it now and then (I woke up in the middle of last night to the sound of silence; I had to find the charging cable and connect it in darkness to re-enable the player).

I also mentioned last time that I had ordered the simplest pair of headphones that I could find. Despite being quoted a delivery date of a few weeks, these arrived two days ago and I was able to use them for the first time last night. Of course, I don't have any data for them yet, but subjectively they were lighter and caused less pain than their predecessors.

And as for readings:

Day minutes
Wednesday, 27/10 19
Thursday, 28/10 33
Friday, 29/10 0
Saturday, 30/10 5
Sunday, 31/10 21
Monday, 01/11 16
Tuesday, 02/11 29

I hope that the improvements of the past few days continue. Tuesday also registered a fairly high number of apneic events (10); I hope that this is a one-off. The problem with reading data from a few days ago is that I don't remember whether there were any unusual events on a given day.

Saturday, October 30, 2021

Binaural beats and deep sleep

My last blog bemoaned my lack of deep sleep (according to the CPAP machine who I tend to believe more than the 'smart' watch that reported on a far larger quantity) and suggested that a method of improving the amount would be with binaural beats, described thus "an illusion created by the brain when you listen to two tones with slightly different frequencies at the same time. Your brain interprets the two tones as a beat of its own. The two tones align with your brain waves to produce a beat with a different frequency. This frequency is the difference in hertz (Hz) between the frequencies of the two tones. When you listen to binaural beats, your brain activity matches the frequency set by the frequency of the beat. This is called the frequency-following effect. This means you can use binaural beats to entrain your mind to reach a certain mental state." One has to listen via headphones - this is mentioned elsewhere. Also the sounds themselves have to be less than 1 KHz, a frequency that might seem limiting but it's actually a shade less than two octaves above middle C (256 Hz) and so should cover most musical sounds.

I know that alpha waves help one relax, focus and reduce stress. A hot shower causes the brain to start pumping out the alpha waves, which is why I get many good ideas whilst showering (I had another one last night). Theanine also increases the number of alpha waves. These waves have a frequency of 8-14 Hz, so listening to binaural beats with a difference of the above (barely noticeable) should increase the number of alpha waves.

At the moment, I'm more interested in increasing the number of delta waves: these have a frequency of 1-4 Hz, almost nothing. Delta waves are supposed to be connected to deep sleep, meditation and anti-aging, amongst other things.

A quick search on YouTube for binaural beats brought up several candidates (I hesitate to call them music): I downloaded two. The first lasts for 5 hours (!) that is intended to increase serotonin and dopamine levels in the brain, leading to happiness, calming the mind and improving sleep quality. The other is 'only' two hours long and claims to improve concentration and studying. I listened to this one for a few hours (through headphones, of course) whilst working and it certainly seemed to be calming. There weren't any musical aspects for my analytical mind to latch on to, so I could simply let the sound flow and do its job. After writing this, I note that neither description of these two mentions brain waves, especially not delta waves. 

After downloading the pieces, the next step to consider was how am I going to listen to them. One possibility would be using my good mp3 player, but as I want the pieces to repeat should the need arise (after all, together they last over seven hours which is about the amount I sleep each night), I need a dedicated mp3 player holding just these two pieces. After rooting about a bit with all my spare parts, I realised that I could use one of the mp3 players that I bought for swimming. I decided to use the second swimming mp3 player that I bought as this is easier to load and charge; one connects a regular 3.5 mm jack to it so I could use any type of wired headphones. Later on, I realised that I could also use my mobile phone as an mp3 player but the swimming player seemed to be sufficient.

For the first night (Tuesday) I used the earbud headphones that came with my mobile phone, but after a few hours I had to stop the experiment as these earbuds were causing a great deal of pain. I normally sleep turned to the right (this is healthier) and as a result, I was pressing on the earbud in my right ear. I also had to reduce the volume of the mp3 player, something that is easier to say than do (the controls are very limited and confusing). 

The next day I decided to order the simplest pair of headphones that I could find: hopefully these will be ok. These would be held in place by the CPAP mask. It seems that all the headphones on sale here are gaming headphones with a microphone and thus unsuitable. What to do in the mean time? It occurred to me that I could try the headphones that come with the swimming mp3 player. These hook over the ear (I always had difficulty putting them on when going swimming, but now it seems easy) and the ear buds are flexible, as opposed to the hard earbuds of the first set that I tried. I used these on Wednesday night; not only did they cause me no pain, I also woke up in the morning feeling that I had had a good night's sleep (even though I still had to get up a few times during the night).

Thursday night was not good for experimental results as my nose was blocked for most of the night. I had to get up four or five times during the night, which culminated in walking around the flat at 2:30 am, trying to clear my nose. Yesterday I bought some nose drops from a pharmacy that helped immediately, although they don't have much effect on the cause of the blocked nose. Last night was much better in terms of sleep quality; I also awoke an hour earlier than I intended but still feeling refreshed.

Enough with the theory; what do the data show? As I have noted before, for some reason the CPAP machine provides data up to two days ago, so I only have readings for the first two nights of the binaural beats experiment. To set a base line, on Sunday and Monday I had one and two minutes deep sleep respectively. On Tuesday, even with the hard earbuds that were taken out at 11:30 pm, I had 19 minutes deep sleep - this is one of the highest amounts that I've had since I started recording deep sleep (1st September). On Wednesday, what seemed to be a good night, I had ... (drum roll) 33 minutes deep sleep! On 27 September, I had 34 minutes, so I still haven't broken my own record, but the increase over the past two days is dramatic. 

Even so, there have been pairs of days with a similar increase followed by a decrease: on 15-16 October (only two weeks ago), the readings were 25 and 12, preceded by 2, 4 and 1, and followed by three days of apparently no deep sleep whatsoever. Then on 20-21 October, the readings were 11 and 21, followed by another five days of almost no deep sleep. So I can't conclude yet that listening to the binaural beats has caused a continued improvement in the amount of deep sleep; I'll need another week of readings to make it conclusive.

Tuesday, October 26, 2021

My blood pressure is balanced!

I last reported on my blood pressure twelve days ago. Since then I've had family doctor and nephrologist appointments. In both cases, we went over the blood pressure readings along with the sleep apnea data, and in both cases we reached the conclusion that my current medication regime is both balancing my blood pressure and also reducing the number of apneic events per hour to a minimum. I'm not cured, but I'm definitely balanced!

With regard to the beta blockers that I mentioned last time, the family doctor agreed with my compromise of a half a tablet in the mornings. There exists a 'version' of the medication with half the amount of active ingredient, so I was prescribed this version instead of the original tablets, meaning that I no longer have to cut these pills in half. They are very small anyway, and half a pill is like a sliver that is easy to miss; I'm pleased that I have larger - albeit still small - pills to swallow.

I hinted that the nephrologist wouldn't have prescribed one of the blood pressure medications, but this time the subject didn't come up. It was clear that the current regime works, and if there are no problems caused by the various medications (e.g. changes in the blood tests) then it should stay as it is with no changes.

I am still occupied with potassium levels in foods. These days there are all kinds of vegan versions of food (there was an item about this on the news last night), but no one talks about potassium levels. There is more potassium in soy 'milk' than cow's milk. There is no information on the internet about proprietary prepared foods, only for raw materials. Although I make maybe 80% of my food intake from raw, unprocessed, materials, it would be nice to know about these innovative goods.

Hopefully this will be my last post on blood pressure for the time being.

The only topic that still needs to be addressed is the amount of deep sleep that I get every night. This is still in the range 0-15 minutes, an amount that I imagine is insufficient. I have an appointment with a new sleep doctor at the beginning of December; it will be interesting to hear what she says. According to the website that deciphers the data from my CPAP machine, The deep sleep indicator marks the time you spend in deep sleep – an especially restorative sleep phase. During deep sleep, breathing is more even than in all other sleeping/awake phases. The new prisma RECOVER algorithm on your therapy device continuously evaluates the respiratory pattern and calculates the duration of deep sleep from the evenness and quietness of your nocturnal breathing. 

A quick Google search brought up this site with ten tips on how to increase the amount of deep sleep, and I've been doing nine out of the ten tips for years. The odd man out is 'doze off to binaural beats'; normally listening to music keeps me awake as I'm interested in the music, but I'll see what I can do about this. Of course, it doesn't help that I get up between two and four times a night due to nocturia that is probably due to the diuretic effect of at least one of my medications.

Monday, October 25, 2021

Blind date (new song)

I was sitting in the waiting area of an X-ray facility (not for me!) about a month ago when a new song popped into my mind. It was in 5/4 time with a fairly simple chord sequence although with a slightly tricky tune. A few days later I started sequencing the song: as I had 'written' it away from any instrument, the song was very regular, so I had to introduce irregularities such as slightly changing the tune - the first four bars and the second four bars had the same tune, so I had the second phrase 'go up' whenever the first phrase 'went down'. Later on I changed the chord sequence so that each verse had its own peculiarities.

Normally I maintain one midi file for a song, changing it as necessary. Sometimes I make a backup copy when I'm about to make a significant change so I can revert to the previous version if I don't like the change, but this time I decided to keep a new version of the midi file as it was at the end of each day's work so that I could trace the path of changes from day to day. Of course, I haven't referred to any of those files, but fortunately a midi file doesn't take up much disk space.

After a few weeks' work, the arrangement was as close to complete as I could make it. All that was missing - as usual - were the words. I didn't really have the time or mental space to write words for a while, but one day last week on a long walk with the dog, I came up with some ideas about a blind date. At the end of last week, I wrote the words, getting out of bed at 11 pm on Thursday night to change a couplet (with the immortal line 'a wilted lettuce leaf' replacing whatever was there before). 

On Friday I tried to record the vocals. The range of the song is from A below middle C to A above middle C - one octave - which normally would give me no problems, but on Friday I had a 'frog in my throat' that prevented me from singing the low notes. After many abortive attempts at singing the song, I had a break and considered my options. In the end, I raised the song up a tone (so easy to do with midi) and found that it was now much easier to sing. 

A 5/4 rhythm usually requires very precise phrasing; the lyrics needed the odd syllable to be pruned in order to make the song singable, but by the time of the key change, I had the phrasing almost completely fixed in my mind. That said, I introduced a little syncopation in the tune that hadn't been there before (this song normally has four syllables in a bar, where the first syllable is on the first beat, the second syllable on the 'and' of the second beat, the third syllable on the fourth beat and the fourth on the fifth beat, or in musical speak, two dotted crotchets followed by two crotchets) - I delayed the third syllable by a quaver.

Then comes the part that is for me the hardest - finding the correct equalisation and volume levels for my vocal track. For the last few songs, I've kept a template file with all the settings, making this part less difficult than it was before. Even so, today I decided that the vocal was too shrill, so I toned it down a little.

The idea for the song came from something that I was reading about mirror neurons and how people signal their feelings, or rather how person #1 can read what person #2 is feeling by looking in person #2's eyes. I think that I'm not very good at reading other people's expressions; I asked my wife whether my face betrays emotions and she says that for most of the time I keep a poker face. The idea of the blind date was supposed to have the protagonist failing to read his date's expressions, but in a sense, I ran out of space to write about this. The third and final verse reads

By the evening’s end, I am unsure of what to do
Share a taxi cab or make my farewells, say adieu?
What were the signals I was sending, tell me what they mean
Will she find me worthy of her time and will she
Want to see me again?

That condensed the entire almost autistic inability to read expressions into one verse, which was not my original intention.

Listening to the song now, there seems to be a mis-match between the music and words (not in musical terms) that is not too surprising as I have been listening to the music for a month whereas I have been listening to the words for only a few days. That said, the words are sounding more integrated with the tune now.

Nearly always it happens that I am very impressed with just an instrumental arrangement but become deflated after I listen to the recording with vocals. This song was no exception......

Thursday, October 14, 2021

Potassium levels in blood

It's been four weeks since I started taking the potassium-sparing drug spironolactone; it's also been four weeks since I stopped drinking milk as well as not eating potassium rich foods. Today I did yet another blood test to see how my body is reacting to the medication and how my diet is faring.

My potassium level is 4.8 mEq/l, which is comfortably below the recommended maximum level of 5.1 mEq/l. Last month the value was 3.9 mEq/l, but before that it was 4.9 mEq/l. I've had my blood tested for potassium nine times so far this year, and the values have varied from 3.8 to 4.9. My conclusion is that I should keep on with my low potassium diet for at least another month.

So what have I been eating? Chicken has less potassium than fish, so I've been cooking the 'chicken and rice in a pot' dish every week. For breakfast I've been eating an omelette (eggs don't have much potassium) with grated cheese (even less potassium). In the evenings, apart from salad (cucumber along with red and yellow bell peppers, no potassium rich tomatoes) and tuna (canned tuna is apparently potassium deficient), I've been eating some peculiar vegan deserts.

The desert pictured on the left would appear to be a typical chocolate flavoured mousse. But it's vegan and in fact it's made from sesame (in Hebrew, sumsum, that explains the name 'soom')! I caught a whiff of sesame (a taste that I generally don't like) when I opened the container, but afterwards it was like eating a regular chocolate desert. The funny thing is that both my wife and my daughter thought that it tasted terrible! Maybe there are advantages in being almost anosmic.

A second desert that I tried but liked less is a bizarre concoction based on oats. I bought two based on blueberries and two based on apples; so far I've only tried the first, and its taste is somewhat peculiar. Most of the taste is fine but there is an intruding note that I can't describe. This is definitely edible but less enjoyable than the chocolate sesame. I'm not going to try the banana based version as this probably has got a higher level of potassium.

As I have discovered very quickly, there is no legislative requirement to print potassium levels on foods so no one does. Thus I don't know whether non-dairy ice cream is better than dairy ice cream, or even how much potassium is in the two above products. 

I used to say that I was a 'milkaholic'; I would drink more than the usual daily amount, and like an alcoholic, I would say that the first drink slides down so easily that another one is immediately called for. I quit the milk without any problems, although occasionally I find myself eyeing the milk cartons in the fridge. To be honest, I had two cups of tea with milk today: I didn't find the taste particularly enticing so it looks like I can stay 'on the wagon' with few problems.

I've also been playing around with the beta blocker medication. After a week of not taking it at all and seeing the number of apneic incidents reduce but the blood pressure slowly rise, I then had a week of taking the medication in the morning. The apnea did not increase (good) and the blood pressure went down again, but there were a few days that I felt completely washed out at 9 am. My compromise was to take half a tablet in the morning: this seems to be the best solution as the blood pressure is good, even in the afternoon, there are few apnea and I don't seem to be tired.

I have yet another doctor's appointment on Sunday. Theoretically I should also make an appointment to see the nephrologist; I like him personally and he has also done a lot for me, but now he seems not to be in agreement with the family doctor.