Tuesday, March 31, 2015

New mobile computer

After about a year and a half with the slimline Dell laptop computer, yesterday it was replaced by one from Toshiba; I think that the model is Z301. It has a touch screen although I doubt that I will make much use of that functionality.

The great advantage of this computer over the previous one is that I now have 3 USB sockets, a network cable socket and a screen adaptor socket. Previously I had only two USB sockets; the screen cable would connect via a special connector, but the network cable would connect via a USB interface, thus reducing the computer to one free socket - which was almost always taken up by the mouse.

Almost all of the software has been transferred without problem, although this isn't saying much as I have only the minimum installed. No Word or Excel, but there is Outlook, which I will later define to use my home email. Dropbox has been setup successfully but not Skype.

Wednesday, March 25, 2015

Zooming the Millennium

Sometime around 1998/9, I wrote a report for our old ERP program which was considered to be "the report to end all reports". I know the approximate date as I called the report "The Millennium Report" - in 1999, everything was millennium this and millennium that. The report traversed over purchase parts and collected data such as the amount needed for customer orders, the amount currently in inventory, the amount in open purchase orders, the average usage per month and other such data. This report helped the purchasing manager to maintain an optimal level of stock for parts which were frequently used.

When we moved to Priority, one of my first programming tasks was to translate the Millennium Report to Priority (this is after I figured out how to use the report generator). This was accomplished without too much difficulty (as far as I remember). The report has continued to serve as a backbone for purchasing. I even ported it to the company for which I am consulting (the contact person helped in developing the original report).

Yesterday I showed one of the zoom (aka linked) reports to one of the people who currently executes the Millennium. I had shown him a report last week but he didn't grasp the significance then.  Once he realised now what the zoom technology was capable of, he wanted the Millennium 'zoomed'; today he sent me a list of requirements.

As if 'zooming' the original program wasn't hard enough, the requirement was to display in one report detailed data from four different sources (amounts needed, amounts in inventory, amounts ordered and amounts used over the past few months). It's not immediately clear how to do this in Priority although I have done this before; it's a daunting but not impossible task. After a few hours of wrestling, I was able to create the required detailed report and insert it into the zoomed program.

The feedback was almost instantaneous - "To be honest, I can't remember when I was so excited about a report". I think that today can go down in history as a very successful day.

On the same subject: another person who uses this report generally sends its output to Excel so that he can fiddle with it and waste his time. I note with sardonic glee that a zoomed program does not work with Excel - the hyperlinks get lost during the transfer. Another reason to work in a natural manner within Priority and not to export data to Excel.

Monday, March 23, 2015

Breaking radio silence

It's been quiet here for the past week and a half, primarily because I've been busy at work but also because there hasn't been anything new to write about. After I exhausted myself with linked reports, I entered a period of 'solidity' when I didn't do anything new but certainly improved all manner of things.

Today I made a 'field trip' - as part of my pilot study, I went to visit a company which uses Priority. As opposed to my company or even the other company where I have been consulting, this 'company' has only two and a half users of Priority. They use the limited 'zoom' version of the program which is more than sufficient for their needs, which are basically a program to create price quotations, receive customer orders and issue invoices. They don't even use Priority for their purchases.

This is quite legitimate although slightly surprising that they use Priority as opposed to any other simple management program. The answer to this question is that one of the co-owners had previously worked in a company which used Priority. The 'zoom' version has a web interface and connects to a server maintained by the company that develops Priority; thus the required infrastructure is minimal.

I'm sure that I will encounter other companies that use Priority in such a minimal manner, although I suspect that they use the purchasing module more than the sales one (for example, an investing house might use Priority to manage its purchases, but it doesn't issue bills to its customers, otherwise known as investors).

One of my informal questions for the company is what data do they maintain in Excel. I was shown a spreadsheet which contained data about all their current projects - project number, date it was started, current status, target date, etc. I pointed out that this data could easily be managed in Priority; the reason why they don't do this is that the data is very simple (thus a relational database doesn't bring much to the party) and that they are comfortable with the current solution. If it ain't broke, don't fix it. At least the spreadsheet is stored with Google Docs; thus it's backed up, always available and shareable.

This last sentence shows the value of conducting the pilot study with companies that have different ways of working than mine. One of the questions in the questionnaire asks about how people share their spreadsheets, and one of the answers is 'save the spreadsheet on a shared network disk'. This company - with its minimal infrastructure - has no shared network disk; it has no network! So the answer had to be amended to include the possibility of saving the file to external storage such as Google Docs.

I want to find one more company for the pilot study before I conclude this stage. It's just a question of finding the right person and getting him/her to agree to my proposal; most people whom I have approached don't even return my calls.

[SO: 3866; 3,15,36]

Thursday, March 12, 2015

This boy is on fire

I am very chuffed with myself as I have just unraveled a very special programming technique in Priority: linked reports. This may not seem much to anyone who does not use Priority, but it's something which doesn't really exist in Priority.

In order to explain what linked reports are, I will give a simple example. One report lists customer numbers, customer names and the total of each customer's orders during a given time period. This is a very simple report which would take me five minutes to write (if that). An automatic feature of Priority is that by double clicking on the customer number will cause the customers form to appear with the chosen customer pre-selected. This mechanism enables one to see details about the customer which aren't in the report. But what if I want to see a detailed list of orders made by that customer during the same time period? Normally, one has to activate a second report, hand entering the various parameters. But if there were a linked report, then one could double click on the customer's name, and hey presto! a new report appears with the required data.

Again, this may not seem much. Linked reports are ubiquitous in the management program which I wrote (a sort of ERP program) for the occupational psychologist. The difference is that the management program is hand crafted; each linked report is programmed into the system. Priority is based on what might be called meta-programming or a programming framework: one enters the fields required for a report into a screen, which stores the data in a table. When the report is required, the values are retrieved from the table and interpreted; these values are formed into an SQL query which extracts the required data from the chosen tables and displays the results in a report. This mechanism is automatic so the programmer is limited to whatever functionality is exposed in the screen where one builds the reports.

How did I know that linked reports are even possible in Priority? There are two or three cases of financial reports (mainly various flavours of trial balances) where one can first create a condensed version of the balance sheet - section names only - then press on a section name and obtain the details of the section. A section in this case is something like 'income', and several accounts can be connected to the section. I have looked at these reports before but couldn't make head or tail of them.

For my new consulting work, I wrote a report which displays for each supplier the total value of open purchase orders by month. I could write this as a simple report with different levels (first the supplier on one line, then a month on a second line, then all the open orders due for that month on consecutive lines, then another month, then the open orders for that month, then another supplier, etc) but the customer wanted a tabular report: one line per supplier and the sum for each month in a separate column. It isn't hard to write such a tabular report in Priority, but one has to remember that it only displays totals for each month. There's no way of expanding the report to show the actual purchase orders which are due to be supplied in a given month.

The customer wanted a 'drill down' or linked report: if he clicked on a given month, then a second report should appear showing the details of that month. Sorry, I said: it's impossible to do such a thing in Priority.

But I remembered the case of the trial balance and returned to looking at it. Since I last looked, my knowledge of arcane Priority programming has increased so some more parts of the program made sense. I started with some special definitions for the section name: part of this was understandable but another part didn't seem to make sense at first. Then I realised that this second part was somehow recursively calling the procedure which created the report, passing parameters for the detailed report.

I elucidated about 50% of the technique yesterday but was stumped as how to continue. I wrote to my consultant asking for help; he wrote back saying that any help would have to be paid for as it is not within the general scope of our agreement. He reckoned that it would take them 6 hours to write a simple program with linked reports. This implies that they don't know how linked reports work either.

Today I was playing around with what I had already discovered when I thought to examine the HTML code which the first report emits. I looked at the HTML code (as displayed in the browser) for the trial balance which confirmed what I thought was happening; I then played around with my report in order to produce similar HTML. This is the link that communicates data from the first program to the second. Once this was correct, the road to the solution was short. 

The reason why it was so difficult to figure out what the trial balance report was doing was that it was hard to separate between statements required to produce the report itself and statements required for the linking. True, there was still some fairy dust to be discovered but I finally managed to elucidate what was required and then produced my own linked report. I started to document what I had done but it was time to go home.

Whilst this is a useful technique in itself (I can think of several places where I could add it), I think that the main reason for my happiness and pride is that I managed to elucidate something which is barely hinted at in the documentation, something which even a professional consultancy company (who are supposed to be expert in such matters) don't know how to do. Of course, it may be the specific person who works with me who does not know; he isn't that experienced, but even his predecessor, who was very experienced, didn't know when I asked him about linked reports several years ago.

Just before I went home, I wrote to my consultant, told him that I had cracked the code and offered to explain it to him for the cost of six hours. I don't know whether he has replied....

Whilst this achievement is hardly on the same scale as cracking Enigma or elucidating the DNA code, I still think that it's outstanding, in its area.

And now for something completely different.... My paper for the spreadsheet workshop in May is now available for reading at arXiv - http://arxiv.org/abs/1503.02997. If one searches for papers in computer science published in the last year with an author named Newman, then currently seven papers are found; mine is first. I rub shoulders with articles like 'Identification of core-periphery structure in networks', 'Graph-TSP from Steiner Cycles' (whatever they are) and 'Percolation on sparse networks'. 

[SO: 3856; 3, 15, 36]

Sunday, March 01, 2015

Last of the Luddites (2)

Today I was dragged screaming into the 2010s (does the decade have a name, such as the oneties?) when I was moved from the old Office interface, which I have been using since 1998, to the new Office ribbon. I have already seen this many times with the occupational psychologist and it is hate at first sight.

The most important thing for me was to import all the various pst files which I have scattered around. At first, I couldn't find the most recent but fortunately I eventually found it; this has all the letters and calendar events from at least the last six months and without it I would have been sunk.

After playing around a bit and googling for various commands, I think that Outlook is set up in a reasonable manner. My signatures didn't survive the transfer so I've had to rebuild them. On the other hand, all of the rules which I use to filter my email did get transferred - but they don't seem to work. I have to update them all to use the exchange mailbox instead of a pst file.

I painfully figured out how to display the menu permanently in Internet Explorer 11.

My next step will be to set up Word and Excel properly; there are a few commands, such as 'send as attachment by email' which I frequently need. I know that the OP has these as extra icons on her screen so I should be able to do the same. The functionality "under the hood" hasn't changed very much; it's only the way the menus are set up that has changed dramatically. Of course, this change is going to impact my productivity at first.

It didn't help that the change-over occurred on the first of the month. This is when I create/update two large documents with several quality measurements. Word (2003) started off ok, then it went mad, then it was ok, then it went mad. So I put in a call for service and the upgrade was the result.