Wednesday, March 29, 2017

The label number bug

Priority, in common with old fashioned versions of BASIC or even Pascal, has labels which are numbered. A label is the target of a GOTO or LOOP command, and unfortunately is the only loop control structure available to the Priority programmer. One feature which distinguishes Priority labels from BASIC labels is that in BASIC, each label has to be unique, whereas in Priority, one can use the same label several times in the same procedure/trigger. This normally helps, as I can copy entire loops out of one procedure then paste them into another without causing a syntax error. Unfortunately, of course, there is a downside to this.

Consider a post-update trigger which I wrote some time ago and started misbehaving a few days ago. It used to start like this:
GOTO 99 WHERE :$.BRANCHNAME <> '400'; #INCLUDE ORDERS/YYYY_BUF1 GOTO 1 WHERE :$.ORDSTATUSDES = :$1.ORDSTATUSDES; /* do something */ LABEL 1; GOTO 99 WHERE (:$.BRANCHNAME <> '400') OR (:$.MODELNAME IN ('CAD', 'F2D')); ... LABEL 99;
I was looking at this trigger the other day when it occurred to me that there was no point in checking the value of BRANCHNAME twice: if it's not 400, then execution should go to label 99, which is at the end of the trigger. So I deleted the second comparison of BRANCHNAME which occurs just after label 1. Today, a part of the trigger executed, despite the fact that BRANCHNAME <> 400. What happened?

It took me a while to figure it out: I had been bitten by the 'label number' bug. The second line in the snippet above includes a second trigger, and when I looked at that trigger, I saw that the final line in it was LABEL 99! In other words, the effective code was this
GOTO 99 WHERE :$.BRANCHNAME <> '400'; /* INCLUDE ORDERS/YYYY_BUF1 */ GOTO 99 WHERE :$.BRANCHNAME <> '400'; :YYYY_TOTO = 0; /* do something */ LABEL 99; /* end of ORDERS/YYYY_BUF1, back to the original trigger */ GOTO 1 WHERE :$.ORDSTATUSDES = :$1.ORDSTATUSDES; /* do something */ LABEL 1; GOTO 99 WHERE :$.MODELNAME IN ('CAD', 'F2D'); ... LABEL 99;
What happened was that the first line of the second trigger once again checked the value of BRANCHNAME, and because it was not 400, execution jumped to LABEL 99 which is at the end of the included trigger. But in the context of the first trigger, LABEL 99 was not at the very end of the trigger, but rather in the middle, so when the comparison :$.MODELNAME IN ('CAD', 'F2D') was executed (and failed), part of the trigger executed, even though it was not supposed to.

Moral of the story: each trigger should use its own labels, especially for 'procedure end'. I have changed the labels inside the included trigger to be 888 instead of 99. This really is only a problem when the trigger is a 'buffer' - common code which is called by other triggers - but one can never be sure. The entire problem would not have arisen had the final line of the above trigger been the inclusion of YYYY_BUF1; true, there would have been an unnecessary extra comparison of BRANCHNAME, but that's better than having code mis-execute.

Tuesday, March 28, 2017

Priority tip: creating business rules with functions

Priority comes equipped with something called a 'business rule generator'; this allows a user to define actions to be taken dependent on certain conditions, without having to program a trigger. For example, in the 'Customer Shipments' screen, I defined a rule
If 'Billable?' is equal to N 
and 'To ConsignmtWarehs' is blank
then Display error message
"Not able to close shipment form when 'billable' is not set"

(this is a rough translation of the Hebrew text). One is able to set up to three different conditions (in the rule above, the first condition is that field 'Billable?' is equal to N), which is sufficient for most cases. Unfortunately, every now and then, one would like to write a rule which is dependent on four conditions, or one condition is complex (e.g. display an error message when the agent number is not '031' or '046', where the numbers are not contiguous).

I'm not sure that I have a solution yet for four conditions, but I have discovered (by means of the Israeli Priority Users Forum) a technique for complex conditions. Existing functionality enables one to define an expression to be used in a condition, but as usual, this functionality is only partly documented.


One presses the button marked in yellow to display an 'enter expression form'.


Pressing any of the buttons on this form brings up data connected with dates - for example, the documentation shows how to use an expression to display an error message when the supply date of an order is less than five days from today.

In order to display an error when the consignment warehouse is not one of the values '23' or '999', one has to do the following: the rule has to read 'Display an error message when the value of consignment warehouse differs from', with the following expression

(:$.TOWARHSNAME IN ('23', '999') ? :$.TOWARHSNAME : '!!!')
Translated into English, this means: if the value of 'consignment warehouse' is either '23' or '999' then return the value of 'consignment warehouse', else return the value '!!!'. If the value of the warehouse were '12', then this expression would return '!!!' which is different from the value of the warehouse ('12') and so an error message would be displayed. This is an example of the convoluted logic with which us Priority developers have to struggle every day. Most importantly, the 'screen name' of the variable (:$.TOWARHSNAME) must be used and not its title ('Consignment warehouse').

Having documented this, I now need to find a real life example. There are certain advantages to using this technique over using a trigger, as well as some disadvantages. These are listed below in the order of thinking of them.

Advantages:
  1. Theoretically, 'anyone' can do this, not only developers, although I'd like to see them try!
  2. No need to 'build the form'
  3. The rule can be defined for specific users in specific companies 
Disadvantages:
  1. No ability to add comments
  2. Difficult to see the rule (a trigger can be viewed in a code editor)
  3. Not easily copied
[SO: 4442; 5,21,43
MPP: 802; 1,4,6
ELL: 926; 0,2,7]

Monday, March 27, 2017

Thesis update

I see that it has been three weeks since I last wrote about my new thesis. Whilst there has been communication with the university, I have yet to hear anything definite about the research's future. It would seem that the university is not a flexible SME (small/medium enterprise)! In the mean time, I have been working on the thesis, applying what I learnt from the first version.

In the past three weeks, I have expanded the introduction, writing mainly about the strategic value of information systems. I also included a paragraph about SAP, which claims to be the best selling program in the ERP market whilst being complex and suitable only for large organisations; I thought this necessary as much of the literature refers to SAP implementations.

The literature survey has been greatly expanded, beginning with a section on SME flexibility (hence the joke in the opening paragraph). Following this is a brief section on 'Not Invented Here' syndrome, which I think is relevant; as most of the current literature on this subject is about something called 'open innovation', I only cited a few papers without giving any details. Then come expanded sections on misfits and enhancements, followed finally by the literature synthesis. 

The third chapter, methodology, is the one that gave me the most problems in its previous incarnation, and it still is problematic for me. As the methodology which I am going to use is the opposite of what was before, most of the prior material was useless, although I was able to use a certain amount by converting it to the new methodology. Whilst looking for literature about case studies, I came across a recent DBA thesis (not from my university) about the success of CRM (Customer Relationship Management) programs; Priority has an underdeveloped CRM module which I have expanded somewhat by means of enhancements, but it isn't used very much. This other thesis should theoretically be very useful, but I found it jargon-loaded and very hard to read. Its major contribution to me was that it mentioned using Grounded Theory as its basis.

There were a few paragraphs about Grounded Theory in one of the DBA preparatory courses (I haven't been able to find them again) which I didn't particularly understand when I first read it. This time, I devoted some time to the subject, looking for suitable references and papers. I found a very good paper from 2013 which explains not only what GT is, but how it is applied, what criteria must be met, etc. Quoting this material certainly fills out the section about GT; I can then refer to the criteria when discussing my case study-based methodology.

At the moment, I think that I have reached the objectives which I set myself a few weeks ago: the introduction includes a great deal of material, the literature survey covers (to a certain extent) the four topics that I consider relevant, and the methodology chapter is covers what it should. I probably should add some material which shows how my methodology meets the criteria of GT - or not; I don't think that it is 'GT complete', but this is not necessarily required.

The thesis ends at the moment with a restating of the questions which the research intends to address; I don't know at the moment how to continue from here but expect to hear from my advisers what to write.

So now, I'm going to cease work for the time being in anticipation of a favourable message from the university.

Sunday, March 12, 2017

How to exclude rows from summation

In Priority, it is easy to mark a report column containing numerical data so that its total appears at the bottom of the report (it's also possible to mark a column so that sub-totals appear). This is normally the required behaviour, but every now and then there are problems with this mechanism. I have been working on a technique which allows users to assign tasks to documents, although this name is not always apt. Two similar examples are 'samples' - goods have been sent to a customer for evaluation and we want to record communications with the customer about the return of the goods, and 'outstanding debts' - we want to record communications with the customer about the payment of the debt. It is quite conceivable that an invoice might have more than one task connected to it (e.g. on 01/03/17, we spoke to the customer; on 02/03/17, we sent a copy of the invoice, etc). In an unaware implementation, having two tasks per document (open invoice) will cause two lines to appear in the report, and the debt will be summed twice. Not good.

The technique which I have developed is to have a separate procedural stage before the report in which the tasks are stored along with the invoice. This is necessary as I have not found a way of displaying in the same report debts with tasks and those without (there is a problem with what is known as 'left joins' which I haven't been able to resolve). The technique to prevent repeated summing is to store not only the primary key to each task, but also store the ordinal number of the task (i.e. this is the first task, this is the second task, etc). In the report, the value of the unpaid invoice is displayed only if this ordinal number is less than 2. This way, each invoice is summed only once, regardless of how many tasks are connected to it.

In the procedural stage, the pre-defined variable SQL.LINE will give the ordinal number of each task.

Monday, March 06, 2017

Priority technique for 'choose screens'

It sometimes happens that I need to create a form from which users can choose values intended for a procedure. For example, I developed a program which allows a manager to choose lines from an existing customer order, have those lines inserted into a new order which the program creates, and have the original lines zeroed out.

Why would I need to develop such a form when from the "input parameters" dialog of a procedure, one can press F6 twice and open the base form of the parameter (e.g. the customers form, the parts form)? The reason is that pressing F6 twice can only open what the documentation calls "a root form (having no upper-level form of its own)". In the above example, data is required from the 'orderitems' table, whose form is not a root form (its upper level form is, of course, the 'orders' form).

Normally, the way I have solved this in the past is to define a specific table for this task and then develop a form based on that table. Today I discovered an easier way of solving this problem.

One still has to write a procedure which at the least will consist of two stages, a form and procedural code, but there is no need to define a specific table upon which the form will be based. Let's say that I want to re-implement the example which I gave at the beginning. I can define a form which is based on the 'orderitems' table, showing the fields which I want, along with the parent order number (which will appear on every line). The trick is that the procedure passes to the form a file parameter, into which will be stored the lines that are displayed on the form. This file parameter is then passed to the procedural code which acts on the lines in the file (table) - that are the lines which were displayed on the form!

For my own reference, the original example where I found this technique is a procedure called TEC_CALCINVLEVEL, which unfortunately for my readers is not part of standard Priority, but rather was developed in the early days of my company using Priority - before I arrived on the scene. Whoever it was didn't bother in signing their work, let alone documenting it.

I doubt that I'm going to rewrite the various programs of this type which I've already written, but I'll try and bear this technique in mind in the future.

Sunday, March 05, 2017

New thesis is up and running

After my series of blogs last week about what I intended to research, I wrote - mainly for my own benefit - an abstract for my new thesis. Once this was done, I started work writing the new thesis. About 50% of the first chapter is recycled from my original thesis - a brief history of ERP, the ERP life cycle and Priority. Some of the material which originally appeared in the 'misfits' section of the introduction has been moved to chapter 2, the literature survey, as this is now the more suitable location. I added two pages describing my taxonomy of enhancements, giving a lengthy example in each case. To close the chapter, I added a section entitled 'Organisational impact of enhancements', which states the economic reasons for enhancements.

When I finished this (last Thursday), I sent a copy to my supervisor, without knowing what might be decided about my future as a doctoral candidate. I thought it best to show some completed work, so that any discussions which might take place in the university would have a background. On Friday afternoon I received a reply, thanking me for my material and informing me that another lecturer, who is apparently an expert in both organisational behaviour (he came to lecture us in Israel several years ago when I was taking the OB course) and case study-based research, has been appointed as my co-supervisor. But he's gone on holiday for a week!

Whilst this is encouraging, it doesn't actually tell me where I stand with regard to obligations. Do I have to write a research proposal and have it accepted by the research committee? Can I skip the proposal and create an intermediate submission (everything bar the research itself) for approval? Can I skip the intermediate submission and start work on the complete thesis? No doubt I will get some form of answer at the end of this week.

In the mean time, I have been working on the literature survey for the thesis. It turns out that my original sources aren't particularly suitable for my new direction, so I've been looking for more material. I have found a few papers, but most of these are about the implementation phase, based on SAP and are concerned with defining misfits. I am researching the post-implementation phase in Priority installations, examining the benefits of enhancements, so there is a definite research gap.

The literature survey will definitely be shorter than its predecessor; I think that I will be lucky if I manage to find 20 papers which are suitable. This is not necessarily a bad thing. As a joke, I included a short paragraph surveying the paper which I presented in Florence two years ago; there is some relevance. It will be interesting to see whether anyone remarks upon it.

It occurred to me this morning that I could post a request on the Priority Users Forum, asking people to send me examples of enhancements, listing what the misfit was, how it was overcome (I need a better word for this) and what the benefits accrued from doing so. Unfortunately, as fate would have it, the forum's web site is down today and it is not clear when it will be available again.

The title is now Researching the benefits of enhancing ERP programs in the post-implementation phase; this almost certainly will be the final title.

Monday, February 27, 2017

What are the benefits of ERP enhancement?

Continuing this series of blogs about what I intend to propose as a new topic for my doctorate, today I want to leave the taxonomy of enhancements and think about what results I am supposed to achieve from the research. The title states that "benefits" - whatever they are - are to be examined. As one reviewer overlooking my work wrote at one stage (I don't remember exactly where) - let us not forget that this is a doctorate in Business Administration; there should be some effect on the bottom line.

My current thinking is that in an interview, I would ask "Can you give examples of enhancements which have been created for your system?" (after explaining what enhancements are). The interviewee would ideally give an example, which I would classify according to my taxonomy. I would then ask how the company functioned in this area before the enhancement and how it functioned afterwards. Finally I would ask what benefits the company has obtained from the enhancement; the obvious benefits are time saving and improvement in the ability to manage processes. Hopefully there will be more, which I haven't thought of. The interviewee would ideally give several examples.

Time saving can also be equated to money: the development of the enhancement cost money (consultant's fees) which hopefully is a one-off cost, whereas the time saved (which possibly translates to employee salary) is a constantly recurring saving. I doubt that any jobs have been lost due to ERP enhancements, but maybe enough savings can be combined, thus allowing overheads to be reduced.

One benefit arising from "the ability to manage processes" would be a reduction in inventory (this was certainly the original aim of my work with WaterCo), which translates directly into money. Every company which has inventory wishes to maintain the smallest amount of inventory possible whilst at the same time maintaining sufficient inventory to fulfill customer orders as soon as required. This balancing act requires knowledge about the needs - the amount of inventory required - and the resources - how much there is. 

Another area having great effect on the bottom line is debt collection, or 'accounts receivable'. Here, the standard reports in Priority should be sufficient, but there is always room for improvement and/or personalisation. More efficient debt collection improves a company's working capital, which is always a good thing (companies can be very profitable but can run out of cash at the same time, if their customers don't pay).

Sunday, February 26, 2017

More thoughts about my new doctoral topic

Whilst walking the dog yesterday evening, I thought some more about my intended subject. I didn't emphasize enough the topic of interfaces previously: these are programs which take data (either from external files or internal sources) and create new documents (customer orders, warehouse transfers, work orders) from those data. These are complicated programs but they don't require any change in the database schema, which led me to the conclusion that my taxonomy of enhancements should initially begin with two classes, those that don't require additions to the database schema, and those that do.

Under the 'no additions to the schema' class, there are (in increasing level of complication)
  1. Innovative usages of existing fields
  2. More complicated reports (the status log reports example fits in here)
  3. Interfaces reading data from external sources
  4. Interfaces reading data from internal sources
Under the 'additions to the schema' class, there are
  1. Additions of standard fields to tables/screens (it's a bit difficult to recall examples of this type, but after a bit of head scratching, I remember that I added a second agent to customers - a customer can 'belong' to two divisions, and each division has its own default agent for the customer). There is a built-in program for doing this, but most people aren't aware of it. I prefer to do this manually.
  2. Additions of single, unbounded, fields to tables/screens  (unbounded means that the field is not connected to any table); example: text fields in customer orders.
  3. Additions of bound, non-standard, fields to tables - this is the case of the degenerate table which I wrote about earlier. A table has to be created, a screen has to be defined in order to input data into this table; all this in order to add a field to the target table (and screen). An example would be a private 'status' field which was initially added to customer orders and later to purchase orders; using a bound field enables records with the same value to be retrieved with little effort.
  4. Private modules, which record data not covered by any other module. These modules can use standard fields along with private fields. One example is a module which I developed for tracking slow and dead inventory; obviously the table contains a field which joins with the 'parts' table. A more extreme example is the 'expenses' table, but this too contains a field which joins with the 'users' table. A table which has no foreign keys (as they are known in relational database-speak) is of limited use.
I think that the word 'user' should be dropped from the title, making it now 'Benefits of extending ERP programs in the post-implementation phase'. Maybe the words 'a case study approach' should be appended; I want to look at the titles of the various DBA theses which I have downloaded to see whether they include their research method.

Saturday, February 25, 2017

Visiting a plant nursery

We have added a new balcony to our house, this time at the back. Naturally we have to have plants on the balcony in order to add some colour, so we had to go to a nursery. I don't know which is the worst option: accompanying my wife when she is buying clothes, accompanying her to the supermarket or accompanying her to the plant nursery.


New direction for doctorate?

I wasn't able to do much thinking about a new direction for my doctorate over the past week for two reasons:
  1. Although my supervisor wrote that he would be discussing my situation with the research committee chairman on Tuesday, it would seem that no decision was made. The chairman has traveled abroad for a week, thus delaying any further discussion.
  2. I was far too busy at work, ironically because I instituted a major change in the way that customer orders are managed in one division. In a sense, the change is minor (one mark is substituted for another), but about 120 orders had to be converted to this new system (done by yours truly) and several key reports had to be changed. The new system required major changes to the reports, so this took much longer than I had expected. 
Last Saturday, I performed a small literature search on what might be my new direction, and came across a very interesting paper, which is also very recent (October 2016): "ERP and Organizational Misfits: An ERP Customization Journey"; two of the paper's authors appear in my bibliography. Whilst much of the discussion in the paper is very pertinent, I feel that some of the subject matter could be looked at in a different way; proposing a different taxonomy is definitely a basis for my new direction. 

A possible title would be "Benefits of user extensions to post-implementation ERP systems", where the word 'extensions' is comparable to what has been called 'customising' in my thesis. There are different levels of extensions:
  1. Using the standard ERP system in a creative and intelligent manner, allowing access to data organised in ways which were not immediately apparent. This level requires no changes to the standard database schema. One example is the one I implemented this week, in which tasks are used to replace statuses (read on for an explanation of statuses). Another example, which would apply to many installations, would be the writing of reports which are based on the customer orders' status log. Each customer order has a defined status - for example, draft, waiting for approval, approval, in production, supplied, cancelled - which shows at which stage the order is currently to be found, and implies who is currently responsible for the order. Priority records in a log table every change of status: when, who and which new status (although there is no 'why', which is sometimes necessary!). This log is of great interest to my company, and probably to others, for several reasons, which I won't explain. To the best of my knowledge, there are no standard reports which use this log, so it was one of the first tasks which I faced as a developer to write such reports. This was a great benefit to my company and did not require any changes in the system. Another example would be writing programs to import data from external sources (e.g. company payroll); this requires an advanced technique, but no changes to the schema.
  2. Adding fields to standard tables: this is a fairly frequent event, in which a company requires to store extra information about a datum (e.g. customer order, purchase order), but there is not a suitable field in which to store this information. For example, companies often store engineering details about parts in the 'parts' table. 
  3. Adding tables to the database: this can be done on two levels. I frequently am asked to add degenerate tables, consisting of a primary key, a code and a description; such tables are needed for adding constant values to existing tables. A deeper version of this is adding a completely new module to Priority in order to record data for which no standard table exists; a simple example is a table containing people's expenses.
All of these extensions naturally bring benefits to the company implementing them - otherwise, they wouldn't be needed. The research will have to find examples of such extensions, then ask how the companies managed before the extensions were added. It is clear to me that prior to adding a module, companies store the data (if at all) in spreadsheets (boo, hiss!).

Friday, February 17, 2017

My research is effectively dead

On the same day that I received the letter from the journal editor asking me to referee a paper, I also received a letter from my doctoral supervisor. He informed me that he and the research committee chairman were very concerned about the small number of completed questionnaires which I have obtained from companies, and asked how I intended to increase the number substantially.

My interpretation is: you will be permitted to continue with your research if somehow you increase the number of questionnaires to 150. As there is no chance of this happening, my research is effectively dead.

I haven't been happy - both figuratively and literally - for some time about the number of questionnaires, so in a sense I am relieved that someone else has made the decision for me and 'pulled the plug' on something which is going nowhere fast.

I considered a few options, of which the best seemed to be to start from scratch with a new, albeit related, topic. Obviously, I will have to write a new research proposal which will have to be accepted by the research committee, then write a new intermediate submission which again has to be approved. 

I have told my supervisor of my decision and I await his response (which may take a week). In my letter, I explained approximately what I intend to research and stated that I didn't have a formal title. After thinking about it some more, I think that the new title will be something like "Examining the benefits of consultants in the post-implementation stages of ERP installations". 

As opposed to my original research, which is based on questionnaires, this will be 'case study' research, carried out with two companies both of which have cooperated fully with my research until now and with whom I work as a consultant. The methodology will be interviews with five to ten people in each company, discussing how their usage of ERP has changed from before I started consulting with them to how it is now and how the company has benefited as a result. The already collected questionnaires may have some value. 

One of the foundations of the research will be a simple question of economics: is it better to employ a developer for a one time, but moderately expensive, cost, or allow employees to use any solution (mainly spreadsheets) at a constant cost of time, at the risk of bad data? This became very clear to me yesterday evening when I was shown a spreadsheet containing  invoices which the customers have yet to pay, which is created daily by a secretary at one of the companies. It seems that my job in this coming week will be to write a program which will output this data in a minimum of time and of course, more accurately. There is also a striking example from my own company: the financial comptroller used to take four days a month to compile a report; after speaking to me, I managed to reduce the required time to four hours a month - an eightfold saving of very expensive time.

I reckon that I can use about 50% of the material which I have already written. All the psychological material can be discarded, and the rest will have to be re-targeted. Fortunately, in the introduction and literary survey, I discussed the subjects 'customisation' and 'misfits', which are very much connected to the new, more refined, topic, so I already have this material in hand.

Thursday, February 16, 2017

Reviewing someone else's academic work

I wrote last time that I had been invited to review a paper about an ERP implementation. I was sent this paper but discovered that the document was empty - for a while, I wondered whether I had been the victim of a scam or a virus attack - but after contacting the journal editor, the documents were sent again and this time were readable.

The paper discusses an ERP implementation for a national electricity company in Africa. The paper shows that so far, the implementation has failed, which does not come as much as a surprise to me. There isn't a particularly good fit between such a company and ERP to start with. It seems that the vendor, contractor and company didn't do their homework very well and that the users were not prepared in advance. Unfortunately, this happens frequently.

Also unfortunately, I couldn't recommend the paper for publication. There were many mistakes in English and strange adjectives used (e.g. "unappealing commitment"). But even ignoring such issues, the paper wasn't very good. There were very few references, which is odd considering the number of papers about ERP implementation (I don't remember the exact figure, but my literature survey states that about 80% of ERP research is about implementation). The methodology is ok, but data is presented in a haphazard way and the conclusions aren't stated in terms of the original objectives.

I can understand how the writer(s) will feel when they receive the feedback - I have been in the same position three times. At least I totally understand the subject matter, which is more than can be said for those who reviewed my work. I have tried to point out where the work can be improved. I was sorely tempted to send back a copy edited version of the manuscript, but that's not my job.

It will be interesting to see whether there is any follow-up to this review.

Tuesday, February 14, 2017

A certain kind of academic recognition

I received an interesting email today, asking me to review a paper for a professional journal. Not surprisingly, the paper is about an ERP installation. As reviewing is supposed to be anonymous, I can't publish here the name of the journal nor of the paper. I don't think that this journal is very well known (I certainly have never heard of it), but it does have a presence on the Internet and one can read papers published within. 

So, this is a certain kind of academic recognition, although not necessarily the kind that I crave for. 


[SO: 4422; 5,21,43
MPP: 802; 1,4,6
ELL: 926; 0,2,7]

Tuesday, February 07, 2017

The City Boy

It happened twice during the years 1969-70 that I found abandoned library books on benches in my school rooms. One time, the book was "Tiger, tiger!" (aka "The stars my destination") by Alfred Bester, which was a stupendous find; this was one of the strongest and most colourful science fiction stories that I would ever read. I suspect that I had difficulty understanding the story at first, but later understood its intricacies.

The other book was "The city boy", by Herman Wouk (certain editions seem to have lost the definite article). Whilst obviously I was not living in 1922 (or thereabouts) in the Bronx, with a father owning a factory which made ice, I was aware on first reading of several similarities between the story's protagonist and myself: we were both plump Jewish boys who preferred intellectual pursuits than sports and we both went to summer camp - although mine lasted two weeks as opposed to Herbie's two months. It is no wonder, then, that this book spoke to me.

I haven't read it for at least twenty years (if not more), but recently found an ebook version which I loaded onto my Kindle. I read the book in its entirety yesterday and was once again charmed by this story which apparently was a failure when first published (although this may have been a backlash to the success of Wouk's previous novel, which was his first). Now, I find it amazing how Wouk understands and writes about the behaviour and motivations of an eleven year old.

The serendipity of finding these books abandoned in classrooms helped fuel my eclectic and scattered approach to reading in the formative years of my adolescence. It's a shame that I found only two books - who knows what a third might have been? By 1970, though, I was off and reading books which I found through books which I had already read.

Sunday, February 05, 2017

Grand-daughter is nine months old


Shaked is now nine months old and has a wide variety of behaviours and responses. Here she is, sitting on the sofa between me and her mother, trying to collect scraps of apple pie with her finger so that she can eat them. I'm trying to distract her with a samba rhythm on the shaker.

[SO: 4412; 5,21,43
MPP: 802; 1,4,6
ELL: 881; 0,2,7]

Wednesday, February 01, 2017

John Wetton, RIP

"Spinal Tap" notwithstanding (five drummers mysteriously die), it seems that being a bassist in a prog-rock group is a work hazard: I was sad to hear this morning that John Wetton, bassist in the 1972-4 configuration of King Crimson, died after a long battle with cancer. Wetton joins recently departed Greg Lake and long departed Boz Burrell in the King Crimson bassist casualty list (there are also two Van der Graaf Generator bassists to keep them company).

Wetton had been in a variety of groups before King Crimson, most notably Family; he sings second vocal to Roger Chapman on one my favourite Family songs, "My friend, the sun". In KC, he played bass, sang, wrote songs and played uncredited instruments, his apotheosis being "Starless".

After KC, he went on to play with Bill Bruford in UK, then hit the big time with Asia (I have no acquaintance with them). Apparently, he was an active musician until the last few years, when the cancer came.

Tonight, as a tribute, once more I will float down the river of music that is entitled "Starless" and enjoy his bass and voice.

Edit from the same evening: listening to the radio today, I heard the announcer mention the death of JW, and in tribute played a live version of 'Book of Saturday'. I didn't recognise this version - it may not have been by KC.

Fripp writes:
John was a pal over almost forty-two years, beginning at Bournemouth College in 1965, two teenage students and local gigsters. We continued in touch during our early professional lives in London, speaking from time to time, before John joined King Crimson in 1972-74 with David Cross, Jamie Muir and Billy B. JW was, for me, the leading bass player of his generation, a player of international class, before John moved increasingly to the front as singer and songwriter: Asia’s debut album was the world’s biggest seller in 1982. We continued as chums, working together when John lived in LA in 1992; and increasingly met for coffee and cakes after John moved back to Bournemouth in the Noughties.

Edit from a month later: I found this article (it's more like a book chapter!) about John, mainly before he became famous.

Saturday, January 21, 2017

TV Series in January 2017

It's been two months since I last wrote about the TV series which I watch; during that time, almost all of the series which I mentioned then have finished, being replaced by a motley selection.

One series, 'Unforgotten', started being broadcast just after that blog entry. This is basically a police procedural, but it's more about the people involved in the crime (the death of a 17 year old boy, 30 years ago) than it is about how the police solve the crime. In other words, it's much more a drama than it is a procedural. In a strange piece of casting, Nicola Walker, otherwise known as Ruth from 'Spooks' plays the senior detective; the initial episodes were broadcast here at the same time as series 3 of 'Scott and Bailey', in which Walker plays a somewhat deranged character. Here, Walker plays a slightly hesitant detective, which seems somewhat unlikely: surely someone at the rank of DCI would be much more self confident and decisive.

'Madam Secretary', as befits an American series which has about 22 episodes per season, is still being broadcast. Episode 12 of season 3 was shown on Thursday night; this means that we are seeing the episodes only a few days after their broadcast in USA, according to IMDB (this link probably will change in the future). They show episode 12 being broadcast on 15 January and episode 13 on 27 January, although no indication is given as to which country those broadcast dates refer. This programme is consistently good (but not excellent), even though its stories are somewhat facile.

With no advanced warning, I discovered that Sherlock season 4 is being broadcast in Israel! We're about two weeks behind Britain, which is also not bad. The first episode ('The six Thatchers') seems to contain more action and is less cerebral than the earlier episodes; still outstanding, but less groundbreaking. I watched the program yesterday when something strange happened: the transition from one specific scene to another seemed very strange - I thought that this might be some kind of dream sequence, but it still didn't seem right. Fortunately, the episode is broadcast several times during the week, so I recorded it again today and discovered that there was a whole ten minutes missing from the version which I had watched the first time.

Another British series which I'm watching is called 'In the club', which follows the lives of six very pregnant women (one gives birth every week). It's a 'bunker' series: dependable, but too much happens per episode to be realistic. This series dates from 2014 so we most certainly are not watching it concurrently. Hermione Norris (Cold Feet, Spooks) appears in this, as does Sacha Dhawan, who is a new name to me, but coincidentally appears in the above episode of 'Sherlock'. I'm not recording this.

Last night I recorded a new - to me - American series called 'Mind Games'; this too dates from 2014. Although thirteen episodes were recorded, apparently only about six were broadcast before the series was cancelled: it will be interesting to see how many episodes are broadcast here. I didn't see the first episode, so the beginning of the second was quite bewildering. Most of the actors spoke too fast so I had difficulty understanding what was happening. So why did I watch (and record) this? Because the theme of the programme seems to be industrial psychology - a strange basis for prime time television (probably the reason why it had low ratings) but definitely up my street. Starring are Steve Zahn (who always seems to play manic people) as an academic psychologist, and Christian Slater as Zahn's brother, who is more of a 'folk psychologist'. In the episode which I saw, they dramatised a psychological experiment straight out of Dan Ariely (this is a true experiment): sometimes it can be very hard to make a choice between two alternatives (let's call them A and B), but if one adds a third alternative - a demonstrably inferior version of one of the original two alternatives (let's say C is comparable to B, but worse) - then choosing becomes easier: it will be the superior version of the third alternative (ie B). A few other psychological techniques also got some air-time. It will be interesting to see what the following episodes are like: whether it calms down, whether we get more real psychological techniques and whether the back story - one brother (Slater) apparently hires a girl to fall in love with the other brother (Zahn) - makes any real sense.

Monday, January 16, 2017

Priority trick for screen procedures

Whilst checking something buried in a screen procedure within Priority, I came across the following nugget:
SELECT 420, 539 INTO :WRNMSG, :GOTO FROM DUMMY WHERE :RETVAL <= 0;
I wrote a quick procedure which confirmed what I thought this snippet does: if the variable RETVAL is less or equal to zero, then warning message 420 will be displayed and execution will skip to label 539. As it happens, earlier this morning I had written something much less concise than this to achieve the same result, so the find was quite serendipitous.

Here are two more undocumented variables which can be added to one's private toolbox.


Sunday, January 08, 2017

A cold day in London

It's comparatively very cold here, although I know that the temperature is at least 5-10 degrees C higher than Europe. We feel the cold more, though, as the area where I live is open to winds which blow the cold air from the Russian steppes. The wind isn't as strong in cities.

Driving home on the motorbike today, I was reminded of a day 39 years ago (I don't remember the exact date, only that it was in the first week of the spring term of 1978), so it may as well have been exactly 39 years ago. I came out of the university - I think after lunch, as there was plenty of light - and started driving home. I don't remember which route I used to take from the Elephant and Castle/Borough area to Hampstead, although I do remember that I would drive through Camden, Chalk Farm, up Haverstock Hill, onto Hampstead High Street, then skirt around the Heath until I got to the back street which led to where I lived on Finchley Road.

When I left the university, it was cold but dry; some time after Waterloo Bridge, it began to rain. As I drove further north, the rain turned to sleet, and by the time I was nearly home, snow was falling. It's very difficult driving on in a motorbike through snow, and I remember that the final back street was almost virgin - no one had cleared a path. My coat had a layer of ice on it!

Unsurprisingly, I decided to travel to the university the next morning by underground.

Saturday, January 07, 2017

1000 blog entries

I wrote my first blog entry in 2005, after we had come back from a three week tour of America. I remember telling a friend that there were things which I wanted to write about which wouldn't fit particularly well into the format of a letter - thoughts about music, books and programming - but which matched the format of a blog. She was supportive but remarked that I would probably stop writing to her; I said that I would continue, but I was wrong and she was right. I do have a life outside of this blog but I don't write about it to anybody.

So: 1000 blog entries!  I do find this blog useful - I refer to it occasionally in order to read how I solved certain programming problems or to read what I thought about a certain record. It's also been a place to store memories of a life which changed dramatically nearly 40 years ago.

As has been my custom for the past few years, here is the 'top twenty tags' - the subjects which I have written about most in the last 100 blogs (it's actually 21 subjects as there is a tie for position 20).
PositionTagCount
1DBA14
2Priority tips9
3Health8
3=Holiday8
5=Obituary7
5=Sorrento7
7Personal6
8Computer5
8=Cooking5
8=DCI Banks5
8=Grandfather5
8=Musical instruments5
8=Programming5
14=Films4
14=Kindle4
14=Mobile phone4
14=Song writing4
14=TV series4
14=Vinyl log4
20=Dog3
20=Theanine3

Comparing this to the previous 100 blogs, 'DBA' was in third position with 13 entries, 'health' was in 18th position with 3 entries and 'holiday' was second with 14 entries. The statistician in me would say that there isn't enough spread in the results to make any conclusions.

I don't have specific data for all 1000 blogs, but Blogger itself maintains a count, albeit in alphabetical order. Here are the top subjects, as far as I can see

PositionTagCount
1Programming133
2=Holiday95
2=DBA95
4Delphi63
5ERP52
6MBA51
7Personal49
8MIDI44
9Cooking38
10Films31