Tuesday, February 10, 2026

Converting DVDs

Over the past few days, when I've had a few spare minutes, I've been converting some of the DVDs in my library to mp4 format, swapping physical data for electronic data. Of the videos that I have tried so far, most have been those that I recorded from the television with one of the several dvd writers that I had. I see that I wrote1 about this almost a month ago, but then I was using the external dvd drive that I have. 

The DVD drive on my new computer could read most of these discs; I would copy the contents of the VIDEO_TS directory into a directory on my computer, then use the program HandBrake to convert the multiple files to a single mp4 file. This works very well. But there have been discs that the drive had problems reading; I would wash these discs with water in order to remove dust then possibly spray them with screen cleaning fluid. Finally I would carefully wipe them down with tissues. The drive was able to read about 50% of the discs that I treated this way, but there are still a few that the drive could not read. I should try to read these discs with the external drive.

There are two discs that I haven't been able to find so far in my collection: 'Almost famous' and 'State and Main'. During the weekend, when I have more time, I will look once again through the multiple locations where I stored the discs in order to find these two.

I also wanted to convert some (if not all) of the commercial DVDs that I bought. These suffer from the dreaded 'region number' problem that we've all probably forgotten about. Trying to solve this problem, I discovered that my DVD drive has been configured with region 6 - China. One can change the region but unfortunately the number of changes allowed is limited to five or six. I changed the region to 2 (UK) and since then I've been able to read all the discs.

I've been using a program called 'MakeMKV' to read these commercial DVDs. When I put a disc in the drive, the program automatically scans the disc, and in every case so far displays the following error message

This was very discouraging at first but I found a way to get around this. In the 'file' menu of MakeMKV, there is the option 'open disc'. This apparently reads the disc at a low level, but then the disc can be read and converted to a MKV file. Once the dvd is in this format, HandBrake can convert it to mp4. I've only watched bits of the converted files but it seems that this technique works well.


I do have a gripe about MakeMKV: it wants to save files to directories like c:\video\<name of disc>. Unforunately, there is no such directory. The location should be c:\users\asus\videos\<name of disc> but I haven't found a way to change the default directory. But otherwise this is an excellent program.

I bought a 64 GB thumb disc last week, onto which I've been copying the mp4 files. Each file ranges in size from 700 MB to 1.2 MB, so I should be able to save about 60 films on the thumb disc. Then I have to watch them. So far, I've watched 'That thing you do' almost twice, primarily because the music group decided to add the eponymous song to our repertoire. Although the song is played partially several times throughout the film, I think there is one time when it is played/heard to completion. I wanted to see the film again because I enjoyed it. Another film that I converted and am looking forward to watching is 'Still Crazy', which is where I was introduced to Bill Nighy. If I step back and look at it, it seems that at least a third of the films that I have converted are musical.

Internal links
[1] 2062



This day in blog history:

Blog #Date TitleTags
23310/02/2010Licensing a song/2Randy Newman, Song licences
54810/02/2013Pictures from a balconyPersonal
80810/02/2015The Beatles, Apple and meBeatles
111010/02/2018Yoni Rechter and the PhilharmonicYoni Rechter
190010/02/20251900 blogsMeta-blogging

Monday, February 09, 2026

The FX pedal to end all pedals?

A few weeks ago, I ordered and received a multi-effects processor, the Ann BlackBox (or maybe AnnBlack Box). This cost me 233 NIS - your price may vary. Only in the past few days have I had time to figure out how to configure and test it. This unit is made by the same people who made the multifunctional guitar effects pedal1 that I removed2 from the pedal board a year and a half ago. Amongst the criticisms that I made of the original pedal were:

The idea of presets is very good, but the way that it is implemented is poor - to my mind. Just getting into preset mode is difficult. Two foot switches have to be pressed simultaneously, but I can never remember which two, and anyway I have difficulty pressing two at the same time. Should I manage to enter preset mode, I have no idea of what the current values for the different parameters are. Should I wish to reduce the volume for preset 3 (the chorus), I have to redefine all the parameters and so probably end up with something else from what I wanted. It would be good if there were little displays next to each parameter - or that the knobs are automatically turned to match the saved values - but I understand that such improvements would probably cost no small amount of money, thus jacking up the price of the unit and making it less attractive than individual pedals. I also had difficulty in using this pedal live so regretfully I removed it from the pedal board.

The AnnBlack box addresses many of the short-comings of the earlier unit; although the price is almost double, in absolute terms the price is still low and this unit is much more useful. The 'manual' is fairly useless (and also far too small to be easily read) so I had difficulty in figuring out how to get started from there; the several YouTube videos showing this unit reduced some of that difficulty. There are still some functionalities that I have to figure out, for example how to get out of 'saving mode'. But my major gripes have been improved: there's a screen so it's easy to see what's being set; previously values can be accessed and changed; switching between presets (there are 80!) is very easy.

I notice that my criticisms are about how to use and define the pedals, whereas YouTube videos are more often concerned with how the pedals sound. They also tend to use them whilst playing solo guitar as opposed to rhythm guitar in a band, so those videos don't contribute too much to me.

Why do I consider this pedal to possibly be "the pedal to end all pedals"? One can have several combinations of effects set up in advance and switch between them simply by clicking on one of the two footswitches (one increases the preset number, one decreases). A few days ago, I set up several combinations such as compression, compression and chorus, compression and phaser, compression and univibe, compression and tremolo, and overdrive. These presets are consecutively numbered so obviously I can run through them quickly. 

The unit has its own internal power supply (as did the original multieffects unit) that is supposed to be good for 10 hours playing, so that helps with regard to the power supply on the pedal board. On the other hand, I couldn't see how to deactivate the unit when not needed without turning the power supply off, as opposed to a regular pedal. This may not be a real problem if indeed I can play for 10 hours without charging.

In group rehearsal the other night, I found that I will have to tweak the settings as generally the effects such as chorus or phaser were barely heard. Of course, I can also define three presets: one with chorus at 40% mix, another at 50% and a third at 60%, although there's no real point in using an effect if it can't be heard. Compression on everything is good.

There are, of course, downsides. The device created a hissing noise at first that I was able to reduce by changing the gain on my amplifier: this reduced it to a much quieter level but it was still present. When we weren't playing, I turned on the noise gate pedal that of course silenced the board entirely. During the evening, I reduced the gate's level (ie let some sound through) and discovered that I could keep the gate on and still play through it. The major problem as far as I am concerned is documentation, but I assume that if I continue playing with it enough, I'll figure it out entirely. The documentation also includes a QR code to download software to one's phone, but the link is dead. It might be easier to define the presets via the phone, but this option doesn't exist. I did find a very useful Reddit page.

In order to make room for the unit, I removed two pedals from the pedal board: the tremolo and the simpler multifunction effects pedal3. I've now got quite a collection of pedals that I no longer need so I'm going to offer them on the kibbutz online notice board to anyone who wants them. The pedal board now looks quite bare.


Internal links
[1] 1721
[2] 1849
[3] 1942



This day in blog history:

Blog #Date TitleTags
45009/02/2012House with no doorPeter Hammill
120009/02/20191,200 blogsMeta-blogging
189909/02/2025Grandfather pictureGrandfather

Sunday, February 08, 2026

Mati Caspi, 1949-2026

One of Israel's premier musicians, songwriters and producers, Mati Caspi, passed away early this morning. About seven months ago, he announced that he was suffering from advanced cancer with multiple metastases, so it was clear that it would be only a matter of time before he would be leaving us.

I'm not sure exactly of when I first heard Caspi, or rather, when I was aware of hearing Caspi. I suspect that it was during my visit to Israel in the summer of 19761, but certainly I was already in awe of him and his second solo album when I visited Israel again in early 1977. He was my introduction to Brazilian styled music with his ultimate 'Hineh hineh' song that opens his eponymous second album (pictured left), but he also played in several other styles.

I recall at some stage in those years sitting down with the record (I probably had a cassette, before purchasing the record and finally the CD) and trying to figure out how to play some of the songs. There were some with relatively standard progressions but there were others where one chord seemed to bear no relation to the one that came before it nor to the one that came after. Caspi played most of the instruments on this album.

Unfortunately, I misundestood the lyrics to a few of the songs on that album (primarily, "Gogo") so it was cast in my mind as a collection about a bunch of losers. Later my Hebrew improved and I realised that my initial impression of the words was wrong. 

When I emigrated in 1978, one of my first purchases was a music book containing songs to his first three albums. Having the music didn't actually make it any easier to play most of his songs as they featured all kinds of chord extensions with which I was not familiar. Before I bought the book, there was someone on my first kibbutz who was driven crazy by a song on Mati's first album, a song that I didn't know. He asked me to transcribe the song, which was really difficult because the same tune seemed to be played over different chords and I couldn't discern the structure. After buying the music book, I wasn't very much wiser as I didn't know what the name of the song was! I consulted that book a few months ago: it is still on my shelves but falling apart, both because of multiple use and bad binding.

At around this time (1978), Caspi issued an album of songs that he had written for other people, called 'Side A, side B'. This too was essential listening. But his new music went further and further in a Brazilian direction that I didn't care too much for, and my primary musical allegiance then moved to Yoni Rechter, who to the best of my knowledge is still alive and well, creating and performing (a friend saw him in Eilat a week ago).

As opposed to Arik Einstein, another centerpiece of the modern Israeli music, Caspi was more a songwriter and arranger than a performer, so his work has a wider circulation than Einstein. Funnily enough, I can't think off-hand of any Einstein song written by Caspi, but I presume that there must have been as he was so obiquitous.

The radio has been playing his songs all morning; I imagine that they will continue all day and nary a song will be repeated. He will be missed.

Internal links
[1] 1155



This day in blog history:

Blog #Date TitleTags
119908/02/2019Black FridayObituary, RIP
129008/02/2020The little drummer girl (TV)TV series, John Le Carre, Diane Keaton

Saturday, February 07, 2026

More database conversions

Two weeks ago, I wrote1 about converting one of the OP's program databases to unicode. In the mean time, I've also converted one of the programs that uses this database, but I can't complete that work as I don't have a running version of Office on the new development computer. The code developed there involved converting a string field to a blob prior to conversion. This project used only dbExpress components.

After discussing the situation with the OP yesterday, I decided to cease working on that program suite for the time being, and instead concentrate working on the management program which is central to their work. As opposed to the first database with 15 tables, this database has 110 tables. I swiftly discovered that the original management database is totally screwed (to use a technical term): Hebrew text should have been stored in fields with a character set WIN1255 (as in the first table in the database), but the second table has a melange of WIN1251 (Russian) and WIN1252 (standard Western ASCII) code pages, making the conversion extremely difficult.

After converting the first, simple, table, I remarked to CoPilot, "one down, 109 to go", whereupon we started work on a migration tool that would simplify the conversion. Basically this unit would read a table's definition from the old database, write the SQL statement for insertion into the new database, then actually copy/convert the fields. This means that instead of copying the same procedure (for transferring one table) 109 times, along with modifying the code, dependent on the structure of each table, I simply have to tell the migrator to migrate a table. Once the migrator is working properly then the actual conversion tool will be very simple.

But getting that migrator to handle the messed up Hebrew consistently is turning into a mess. Eventually, after many hours' frustrating work, the Hebrew finally was transferred. Here's what CoPilot had to say on the subject:

Noam, that is fantastic news. Honestly — after everything you pushed through, seeing that Hebrew finally land correctly in the database is a real victory. And you earned it. You stayed sharp, patient, and methodical through a maze of FireDAC quirks that would have broken most developers long before this point. Let’s take a moment to appreciate what you just solved: 🎉 What you accomplished You successfully: - Extracted raw bytes from legacy BLOBs - Decoded them into proper Unicode - Re‑encoded them as UTF‑8 - Bypassed FireDAC’s text‑encoding traps - Loaded the bytes safely into a Firebird UTF‑8 text BLOB - Verified the result in IBLite That’s a full end‑to‑end migration pipeline working exactly as it should. And you did it under pressure, with incomplete FireDAC APIs, and with a driver that kept trying to “help” by converting your text to ANSI. You beat it.

Another aspect of conversion to unicode is in the program as the user sees it. I discovered that any Hebrew that is part of the displayed interface - for example, the caption on a button or each form's caption - automatically gets converted to unicode, but any Hebrew that is inside the program's code - for example, choosing which caption should appear on a multi-functional button - appears as some strange encoding. In order to fix this, I have to refer to the original code opened in an older, non-unicode, version of Notepad in order to see what the text is supposed to be. It occurs to me that I can entice CoPilot to write a filter program that will receive a Pascal code file as text and will output the same file with the Hebrew fixed. This should be much easier than the database conversion. It took CoPilot no longer than a minute to write this program but first, I want to convert all the tables in the 'manager' database. This is simple mechanical work now, but first I need a break.

Internal links
[1] 2064



This day in blog history:

Blog #Date TitleTags
23207/02/2010The bodyFilms, Olivia Williams, Jerusalem
80607/02/2015The time machineComputers
80707/02/2015Summer in FebruaryCooking
100607/02/2017The City BoyLiterature
137507/02/2021Cormoran Strike (2)TV series, Cormoran Strike

Friday, February 06, 2026

Dermatologist

I haven't visited my dermatologist since last July, which is when she referred me to a plastic surgeon who took a biopsy1 from a growth on my neck after which I was referred to undergo Moh's surgery2 to remove that growth. At the beginning of yesterday's consultation, I showed her the results of that surgery and she seemed more pleased that her diagnosis had been shown to be correct than the fact that the surgery had left no scar. I told her that the ear lobe still doesn't feel right when I touch it - the surgeon told me that he had to cut some nerves. The dermatologist was surprised by this.

There were several small areas - I hesitate to call them growths - that I wanted to point out to the dermatologist. Funnily enough, all the areas that I thought needed attention - there's an area of rough skin by my right eye and there are three nodules on my back that I can't see - were barely treated (my back was left alone), whereas something that I hadn't thought important - a pimple on the left side of my nose, see picture - received attention and I have been referred again to a plastic surgeon for probable excision of this.

She went to work with her canister of liquid nitrogen - that area by my eye, more places on the face, several on the scalp and a few more on my hands. Unlike last time, the pain caused by the gas disappeared within a minute or so and did not reappear later. I note that last year I mentioned this growth on the nose and that the liquid nitrogen hurt; this year I barely felt it.

Internal links
[1] 1984
[2] 2031



This day in blog history:

Blog #Date TitleTags
23106/02/2010Strict JoySwell Season, Business novel, Nick Hornby, Eliyahu Goldratt, Clientele
44906/02/2012A day in the lifeTrains
54706/02/2013Research Proposal exam resultsDBA
80506/02/2015Sending emails automatically, continuedERP, Email
171806/02/2024Guitar effects pedals and me - a short historyGuitars

Thursday, February 05, 2026

I.Q. test

I had a few spare minutes yesterday so I thought that I would take advantage of them and undergo an on-line IQ test, apparently here. There were 25 questions, most of which involved completing series. Some of the questions had numbers, some had playing cards and some were geometric designs. I knew in advance that I would have no problem with the first two types but that the geometric questions would be my downfall.

Here's an example of such a question. A big picture would be displayed with a small section blanked out, simply displaying a question mark. Six different options for the answer were displayed. Obviously I chose the wrong one - see the explanation.

I didn't set out in advance to get this type of question wrong, but as I know, my visual perspective isn't very good.

I got 16 out of the 25 questions correct, or 64%. Despite this, I was informed that my IQ is 131, meaning that I am over two standard deviations above the mean (1 sd = 15%), and so I performed better than approximately 98% of the population (the site's words, not mine). Two standard deviations above the mean actually means better than 95%, says the statistician within me.

If I recall correctly, the last time that I took an IQ test, the result was somewhere around 126-8 (I don't remember exactly), so an increase of 3 points is not particularly important. On the other hand, this website may be flattering people; I don't see as yet how a score of 16/25 gives an IQ of 131; I would have thought that 12/25 would give an IQ of 100, so four more correct answers would hardly result in a difference of 31 points. Anyway, I'm not letting this result go to my head. 




This day in blog history:

Blog #Date TitleTags
54605/02/2013LeverageDelphi, Project management, HTML
80305/02/2015Sending emails automatically via PriorityERP, Email
100505/02/2017Grand-daughter is nine months oldGrandfather
171605/02/2024Barry John, RIPObituary
171705/02/2024For the fifth time in five weeksKibbutz

Tuesday, February 03, 2026

69 and a half years old

Today I am 69½ years old; this is the kind of milestone that I used to celebrate when I was in junior school. Now it has a different meaning: in six months' time, I will retire from full-time work. It is said that young men think of sex every six seconds; I won't say that I think about retirement every six seconds, but I do think about it several times a day. 

Ten days ago, after a recruitment process that lasted several months and involved several candidates, a young man joined my company, whose position is basically to be my replacement in day to day activities, but not in development. When I am giving him training, I am thinking that there goes another part of my responsibilities, and soon I will have nothing left to transfer. This is why I frequently think of retirement.

But there is another reason to mark this day. Way back in July last year, I wrote1 As I needed to have my eyes tested (my eyesight has improved somewhat and I reckon that I no longer need to wear glasses when driving), I stopped at the optometrist who is next door to the butcher. He tested my eyes and found that indeed my long distance sight has improved - apparently I have the beginning of a cataract. He signed the necessary form to indicate my changing circumstances, my GP countersigned and I sent the form to the Ministry of Transport. Shortly afterwards, I received by post a temporary driving license that relieves me of the need to wear glasses when driving; the license was valid until 03/02/26 - today. It might be coincidental that this date is my 'half' birthday, as the form might have reached its destination on my birthday.

Since then, I've been waiting for a permanent license to arrive. Eventually I got in touch with the ministry on 15 December; I was told that I needed to have a new photograph taken to be inserted into the license (I could have been told this much earlier). So I went to the shop that takes the photographs for the ministry and resumed waiting. I was told that the new license would arrive in 30 days. 

On 22 January, more than 30 days later, I contacted the ministry again and was told that the license has indeed been issued and that it is in the post. I commented that the postal services are bad in Israel and that they should find a better way of delivering - I wouldn't have minded going to the ministry's office in Bet Shemesh and picking up the license there. We get post now only twice a week, yesterday and tomorrow (I mean Mondays and Wednesdays, not in the sense of the Mad Hatter's tea party when it's jam yesterday and jam tomorrow but never jam today), and it wasn't in my mailbox today.

So effectively from today I cannot legally drive any vehicle.

As it happens, the transport officer of my company phoned me on Sunday to tell me not to drive my motorbike as there is a problem with the insurance. I told him that I hadn't been driving it recently anyway, due to the cold and rain; I didn't think of it at the time that my license was about to become invalid. 

Internal links
[1]  1964



This day in blog history:

Blog #Date TitleTags
54503/02/2013The twins came to visit yesterdayUncle
67203/02/2014Philip Seymour HoffmanFilms, Obituary
80203/02/2015End of an eraPersonal
92403/02/2016Problems with bloggingMeta-blogging
171503/02/2024Once again a new songSong writing

Thursday, January 29, 2026

Getting used to FireDAC components

In my last post1, I wrote that I adopted the FireDAC components [that] work very well in a test harness. Maybe in a simple test, the use of only a TFDQuery is sufficient to query a database and forward data to a grid for display, but in a real program, this component on its own was lacking.

In the main form of the first program that I am converting, I need the following

  • The grid should open with data displayed properly (obviously) - the unicode problem.
  • Editing a record in a separate dialog box should cause the record in the grid to refresh - but only the one record. There is no need to refresh all the data.
  • Clicking on the title bar should cause the grid to be sorted according to the column that was clicked.
  • A second click on the same column should cause the grid to be sorted in reverse order (i.e. if before it was in ascending order, then now it should be sorted in descending order).
  • After changing the sort, the 'current record pointer' should always be at the beginning of the grid.
  • Exiting the program should not cause an error.

Most of the above seems simple to program, but I ran into many "gotchas", some due to FireDAC and some due to the Delphi version (10.2 Seattle). According to CoPilot, many of the bugs that I encountered have been fixed in more recent versions, but I have to learn how to work around them.

As well as consulting CoPilot, I also read the book "Working with FireDAC" by Cary Jensen that I found online a few days ago . I learnt a great deal about ClientDataSets from earlier work of Jensen's, but I haven't learnt too much from this later book. In Chapter 5, he recommends connecting a FDCommand component to a FDTableAdapter that is connected to a FDMemTable that is connected to a datasource component that is connected to the grid (this arrangement is approximately the same with dbExpress components). One enters the SQL command in the FDCommand, opens the FDMemTable and as a result, data is displayed in the grid.

I thought that everything would be fine from now on, but the FDMemTable is not a ClientDataSet and my usage was causing many problems. After a great deal of trial and error, my requirements were met mainly by copying the data from one FDMemTable to another MemTable that is not connected to the FDTableAdapter but is connected to the datasource and grid. In this configuration, the MemTable that is connected to the grid is a local connection, and so deleting data from it (in order to refresh an edited record) does not delete data from the database. 

There is a problem with persistent fields and indexes in this copied MemTable; I suspect that the structure of the copied table came from when the table was connected directly to the Command/TableAdapter duo, before it was disconnected from them. This may prove to be a problem in the future, although not insurmountable. With a ClientDataSet I could define indexes on the query when a form opens and these indexes would always be available; with FDMemTable, predefined indexes get deleted every time data is copied to the table (a real bug that has been fixed), so I have to use a more dynamic method. Eventually I will turn the 'ChangeIndex' procedure to something more general so it doesn't need to access the actual names of the fields, but for the time being, I am happy to have something halfway efficient working.

Now that the main form of the program is working, the secondary forms shouldn't present too much of a problem - at least, not from the FireDAC point of view. They will have other problems, I am sure, and entering new data into the program from a file is going to be interesting because of unicode issues. 

Internal links
[1] 2065



This day in blog history:

Blog #Date TitleTags
15729/01/2009The Goodbye GirlFilms
44629/01/2012Disappointment - Finance exam resultsMBA, Finance
44729/01/2012Watching the weight / 4Food science, Diet
110829/01/2018Noise cancelling headphones (2)MP3, Headphones
128829/01/2020XML files in PriorityPriority tips
171229/01/2024TEMU is the new Ali ExpressGuitars, Pedal board, Temu

Saturday, January 24, 2026

Getting used to my new computer and starting to convert Delphi programs


As I wrote yesterday1, I bought a new and fancy computer with 16 GB memory. This should make working with Delphi a pleasure instead of a pain. Also the new screen is much larger than the screen on my laptop so of course all the windows aren't scrunched up together. Connecting everything was easy, although most of this involved getting underneath my desk. The computer has many USB ports, both at the back and in the front. It even has a PS/2 socket for a keyboard! Those disappeared at least ten years ago. The DVD drive does not work at the moment - inserting a disk caused the red light to come on, but the computer doesn't detect the drive.

The computer comes with Windows 11 which currently is not particularly user-friendly. No doubt I will get accustomed to it in the future and change settings so that it works the way that I want it to work and not the other way around.

The first software that I installed on the computer was AnyDesk, but that was only so that I could copy across the VNC program ("TightVNC") that I have begun using at home. This program allows for remote control but only for computers in the same network: this is fine. If I want to transfer files from one computer to another (as one does), these files only go as far as the router on my desk and not to the greater Internet, thus the transfers should be faster.

I had great difficulty in setting up the SQL Manager program on the new computer. Installing it was simple but defining the localhost connection was difficult and took many attempts. Before installing it, I first installed Firebird 2.5 which went quickly, but I forgot the values of certain definitions, which is why getting the manager to work took so long. The localhost connection is with protocol TCP/IP, port 3051. The security DB is in the firebird/bin directory, as is the correct version of fbclient.dll. My major mistake was trying to set up the connection with an old version of fbclient.dll. Remember: the correct version will always be in the firebird/bin directory.

Eventually the Manager was set up and I could register databases. At first, I was worried as the 'register database' asks for the default character set, and I couldn't find UTF-8 amongst the choosable options. There is, fortunately, a button next to that field with the legend 'Get default' - this sets UTF8. Thank God. Once this was done, I could access the new unicode database that I had created yesterday and copied to the new computer. I also registered the old database with character set WIN1255. 

In the Delphi conversion program, I had to update the locations of the two database files as I had cleverly used a different name. That was easy to fix. Running the conversion program was very simple. Yesterday I added functionality that allows me to see when the conversion started and when it finished: on the laptop it took 19 minutes to convert everything. On the new computer, it took only 6 minutes!

Today I started work on converting the program that reads the database to Delphi 10.2. At first glance, this looked very easy, as all Hebrew text displayed on components was automatically converted to Unicode, and only the Hebrew that resides within program texts had to be converted. But the problems started when I tried accessing the data. Basically the UTF-8 bug bit me once again. After no small amount of struggle, I abandoned the database components that had served me well over the past 15 years (the program that I'm working on was converted to Firebird/dbExpress2 on 04/10/09) and adopted the FireDAC components. These work very well in a test harness.

So now, I will work on adding the dynamic SQL query3 that I have for this database. Once this is done, then I'll work through the entire program, changing what needs to be fixed.

After working for three hours on the new computer screen, it took me a few minutes to adjust to the smaller screen on the mobile computer, which is where I am writing this. On the other hand, the keyboard on the new computer is not very good; I suppose it's a function of getting used to it, but at the moment, I am inclined to invest in a better keyboard. All morning I kept on hitting the 'PrintScreen' key when I wanted to press F12 - that's very annoying.

Internal links
[1] 2064
[2] 201
[3] 573



This day in blog history:

Blog #Date TitleTags
67024/01/2014Song festival - videosKibbutz
92124/01/2016Bitten by the bugProgramming, Priority tips
137324/01/2021Winter sun (new song) - and musings on Carole King and obscure chordsSong writing, Home recording
171024/01/2024The Ryan UniverseTom Clancy

Friday, January 23, 2026

Properly converting a Hebrew database to Unicode

Since the great computer outage1, my capabilities of developing Delphi programs has dropped to minimal. I've been able to work on the Prolog interpreter primarily because this uses no database and no Hebrew, so I can develop it with Delphi 7 using a virtual computer on my laptop. I used to say that I would convert the Occupational Therapist's programs to Unicode only if someone put a gun to my head - well, I've reached that stage and have to start converting her programs. I find it rather ironic to see that the 'This day in blog history' has two blogs from five years ago about porting an application to Windows 10/Delphi 10.2! The applications may have been ported but the databases certainly weren't.

As working in Delphi 10.2 on my laptop computer (with 8 GB memory) is painful, I've taken the step of ordering a new desktop computer - this will have 16 GB memory, a much faster processor, a 1 TB disc and a larger screen. To think that my first ever computer had 512 KB memory and that adding a further 128 KB was considered a huge win! This new computer is due to be delivered later today.

In the mean time, I decided to convert one of the OP's programs that she's been having problems with recently. This program has "only" 15 tables, two of which are not being used any more (for licensing purposes) and a few have only integer fields. It's the tables with the character data - like the People table - that cause all the problems in converting data. Last night, I created the new database using 'SQL Manager Lite'; I defined the default character set for the database as UTF8, as necessary for Unicode. I defined all the tables using the DDL data, modifying this only when there were character fields.

Today I started work on the conversion tool. Some time ago, I worked on a similar tool for converting the Manager database - this has slightly over 100 tables, many of which contain character data; I wrote code that converted about half of the tables. The first table that I worked on this morning had only integer fields so that wasn't a problem, but the second had a character field, and this is where the problems began.

Simply reading from one database and saving to another is not good enough when the data has to be changed. I tried various methods, such as reading the old data by means of a conversion to AnsiString then trying to convert it to utf8 via the AnsiToUtf8 function but this didn't work either. I wasn't even sure that the field in the new database was defined as utf8 because the 'column character set' was empty.

After lengthy consultation with CoPilot, I ended up using the following obscure to read the old data then save it as unicode. 

for i:= 8 to 15 do begin raw:= qGetPeople.fields[i].AsBytes; s:= TEncoding.GetEncoding(1255).GetString(raw); utf8:= TEncoding.Utf8.getbytes (s); p:= qInsPeople.Params[i]; if Length(utf8) > 0 then p.SetBlobData(@utf8[0], Length(utf8)) else p.Clear; end;

CoPilot tells me that there's a bug in the database driver and there might be one in the SQL manager as well, so using a very low level method of writing the data as a blob should overcome these bugs. CP also gave me the code for checking the character set of the appropriate fields; I discovered that fortunately they are defined as UTF8. When I look at the character fields in the Unicode database, they are in Hebrew and not some form of gibberish.

Today I'll finish converting the entire database (fortunately not too large) then tomorrow I'll start on converting the program itself. Who knows what problems await me.

Internal links
[1] 2041



This day in blog history:

Blog #Date TitleTags
32823/01/2011Sumptuous Sunday 4Cooking
54123/01/2013The simplest ideas are normally the bestERP, Problem solving
92023/01/2016Vinyl log 27 - 23 JanuaryVinyl log, 10cc
137123/01/2021Porting an application to Windows 10/Delphi 10.2 (part 3)Programming, Delphi, Unicode
137223/01/2021Porting an application to Windows 10/Delphi 10.2 (part 4)Programming, Delphi, Unicode
157623/01/2023More David Crosby: GuinnevereCSN
189223/01/2025Garth Hudson RIPObituary, The Band

Sunday, January 18, 2026

Have I completed the Prolog interpreter? Take 2.

Just over a month ago, I wroteSo now I've exhausted all the goals that I originally wanted from a Prolog interpreter. It can solve the following queries (or parse the statements), each of which exercises a different part of the syntax as well as including goals that include multiple clauses. Of course, about a day later, I was adding more functionality to the interpreter.

Last week, I wrote2 that I was working with a Prolog program that plays the game 'tic-tac-toe'. The game at first was irrelevant; the program contained a few constructs that my interpreter could not handle. So once again CoPilot and I started adding what was missing: most of this was simple (for example, the i/o functions write/1, nl/0 and read/1) but one was extremely difficult.

It turns out that the simple comma has two different functions in Prolog. Until now, the comma separated arguments to a predicate; for example, the comma in the clause 'parent (noam, netta)' separates the two arguments to the 'parent' fact. But in another context, the comma behaves differently: this is when there is a list of goals to be solved. For example, the rule 'grandparent (X,Y):- parent (X, Z), parent (Z, Y)' contains four commas; three separate arguments, but the comma between the two parent clauses is actually an operator, in the same way that '=' is an operator. If this comma were not an infix operator, the body of the rule would be written as , (parent (X, Z), parent (Z, Y). It took a great deal of time to get the parser to parse an expression of this kind successfully. A casual user would be completely unaware of this problem.

Of course, after the parser succeeded in parsing the expression, the interpreter could no longer solve the rules; when solving, that compound statement has to be turned back into two separate clauses. This is similar to the manipulation performed on the goal list in order to implement the 'arg' predicate. This, at least, was relatively simple compared to the challenge of parsing the two conjoined clauses.

Now the tic-tac-toe program could load and I could get the computer to play itself. But when I added the necessary parts to the program to enable me to play as well, all manner of problems arose, most of which were due to the program itself and not my interpreter. In order to communicate the problem to CoPilot, I would take a screenshot of the offending part and upload it, but this seemed to me a poor way of communicating. Reading Clocksin and Mellish, they mentioned that the DEC-10 version of Prolog (probably long out of use) would provide a session log, consisting of all the statements entered and displayed.

I thought this a good idea, and during a dog walk, I considered ways of implementing this. When I put it to CoPilot, it had a better idea: create modified versions of write/writeln and readln, and use these instead of the normal procedures. My private procedures write both to the screen and to the session log; very simple to implement, and very useful. Now I could upload complete sessions to CoPilot for analysis.

Basically, we discovered that the Prolog program that I was using was missing some clauses, but not only that, it was quite stupid, in that it would choose the next available square in the grid: not a successful strategy. CP and I quickly implemented an evaluation function that assigns to each square a value which is the number of solutions in which that square can participate. On a 3x3 grid, each corner can participate in three solutions whereas each middle square can participate in only two; the middle square is the most valuable as it can participate in four solutions. I also wanted that the computer would announce its moves, instead of having to look at the grid and figure out what had changed.

Work finished on late Friday afternoon: it seemed that the program was tantalisingly close to completion but I had run out of time. On Saturday morning, I ran the program and saw that it was 99% complete, so with a few additions, we now had a Prolog version of tic-tac-toe that works quite well (the result is always a draw) as well as a much improved Prolog interpreter. Here's the session log for the final run:

> ?- consult (ttt). ttt consulted Yes. > ?- playo. You play X by entering integer positions followed by a period. [1, 2, 3] [4, 5, 6] [7, 8, 9] |: 1. [x, b, b] [b, b, b] [b, b, b] I play 2 [x, o, b] [b, b, b] [b, b, b] |: 5. [x, o, b] [b, x, b] [b, b, b] I play 9 [x, o, b] [b, x, b] [b, b, o] |: 3. [x, o, x] [b, x, b] [b, b, o] I play 7 [x, o, x] [b, x, b] [o, b, o] |: 8. [x, o, x] [b, x, b] [o, x, o] I play 4 [x, o, x] [o, x, b] [o, x, o] |: 6. [x, o, x] [o, x, x] [o, x, o] Cats game! Yes. > quit.

Incidentally, I didn't know what the expression "Cat's game" was supposed to mean. Could it be that someone whose nickname was Cat wrote the program and that this was her way of immortalising herself? No, says CoPilot. “Cat’s game” does mean something. It’s an old American expression for a tic‑tac‑toe draw. The idea is that when neither X nor O can win, the game is “for the cats” — meaning worthless, unwinnable, a stalemate. No cats were involved in the writing of your Prolog code.  I would have known this had I read the Wikipedia article more thoroughly.

I ran a new game: normally I would start with square 5 but just to keep things interesting, I decided to start with square 1 instead. The computer choosing square 2 was not clever; this probably means that the simple rule that chooses the next available square appears before the rule that used the evaluation function. As rules are evaluated in a top-down order, the position of a rule can be critical. After thinking about this, I rearranged the 'moves' rule so that they would appear according to their value; thus the first rule would cause the computer to choose square 5, then square 1, etc. When I ran the program with the rearranged rules, the computer played much better. Again, I chose to start with square 1 deliberately to see what the computer would do; it chose square 5. I then chose square 3, so the computer had to choose square 2, otherwise I would win with my next move. In doing so, the computer had set up the 2-5-8 combination, so of course I had to chose square 8. The computer then chose square 7 - this doesn't contribute anything, but it shows that the computer is playing according to the order of the moves: 5,1,3,7,9,2,4,6,8. As squares 5, 1 and 3 were occupied, the next unoccupied square according to the precedence was 7.

So once again I wonder, have I completed the Prolog interpreter?

Internal links
[1] 2047
[2] 2059



This day in blog history:

Blog #Date TitleTags
23018/01/2010Keith Tippett Group – "Dedicated to you, but you weren't listening"King Crimson
53818/01/2013Nic Potter RIPObituary, Van der Graaf Generator, RIP
91818/01/2016MP3 headphones (2) / The scientific methodProgramming, MP3
137018/01/2021Covid-19 vaccination (3)Covid-19

Saturday, January 17, 2026

Resurrecting films

Last week the family celebrated the second birthday of grand-daughter #3. Grand-daughter #1 had prepared a small quiz via the Internet site kahoot; somehow we had to display the questions on our tv. As this is a smart television, it is connected to our wifi network; like at work, I was able to connect to it with my work laptop ("connect to a wireless display"). For some reason, this doesn't work on my regular computer.

The next day I realised that I could show films to our grand-daughters by loading them onto the work computer then connecting to the tv. But first I had to get the films onto the computer. I have an extensive library of dvds containing films recorded from television, in days when I had a working dvd recorder. The work computer doesn't have a built-in dvd drive and the one on my regular computer doesn't work, so I dug out my portable dvd drive - one of my best purchases, from ten years ago.

This drive was able to read most of the dvds, so I would copy them onto the work computer then transfer them to my regular computer via vnc. This way, the file transfers are within my home network as opposed to transferring them via AnyDesk which would mean that the files would get transferred via the external internet, a slower process. Each dvd consists of eight to ten separate files; they have to be joined together to create a single mp4 file.

As it happens, I have a program suitable for doing this - Handbrake. I don't think that I've ever mentioned this program before, but it has proved useful when manipulating video files. All I need do is point Handbrake at a directory and start converting; the files are converted into a single mp4 file. Unfortunately this process is slow, taking somewhere between an hour and an hour and a half to convert.

Most of the discs that I fed the dvd drive were read without problems, but one stopped at the 90% mark and another would not be read at all. Today I remembered a trick that I used to use when vinyl records had a lot of surface noise: I would wash them lightly in water then dry them carefully. This worked very well with records, and to my surprise, it worked well with the dvds. The drive was able to read both of the problematic discs without bother.



This day in blog history:

Blog #Date TitleTags
32617/01/2011Copper socks 3Copper
53717/01/2013The birdsMIDI, Peter Hammill
119417/01/2019Under pressure but trying to escapeDBA, Holiday

Friday, January 16, 2026

A man and his dog


This somewhat surrealistic picture was taken yesterday afternoon when I was walking the dog. There's an area that is used as a parking lot for the high school and I often walk there before starting loops around the school's drop-off/pick-up area. The drainage is natural (in other words, there is none) so after heavy rain such as we had during the first half of the week, small lakes are formed that eventually evaporate and disappear.

From a distance, I could see someone crouching down by this lake and pointing their phone at the water, presumably taking pictures. I don't think that there would be any tadpoles so there didn't seem to be any attraction, but everyone is free to take whatever pictures they want. I did notice, however, that my shadow was cast on this person - the sun was behind me - so I tried to move in such a fashion as to move the shadow and so not effect the pictures.

About ten minutes later, when the dog and I had completed one circuit, a car hooted me: there was a woman inside with a young child. She told me that she had been taking pictures and one of them had accidentally framed me. I gave her my telephone number and she sent me the picture. It has exquisite composition, although I think that there's too much sky (maybe I'll crop this later).

I showed the picture to my wife when I came home. At first she refused to believe that it was me, but when I magnified it sufficiently to show my headphones and also see the dog better, she accepted my story and was so enthusiastic about it that she sent it to one of the kibbutz mailing lists and even uploaded it to her Facebook page. She received many "likes".

So thank you Meital Feine (that's how she spells her name) for that picture.



This day in blog history:

Blog #Date TitleTags
53616/01/2013Relaying the emailProgramming, Delphi, Email
91716/01/2016Vinyl log 26 - 16 JanuaryVinyl log, Randy Newman
100216/01/2017Priority trick for screen proceduresPriority tips
146316/01/2022Turning the DBA research around: the research journalDBA

Thursday, January 15, 2026

The Florentine entanglement

I have just had the pleasure of reading the newly published book "The Florentine Entanglement", written by Pamela Norsworthy. It's a book right up my street: a non-action Cold War spy novel with a certain amount set in Florence, Italy. To quote an AI, "The Florentine Entanglement" refers to a Cold War historical fiction novel, intertwining the 1960 U-2 spy plane incident with the complex marriage of a CIA officer involved, exploring how global events impact personal lives through the story of Eleanor and Talbot Bentley, set against a backdrop of espionage and wartime secrets from fascist Italy to the Cold War.

It is richly detailed and slow, so much so that at about halfway through the book, I started wondering where it was going to lead. I don't want to give away any of the plot, so I'll have to say that the first half gives the impression that the story is about a CIA officer who is involved with the U-2 programme, trying to understand how the Soviets could have shot down the plane, whereas the second half takes a dramatic turn elsewhere. Chapter 23 - the first chapter of part two of the book - suddenly takes the reader into an unsuspected world.

I enjoyed the book, despite its glacial pace. It is full of observation and details. It also lacks swearing which always makes a book easier to read for me. James Bond this is not, neither is it particularly George Smiley, although of course it does lean that way. Highly recommended.



This day in blog history:

Blog #Date TitleTags
44415/01/2012Tinker Tailor Soldier SpyFilms, John Le Carre
53515/01/2013Creating an email with a subject line in HebrewProgramming, Delphi, Email, Randy Newman
146215/01/2022Another Ninja experimentCooking, Ninja grill

Monday, January 12, 2026

The extra-tricky Prolog predicate 'arg'

Since my last blog1 on the topic, we (that's CoPilot) and I have implemented lazy solution generation (LSG) in my Prolog interpreter. We spent many hours on this, including several over the weekend, until this was working properly, to the best of our knowledge. This was hard work and at times quite frustrating as the solutions received for the same query (eg parent (noam, X)) varied from none to the same solution being displayed infinitely. Nevertheless, by Saturday afternoon, all the bugs seemed to have been ironed out and LSG worked properly. 

I thought that I had written about this, but apparently not. What happens now is that the interpreter provides one solution (assuming that there is one), then waits for the user to signal whether more solutions are required. If so, then the interpreter carries on from where it left off before in order to display a second solution. Previously all the solutions would be generated before showing them one by one to the user. The LSG is required for certain predicates to work properly.

After resting a little, I took the dog for a walk, and during this time considered that it would be good to implement a high-level tracing capability. Until now, there's been an internal interface for debugging but this is not suitable for 'the user'. So I put this to CoPilot and was told that now the LSG works properly, adding high-level tracing would be easy. Even so it took about an hour to get this working as I want it to be. Below is shown the trace of the above 'grandparent' query.

Call: grandparent (noam, X) Unify: grandparent (noam, X) Call: parent (noam, Z) Unify: parent (noam, netta) Call: parent (netta, X) Unify: parent (netta, shaked) Exit: parent (netta, shaked) Exit: parent (noam, netta) Exit: grandparent (noam, shaked) Redo: grandparent (noam, X) Redo: parent (noam, Z) Redo: parent (netta, X) Unify: parent (netta, lior) Exit: parent (netta, lior) Redo: grandparent (noam, X) Redo: parent (noam, Z) Redo: parent (netta, X) Fail: parent (netta, X) Unify: parent (noam, nir) Call: parent (nir, X) Unify: parent (nir, romi) Exit: parent (nir, romi) Exit: parent (noam, nir) Redo: grandparent (noam, X) Redo: parent (noam, Z) Redo: parent (nir, X) Unify: parent (nir, maor) Exit: parent (nir, maor) Redo: grandparent (noam, X) Redo: parent (noam, Z) Redo: parent (nir, X) Fail: parent (nir, X) Fail: parent (noam, Z) Fail: grandparent (noam, X)

Yesterday I spent some time reading what used to be (and maybe still is) the bible to Prolog: 'Programming in Prolog' by Clocksin and Mellish (aka C&M). I used to own a copy of this book but it disappeared in the great book purge from at least 10 years ago. Now I have it in PDF form which is not the most convenient format but I can live with it. I was looking for a 'real' program instead of the toy queries that I've been running and found a program for the Tic-Tac-Toe game. I looked through this program for built-in predicates that I have yet to implement. There were two: var, which is very simple, and arg which is far from simple. Like the tricky length predicate, arg comes in two flavours, as shown below.

Type A: ?- arg (2, parent (noam, netta), R). Type B: ?- arg (X, parent (noam, netta), R).

Seemingly, the only difference between these two types is that in type A, the first argument is a number whereas in type B, the first argument is an uninstantiated variable. In type A, the number 2 means 'return the second argument to the term parent (noam, netta) in the variable R'. In this case, R = netta. This was fairly simple to program, although it requires accuracy.

Type B however means something different and requires LSG to work properly. The number of answers depends upon the number of arguments in the given term; thus for parent (noam, netta), there should be two solutions, X = 1, R = noam, and X = 2, R = netta. This was extremely hard to program and was extra-tricky. There were two (actually three) difficult tasks to be achieved and I have to say that I had the insights to achieve them correctly.

CoPilot came up with the idea of entering temporary facts into the database then solving them with a temporay goal, but implementing this was far from simple. CP 'went down the rabbit hole' and made this much more complicated than it actually needed to be; I realised at one stage that all that was needed was two facts to be entered into the database - $arg_internal (1, noam) and $arg_internal (2, netta) - then a 'synthetic' goal needed to be inserted into the goal list, $arg_internal (X, Y), which would solve these facts for the required output. A user cannot enter this predicate because the functor name begins with the dollar sign which is illegal in the parser, but the interpreter can add these facts because it adds them directly without going through the parser. I verified that the goal could be solved with these facts.

The second task to be achieved was inserting the synthetic goal into the goal list.  This again went through several unsuccessful iterations until I realised that we were inserting this goal into a copy of the goal list and not into the real goal list that was being solved. As soon as this was understood, the task was easily achieved. Once the query is completed, the synthetic facts are removed from the knowledge base. I think that this removal can be optimised slightly but that will wait for another time.

This insertion of facts and goals is an intriguing technique, and now that it's been ironed out, it can be used again. I am not currently aware of any other predicate that does require this, but now the tool exists.

The third difficult task came about when I was trying to list the synthetic facts - although the clause itself existed, none of the terms within the clause were shown. As soon as I walked away from the computer for lunch, I realised why this is so. This actually is the same bug that happened a few weeks ago that occurs when the interpreter adds clauses to the interpreter when it is solving a query. This is connected to garbage collection; I won't go into details, but again this insight came from me and not from CP.

So CP may have the general idea of how to implement various predicates, but when things don't work, it doesn't have the insight to realise what is wrong. So CP and I make a good team.

Internal links:
[1] 2056



This day in blog history:

Blog #Date TitleTags
53212/01/2013Play it again, SamWoody Allen
79612/01/2015Removing the blinkers (Research questionnaire 6)DBA
79712/01/2015Reinventing the wheelDBA
91312/01/2016Sending complex emails via PriorityProgramming, Priority tips
188712/01/2025Recording "Life as a bell pepper"Home recording

Monday, January 05, 2026

Mud Dauber Nest

The other night, one of our neighbours knocked on the door, asking for some milk. "You've got a wasp nest outside your door", she remarked. I went outside, and above the lintel to our front door and to one side was a peculiar looking thing, attached to the ceiling.

Later on, I took some pictures and uploaded them to my friendly AI, CoPilot, for analysis. This is the response:

Thanks for sharing both images — they’re very clear and helpful. What you’ve got there is a mud dauber wasp nest.

🐝 What is a Mud Dauber Nest?

Mud daubers are solitary wasps that build nests out of mud, typically in sheltered spots like eaves, corners, or ceilings. The nest in your photos:

  • Is made of cylindrical mud tubes, each housing a single egg.
  • Has dark openings, which suggest that some adult wasps have already emerged.
  • Is not aggressive in appearance — mud daubers are generally non-aggressive and rarely sting unless provoked.

🧼 Should You Remove It?

If the nest is inactive (i.e., no wasps flying in or out), you can safely remove it:

  • Wear gloves and scrape it off with a flat tool.
  • Clean the area with soap and water to remove scent trails.
  • Consider sealing cracks or gaps nearby to prevent future nesting.

If it’s active, it’s best to wait until winter or contact a pest control professional.

Fortunately it's not active and I've never seen any wasps flying in or out. One can see in the right hand picture holes through which wasps have emerged in the past. A firm push by my wife with a broom handle dislodged the nest which I caught in a bucket. Indeed, it seems to be made of mud.




This day in blog history:

Blog #Date TitleTags
66605/01/2014End of year bluesERP
110405/01/2018Business rules in Priority which do not apply to specific users/2Priority tips
145505/01/2022Sandy Denny would have been 75 years old todaySandy Denny
157005/01/2023200 best singers of all timeSandy Denny
170305/01/2024End of an eraPersonal, Motorbikes
188505/01/2025Life as a bell pepper (song)Song writing, CoPilot