Tuesday, September 21, 2021

A song of changes

The genesis of this new song was a video from David Bennett Piano from 18 August 2021 in which he discusses 6/4 time. As he notes, this is a time signature that was used frequently in classical music, but rarely in modern music. These days no one initially publishes sheet music but rather recordings, and it is the job of a copyist to create the sheet music by listening to the music.

I admit that I have rarely encountered 6/4 time; Dave Stewart notes that the organ solo in National Health's "Dreams wide awake" is in this time signature. A very interesting case is the song "Love that conquers" by the Swell Season, where instrumental bars in 5/4 alternate with sung bars in 6/4. Towards the end, there are even a few bars sung in 7/4. Needless to say, I was not familiar with any of the examples that David played in his video, save 'Electric Feel' by MGMT, whose beat is very hard to pin down. To me it sounds like 4/4 + 2/4 but everyone has their own opinion (where is the 'one'?).

Anyway: I was charmed enough to attempt writing a song in 6/4. I confess that I cheated, in that the original tune that I recorded on my mobile phone whilst playing the piano was in 4/4. When I came to sequencing the tune, I added another two beats per bar. This worked out very well, except in one place where an instrumental bar of 6/4 in the middle didn't sound correct; in the end, I sequenced this as two bars in 4/4, thus adding an extra two beats to the verse. This mucked up the bar markings in Reason, although by the end of the song, it got sorted out as there are three verses with this extra two beats, thus an extra complete bar had been created.

Over the past month, I've been working on the arrangement. It was almost finished until a few days ago, but since then I made quite a few changes to the music, including the chord sequence of the coda, one instrumental link and even the sound of one of the instruments. Excessive polishing of the arrangement always means that I am having problems writing the words; in fact, I didn't have any ideas what the song was to be about which is why I couldn't write any lyrics. At one stage, the lyrics seemed to be pure prosody, describing the tune, but I cleverly deleted them this morning (I found a piece of paper where I had scribbled down 'A semitone raise, the tonal centre/Has lost its balance and then it rests', but I don't remember what came before that, something about smooth glissandi).

Yesterday after much effort I managed to write a coherent verse about a romance, similar in scope to my song 'This is how it all begins'; the first verse initially started with the phrase 'A summer romance', whereas the second verse would begin with 'An autumn cooling', and the third verse would have 'A winter break-up' somewhere. But this didn't work out exactly how I thought it might, probably for the best. In terms of rhythms, each phrase (one bar) had five syllables, as can be seen in those examples. This was slightly limiting, but meant that there are very few verbs in the lyrics.

This morning I worked hard and completed the lyrics, rewriting several lines in the first verse and then continuing with the rest of the song. Once I had lyrics, I could sing and record them; during the recording, I was still changing a word here or there. Now the song is complete and mastered; I need to listen to other music for a while in order to get this song out of my head. Tomorrow I'll listen with fresh ears and probably remix it.

An introduction: a slow beginning
Hearts full of flowers and hidden meanings
We take our walks here along the pathways
We talk sweet nothings, we speak of fair days
That bring on changes in our relations
We’re going somewhere, we’re growing closer
A summer romance, a slow enchantment
That promises so much

And so the weeks pass with mutual feelings
Nights full of loving, the mornings seeking
Some kind of balance, some type of order
A rearrangement, the days grow shorter
And bring on changes in our relations
We’re going nowhere, we have stopped growing
An autumn cooling, a slow detachment
That could have brought so much

I don’t know if I could see what I’d lost
All I’ll ever know is the pain that it cost

Now I remember the songs she sang me
I caught a whisper of some lost memory
Of conversation that yielded nothing
Of situations that called for bluffing
A song of changes, lost in the cosmos
A song of yearning for something better
A winter breakup, a spring revival
We live and hope for more

I still managed to get those seasonal phrases into the song!

A slightly hallucinogenic video of this song can be found here.

Dave Evans, RIP

I belatedly discovered an obituary for one time Bristol musician, Dave Evans, who died on or around 20 May 2021.

Dave was the performer on one of my favourite albums from the 1970s.

Saturday, September 18, 2021

Popup menus: a misconception

In almost every Windows program (or form), right clicking will lead to displaying a context menu that provides more, but less frequently used, options for whatever is displayed. In programming terms, this context menu is called a popup menu because it pops up, as opposed to the standard menu that appears at all times. In Delphi programs, it's very easy to add a popup menu to a form: one defines the popup menu, adds options to it, then connects this menu to the form by means of the form's popup property.

In the 'ERP' program that I wrote (and continually develop) for the occupational psychologist, one of the forms that is used the most is effectively divided into two: in the top half are displayed dockets (i.e. customer files) and in the lower half can be displayed eight or nine different sorts of data, each connected to the current docket in the upper half. For example, one option is to display the people (examinees) connected to the docket, another is to show the meetings for that docket, a third shows invoices for that docket, etc. As a result of this rich amount of possible data, the popup menu for this form contained maybe twenty different possibilities, when only some of those possibilities are available at any given time (it doesn't make any sense to allow the 'delete examinee from docket' option when invoices are being shown). This requires continual updating of this menu, marking which options are available at any given time; this is confusing for the user and also is quite a headache for me to maintain.

It occurred to me yesterday that I could simplify matters by defining several popup menus for the form. As the form has a single popup property, it is easy to be under the misconception that only one popup menu can be defined for a form. In fact, most controls within a form, including a data grid, have a popup property of their own; defining a popup menu for a control will cause that menu to appear when right clicking on that control. I defined one popup menu for the upper data grid that contains four or five options that are always valid for a docket. For the lower data grid, I defined eight different popup menus: one for examinees, one for meetings, one for invoices, etc. When the user chooses which kind of data to display in the lower data grid, the grid's popup property is set to the appropriate popup menu, thus each menu contains three or four options that are always available. 

Actually, that statement '[all] the options are always available' is not true; first there is a check to see whether there is any data to be displayed (e.g. does the current docket have any invoices?) and then the options' availability is set depending on this check. After all, it makes no sense to offer the option to delete the current invoice if the docket has no invoices. 

Monday, September 13, 2021

Potassium levels in food

In Orwell's 1984, At some stage, Oceania is at war with Eurasia; later on Oceania is at war with Eastasia. As a result, history has to be changed to show that Oceania has always been at war with Eastasia. I left the doctor's office feeling something similar: until now, Potassium has been good, now it's bad.

I looked at a site that discusses the amount of potassium in milk, that begins Dairy milk is a good source of potassium. That's not good for me. I then learn that the amount of potassium is in reverse proportion to the amount of fat in the milk: One cup of whole milk provides 322 milligrams of potassium, or 9 percent of the nutrient’s daily value, while the same amount of either reduced-fat or low-fat milk provides about 10 percent of the daily value for potassium. I drink no-lactose 2% fat milk, so this should provide about 350 mg/cup. Yoghurt has higher levels of potassium per 100g product. I know that the site is trying to be pessimistic when it says that rice milk is not a good source of potassium and that a 1-ounce slice of cheddar cheese, for example, has just 27 milligrams of potassium

The site that I need is like this one: nine foods to avoid when your potassium is too high, listing potatoes, bananas, milk, oranges, dried beans and peas, winter squash, sports drinks, spinach and salt substitutes. Again, milk is the problematic food, followed by potatoes (maybe once a week).

I'll buy some 'rice milk' the next time I go shopping and I'll see how I get on. I read somewhere that all the 'milks' are worse for the environment than regular milk.

Sunday, September 12, 2021

The next stage in the aldosterone saga

I wanted to make an appointment to see my nephrologist as he had been sent the results of the AVS test. To my surprise, I could make the appointment for today, a week before I am supposed to be seeing the endocrinologist in the hospital (I may well cancel this appointment). 

I have been left without one of the medicines that I had been prescribed for lowering my blood pressure; this was prescribed by the endocrinologist in place of one of the medicines that the nephrologist had prescribed. I don't want to assign any personal motives to the nephrologist, but he did take the opportunity to restore the medication that he had prescribed instead of what the endocrinologist prescribed. I still have some of these medicines in stock, so I'll take them until I can get a new prescription from my family doctor, who is supposed to be in charge of the process.

The nephrologist also prescribed a month of spironolactone that is the primary treatment for hyperaldosteronism. Unfortunately, both this medication and those that are being restored are liable to increase the potassium level in my blood; normally this is considered good, but as at the moment my potassium levels are quite high (but still in the allowed range), this means that I run the risk of having too high a potassium level, leading to heart problems. I'll do a blood test in the next few days (problematic because of the Jewish holidays) before I start to establish a base level, then again after a month to see what effect the drug has had.

So now I have to try and eat a low potassium diet: primarily this means no pumpkin, no bananas, no tomato sauce, no peanut butter and no milk! I can still have my yoghurt and fruit for breakfast, but no slice of bread with peanut butter; I'll replace this with an omelette. I will have to stop drinking the nut flavoured milk and drink more water, or maybe 'almond milk'. Looking at the list, there is a contradiction, as milk can be found both in the list of foods with high potassium and in the list of foods with low potassium. Unfortunately no value for potassium is listed on the nut milk bottle. I'll finish all my stocks during the coming week before I start the spironolactone.

Saturday, September 11, 2021

Smart watch (2)

I wrote at the beginning of the week about my new Xiaomi Band 5 smart watch. Over the past few days I've been playing with the watch and discovering new functionalities. At the same time, I have become less and less enamoured of the watch, primarily because of the user interface and secondarily because of the inaccuracies in the data.

User interface: I appreciate the difficulty of trying to cram no small number of options onto a small screen when the only control functions are pressing the bottom of the watch, swiping up and swiping down. Of course, it would have helped had the minimal user manual include a map of the functions and how to access each one. I will return to the user interface later on.

Inaccuracies in the data: I already noticed the difference in the number of steps being counted by the watch as opposed to the steps counted by my phone. After I discovered the 'walk exercise' function on the phone, I decided to test this on a long walk; I forgot to start MapMyWalk at the beginning of the walk so I had no comparison at the end. The smart watch said that I walked 3.55 km when I'm sure that I walked more. The second evening I started both the watch and phone at the same time: they agreed on the duration of the walk (45.1 minutes) but on nothing else. MapMyWalk says that I walked 4.12 km burning 258 calories (no step count) whereas the watch says that I walked 2.93 km in 5855 steps, burning 372 calories. Big differences! I tried a third night; I started MapMyWalk about 200 m from my home and recorded 3.98 km whereas the watch says 3.16 km.

From a discussion of Reddit: Miband doesn't have GPS but while you're walking, it counts your steps, with that information it calculates an approximate distance. 

I thought that the watch somehow utilises the GPS in the phone to which it is paired via Bluetooth, but apparently not. Counting by steps is not a good method of calculating distance as the length of each step is not constant.

After having given up on the walking function of the smart watch, I was interested to see how the swimming function would work. I took my reading glasses with me to the pool yesterday so that I could see the menu options on the watch, but I couldn't see a thing because of the light. I guessed how to start the swimming function but guessed wrongly (I'm not sure what I did choose). This morning I started the swimming function before I left home so at least I could see what I was doing. I was asked the length of the pool and then the watch started measuring. When I got home, I looked at the watch again, trying to figure out what it had measured and how to stop it.

In trying to stop the swimming function, I noticed that it had at the bottom of the screen a small icon with an arrow pointing to the top of the screen where another icon waited. Sweeping the surface of the watch caused the icons to switch places; the arrow changed direction. When I saw this, I realised how the watch was measuring: one is supposed to sweep at the end of each length, and as the watch knows the length of the pool (because it was told at the beginning), it can calculate how many seconds it took to swim the length and from that how much energy had been expended. I can just see myself stopping after every length to change direction of the watch (NOT!).

Then I tried to stop the swimming function. This was exceedingly difficult: every time that I swiped, the direction of the arrow would change but there seemed to be no way of actually stopping the measurement. Eventually I saw that a red button would appear briefly; somehow I managed to get this button to appear for more than a second and then pressed on it, finally managing to stop the watch. Terrible user interface design.

So I'm not going to use the watch to count steps and I'm not going to use it to measure long walks and I'm certainly not going to use it for swimming. Am I going to use it at all? The sleep measurements seem to have some amount of accuracy, although one day it showed me sleeping at 8 am when I had got up at 5:30 am. I can see the length of sleep along with how much deep sleep and how much REM sleep I got. I find it strange that the first night I had 8 minutes deep sleep and no REM sleep, whereas later on I have over an hour deep sleep and over two hours REM sleep. In other words, I have my doubts about this data too. The only thing that should be accurate is pulse measurement and even that does not agree with my personal sphygmomanometer.

So it looks very much as if I am going to abandon the smart watch.

Chicken and rice together in one pot (2)

After the success of last week's chicken and rice together in one pot meal, I decided to repeat the recipe, although this time I made a small change in the order of cooking.  Normally when I cook rice, I start with frying the rice in olive oil for a few minutes: this is supposed to bring out the flavour of the rice, although my taste buds can't sense any difference. Adding the rice as the final ingredient as I did last week would skip this, so I decided to add the rice after having fried the onions and tomatoes. I added the chicken stock after I could see the rice turning slightly brown, then I added the vegetables and finally the chicken drumsticks. Adding the rice earlier enables it to be better mixed instead of being stuck on the drumsticks.

On the left is a picture of the onion being fried; in the background is a Pyrex dish holding the drumsticks that I browned previously. They can't really be seen due to the steam coming off them.
Here are the vegetables waiting their turn to enter the pot. In the back are pumpkin chunks and frozen green beans; in the front is a cup of basmati rice and diced tomatoes.

The final product after coming out of the oven.

Incidentally, this is one of those dishes that taste better the day after having been cooked. Any excess moisture is absorbed into the rice along with flavours from the chicken and vegetables, improving the collective taste.





Thursday, September 09, 2021

DBA: Pilot study

The last installment of the on-going DBA saga was at the end of April when I finished rewriting all the theoretical material in the thesis. Since then, I have barely touched the thesis because of all the personal issues that I have had since May. 

About ten days ago I went a long walk with the dog and wondered how I could get the thesis back on track; I decided to start with a description of my company and the initiatives that we have undertaken in the past year or so. As I wrote that a good ERP system reacts to changes in the company, it is only natural to discuss the various enhancements that I had to develop in order to express these initiatives. This is good material, but I had what I term a 'crisis of faith' as none of the enhancements seem to fall into what I could call 'classic enhancements' as per the thesis definition; they all seem to be one sided (receiving a file produced by an external program and creating a set of parts and a BOM from the file; developing 'batch' processing; creating a purchasing recommendation program based on data from the 'automatic warehouse'). It may be that I will consider the automatic creation of parts and BOM followed by the purchasing recommendation as part of the same enhancement, as the recommendations are based on the quantities expressed in the BOMs that came from the external program.

In the mean time, I have reverted to considering the pilot study. For this, I am using a 'classic' enhancement that failed: task and time management. This is something that started in July 2020 and collapsed towards the end of last year. I 'interviewed' myself in order to get as many facts about the enhancement as well as some analysis as to why the enhancement failed. I then started looking for documents and found several: some are specifications, becoming more detailed as time went on, and some are documents explaining how to use the enhancement. I also found several emails about the process.

After completing the self-interview, I started writing the invitation letter to colleagues who were involved in the development and deployment of the enhancement. This might sound very simple but it took several hours to get right; finding a logical order to talking about the research methodology then then the enhancement itself and what I am expecting of people was not easy, and I'm not sure that it's totally clear. After I finished writing the letter yesterday evening, I translated it into Hebrew and this morning sent it to about eight people who were all involved at some stage or another, some more than others.

The pilot study is intended to familiarise myself with the Action Research methodology and is not intended to produce any conclusions. That said, I surprised myself slightly when writing conclusions at the end of my 'interview': this enhancement had nothing to do with increasing the throughput/shortening through times of the furniture division which is probably why it failed; it was perceived as pure overhead that hindered more than helped. I think that enhancements that improve/shorten are more likely to succeed than those that do other things, probably because the direct value can be perceived whereas indirect value is harder to see. It will be interesting to read/hear what my colleagues have to say for themselves; I don't want to put ideas into their heads.

I have a chat with my supervisor tomorrow morning when I can update him with my work of the past ten days.

In the mean time, I have recently been approached (via LinkedIn) by two people (one in Australia and one in Japan) asking about the DBA programme. In neither case has a dialogue emerged yet, but this could be interesting. At the moment, I'm wondering how they heard about me.

Sunday, September 05, 2021

Walking apps and smart watches

In the pre-historic age, I used to use an app called MapMyWalk to measure how far I walked. Whilst this app is useful when I walk abroad, it's less useful at home. Apart from the fact that I know my route intimately, it only counts my steps in a given walk, not how many steps I've taken all day. For this, I use the pre-installed app Samsung Health.

A few years ago, there was an item on the early evening news about an app that would give its users money in return for walking (I worked out that it was 1 NIS per 1000 steps). Fairly quickly I stored up a large number of points and was able to redeem them whilst purchasing a pair of enclosed gaming headphones (I'm not a gamer, but I appreciate the closed headphones for listening to music). Shortly after, I realised that this app was not really giving me money: it was giving me discounts for products that I don't purchase. 

A few months ago, a random conversation on this topic brought up the fact that our health fund has its own app; this tracks not only steps but also self-reported meals, meals, sleep and a few other things. This app sets ridiculous standards: 11,600 steps/day (I actually manage this most days) and 17 cups of drink (this is 3.4 litres, whereas most sources say that one needs to drink 'only' 2 litres a day. The app does not recognise other types of activity, such as swimming, which is a shame because the swimming season started at around the same time that I started using this app.

Be that as it may, over about eight weeks I managed to accumulate over 26,000 points and was able to order a smart watch. Unlike the goods and/or services from the previous app, this watch is completely free. There are other items that I can obtain from the health fund, such as exercise mats and balls, that are less useful to me. The smart watch, an Xiaomi Smart Band 5, arrived at a pickup location in Bet Shemesh a week ago. The instruction manual is so small that it was very difficult to read (I found an online copy but it wasn't more enlightening). Thus it took some time before I realised that I was supposed to charge the watch - then I had to find the charging cable that I had thrown out with the packaging. There was quite a bit of confusion and frustration regarding opening a "Mi account" but I eventually I managed to get past this.

OK, watch charged. Now it wants to pair with my telephone via Bluetooth. This took several days to achieve, mainly because I was making a mistake in the app on the phone. I can't restore the same screen now, but there was a choice of band/watch/smart shoes and something else; I chose 'watch' but eventually I realised that the correct choice was 'band'. Now the band and my phone are paired! Then came a stage that lasted about 15 minutes during which firmware and other things were transferred from the phone to the band, before the band finally lit up and said that it was ready.

What can I say after 24 hours of wearing this band (I'm going to call it a watch from now on)? I haven't got a complete day's walking yet, but until this minute Samsung health says that I have taken 3,611 steps; the health fund app also says 3,611 (that surprised me slightly as I thought that there were small differences between the two) and the watch app says 3,262 steps - quite a difference (that's only 90% of the steps as reported by two other apps).

More interesting is apparently I slept 6 hours and 37 minutes last night. I fell asleep at 21:53 (I thought that I fell asleep a bit earlier, but that's close enough) and woke up at 5:31 (the alarm is set for 5:30). But apparently I was awake for just over an hour during the night; I can't see at the moment how to get a list of times that I was awake according to the watch. I know that I got up twice during the night, the first time for about ten minutes and the second time for a minute or two; the watch shows that the first time was quite a bit longer than I thought. There are also a few other periods that the watch shows that I was awake that I'm not aware of. This doesn't surprise me too much as after all I suffer from sleep apnea; it will be interesting to compare these results to those of the CPAP machine, although the latter doesn't seem to measure how long I've been asleep (or awake) but rather how long I've been wearing the mask.

It will be interesting to compare my pulse as per the blood pressure machine to what the watch claims it to be. There are a few other pieces of data that the watch provides - stress and something called PAI (I imagine that it's Personal Activity Intelligence); it will take some time for this to accrue.

One thing that I checked on the watch's website is whether the watch is water-proof: it is! This means that apart from not having to take it off when I shower, supposedly the watch is going to measure something when I swim. I'm not sure when I'll be swimming this week (it's the Jewish New Year on Tuesday and pool openings are irregular) but I'll make sure to check. The swimming should affect the PAI, at least.

Saturday, September 04, 2021

(Yet another) New chicken dish

I don't remember whether I actively looked for this recipe or simply happened to find it: a new variation on chicken and rice. The recipe that I have is in Hebrew, so I won't bother with the link.

  1. Brown the chicken pieces (I used 10 drumsticks) with olive oil in a pan for about 8 minutes. I have my doubts about the need for this stage, as browning drumsticks is not the same as browning cubes of beef, because of the shape.
  2. Move the chicken pieces to a side dish, then fry a large diced onion in the pan using the same oil.
  3. When the onion is nearly done, add two chopped tomatoes and optional spices. I used paprika, cumin and oregano, but I think that I'll skip this next time. I also added frozen green runner beans to the pan. I think that I intended to add parsley, but I forgot.
  4. After a few minutes of cooking the vegetables, return the chicken to the pan.
  5. Add two cups of chicken broth (I used chicken soup powder dissolved in water) and cook until boiling.
  6. Add one cup of rice (I used basmati) and two cups of water. This seems to be too much water, because of the two cups in the previous stage; I think that a total of three cups would probably be sufficient.
  7. Cover the pan and continue cooking in an oven at 170°C for 40 minutes.
After placing the pan in the oven, I took the dog for a walk then had a brief cold shower. By the time I had finished, the cooking time was up. The result: a bit soggy (due to the extra water) and possibly a bit too greasy (the olive oil) but otherwise very tasty. 

I won't post a picture of what I cooked because it looks a bit like something the dog brings up, but it's much better than it looks! The picture on the left is from the original article: here, chicken thighs have been used as opposed to drumsticks. Also the rice looks somewhat different.

Thursday, September 02, 2021

Once again, John Martyn

I am trying to like JM's output, but apart from a handful of songs, I don't understand why people in certain circles rate him so highly. Obviously I'm like the rest who couldn't care about him.

Rummaging around on his website, I found a very interesting paragraph in an interview from 1970: When John and Beverley tried to recreate their “Stormbringer!” sound on stage at the Queen Elizabeth Hall earlier in the year, they failed miserably; and John explained: “I was never happy doing that concert. We only had four days to rehearse with the band, although the other gig at Bristol was strangely successful."

Judging by the date of this interview, 'the other gig at Bristol' almost certainly was the concert that I attended in April 1970 and wrote about here. I see that I didn't write anything about J&BM apart from the fact that they appeared; it seems that they appeared with a group. It would seem that they didn't impress me otherwise I probably would have bought "Stormbringer!" at the time.

Wednesday, September 01, 2021

Adrenal venous sampling (3) - unofficial results

Three and a half weeks ago I underwent the Adrenal Venous Sampling (AVS) procedure; I was told at the time that there would be results after two weeks but so far I have not received them. This might be because the results have been sent directly to my nephrologist and/or because the hospital is currently reducing all non-essential activities because of a dispute with the Ministry of Health regarding the transfer of money.

In the mean time, I have noticed that my weight has been steadily increasing since my appointment with the endocrinologist at the beginning of July (coincidentally the morning of my father's funeral), when he changed some of my blood pressure medication. One of the medicines that he removed contains a diuretic so there exists the possibility that the amount of water in my body is increasing. I weighed myself last Thursday and was horrified to discover that I had added 3.5 kg since that consultation. I later checked my weight in the clinic; there is a small difference between the traditional scales there and my electric scale, but the readings at home are near enough correct.

So I decided to write to the endocrinologist, asking about the results and telling him about the weight problem.  In about two thirds of the cases of primary aldosteronism, both adrenal glands pump out the same amount of aldosterone whereas one third of the cases have one adrenal gland pumping out much more than the other. The treatment for the one third is surgery, whereas the two thirds have to manage the condition with medicine. The endocrinologist called me this morning to inform me that the results show that I am with the statistics: I am in the two thirds group and so there will be no surgery. Better to find this out before any surgery rather than afterwards....

I have an appointment with the endocrinologist in a few weeks (after the Jewish High Holidays) but at the moment it's not clear whether that appointment will take place (because of the industrial dispute). I think that I'll reach out to the nephrologist.

For some reason, I woke up five or six times last night, each time going to the toilet (normally it's only once a night). Due to the amount of liquid that I passed, I decided to weigh myself again this morning - about 1.5 kg disappeared overnight. I'm still 2 kg over what I would consider to be the maximum weight, but at least there is an indication of what the problem is. The endocrinologist said that I can resume taking the diuretic medication if I want to in order to see if it makes any difference.