Sunday, October 29, 2023

Farewell, Avon SG copy

Many years ago, I wrote the following about one of my guitars: In the spring of 1976, when my little rock group got underway, I bought a Gibson SG copy from a shop on the Kilburn High Road. I played this guitar for many years, whenever an electric was needed, but slowly my usage decreased. After all, I am an acoustic guitar player. There was also a problem with the bridge which was causing intonation problems; I had this corrected, but never really used the guitar after that. The guitar is lying under my bed, untouched for several years. 

Then a few months ago, I wrote with regard to the music group, I used my venerable SG copy guitar as this is very light as compared to the Washburn semi-acoustic. I discovered that the neck pickup doesn't work (probably a wiring fault) so my sound was very tinny and not what I wanted. Next time I'll take the Washburn. The other guitarist has a real Gibson SG!  Of course, the Stagg Tele that I bought six weeks ago is intended to take the place of this guitar.

Why am I writing this? This morning I saw a note (posted yesterday) on our virtual kibbutz noticeboard asking for guitars that can be donated to the evacuees from the kibbutzim on the Gaza border. It took me a few moments for the penny to drop that I do indeed have a guitar that I have no need for, and I would only too pleased to know that someone is using it to make music so to make their lives more bearable. Only after delivering the guitar to the collection point and returning home did I realise that I also should have donated the pocket amplifier along with a guitar lead. As I noted then, the cost of this amplifier is negligible, but the value that it would provide would be far more.

Many people throughout Israel have donated clothes and food, but these have no sentimental value at all. There are many memories wrapped up in the SG copy - the memories will remain with or without the guitar. I can only hope that someone will create more happy memories with it.



This day in history:

Blog #Date TitleTags
10829/10/2007New computerComputer
51729/10/2012Remixing songs and playing liveMIDI, Guitars, Antibes
77029/10/2014Importing purchase ordersProgramming, ERP
89929/10/2015Vinyl log 24 - 29 OctoberVan der Graaf Generator, 1975, Vinyl log
154229/10/2022The 8-puzzleProgramming, Puzzles

Saturday, October 21, 2023

Seventh chords

I've watched a few YouTube videos that purport to talk about seventh chords; normally they show the most frequent chords and ignore the more exotic varieties. I am going to put my point of view forward. First, some definitions: a seventh chord has four notes (root, third, fifth, seventh), and so has three intervals, where each interval can be either a minor or a major third. Thus there are 23 = 8 different seventh chords. That's actually not true, as there are a few really exotic chords that have a flat 5 (i.e. the interval between the third and fifth is a diminished third).

Name Third Fifth Seventh Notes in C
Dominant 7 Major Minor Minor C E G Bb  
Major 7 Major Minor Major C E G B  
Minor 7 Minor Major Minor C Eb G Bb  
Minor Major 7 Minor Major Major C Eb G B  
Half diminished 7 Minor Minor Major C Eb Gb Bb  
Fully diminished 7 Minor Minor Minor C Eb Gb Bbb  
7#5 Major Major Diminished C E G# Bb  
7b5 Major Diminished Minor C E Gb Bb  
Major7b5 Major Diminished Major C E Gb B  
Major7#5 Major Major Minor C E G# B  

I've ranked the chords in approximately their frequency of use. I have used on occasion the 7#5 that sounds like an enhanced dominant seventh and I have used here and there the Major7b5, but I have never used or even seen the Major7#5 - this sounds like a fully diminished seventh chord, but it isn't.

Some of these chords, when inverted, give other chords; for example, C minor 7 in the first inversion is the same as Eb6 (Eb G Bb C), and C half diminished 7 in the first inversion is Ebm6 (Eb Gb Bb C). There are only three fully diminished chords, as the same notes in different inversions give differently name diminished sevenths - C Eb Gb Bbb, Eb Gb Bbb C, Gb Bbb C Eb and Bbb (A) C Eb Gb - are all the same.

I suppose that theoretically there are even more exotic chords, such as C Eb G# Bb, which might be called Cmin7#5. This sounds remarkably consonant when playing it on the piano, as the G# makes the chord sound like Eb6sus4, especially if it is played in first inversion with Eb in the bass.

There's a very easy chord shape on the guitar for FMajor7b5: first play an open position E chord (x22100), then move the fingers up a fret, leaving the top two strings to ring out (x33200). These notes are C,F,A,B,E. The first three notes are an F major chord, the fourth note is the flat fifth and the fifth note is the major seventh. 



This day in history:

Blog #Date TitleTags
5821/10/2006Busy morningProgramming, Randy Newman, Paul Simon
64221/10/2013Paul KleePersonal, Bristol Grammar School
108421/10/2017Sumptuous Saturday Seven - baked hake with potatoes and vegetablesCooking

Friday, October 20, 2023

Sorting on two or more columns

Years ago, I developed a system whereby the data in a grid could be sorted according to any column, ascending or descending, by means of clicking on the column's title: shades of Excel, or indeed Priority. Now and then I wondered how difficult it would be to sort according to two or more columns, where any of them could be ascending or descending. This couldn't or shouldn't be something that is preprogrammed as one person might want to sort according to column 2 ascending, then column 1 descending, then by column 3 ascending then by column 4 descending - there are too many options to do this in advance. Another person might want a different order.

I thought about this seriously during this morning's early dog walk. I already have several bits that would need to be put together, primarily the dual list box, in order to choose which fields are required, and the advanced addindex code that allows sorting to be according to several fields where some could be descending. Yet there are a few more bits that need to be added to the dual list box: there must be a way of marking in the list box whether a field should be sorted descending, and the order of the fields in the list box is critical (not alphabetical!). There were a few more gotchas that became clear only after I started.

Of course, each 'sorter' would have to be saved according to screen and user - this put me in mind of the SavedQueries table. After a quick examination, I realised that I needed to add only one field to this table in order to be able to support the 'sorters' - a simple binary field. By means of a default parameter, I didn't even have to change any of the existing calls that insert data into this table. The details table required the addition of the two fields that I mentioned previously: the sort order and whether the field should be sorted ascending or descending.

As opposed to the SavedQueries code, here I was able to create a stand-alone unit that receives as input the name of a query (a clientdataset, to be accurate) and a form's identity number. The interface took a while to figure out: a user should be able to choose sorters that she has previously defined, create a new sorter, update the configuration of the sorter and delete the sorter. Assuming that one is creating a new sorter, first one defines the sorter itself (by means of the existing code for creating a new saved query), then the window opens up in the dual list box configuration with all the query's fields all on one side. Chosen fields can be transferred to the left hand side and optionally marked as descending. The list of fields can then be saved (that's the OK button on the panel) or ignored; the sorter can then be transferred to the calling form (the bottom OK field) or cancelled. At the moment, there's no way of changing the order of the fields that have already been selected; one has to remove the appropriate fields then add them again in the required order.

The four fields chosen on the left (one descending) then have to be transferred to the calling form and an index built. At first, I thought that the code necessary to build the special index would have to be in the calling form, but after a while I realised that I could do this in the sorter form as the form receives a parameter to the query thus making this unit even more self contained. One small problem that I had was that the index would have to use each field's fieldname and not the displaylabel (these are displayed in the dialog). Once I got past this, I had to build the index - I wanted to use a constant index name, but as this would be invariant, I would have to delete the index should it exist then recreate it, meaning that I would have to check whether the index existed before trying to delete it. Counting from 'fieldslist.clear', the next three lines check whether the special index exists then delete it; the fourth line add the new index, the fifth line causes the query to be sorted according to the new index and the sixth line causes the query to be displayed properly.

if (showmodal = mrOK) and (cbSorters.text <> '') then begin s:= ''; reverse:= ''; dm.qSorterDistList.Params[0].asinteger:= getCBValue (cbSorters); dm.qSorterDistList.Open; while not dm.qSorterDistList.eof do begin n:= dm.qSorterDistList.fields[0].asinteger; s:= s + query.fields[n].fieldname + ';'; if dm.qSorterDistList.fields[1].asinteger = 1 then reverse:= reverse + query.fields[n].fieldname + ';'; dm.qSorterDistList.next end; dm.qSorterDistList.close; setlength (s, length (s) - 1); if reverse <> '' then setlength (reverse, length (reverse) - 1); with query do begin fieldslist.clear; getindexnames (fieldslist); if fieldslist.indexof (SpecialIDXName) <> -1 then deleteindex (SpecialIDXName); addindex (SpecialIDXName, s, [], reverse, '', 0); indexname:= SpecialIDXName; first; end; end; fieldslist.free; end;

I don't know how valuable the above code is because some of the hard work is done behind the scenes. I also don't know in the end how useful this unit will be - it only makes sense where there are both repeating and non-repeating data in a grid. For example, the main 'dockets' form of the management program displays docket number and customer name, amongst other things. Each docket number appears only once, so sorting by docket number is natural. But sorting by customer can display the docket numbers for each customer in a random matter; defining an index 'customer;docket id' would sort this out (pun intended). 

Looking at this code later, one clear optimisation can be seen: there's no reason to rebuild the strings 's' and 'reverse' every time. This can be done only when the sorter is defined, saving the values in the database table, so that they can be retrieved whenever the sorter is chosen.

Edit from 23/10/23: I saw how to get rid of the need to check whether the special index exists. Instead of using a constant name for the index, it is now built on GetTickCount and so is effectively random.

with query do begin idx:= 'idx' + inttostr (gettickcount mod 16384); addindex (idx, s, [], reverse, '', 0); indexname:= idx; first; end;


This day in history:

Blog # Date Title Tags
209 20/10/2009 Lucky break TV series, Films, Olivia Williams, William and Mary, Cold feet
419 20/10/2011 Firebird DB management tool (4) - Corrections Programming, SQL, dbExpress
641 20/10/2013 More health issues Health, CPAP
767 20/10/2014 The seach for serendipity DBA, SQL
894 20/10/2015 Vinyl log 23 Vinyl log, 1971
1268 20/10/2019 This must be the place (2) Personal
1350 20/10/2020 DBA update DBA

Thursday, October 19, 2023

Think again: the power of knowing what you don't know

I read "Think again: the power of knowing what you don't know" by Adam Grant a few weeks ago; he is an author new to me to whom I saw a reference in some other book. This is a book well worth reading as it displays in easy to read language what happens when we know a little about a subject then think that we know more than we actually do (in the same way that 80% of drivers think that they are better than average - a mathematical impossibility). An expert in some topic knows that she knows a great deal, and someone who knows nothing about a topic knows that she knows nothing, but someone who knows a little tends to believe that she knows more than she really does.

I fell foul of this syndrome whilst I was reading the book as two other significant events happened at the same time. I received the results of my last set of blood tests and wrote about what seemed to me to be anomalous results for ferritin and T4. At the same time, I was learning about the endocrine system that bestowed a little knowledge upon me.

Real life interfered a little, but today I finally had an appointment with my GP. I raised my concerns but also said that I was aware that a little knowledge is more dangerous than no knowledge at all. Indeed, she said; as long as the haemoglobin level is reasonable then the ferritin result doesn't have much meaning. To expand her simile, it's like having money in one's current account (haemoglobin) but no savings (ferritin). She said that it was ok to take iron supplements in order to build up my reserves, but that the current levels are no cause for worry. She was even more dismissive of the T4 result, saying that the TSH level was fine, and that she looks at all of the results as a whole and does not put one specific value under the microscope.

I'll probably do another set of tests in three months to see whether I have succeeded in reducing the hemoglobin A1C level, along with glucose, fats, thyroid and kidney functions.



This day in history:

Blog #Date TitleTags
76619/10/2014Literature review: first draft completedDBA
126719/10/2019Juliet (naked) - the filmFilms, Nick Hornby

Monday, October 16, 2023

The running grave

This is the seventh book in the Cormoran Strike series of books by Robert Galbraith, aka J. K. Rowling. There was a very well thought out review in the Guardian with which I totally agree, so I'm not going to review the book here. Instead I'll offer a few comments of my own.

This book is long! The length of the books seems to increase according to the position of the book in the series (i.e. the seventh is longer than the sixth that is longer than the fifth, etc); one wonders whether this length is justified. As opposed to books by Tom Clancy that could easily be trimmed by 30%, there is very little fat on this book. A great deal of the book is devoted to Robin's undercover stay;  there's the secondary plot of the stalked actress - this is necessary as the actress plays an important part in a later section of the story.

Then we have the backdrop of mainly Strike's personal life - his uncle, his long time ex-girlfriend, his current very problematic squeeze and of course the will they/won't they sexual tension between Strike and Robin, ending the book with a broad wink to all shippers. Probably the sub-sub-plot of competition with a rival agency could have been dropped entirely without interfering too much, but on the other hand, this adds verisimilitude in that in real life one has to deal all the time with multiple issues that have no connection between each other but take up time and mental space.

Certainly the brief mentions of Brexit are fairly irrelevant; whilst this is a huge issue for Britain in 2016, it has absolutely nothing to do with the book. Other real time political events have not been mentioned in any of the other books* so this one seems slightly jarring, especially as Strike has no view whatsoever on the topic (it certainly doesn't affect his business).

One thing that eludes me is understanding the motivation of the UHC elders. Maybe I missed something (and I read the book carefully for the second time), but this seems to be lacking. Yes, "Papa J" can have sex with multiple partners including underage females, and yes, his wife seems to be a total sadist, but this doesn't seem to be sufficient to justify the creation of their "church" and the lengths that they go to in order to hide as much as possible. There is also very little mention of the good that UHC apparently does to justify its public side: there are mentioned various shelters for homeless people and drug addicts but this isn't gone into very deeply. 

* Rereading an earlier Strike book, Career of evil, I see that this statement is untrue. Here we have a royal wedding and the killing of Osama bin Laden. The royal wedding (Kate and William) is a distorted mirror image of the disintegrating relationship between Robin and her then fiancé.



This day in history:

Blog #Date TitleTags
134816/10/2020PrioXRef 3 - insert without parametersProgramming
153816/10/2022Indexing blogsProgramming, Meta-blogging

Friday, October 13, 2023

Time out

I want to take a time out from what is happening here in Israel at the moment and mention a few other personal things.

In yesterday's post I discovered that I had been sent a letter from the Ministry for Social Equity: it contained my 'senior citizen' card, as pictured on the left. This possibly entitles me to a reduction in local authority 'rates' but also allows me to attend lectures and other activities held at a local senior citizens centre.

Although I have reached the nominal pension age, I am not entitled to receive an old age pension yet, because I am still working and my gross salary is above 8,000 NIS. From a financial point of view, it's better to continue working and receive my salary rather than to retire and receive an old age pension along with a monthly payment from my retirement fund. The old age pension is paid regardless of income to all who are 70 years old (and above), so in three years' time, I will be eligible for this. To me, it's slightly amusing and askew, but someone who delays receiving their pension for whatever reason will receive a higher pension than someone who retires at 67 (or 62 if you are a woman). 

The irony of it all is that I don't feel like a senior citizen; I have amended this blog's subtitle to be "I'm not 67 years old, but rather 22 years old with 45 years' experience", which is something that I saw once on a t-shirt. Let's hope that my physical and mental capabilities carry on as they are for many more years.

About two weeks ago, I wrote about completing the "7/4 song", aka "The great escape". The arrangement was somewhat bombastic and featured several innovations (at least, for me), including several tracks for drums, some of which were panned and some not; the snare track had an echo that created an interesting effect. But listening to the song repeatedly (propably hearing it in my head and not so much listening to it) caused me to doubt the suitability of the arrangement; maybe something lighter would be better. So a few days ago I started with a copy of the then final MIDI file, then ripped out several instruments, including the drums and arppegiators, but leaving a few. I then rebuilt the arrangement in a different style, although the solos remain. After having completed this second version (that also went through a few iterations), I am now uncertain as to which version is better; I shall let time decide.

The song can be heard here.



This day in history:

Blog #Date TitleTags
13913/10/2008Fotheringay 2Sandy Denny, Fotheringay
41413/10/2011KindleKindle
64013/10/2013TasksProgramming, Delphi
126513/10/2019Acting like an MBA (a 'suit')Personal, MBA

Thursday, October 12, 2023

A military funeral

I don't know how many funerals I have attended in my life: at least fifty, probably in excess of one hundred. But I have never attended a funeral like there was today, a military funeral.

Actually, that's not quite true. Sometime in October 1973, I and my group on Kibbutz Bet Ha'emek attended the funeral of a pilot who had been shot down during the war. I remember that I attended the funeral but I don't remember anything else about it.

There were hundreds of people at today's funeral, almost half of whom were in uniform. We heard how Lieutenant Sahar Tal was at home on Saturday morning before he received an urgent phone call to report for duty at Ashkelon immediately. We heard how his father and brother drove him to the meeting point and how he checked later on that they had arrived back home safely. We heard that Sahar was a model officer: shy and humble, but well liked, both by the ranks above him and by those he commanded.

Whilst the army funeral ceremony is somewhat different to the kibbutz version, there are several points of similarity. Even so, I think that we could adopt the final prayer that was sung with great feeling, instead of the same prayer simply read aloud. Then of course there is the three gun salute.

In a terrible sense of irony, an air raid siren (from nearby Bet Shemesh) rang out while we were waiting for the funeral to begin. We were directed to spread out in the cemetery and lie down with our hands over our heads. A moment later there was a loud boom as the rocket landed somewhere close; after a few minutes we were allowed up. A soldier who had laid down near me helped me get up.



This day in history:

Blog #Date TitleTags
1812/10/2005The six ringsBar mitzva
29312/10/2010Cooking for GeeksCooking, Food science
51512/10/2012A new season, a new teamMaccabi Tel Aviv
63912/10/2013Sleep apneaHealth, CPAP, Apnea
108212/10/2017Madam SecretaryTV series
126412/10/2019Two (historical) events which I wish had never happenedIsrael, Gap year
134712/10/2020CardiologistHealth

Wednesday, October 11, 2023

Communal grief (2)

Slightly less than a year ago, I wrote about the death of a young kibbutz member; yesterday we were informed that his grandfather, also a kibbutz member, had died. I had worked with the grandfather for several years until his retirement about ten years ago, aged 80. I remember that we held a retirement party for him, in which both people from the kibbutz and work participated. I was asked (in advance) to say a few words; I prepared a speech that was longer than required, as there was so much to say about this person. In the speech (whose text I cannot find), I compared him at one stage to being like a second father: his eldest daughter was born a week before I was, and he would always ask about my studies.

The path that I take in the early morning while walking the dog goes past this member's house. This morning I was thinking about what to write in his memory, and that the kibbutz was fortunate in that none of the outrageous acts of the Hamas terrorists over the past week had affected anyone here. How wrong can one be?

Barely ten minutes ago, a notice was posted on the kibbutz internet site informing us of the death of one of the kibbutz sons, who was serving in the army near Gaza. My wife works with the father of this soldier. I am numb.



This day in history:

Blog #Date TitleTags
20711/10/2009This tickled my fancyDog
63811/10/2013More booksLiterature, Tom Clancy
108111/10/2017Research questionsDBA
134611/10/2020Continuing the story of porting an application to Windows 10/Delphi 10.2Programming, ClientDataSet
153511/10/2022Another DBA updateDBA

Sunday, October 08, 2023

The blackest day for 50 years - notes from a peripheral participant

Yesterday (Saturday, 7 Oct 2023), my wife woke me at about 6:30 am - "Wake up, there are booms outside" [booms in this context is the sound and pressure wave of a missile falling to the ground]. We turned on the television and saw the unpleasant and automatic messages from the Home Guard, showing where missiles were falling and where inhabitants had to get to air raid shelters or their internal security room. At first the locations were only settlements near the Gaza border, but slowly more and more targets appeared, further and further away from the border. As our bedroom doubles as the security room, we stayed where we were, but I closed the steel shutters to the window. 

We saw that the locations were getting closer and closer to where we live and eventually the local sirens went off. At the same time, the list of locations included Jerusalem, a location that one would not expect to be targeted (what would happen should a missile fall on East Jerusalem, or worse, on one of the holy sites?). I have no idea of how much damage the 1,500 rockets fired at Israel caused, although I suspect that it was relatively little and that the barrage was more like covering fire.

By this time, the television news company had got its act together and had started broadcasting properly with correspondents situated at various locations. It was then that we heard that the enemy had overrun and occupied at least two kibbutzim near the border. The residents - my spiritual brothers and sisters - were all sitting tight in their security rooms, but this was an event that had not occurred since 1948 when a few kibbutzim were similarly overrun during the war of independence. There were some heartbreaking conversations between the television anchor and frightened kibbutz members hiding in their houses and playing possum. Each kibbutz has a primary reaction force composed of members, and these were trying to engage the enemy, with varying degress of success.

At the same time, filtering in were the first reports about an outdoor festival (what the British would call a rave) that inexplicably had been situated in the same general area. The enemy had arrived at this site and were shooting people; the festival participants had all run away, trying to get away from the enemy and in the hope of finding some shelter. Some survived, some were killed and some were taken prisoner.

Videos (filmed by the enemy) began to be shown of how they managed to breach the border wall, how they were strutting down the streets of Sderot and Ofakim (towns situated about 30 km from the border) and most painful of all, a Palestinian news reporter giving a summary whilst standing in a kibbutz; behind him could be seen enemies looting houses and storage areas, taking anything that came to hand.

All this time, more and more missiles were raining down on the south of Israel. The number of deaths began to rise and rise - 10 dead, 20 dead, 50 dead, 100 dead - along with an even greater number of injured people. One number that was never shown, primarily because of its negative affect on morale but also because it was simply unknown, was the number of prisoners - both soldiers and civilians - taken.

By nightfall, the situation had changed somewhat. There were very few rocket launches after about 4pm, but at 8pm - primary news time - again a huge barrage was fired, causing damage in cities around Tel Aviv. The air force had got its act together and was shooting at enemies trying to return to the Gaza strip along with the more familiar site of tall buildings (that house enemy headquarters) in Gaza being destroyed. Reserves had been called up and deployed at various locations, trying to free hostages and remove enemy forces.

Inevitably comparisons have been made between now and 50 years ago, the Yom Kippur war. Staring us in the face is the complete surprise and lack of intelligence; as the commentators say, this concerted and coordinated attack must have been planned and rehearsed for months, if not years, yet Israel "was caught with her trousers down". On the other hand, there is no comparison at all: then the battlefields were nowhere near civilian locations (especially in the south), and whilst some settlements were threatened on the northern front, the civilian population was never at risk. Yesterday the battlefields were kibbutzim and towns, with rockets raining down on the civilian population.

In the late afternoon, we heard about approaches made by the leaders of the two major opposition parties in the Knesset to join forces with the Likud party and form a time limited emergency government that could make rational and professional decisions about running this war. One leader indicated that the more extreme members of the government would have to leave (mentioning no names but we all know who he was talking about) whereas the other did not mention this. All other legislation would be put aside for the time being. Netanyahu cannot refuse. 

The colossal damage that extremist politicans have caused in the past nine months may have given our enemies the impression that Israel has been torn apart by internal forces and that she is weaker, but in times of war, we are all united. 

It is now 7:52 am on Sunday morning, 8 Oct 2023. I have just received a much-copied WhatsApp message saying that General No'am Tibon [a son of Tzora - NN] aged 62, an anarchist who demonstrates every weekend in Tel Aviv, drove from Tel Aviv in order to rescue his grandchildren who have been hiding without movement for 10 hours in Kibbutz Nahal Oz [a border kibbutz]. On his way, he picked up four soldiers, formed a squad, then staged a battle with five terrorists who were in the home [presumably where his grandchildren were]. He freed the children then drove home. A privileged person. [A fuller and more accurate version of this story, albeit in Hebrew, can be found here.]

This last sentence is extremely sarcastic as one of the epithets hurled at the opponents of the destruction of the judicial system is "Privileged person" - those who had life easy by growing up in a kibbutz and having doors opened for them in later life because they are white and educated... and ignoring the fact that almost all such privileged people served in the army and many reached high ranks. These are the true patriots.



This day in history:

Blog # Date Title Tags
17 08/10/2005 Bar mitzva Bar mitzva
205 08/10/2009 The girl who played with fire Literature, Steig Larsson
292 08/10/2010 Misinformation ERP
890 08/10/2015 How the mind works Psychology, David Lodge
1429 08/10/2021 DBA: Pilot study 2 DBA

Friday, October 06, 2023

Belated discovery in Delphi: defining indexes on calculated fields

Many years ago, I showed how to define indexes on the calculated fields of a ClientDataSet in Delphi. I haven't had need to look at that code since, as I included the index creation code as a utility procedure in the management program. Today, however, I was working on a different program and wanted to sort the data in a clientdataset in descending order (using AddIndex). When I used the name of an existing field (i.e. one defined in the sql code), AddIndex worked, but when I replaced the name of the field with a calculated field, I repeatedly received an error.

After looking for information on this topic, I finally found the answer: the calculated field has to be defined as an internal calculated field (fkInternalCalc), not as a regular calculated field. Once this has been done, the index can be defined as follows

qSigHarig.Open; qSigHarig.addindex ('idx1', 'thissig', [ixDescending], '', '', 0); qSigHarig.indexname:= 'idx1'; qSigHarig.first;
In fact, it can't be seen from that code that 'thissig' is an internal calculated field, but it is. The documentation is opaque on the difference between these two types of fields and doesn't mention the index problem.

Internally calculated fields, just like calculated fields, are calculated in an OnCalcFields event handler. However, you can optimize your event handler by checking the State property of your client dataset. When State is dsInternalCalc, you must recompute internally calculated fields. When State is dsCalcFields, you need only recompute regular calculated fields.


On a completely different topic, today is the 50th anniversary of the Yom Kippur War (at least, according to the Gregorian calendar). I wrote about this from my very limited point of view ten years ago.


This day in history:

Blog #Date TitleTags
41206/10/2011Rest in peaceRIP
98006/10/2016Health updateHealth, Theanine, Donating blood
153306/10/2022Weight and bp confirmedHealth

Thursday, October 05, 2023

The neuroendocrine system and my blood tests

I've now reached the final section in the first module of my nutrition course: this is concerned with the neuroendocrine system. Some of this material is very important for me, as it mentions the hormones aldosterone and renin that maintain the salt-water balance thus regulating blood pressure. Regular readers will know that I suffer from hyperaldosteronism, which is a difficult word to type and even more difficult to pronounce.

Coincidentally, I have discovered that there are three more sets of results from the blood test that I did a week ago that I hadn't seen previously. The urine test was fine; the hemoglobin A1C % result was 6.0, unchanged from the last time that I had this test done. This is still too high, but if my free glucose level has lowered, then maybe this value too in a few months time will also be lower.

The third set of results were for items that have rarely been tested: Folic acid, Vitamin D, and the thyroid trio of TSH, free T3 and free T4. All are normal except for the free T4 which is too low. What does this mean? Quotes from this site: a low T4 level could mean a diseased thyroid gland or a non-functioning pituitary gland, which is not stimulating the thyroid to produce T4. Since the pituitary gland would normally release TSH if the T4 is low, a high TSH level would confirm that the thyroid gland (not the pituitary gland) is responsible for the hypothyroidism. If the T4 level is low and TSH is not elevated, the pituitary gland is more likely to be the cause for the hypothyroidism. I should say that I don't feel any of the regular effects of hypothyroidism.

I do not want to rush to any conclusions on this topic, so I will not quote the rest of the text. If previously I had wanted to discuss the iron/ferritin results with my doctor, then the TSH/T4 results make this imperative. A fine time to read about the various endocrine glands....



This day in history:

Blog #Date TitleTags
1605/10/2005SudokoProgramming
20305/10/2009Old computer in new caseComputer
41105/10/2011Firebird DB management tool (3) - Bells and whistlesProgramming, SQL, dbExpress
97905/10/2016DBA: Entering the final third of the doctorateDBA
107905/10/2017A kibbutz dayJewish holidays, Obituary, Kibbutz
117805/10/2018Geoff Emerick, 1945-2018Obituary, Beatles
134205/10/2020Continuing the development of the Priority Cross Referencer (PrioXRef)Programming
142805/10/2021Continuing the BP sagaHealth, CPAP, Blood pressure, Aldosterone

Tuesday, October 03, 2023

A day spent studying

I took a day off yesterday* in order to continue my nutrition studies. I breezed through the section on the cardiovascular system then followed it by the musceloskeleton system. I tried working on the immune system, which is much more interesting than the musceloskeleton system and also more intimately connected to nutrition (undernutrition interferes with the immune system) but there was simply too much to learn in one go.

Whilst answering the multiple choice questions for these systems, I realised with a very heavy heart that the course requires memorising the material but not necessarily understanding it. The musceloskeleton system material was very much a 'naming of the parts' that makes learning hard but barely contributes to understanding (if not directly hindering).

I noticed a few ambiguities in the texts that were brought to my attention by some of the questions. As I asked, What is the difference between "formation of red blood cells" and "production of red blood cells" (apart from the fact that they have different names)? Formation and production appear to be synonyms.

The final answer that I received was that Haematopoiesis refers to the process through which the body manufactures blood cells. It begins in the embryo and continues for life. This refers to all blood cell types (red, white and platelets). Each of these cells begins with the transformation of hematopoietic stem cells. Erythropoiesis in its simplest definition is the production of red blood cells. It is the process which produces red blood cells (erythrocytes), from erythropoietic stem cell to mature red blood cells. Formation/production/manufacture are all interchangeable. The important factor is the difference between Haematopoiesis and Erythropoiesis. So now you know.

The section on the immune system contained a video delivered by someone whose native language appears to be French. His heavy accent made understanding what he was saying difficult but there were sub-titles that purported to show what he was saying - except that they didn't and contained so many mistakes that I had to give up watching. 'Thymus' (a gland that is part of the immune system) was one time rendered as 'virus' (which really got me head scratching) and another time as 'time is'. There were so many mistakes that I complained on the discussion board for this section; this morning I read that the sub-titles have been corrected and that one can download the slides of the lecture. I think that I'll stick with the slides.

If I'm already talking about the subject of lecturers' accents, then I should recall that in one of the initial lectures about the GI tract, the lecturer (Dutch) kept on calling the second part of the small intestine yeyunum, instead of jejunum. I could understand confusion about pronounciation if it were called the gegunum (is that a hard or soft g?), but the j makes it clear how to pronounce this. So why did the Dutch lecturer 'replace' the j with a y? Unnecessary confusion.

* Although this didn't stop several people from work telephoning me.



This day in history:

Blog #Date TitleTags
10503/10/2007Sandy Denny - Live at the BBCSandy Denny
76203/10/2014Watching the weight (once again)Health
88903/10/2015More statistics functions with SQLDBA, SQL, Statistics
107703/10/2017The 'check-field' triggerPriority tips
117703/10/2018Knocking my head against a brick wallProgramming, Delphi, Priority tips