As opposed to the autumnal weather of yesterday, when the outside temperature reached a high of 11°C, today is warm and sunny, 20°C. Great weather for a walk.
As opposed to the autumnal weather of yesterday, when the outside temperature reached a high of 11°C, today is warm and sunny, 20°C. Great weather for a walk.
Two and a half months ago, I wrote "Of course, I also have to monitor my blood pressure: if it starts rising then I will have to see my GP who will recommend new medication. It will be very easy to see whether his [the cardiologist] opinion is correct.". Well, the swelling in my legs disappeared after a few days but my blood pressure shot up and these days is around 160/100, which is far too high!
I have seen my GP a few times and she has been trying out different combinations of medications in order to reduce my blood pressure. So far, nothing seems to have worked, including the previous medication that I was taking (apart from the one that caused the swelling). In return, I've been suffering from bad headaches about every other day; sometimes my migraine medication works and reduces the headache, but more often than not I am stuck with a headache for hours.
As a result of the combination of headaches and blood pressure, I have noticed that my level of patience has been reduced to about zero, which is making my daily work problematic. I can no longer accept the failings of my fellow workers, whether it is the noise that they make (when I am in the factory) or their inability to think for themselves.
In order to reduce this stress, I decided (along with the advice from my manager) to work a few days from home. Last night, the Israeli government decided on another lock-down to start from Sunday evening (just when I'm about to be vaccinated!) so in a sense I'm simply starting the lock-down a few days earlier. The only real advantage that I have in working in the factory is that I have easy access to a printer, but as I rarely print documents, this sole advantage is completely outweighed by all the disadvantages.
Not only that, yesterday it started raining and hasn't really stopped yet (although the rain is far from continuous). As a result, I am once again sitting by the dining room table surrounded by computers and looking out of the window at the view of the kumquat tree which is currently flowering.
Of course, we will still be locked down, high blood pressure or not, so I will be saving myself the annoyances connected to my physical workplace in the factory.
[Edit] Grrrh! How could I forget "A perfect spy"? Especially since it's so autobiographical. I also enjoy "The Russia house", but to be honest, I prefer the film to the book in this case.
This song was partially inspired by 'The Undoing' TV series that is in itself based vaguely on the book 'You should have known'. I thought that it would be an interesting exercise to write from the viewpoint of Grace, the titular wife and mother who should have known.
I started off with what I thought was the chorus three weeks ago, but this was not much more than a false start; the main idea that remained was that the song be in 3/4 time. Two weeks ago I changed slightly the chord sequence for the 'chorus' which meant that the verse music had to be completely rewritten (the chorus ended on E and the verse started with A minor; now the chorus ended on B and the verse had to start in E minor). Last Friday I was playing around with the song and wrote the verse and the tune, which was centered around the note B; the chord sequence was Em Dm C F, so the B is initially the fifth then the sixth then the major seventh then the augmented fourth: interesting harmonies.
I began sequencing the song with these chords and tune; I added a middle section with a rising bass - B (over Em), C (C), C# (A7), D (Em7). During the week I worked on an arrangement which still was fairly basic. Yesterday I had the time to start writing the words; during the week I had been thinking about the opening 'statement', and once this was down, the rest of the words came fairly quickly, although I changed a few here and there during the next few hours. The arrangement also became finalised, meaning that it was time to record vocals.
These required a few takes but in the end I had what I originally thought would be the vocal track. Listening back to it again this morning, I decided that it wasn't confident enough and certainly was too 'polite', a failure of most of my work. I didn't have a chance to do much about this during the day except think how I could make it less polite. The answer was to sing it angrily, as someone would be who had been duped in the fashion of the book. This evening I got the chance to sing it, as loud and as angrily as possible; I feared that I had recorded the vocal with too high a level, thus leading to distortion, but this worked quite well: slightly distorted and certainly not polite! I didn't bother with autotune as the vocal was near enough in tune throughout, and the autotune would probably diminish the impact. One take, albeit with a punch-in at the beginning, and it was nailed. A few mixes later and I had a completed product.
Unlike some of my songs, I don't mind publishing the lyrics here
How could I have known? How could I have known? True, there were no signs Not even a hint Nothing was out of place You said that life was just fine You were happy with me The sun shone upon us both You had me duped How can love remain? Should our love remain? I thought you were true But in the end You have betrayed me so You took me for a fool Whilst playing the field Leaving me on my own You told me lies Always a face for each person you knew with a Separate face kept for me Recalling each one took a fair bit of skill but now You’ve been revealed as a freak Where does that leave me? What choices do I see? I’m left on my own, Wondering how I can restore my life Trust has been destroyed Certainty lost Leaving me bruised and scarred I stand alone
Because I travelled at a non-peak hour, I had to wait for 50 minutes for a connecting train, instead of the normal 5-10 minutes which was very annoying. Coming back, I had to wait for a 'mere' 20 minutes, but there were more people on the train. One has to wear a mask all the time in the stations and on the train, of course. One is also not allowed to eat on the train (I started eating a pear but was cautioned not to do so by the conductor).
Verdict? It's definitely possible to travel by train but at the moment there's no overwhelming reason to do so.
Now onto the viva. My supervisor (who was 'present' during the entire Teams meeting but was not allowed to talk) said that I acquitted myself well: I wasn't belligerent, I didn't freeze, I didn't waffle and I didn't bluff. But as I have tried to say in the past, the viva is not examining 'me' but rather examining the thesis: why did you do this and why didn't you do that?
I was prepared for that type of question, but I wasn't prepared for the depth of some of the questions. For example, chapter 2 talks about ERP systems: it gives background, reasons for adopting ERP, the ERP life style, comparison of four systems and material on 'horizontal' software. For some reason, the external examiner thought that this was part of the literature review; no, I said, it's to give background. One can't talk about enhancing ERP systems without knowing what an ERP system is. Why did you only compare four systems? Maybe the material on horizontal software is not relevant? I explained why I chose those four systems; I also explained that I felt that if I had left out some of this material, I would have been asked why it wasn't there. You can't win either way.
To cut a long story short, the verdict on the thesis centered on two issues. The framework for developing and deploying enhancements appears "like a rabbit from a magician's hat" (as I put if after the examiners had had their pound of flesh) and does not follow on logically from the literature review. The methodology was not sufficient for their liking, lacking a validity stage.
I was given the worst possible result (apart from failure): either accept a lesser, compensatory, Master of Research degree (that no one has ever heard of, along with a loss of pride) or resubmit the thesis with major amendments, including obtaining new data on the basis of a revised methodology, followed by a further viva. There is no guarantee of passing even after this, and failure here means complete failure (probably with the compensatory degree).
I was stunned; my supervisor was also surprised. My initial comment was why didn't the research committee and the final review pick up on these topics? After the viva finished, my supervisor and myself had a brief chat via Skype; obviously no decisions should be made until the examiners' report is received. He thinks that I should be able to finish the necessary work in under a year.
I took the dog for a walk and considered my position. The best way of looking at things is that I have submitted my thesis to another research committee review and it has been found wanting. The examiners will present a report of what needs to be fixed, so I can work according to this report and create a new thesis that should answer their requirements.
When life gives you lemons, make lemonade.
[Addendum] I neglected to write that the examiners thought that the topic was very interesting and (for some reason) timely. What they didn't say (in my words as I am assuming this) is that it's a shame that it was ruined by poor methodology.
About the research committee: the document that they saw was upto and including the literary review and synthesis along with a certain amount about the pilot study that had yet to take place. If there is any blame to be placed, it is on the review from a year ago. But even then, the reviewer did not see a document resembling the final thesis, which had doubled in size over the past year.
My doctoral viva will start in another four hours. There isn't very much that I can do in terms of preparing material; it's more a question of being in the correct frame of mind. At today is the first of the month, I had several monthly reports to prepare, but as soon as I finished them (remarkably early) at 9:30 am, I came home.
I have just returned from taking the dog for a walk; my headphones were playing songs by Peter Hammill, and as I completed the walk, the song 'Confidence' began. A remarkable co-incidence! Times have changed somewhat since March 2011.
I'm going to read my DBA blogs to get me in the right mood, then I'm going to reread the thesis for what is probably the thousandth time. It certainly won't be for the last time as I assume that the examiners will require some changes, hopefully only minor.
I started off with a modest two bottles (2 litres) a week but I didn't like rationing myself so I started buying 4 bottles a week. My wife has started drinking it occasionally as well as giving some to the grand-daughters so sometimes even 4 bottles doesn't seem enough. There have been weeks when there was no chocolate flavoured milk on the shelves so I bought the equivalent banana flavoured milk. I thought that I would prefer this but the taste is more synthetic and seems sweeter even though it isn't.
On Friday, which is when I make my weekly purchases, I saw that there weren't enough bottles of chocolate milk on the shelf, but there was one of 'nut choco'. In my naivety, I though that this was 'milk' made from nuts (in the same way that there is almond 'milk') with a chocolate flavour, so I was slightly surprised when I saw that it contained 99% 'real' milk. In other words, it's the same chocolate milk, but with an added nutty flavour. As I find the regular chocolate milk slightly lacking (the initial taste is chocolate, but the after-taste seems thin), this addition is very warmly received. It's now become my favourite cold drink; I wonder whether I will be able to buy another bottle during the week.
As this flavour comes from a different dairy, its calorific content is slightly different (51 calories/100 gram) but not significantly so. Intriguingly, it's also cheaper; the regular chocolate milk is 136% more expensive than regular low lactose milk (13 NIS as opposed to 5.5 NIS), whereas the nut version (different dairy, remember) is about 100% more expensive. Maybe this is for an introductory period only; I'm going to take full advantage of this.
And by the way, I'm losing weight again. There were two weeks with a negligible 100 g loss, but on Friday I measured 500 g less than the week before, choco or no choco. The heavy walking seems to be paying off finally.
Today I had two video calls in preparation for the viva that will take place in another few days.
The much more important call was with my supervisor; I thought that we were going to have a mock exam but he started off by saying that there is no point in him improvising questions because probably the examiners will ask something else. He then continued to say that the examiners will not be 'out to get me' and will not ask questions such as 'what did you mean by ... on page 32' and similar. Instead, I should think of the exam as a discussion between colleagues.
One interesting point came out of our discussion today: I feel that I older I get, the more open I am to compromise. There is a lack of 'ego', something that will be very important in the viva, but also in my research itself. I wrote about this in the thesis, albeit in different terms, when I discussed the confirmation bias. Frequently people who 'research' subjects are open only to ideas and statements that strengthen their point of view/beliefs, or as it is commonly put, they only hear things that confirm their original position. In the thesis, I state that I tried to be as free as possible from this bias, in that other people's ideas can strengthen the 'product', whether it is a thesis or an enhancement. The idea is to create the best possible product, utilising everybody's ideas. As I have written sometimes at work, I don't have a monopoly on good ideas. People start from different viewpoints that lead them to differing and sometimes surprising endpoints, and it is often my job to incorporate these various ideas into a whole, introducing a certain amount of synergy.
So, unlike some doctoral candidates (apparently), I am open to whatever suggestions and/or corrections that the examiners may have. We are trying to improve the topic, without regard to who suggests what. I think that anyway one has to lose one's ego to a certain extent when the entire doctoral process begins with the supervisor suggesting various options and changes.
My supervisor advised me to enjoy the experience as it is going to be the only time in which I can talk at great detail about my research with people who are interested in what I have to say.
I said that I doubt that I am going to feel very nervous about the exam: first of all, I will be in my own home and so the surroundings will not threaten me. Secondly, the fact that I cannot fail removes a great deal of pressure; my supervisor mentioned one student who did fail, but that was because he was not prepared to take anyone's advice, not least the examiners'. I am going to view the viva like a meeting at work, when I try as much as possible (and not necessarily successfully) to lose myself in the subject and not get mired down in my personal agenda.
The less important call was to the DBA administrator; this was mainly to check that the Teams software (which will be used for the exam itself) that I installed on my computer works properly. We use Teams at work, but that is within a closed user base, whereas here the meeting is a one off. From what I happened, I see that it is best to open Teams (it takes a long time to load completely) before clicking on the link to the meeting instead of doing it the other way around. That's the reason for having this call!
The administrator closed off by saying that he would see me on Tuesday and that I should try to enjoy the experience as it is going to be the only time in which I can talk at great detail about my research with people who are interested in what I have to say. Does that sound familiar? True, I copied and pasted that sentence, but he did in fact repeat almost word for word what the supervisor said. This must be the party line, in the same way that the text says that 'the doctorate teaches one to become a researcher', and not a world expert in some arcane subject, as public belief would have it.
On to Tuesday!
Day | Month | Year | Artist | Title |
---|---|---|---|---|
16 | November | 1970 | Heron | (eponymous) |
I've written here and there about Heron, the one penny tour and their first record. Today we can celebrate 50 years since I purchased it.
At the time, there was a company that was selling records by mail order; on every purchase one would receive a certain amount that one could utilise in order to buy more records. Being very young and callow, I thought that I could use this amount at the same time as buying records, but the company said otherwise. I remember that I ordered several records - the three record set of 'Woodstock', 'Watt' by Ten Years After, 'Full house' by Fairport Convention and 'Heron', having just seen them. I don't remember now which record became the free one, but I do have a memory of trudging through snow, meeting the postman and asking whether he had a record for me - quite trusting of him. This was 'Watt'; after listening to it, I was severely disillusioned and never listened to TYA again.
But Heron! My original favourites were 'Harlequin 2' and 'Lord and Master', but the second became unlistenable when my record player had 'an accident' and the record became scratched. These were the days of the stackable record player where one could prepare a few records to play and the autochanger would drop each one down in turn. After I ruined two records in this way (Sandy Denny's 'North star grassman' was another casualty), I stopped using the autochanger.
I found this record captivating, but I don't think that I truly appreciated it until I bought the cd and listened to it via headphones. One of the selling points about the record was that it was recorded in a field and so everything (or nearly everything) is recorded live. I can hear a few overdubs in 'Harlequin 2' but they don't really disturb me. It's so live that when Gerald Moore plays some acoustic lead guitar, he stops singing. That said, I've never figured out which guitarist is playing what on 'Upon reflection'.
For me now, the highlights begin with what was the last song on side one, 'Upon reflection', carrying on through 'Lord and Master' (no scratches now!) and culminating in the sublime 'Little angel', although I have to admit that the lyrics of this latter song leave me scratching my head as they don't seem to make too much sense ("so I won't ever know what it is you've been missing"). I love the way that the three singers trade lines between themselves (now that I think of it, this was a feature of The Band), and once, when writing to Steve Jones their keyboard player, I said that Heron could have been the British equivalent of Crosby, Stills and Nash!
My memories of listening to this record are combined with the winter camp of 1970 about which I will write no more, save to say that they are very happy.
Unfortunately, Heron's second album was a disappointment but I have always treasured this jewel of an album and frequently listen to it even now.
First off was the appearance of the great Sunetra Sarker, better known in our family as Dr Zoe Hanna from Casualty. I wonder how many of the people watching this episode know that this is not the first appearance of Sunetra in CF: she had a brief appearance in series two as a possible one night stand with Adam. Maybe she foresaw her medical career with the statement "I'm not going to kiss those" (referring to Adam's testicles) which were black: Adam was then diagnosed with testicular cancer and if I remember correctly, underwent a partial orchidectomy (such a lovely word, such unpleasant connotations). Presumably she is going to have some form of relationship with David; initially a business relationship, but who knows where it might lead.
Even more surprising was the appearance of a young woman in the local court; just by chance Adam happened to be in the public gallery. She seemed familiar to him and eventually he realised: she was a girl that Adam and then wife Rachel (Helen Baxendale) were going to adopt as they could not conceive. As soon as the adoption went through, Rachel became pregnant (with Matt) and so they had to give up the adoption. We even saw a few images of Rachel - she was the best character in CF. One can assume that Adam will make contact with this woman in an attempt to atone for the fact that he did not adopt her ... and so her life did not improve and she ended up selling drugs, hence her court appearance.
Talking of best character, I have been impressed by the character of Pete. He was always at the butt end of everything: not the smartest, not the wittiest, not the most successful. He really has grown and showed in this episode his attention to other people. David's character has also improved over the years, whereas Adam has stayed near enough the same, if not regressed.
I write about these characters as if they were real people: a sign as to how much they have entered my life.
Another television series that promises to be more than worthwhile is 'The Undoing'. The series is based on the novel 'You should have known' by Jean Hanff Korelitz. I am reading the book at about the same pace as the series and it is interesting to note that the entire first chapter of the book, which is about Grace's book ('You should have known'), is not referenced in the series, at least not in the first episode.
Grace is a marriage counsellor/therapist and the (fictional) book is based on her experiences with women who should have seen signs of incompatibility with their future partners but ignored them because they were dazzled by other features, or the fear of being alone was too great (I can understand this from personal experience). Of course, in the book by Korelizt, Grace also should have known various things about her husband.
I purposely haven't read much more of the book as I want to see the television series unfold, but I have a good idea about what is going to happen.
The backdrop of rich, upper East Side women and social comparisons is somewhat tedious and I hope that this is going to disappear. Also, the book is set against a mild backdrop of Judaism that might cause some readers a degree of non-comprehension; this appears to be dropped in the series, not least because Grace's surname has been changed from Sachs to Fraser.
So it's time to hit the thesis and learn it backwards. I have been looking at it on and off over the past few weeks but I haven't reached the meaty part - the methodology and the results - basically chapters 5-8. My supervisor also received notice so no doubt we will be scheduling a mock exam for next week.
For the past week, the weather forecast has been predicting heavy rain on Wednesday/Thursday - and they were right! A few drops fell on Tuesday evening but these were just the preliminaries. It started raining, not particularly heavily, on Wednesday morning, but this cleared up after a few hours, and by the time I drove home in the afternoon, one wouldn't have known that there had been rain at all.
At around 7pm, rain started to fall ... and fall ... and fall. When the news wasn't concerned with the US elections, it was showing pictures of two coastal towns that were already suffering from flooding (this happens every year and nothing ever seems to be done about this). There was heavy rain in our area that continued throughout the night.
At about 11:30 pm, I awoke. I'm not sure whether this was due to the sound of the rain falling on a roof or whether it was because I was having difficulty breathing - I think the latter. I took the CPAP mask off my face and then noticed that there was no sound of air rushing out of the mask; the machine didn't light up, either. In other words - a power cut. Typical: there are always problems with the electricity supply whenever it rains. A message then appeared on our mobile phones, saying that the problem was regional: not only was our entire kibbutz without electricity, the neighbouring moshav was without power either.
I tried to fall asleep but it was difficult, what with the noise of the rain outside and a slightly blocked nose. Eventually the power returned at about 1:30 am and I was able to sleep.
The rain had ceased at some time during the night for there was no rain when I went for my morning walk at 5:30 am. True, there were puddles everywhere, but no water running down from the hill behind us. The rain and the power cut conspired to deprive the kibbutz of internet access so I couldn't access my mail. I assume that this is going to be fixed during the day because I have an internet meeting at 15:30 in which I will participate from home.
Presumably the lack of internet access is also preventing the kibbutz secretary from informing us how much rain fell during the night.
Of course, there will be no more rain for another few weeks.
Edit: five minutes after writing the above, of course it started raining again....
Further edit: 44.5 mm rain fell during the last 24 hours on the kibbutz.
Just over a week ago, I detailed how I transfer strings that begin with a leading zero from my Delphi programs to Excel. Unfortunately the transfer mechanism causes problems with a different type of field: dates. Using the 'csv method', dates are passed as strings, so today's date should appear as 03/11/2020 (there's a leading zero here as well, but Excel knows that this isn't a number because of the slashes). The 'varArray method' has to format the columns prior to data being transferred: I use a constant xlDateFormat that is set to 'dd/mm/yyyy'. Surely this is correct as 03/11/2020 is dd/mm/yyyy.
But no: Excel seems to have a bug that causes the month and day to be swapped as long as the day is not greater than 12. So 12/11/2020 would appear as 11/12/2020 (American format) but the following day, 13/11/2020 would appear as 13/11/2020, which is apparently a month before the day that precedes it!
The initial solution was to use a different value for xlDateFormat: d/m/yyyy. This causes today's date to appear as 3/11/2020 which is much better than 11/03/2020 but still not totally correct. Writing this blog entry has caused me to wonder whether there is a better solution (drum rolls, please).
Counter-intuitively, the optimal solution is ... not to format date columns! 03/11/2020 appears as 03/11/2020. I live and learn.
I'm going to deviate from my normal topics for this blog and write about something at work, in the hope that I might better understand what has happened.
Sometime around the end of March (when we were locked down and working from home), the factory in Karmiel took on a new worker whose job was never clearly defined to me, but turned out to be responsibility for improving work methods in the metal division, primarily with reference to Priority. In other words, this new worker and I interfaced on many levels. He came with a background of working in other companies in similar areas so presumably knew a thing or two.
Almost immediately came the clashes between us. He wanted to change almost everything regarding how the metal division is implemented in Priority (processes, actions, work centres, warehouses) as well as how the reporting itself is done. Whilst some of the changes were necessary and overdue, some of them seemed unnecessary and would lead to the imposition of even more overhead than exists today.
My biases are already becoming apparent in that previous sentence: something with which I agree is fine, but something with which I do not agree is unnecessary. Several times I tried to persuade this employee to write a complete business plan so that it could be scrutinised and criticised but this never happened. During the single day (in June) that I spent in the Tel Aviv offices since March, I had a meeting with both my manager (the CFO) and the managing director, trying to explain why some of the proposed changes were not good. In fact, they were not proposed, they were already on the way to being implemented. The Karmiel factory manager also participated in this meeting - he had been charmed/seduced by this new employee and was prepared to back every single move. Their attitude was that I was complaining due to 'sour grapes', that this new employee would succeed where I had failed and because of this, I was determined to bring him down, so that he would not be more successful than I.
Is this true? I sincerely hope not. Throughout the months that followed, I tried very hard to separate any personal thoughts that I might have had from professional criticism. I was forced to complain a few more times - especially after blitzes of emails - and was told that it is good that there is someone who is trying to move this most stubborn division forward. I cannot disagree with this aim, but there are ways of achieving this.
This person several times told me that he was a "bulldozer" and would succeed in both passing his reforms and getting them implemented. I have kept on the sidelines for the past few weeks, not because that I am trying to show that I am waiting for him to fail, but because I want to let him have a free run, letting others make the criticism. Does this mean that I am waiting for him to fail?
Anyway, yesterday I was very surprised to receive an email from my manager telling me that this employee had decided to quit at the end of the month.
How am I supposed to feel? To gloat over the fact that most of my predictions came true? I don't take any pleasure in being a Cassandra. So much for being a bulldozer who sees projects through to their end. I don't what the reasons were that caused him to quit - they may be entirely personal reasons with nothing to do with his job. It doesn't really matter; what I want to know is who is going to pick up the pieces and continue with all his changes that are in mid-flow, or who is going to revert them to how they were. At the moment, changes in processes, etc, are causing more problems than they are solving.
I don't want to say to anybody "I told you so" but maybe I don't have any option. There is nothing to be gained from doing so, but this is going to be very hard to escape from if I am the person who will be required to assess the damage (I don't see that any progress has been made).
There is supposed to be a meeting held today, one of a series, whose topic is improving the output of the factory. Most of the time the discussions are about the arrival and installation of new equipment and the changes that these new machines will cause to our work methods, but I have no doubt that time will be devoted to this change in personnel. Due to a pressing personal reason, I cannot participate in today's meeting. It has happened before that meetings have been rescheduled because I couldn't participate at the given date or time, so it might be that this meeting will be rescheduled for the afternoon.
As always, wait and see.
[Update from a few hours later] The meeting has indeed been rescheduled for Wednesday.
I thought it appropriate to give an example where my well- meaning advice was totally ignored. The person wanted stations on the shop floor to report production as they finish each job (good). To this end, he requisitioned a computer for each station, each armed with a bar code reader, and connected to the wired network. At one stage it appeared that each station would require a separate Priority license as well as a network license. A few months earlier, I had implemented a similar system for on-station reporting using wireless bar code readers that would broadcast their barcodes to one central computer; each message that the readers would send would include a prefix identifying the reader (in other words, the worker). This solution would be cheaper and easier to implement (in my humble opinion); this suggestion was totally ignored. It rose again in a meeting a week or so ago when one manager had visited another factory and saw how they were reporting, using wireless bar code readers. Why should 'the person' ignore this suggestion? Because someone else suggested it? Because I suggested it? Maybe this suggestion can be used now that he is going.
I see that I haven't written on the topic of Excel and automation for two years - I must be doing something right. In the management program that I wrote (and always extending) for the OP, there is frequently a need to output data to Excel. In order to facilitate this, I wrote a few standard routines that extract data from some form of query (this could be a clientdataset, an SQL query or a 'simple' query, hence the need for a few routines): these extract the data and output a CSV file along with column headings. Another routine is then called that inputs the CSV file into an Excel spreadsheet and displays it.
There is a well known problem with Excel - fields that appear to be numeric but are actually alphanumeric have leading zeroes truncated, as Excel 'thinks' that the field is numeric. In the OP's world, this problem applies to identity card numbers: many (including mine) begin with a zero (mine begins 0176), and when a csv file with this number is inserted into a worksheet, the field displays 176. Until now this hasn't been a problem, but a new (and somewhat nasty and patronising psychologist/analyst) has been working on data output from the management program and it annoys him that the leading zeros from identity numbers are being dropped.
My first solution was something similar to what Priority does: surround the field with quotation marks. I innocently thought that Excel would not display these marks but that's not the case. My 'solution' probably annoyed this psychologist even more as now he had to contend with strings like "0176". I had to find another solution.
Theoretically the problem could be solved easily by formatting the column that would hold the identity numbers, but this is a chicken and egg problem: formatting the data after it has been read in doesn't help as the leading zero has already been stripped, and formatting the column before reading in the file doesn't help because a new sheet is always created with the data. I thought that I might be able to hack the problem by including a non-displayable character before the string but this didn't work either.
Excel does have a method for inserting data into an existing spreadsheet - I used to see this frequently when trying to input text files - via a wizard that helps the user to insert the file correctly, handling character sets and delimiters with ablomb. I recorded the process as a macro but there were too many problematic statements for me to translate into the required Delphi format so I discarded this approach.
Then I remembered that I already have implemented a solution - the varArray approach. This allows one to create a sheet, format its columns then input the data in an 'underhand' manner. I adapted the code that I already have in one module to the module where I need it, and lo and behold, the leading zero problem had been solved.
I then removed the new code from the module and inserted it into the same general utility module that contains the other Excel routines. This required a few minimal changes and now there is an alternative method for exporting to Excel that both solves the leading zero problem and doesn't require an intermediate file.
After I reported on this improvement, the annoying psychologist condescendingly wrote to me to make sure that nothing else has been affected by this change. Obviously he's never heard of modular code.
So the space on the wall became vacant. At various stages the 2019 bozouki and one of my mandolins have occupied this slot. Over the last few months I've bought a few new (to me) instruments and something told me that maybe now is the time to buy a 'proper' bass guitar.
There are two main sources for buying instruments in Israel: one is a company with maybe ten or more shops throughout the country (I bought the Fender 12 string from one of the branches). I had a look at their web site, but the basses displayed there were far too expensive for my modest needs. Maybe they have cheaper items in the shops but I'm not about to visit one (because of the Covid lockdown that has now be relaxed somewhat). There is a music shop in Bet Shemesh but I don't know whether they are open let alone whether they have a suitable instrument. The other main source is a company whose main shop is in Jaffa - I bought the Washburn semi-acoustic here. Their web site was much more promising, with a variety of basses suitable for any pocket. They also offer a 40% discount and no delivery charge, making their goods very attractive.
Finally some news! The DBA coordinator informed me a few days ago that a tentative date for my viva exam has been set - 26 November. Apparently the external examiner had been unwell for some time (I don't know whether this was due to Covid-19 or something else, and it doesn't really matter).
Coincidentally, someone approached me via LinkedIn: it transpires that this person completed his doctorate at EBS earlier in the year, with his viva taking place via Zoom (or similar). When I informed him that I now have a tentative date and that I was going to start rereading the thesis, he pointed out that the examiners will probably ask about things that aren't in the thesis.
As it happens, I spent a few weeks at the end writing about topics that might have been expected to appear in the interviews but didn't (section 7.6, data lacunae) as well as hindsights obtained after completing the research and thesis (this section refers to section 7.6), so these sections should be good preparation.
Incidentally, the person from LinkedIn has chosen an unorthodox abbreviation for his doctorate: DrBA instead of DBA. This is a good idea as it differentiates between a DoctoR of Business Administration and a DataBase Administrator. In my line of work, I'm more likely to encounter the second type of person.
The previous installment of this story had the application displaying people's names in unicode and allowing them to be edited. This means that the remaining parts are to read in the INI file that contains the answers from the user and then display them, via HTML and thence to Word.
Once the database issue had been settled, it was much easier to continue porting the application. I restored the 'edit person' screen discussed in the second episode of this series to use data aware components; there was no need for tricks using 'cast' as the text was now unicode. Reading the data file, including Russian, required no changes that I can recall.
Creating an HTML file that could be sent to Word required a few changes. Until now, I have been using the 'AnsiToUTF8' procedure whenever I wanted to output Hebrew; this is now superfluous so I had to remove all these calls. I also had to update all the Hebrew that was embedded in the program code. Once I had an HTML file that displayed correctly, I tried to export to Word; I received a mysterious error message, informing me that my file could not be found. Initially I thought that this meant my HTML file, but then I realised that it meant that the template could not be found. Once I updated the template, I could export the data to Word.
Conclusions for next time:
Every day I've been checking the Priority cross referencer and fault analyser (XPrioRef) against a variety of my own procedures and every day I've come across new constructs that have to be handled. Yesterday I came across a real doozy (as Ned from 'Groundhog day' would say):
INSERT INTO PART SELECT * FROM PART ORIG WHERE PART = :PART;
In July, I wrote: During the lockdown, I noticed that my feet - especially the right foot - were swelling up, and it was painful to move them. Although that extreme swelling has not returned, I still see every evening that my right foot is somewhat inflexible. It often happens that by the time I return home from work, my feet and legs are like two blocks of wood. Fortunately, exercise - walking the dog - helps, as do my sport shoes, so I don't suffer so much in the evenings.
The final stage in the diagnostic sequence was a visit to a cardiologist. He asked me all kinds of questions, looked at the list of medications that I take and examined the various test results. His opinion is that the swelling is a side effect of one of the medications for lowering blood pressure, and so his recommendation is to stop taking the medication. The daily swelling should cease in a day or two. Of course, I also have to monitor my blood pressure: if it starts rising then I will have to see my GP who will recommend new medication. It will be very easy to see whether his opinion is correct.
I spent quite a few hours on Saturday working on the application that I discussed here. I started off by working on the database again: I wrote a program that would export the forename, surname and primary key of all the records to an INI file (this is with Window 7/Firebird 1.5, so there are no problems with unicode). Once I had this data outside of the database, I dropped those two fields then redefined them, this time with WIN1255. I then wrote a simple program to repopulate these fields from the INI file. So far so good.
On to the mobile computer with Windows 10, Delphi 10.2 and Firebird 2.5. As I seemed to be unable to use the clientdataset component, I was forced to use a simple query to access the data then display it by means of a listview component. The 'cast' trick worked well and now I could display all the records. I worked on the code to filter these records, and when that was done, I worked on a screen in which the user can edit personal data. As I couldn't use the clientdataset component, I had to create a screen with non-data aware components; this means extracting the data from the database with a query component then loading the data into the appropriate edit boxes. Should the user decide to accept the changes, the data from the edit boxes would be written back to the database with another query.
This update query was actually a piece of serendipity: when I edited a person's name then wrote the data back to the database (into a field defined as WIN1255), the field in the database became gibberish. Of course! The solution was to add two new fields to the database table defined with character set UNICODE_FSS; the update query then wrote the data to these two fields correctly. But that's not much use if I want to use the WIN1255 fields in the main screen, so I wrote a simple query that updates the WIN1255 fields with the data from the UNICODE_FSS fields cast as WIN1255 (i.e. the reverse of what I had done previously). This actually worked first time!
Then I faced the problem of updating the tree view with the new data: I used the same approach as I use with a grid, namely delete the current record, extract the data for the new record from the database then add it to the list view. This worked on the second time - because I forgot to delete the current node first time around and so caused a key violation.
Whilst walking the dog, I wondered about the clientdataset component: I'm sure that it worked at some stage before I got bogged down with unicode issues. I decided to remove the Delphi installation completely then reinstall; this took a fair bit of time, but once it was finished, the clientdataset component resumed working. So I saved the list view version of the program in a different directory for backup purposes then set about restoring the grid and db controls - this went very quickly. Due to the unicode issues, I decided to continue using the new version of the 'edit person' screen with its non-data aware controls; my approach wouldn't work well with data aware controls as the data is read from one field but written back to another field.
The next stage will be to see what happens when the unicode INI file containing the Russian text is read. I may have to defined duplicate fields with character set UNICODE_FSS for this data. Supposedly the database knows in what language the user completed the exam as there is a language field in the 'people' table, but this field is always empty. I shall ensure that this field receives a value when there is Russian text so that the correct field in the 'results' table will receive the text and eventually be displayed.
With regard to the clientdataset, I wonder whether fields defined in the program (i.e. using the component in 'standalone' mode, not connected to a database) are automatically unicode. This isn't an issue for this program but it will be for the next program that will undergo porting.
And here is the answer to my question about unicode (someone had asked before me):
You cannot store unicode characters in a field with the ftString field type, you should use the ftWideString field type. Data disappears in a field with ftWideString field type because the size of this field is zero by default. To solve this problem, you should set the Size property of this field to the value more than zero.
As a result of being at home, I decided to change my cooking/eating habits: instead of making a pot full of chicken breast or meat balls with vegetables for the entire week, I bought a 'plank' of salmon, cut it into portions and every day I would bake a portion in the oven, served along with steamed vegetables.
The recipe is extremely simple: spread a sheet of baking paper on an oven pan, drip a few drops of olive oil on the paper, rub a salmon portion in the oil and leave it with the skin upwards. Bake in the oven at 180°C for 15 minutes. Serve along with steamed vegetables. Simple, nutritious and above all, tasty.
Next week it's back to the office so I'll get out the trusty slow cooker and cook up a batch of meat balls and vegetables.
Possibly the simplest exam in the Occupational Psychologist's armoury is a program that requires the user to list 20 phrases that describe herself ('I am ... ') and 20 phrases that do not describe herself ('I am not ...'). The program displays itself in four languages - Hebrew, English, French and Russian - but until recently, the output that the user entered appeared as either Hebrew or English. We bought a 'Russian' keyboard and added Russian to one computer, in the naive hope that words that the user types in Russian would appear as such in the output file (an INI file).
Extremely naive: the output file consists of question marks where there should be Russian. After researching the topic, it turns out that the output file should be opened as follows
Old style: datafile:= TIniFile.create (ffn); New style: datafile:= TMemIniFile.create (ffn, TEncoding.UTF8);
I spent several hours yesterday and today working on the Priority Procedure Cross Referencer and Fault Analyser (PrioXRef). I finished off the deceptive assignment statement (:C = (:B = 1 ? 2 : 3) initialises :C but it does not initialise :B) then continued working on other kinds of statements. I noticed that at one stage, some variables were being marked as unused after their definition, which I know is wrong. It turned out that the code that reads comments was not working correctly and caused the program to skip over a large chunk of the program. I wrote a routine that sort of works but I wasn't happy with this and tried to find a better solution.
The problem is that two characters have to be detected in order to end a comment (*/) and my routine had great difficulty in doing so. It doesn't help that I often used long comment lines (like /****************/ to mark sections in my code: these were causing the problem. After thinking about the problem for several hours, I decided eventually to 'cheat': I used the Delphi function pos that looks for a substring in a string, making the detection of */ very easy. Thinking about it now, this is hardly 'cheating' as I am using several other Delphi constructs, but the idea was to write the lexical analyser using standard Pascal as much as possible.
For all the help that PrioXRef can bring to the table, there are still areas that can give a programmer grief. I have just spent a frustrating hour trying to figure out why an interface procedure that I wrote several months ago had suddenly stopped working. The interface is for the SUPPLIERS screen and naturally uses fields from the eponymous table. I eventually discovered that the problem was that I was accessing the default purchase order type, a pointer to which is held in the table SUPPLIERSA. There was no record in this table for the supplier that I was testing and so my query result was empty. The rationale behind extension tables (such as SUPPLIERSA) is that one can define for this table fields that are used by only a subset of the suppliers and so save space in the database.