Friday, August 30, 2019

Priority tip: beware of linked files when checking in Windbi

A few days ago, I was trying to debug some code which I had added to an existing procedure. The idea was to check whether a given part had ever been returned by a customer, so the code was something like
The code seemed correct but didn't work. I opened a WinDBI window to check my code, and of course it worked properly there. What could be wrong?

The answer came, as always, when I was doing something else (maybe I went to make a cup of tea) - check whether the DOCUMENTS table had been linked. Should this be the case, there will only be a record or two in this table, so it's fairly obvious that the record which I'm checking for won't be in the (linked) DOCUMENTS table and so the above will return true.

DOCUMENTS was indeed linked - but as it was at the beginning of the procedure, the line wasn't displayed on the screen and as I wrote, I was adding this check to code which I wrote some time ago and had forgotten the small details. No wonder I had forgotten to check this. The fix, of course, was simple
One simply gives the table an alias which ensures that the real DOCUMENTS table will be used. There are no links in WinDBI so the real table will always be used. This problem is similar to the one described here, so the moral is if something doesn't work in a procedure but does work in WinDBI, check for linked tables. It's so easy to forget.

Tuesday, August 27, 2019

Yet still more doctoring

My last post nearly ended with the words [my supervisor] will look at it over the weekend and provide feedback on Monday.  I actually received the feedback on Sunday: there were two specific issues which have to be addressed, and the feedback ended with these words: apart from [those issues], let's submit and get another pair of eyes on the document. So my supervisor thinks that I've finished!

I added more material to the final section, which I wrote about here, just over a week ago. 

In the final days of writing this thesis, I came across the book "Grit: The Power of Passion and Perseverance" (Duckworth, 2016), which defines 'grit' as passion and perseverance for especially long-term goals. There is no doubt in my mind that one has to be exceptionally 'gritty' in order to complete a doctorate: one has to begin with a passion for knowledge and then persevere over years in order to achieve the goal of completing the doctorate. This statement can be presented as the following 'equations': 

talent x effort = skill
skill x effort = achievement 

I have learnt how to perform a literature search, how to download the suitable papers (not always a simple task), how to read them and how to extract their importance. I have learnt how to weave together a tapestry of arguments from the knowledge extracted from those papers. I have learnt how to write (and rewrite) a long document which is patched together over the years and how to work with an editor (i.e. supervisor). Most importantly, I have learnt to persevere: almost all of the tasks which I perform both at work and at home are short-term, varying in duration from fifteen minutes to a few weeks. Aside from parenthood, this doctorate has been the longest ever project in my life and at times has been managed as a project, sometimes requiring me to allocate blocks of time in order to keep moving forward whilst simultaneously achieving other shorter term goals.

It was the OP who showed me the book 'Grit' in its Hebrew translation during our weekly meeting on Friday; I found a copy in English and read it over the weekend. The book is divided into three parts, and the first was enough for me. I found that the second and third parts were repetitive, repeating the message for those who hadn't cottoned on yet. 

I wrote many years ago about how school used to be very easy for me until about the age of 14, and how it wasn't until 1977 that I felt confident and more importantly, prepared for the second year university exams. Reading 'Grit' put things into perspective: until about 1970, my memory and ability to understand things quickly enabled me to glide through school. Other students weren't so well endowed and had to put effort into learning; I didn't. It was only a few years later that I developed enough grit (perseverance) to finish university with a good enough grade. 

Duckworth writes that one develops more grit as one grows older and I can definitely attest to that! I started the doctoral programme in 2012 so it's been seven years and I still haven't finished (although I'm very close). I doubt that I would have had sufficient grit in earlier years to last the distance.

Angela Duckworth is a respected psychologist; it turns out that she was a graduate student studying under Martin Seligman, about whom I have written in the (distant) past.

Saturday, August 24, 2019

Conclusions about what isn't being said

The other day, I started rereading "The cardinal of the Kremlin", which is one of Tom Clancy's better novels (still, it could do with some strict editing that would remove 15-20%). What caught my attention this time was Jack Ryan's role as an analyst, where he says something like "it's not so much my job to analyse what was said, but rather to analyse what was not said". It's always easier to look at what there is as opposed to looking at what isn't - what is being hidden, what isn't being shown and so on. This attitude percolates down to SQL where almost all queries select data which is stored within the database; it's harder and less intuitive to find what isn't there (for example, customers who haven't purchased anything in the last year).

With this on my mind, my attention wandered to the conclusions chapter of my thesis, where I had analysed points which had become clear during the interviews. I now thought that it would be a good idea to discuss points which hadn't arisen, for example inter-departmental co-operation. Continuing this train of thought, I realised that I should take each topic which had been presented in the literature review and discuss their influence on the results. This gives the section a structure, which is always important, but also gives an answer to a question which might be asked in the viva interview: why did you present literature on a given topic then not discuss it in light of the interview results?

The material which I had written previously provided about 50% of what was needed; having the structure of the literature review topics made it easier to focus on what could be concluded. Whilst doing so, I noticed one point that would be good for the 'recommendations for future research' section - business competence of IT workers. I started looking for papers on this topic and found several, although I have yet to read them and so do not know how relevant they will be to the thesis.

My supervisor had written that he intended to look at the current version of the thesis on Friday, which was the same day that I had this insight. I quickly posted a note to our message board, saying that I intended to restructure this section, which is one of the critical ones. In the evening, I saw that he had posted a note to say that he would wait for the new version. I uploaded the thesis and was rewarded with the comment that he will look at it over the weekend and provide feedback on Monday. So now I leave the doctorate for a few days and concentrate on other matters.

Sunday, August 18, 2019

What I did on my weekend

A few random notes before getting to the meat of this entry.

I repeated the 'beef stir fry' for Friday night dinner; as there were more diners, of course there was more food, but the wok was big enough. The dish went down very well so this will definitely be repeated. I'm still a bit wary of the sweet chili sauce - I would prefer something else but have yet to find something suitable. I wonder whether I should cook this in advance (a few hours, not a few days) and keep it warm in the oven, so that I don't have to tend a smoking wok when I could be on the floor playing with my (second) grand-daughter.

At the pool on Saturday, someone remarked to me that I am swimming much more than last year. Someone else said the same thing the week before. I find it interesting that people note how much I swim and are capable of comparing the number of lengths. Yes, I am definitely swimming more this year, and as I have commented before, it's much easier this year. I don't know whether this is directly due to loss of weight - it's probably more connected with improved stamina. Yesterday I swam 32 lengths without a break; I had to stop because of the urination issue. Last week I carried on swimming after a toilet break, but I was very tired when I got home, so yesterday I decided to stop before the urination. I wasn't particularly tired at home afterwards.

I have been walking longer distances - yesterday, I walked 4.85 km - in 46 minutes, which works out as 9:29 min/km or 6.32 km/hour. The further I walk, the faster I walk. Thinking about this on the way back (before I knew my speed), I realised that the reasons are (as economists would put) the unavoidable fixed costs (initial stretching and getting up to speed; the dog looking after her needs) take the same amount of time whether I am walking 2 km or 4 km, so their influence decreases the longer one walks. Also, the first kilometer of the walk has me going up a hill then down a hill, so a walk of two kilometers is going to be very hilly. After the hill, there is a stretch of just under 2 km which is flat, so obviously I can walk fairly fast here. By the time I get to the final kilometer, which has me walking up a hill, I am walking fast enough to overcome the difference in elevation.

My weight has now gone down to 77.2 kg!

But what I really wanted to write was this: after receiving some belated feedback from my doctoral supervisor (he had to undergo emergency surgery on his eye in the middle of July), I spent several hours working on the doctorate. He advised me to make an automatic table of contents: I had to learn how to do this although theoretically it was quite simple. For some reason, the toc displayed right to left which was very annoying; it took a while to figure out how to overcome this. Now, if I add more material, I only have to instruct the toc to recalculate the page numbers, which it does. I extended the technique to figures and tables; again I had the right to left problem. Here, for some reason, the page numbers didn't recalculate correctly so I had to change them manually. A big advantage of this is that the toc also displays in a window on the left hand side of the screen, which makes it very easy to navigate between sections. The final thesis will be in PDF format, so this advantage will be lost.

Apart from adding material to almost all the chapters, I added a new section at the very end, which I am going to quote here.

7.6 Personal reflections on the research
This section aims to reflect on the researcher’s personal experience over the course of this study. Even though there are many SMEs which use ERP systems in Israel (a majority appear to use Priority), there is very little interaction between the companies and so one often feels as if one is operating in a vacuum. Even though user conferences are held bi-annually, these tend to be focused on technical advancements by the implementing company which frequently are of little interest to those companies which use the system, whereas topics which are of interest to the users are not considered sufficiently 'sexy' by the implementing companies. For example, whilst the development tools are sufficient to create sophisticated enhancements, their interface has not been updated for a decade and their documentation is lacking.

Conducting this research enabled the researcher to realise that he is not alone and that other companies suffer from similar problems. Whilst deriving some consolation from this, it doesn't help in overcoming problems such as user resistance.

Researching the literature was at times frustrating and at other times very interesting.  Much intellectual satisfaction was derived from reading the literature and viewing it in a critical manner. What was apparent though is that very few users and/or system managers use ERP with reference to academic literature about ERP: everyone gets on with the job in what each considers to be the most suitable method. Many potential participants did not understand the intellectual reasons which lay at the basis of this research, and this lack of understanding may well be one of the reasons why they declined to participate.

There appears to be very little cross-fertilisation between academia and industry in this thesis' topic. This has caused a certain amount of disconnection and alienation for the researcher who views, as a result of this research, the ERP system and its usage in vastly different terms from most of the users.

It is not clear what impact this thesis will have on the researcher's professional future, especially considering his age (approaching retirement). Will the researcher continue in industry, trying to implement the conclusions of this research by improving the chances of enhancements to be utilised and thus approaching the dream of realising all the power of an ERP system? Will the researcher turn to academia – problematic considering that this research does not fit into the domain of any conventional university department? Will some form of hybrid solution be found: writing academic papers whilst continuing to work in industry?

What is clear, however, is that the prolonged period of doctoral research has answered a deep need in the researcher's life for intellectual stimulation.

Tuesday, August 13, 2019

Night walking (2)

Due to various commitments, I couldn't start yesterday evening's power walk until just after 8 pm, at which time it was already dark. So after putting the new collar on the dog, I turned it on so it was glowing bright red. I also turned on my head band torch.

After about five minutes of walking, I bumped into two other groups of walkers: two sisters coming home, and mother and daughter going out. The only illumination that both groups were using was their mobile phones - a poor source of light, and one has to hold it. My mobile phone is safe inside my trouser's pocket. They were all appreciative of my torch, but especially appreciative of the dog's collar.

I don't know whether it was because of the hour and relatively less humidity than most evenings, but I set a new record for distance walked this year (4.56 km) and surprisingly walked this distance at an average of 6.2 km/hour (44:19 mins). This is very encouraging. I haven't weighed myself the last two days, but on Sunday I saw that I had lost more weight, weighing in at 77.7 kg. The walking and swimming is paying off.

Friday, August 09, 2019

Beef stir fry

I saw a recipe (in Hebrew) for a beef stir fry the other week; it seemed interesting, and as I knew that tonight only my wife and I would be dining, it would be a good time for experimentation. I bought 500g of sirloin (in Hebrew, 'sinta'), cut into small strips by the butcher, which saved me having to do so.

About two hours before the meal, I unpacked the meat and gave it a light marinade of sweet chili sauce. Then I cut up vegetables: frozen green bean, carrots, yellow bell pepper, pumpkin and onion. I poured a few drops of soy sauce onto the pieces then put them in the fridge.

When it became clear that supper time was approaching, I heated some oil in the wok then added the strips of meat. I cooked the meat for about five minutes, turning it frequently to ensure that all the pieces had been cooked, at least to some extent. I then removed the meat from the wok and stored it in a glass dish.

Starting again with an almost clean wok, I added a little more oil, then added the onions and after a minute of two, all the vegetables. These had to be steamed more than fried, so after a few minutes of high heat and being turned frequently, I reduced the heat and covered the wok.

I steamed the vegetables for a few more minutes, occasionally lifting the lid and turning the vegetables until they were reasonably cooked. Obviously some of the vegetables - primarily the carrot pieces - weren't going to be cooked in this short period, but the idea was to cook them slightly whilst leaving them firm, providing crunchiness in the final product.

Finally I added the meat strips to the wok for final cooking. At the same time as the meat and vegetables were cooking in the wok, I prepared noodles. I've never done this before so I had to follow the instructions on the package: two cups of hot water to 50 g noodles, leaving them to sit for four minutes.

When I judged the food to be ready, it was time to serve. The final result was better than I expected, although next time I won't use sweet chili sauce but rather something else for a marinade, maybe something 'nutty' (although I'm not familiar with such a sauce). The final picture didn't come out too well because of the lighting: the portion was slightly more colourful than a brown lump.

I knew in advance that 500 g meat would be more than enough for two people but I ordered this amount of purpose so that there would be enough food left over for a few more days.

Thursday, August 08, 2019

Night walking

I've been very busy in the past few weeks, although not with anything worth writing about. Despite the heavy schedule, I've managed to fit in a long walk (3.75-4.15 km) every evening. Due to the heat (and sometimes the schedule), I've only been able to start walking at 19:30, and as the days are getting shorter, the final part of the walk has been in the dark.

I became aware of this problem a few weeks ago and decided to purchase a few items to make the walk safer: a 'head light' for me and a flashing collar for the dog. Five minutes with Ebay sufficed to order what I needed.

This is what I bought for myself: as always, it looks better in the picture than it does in reality. I think that the lamp appears here to be slightly larger when compared to the head band than what it really is. The lamp can be angled so that it points at the path just in front of the walker as opposed to lighting up the general area. I haven't decided which is better: I think that it's more important that approaching vehicles see me (there are very few at the time when I walk along the way) as opposed to lighting my path.

There are a few settings for the lamp: strong, normal, flashing and off. I used the strong setting but I may reduce it to normal.

The dog collar also comes with a few settings: quick flashing, slow flashing, completely on and completely off. I ordered a red collar which I set to quick flashing. I took a few pictures of the dog with the flashing collar but they all out without the flashing. I'm not too sure whether the collar is sufficiently visible in the dark as the dog's ears seem to mask most of the light. 

Tonight was the first night that I needed the lamps, and then only on the return leg.