3 ms·
Oh, and as a bonus for techy people: 1. Here's a quote from a 2001 (yes, 23 years ago) report by Fujitsu/ICL into how badly developed their Horizon system was:
by amiga386 3y ago
Oh, and as a bonus for techy people:
1. Here's a quote from a 2001 (yes, 23 years ago) report by Fujitsu/ICL into how badly developed their Horizon system was:
https://archive.is/MFtZC https://archive.is/MFtZC
https://www.postofficehorizoninquiry.org.uk/sites/default/files/2022-11/FUJ00080690%20Report%20on%20the%20EPOSS%20PinICL%20Task%20Force%2014052001.pdf https://www.postofficehorizoninquiry.org.uk/sites/default/fi...
> Although parts of the EPOSS code are well written, significant sections are a combination of poor technical design, bad programming and ill-though out bug fixes. The negative impact of these factors will continue and spread as long as the PINICL fixing culture continues. This is partly due to the nature/size of the bug-fixing task and partly due to the quality and professionalism of certain individuals within the team. The problem is probably best illustrated [by] examples:
> Example 1: This extract from EPOSSCore.dll has been written to reverse the sign of a number and is equivalent to the command d=-d
Public Function ReverseSign(d)
If d < 0 Then
d = Abs(d)
Else
d = d - (d * 2)
End If
ReverseSign = d
End Function
> Whoever wrote this code clearly has no understanding of elementary mathematics or the most basic rules of programming.
2. Here are the juicy details about the overall architecture:
https://archive.is/5Inru https://archive.is/5Inru
> The Fujitsu-designed Epos software on the PCs was written onto an off-the-shelf system called Riposte.
> Our source said the big flaw in Horizon was the way data was being written to Riposte.“Riposte wasn’t really a database, it was a messaging system based on an XML structure where you write messages down into the message store, and then Riposte took care of replicating them,” he said. “The first thing that you should always do with a system like that is design and agree a data dictionary and a message library repository, basically to say: these are the messages that are allowed to be written to the message store and they all provide the following function.
> “You should also have a layer of software that lies on top of the message store that checks that any application above it which is trying to write a message, conforms to the agreed data dictionary. Otherwise, you can just write freestyle to the message store, which is what they were doing. There was no application interface in there, no agreed data catalogue or anything.”
> Computer Weekly also spoke to a former Fujitsu employee who worked in the Horizon Service Support Centre from 2001. The support engineer – who also wants to remain anonymous – recognised this new description of Horizon’s badly built message store, adding: “Our job was to fix these problems as they arose. We all knew the code wasn’t fit for purpose and needed rewriting. The data dictionary was still being added to when I got there.”
> For the first 10 years of Horizon’s existence, transaction and account data was stored on terminals in each branch before being uploaded to a central database via ISDN. Our source says this part of the system simply did not work.
> “The cash account was a piece of software that sat on the counter NT box, asleep all day,” he said. “At the end of the day, or a particular point in the day, it came to life, and it ran through the message store from the point it last finished. It started at a watermark from yesterday and combed through every transaction in the message store, up until the next watermark.
> “A lot of the messages in there were nonsense, because there was no data dictionary, there was no API that enforced message integrity. The contents of the message were freehand, you could write whatever you wanted in the code, and everybody did it differently. And then, when you came back three weeks later, you could write it differently again.”
He gave an example of a message stored previously when a customer bought a stamp. It was feasible that a new message for buying a stamp weeks later could be slightly different.
> “When the cash count came along, it found a message it was not expecting and either ignored it, tripped up, or added something it shouldn’t be adding,” he said.
- Workaccount2 3y agoNon-programmer here, can someone explain what is wrong with that code?
- cmptrnerd6 3y agoEdge cases. If d is very large then 2*d might be larger than what can be computed. Also I think the code could just multiply d by -1 which would "reverse the sign". Even that has some edge cases that should be handled around the maximum value of an integer. But the main thing to me is that as written this code is confusing and overcomplicating the easy part of the problem.
- jph 3y agoYes. Flipping the sign of a number can typically be done in one line as `d = -d`. Or if that syntax isn't available in that programming language, then `d = 0 - d` or `d = -1 * d`. What's wrong with code above is 1) it does a conditional branch (meaning if.. then... else...) which is unneeded. 2) The "then clause" does an absolute value which is a waste of a function call. 3) The "else clause" does `d = d - (2 * d)` which is a waste of a multiplication 4) possibly with an overflow risk and/or floating point estimation risk. That said, it's admittedly possible that the programming language above, or the number representation in that code above, have some highly atypical needs that we here on HN don't understand.
- nerdawson 3y agoMaybe they were measuring programmer output in KLOCs.
- tauchunfall 3y agoThey had teams with software engineers with different levels of competence and experience [1]. There were good, mediocre, and members that were not so capable. Which is true for many teams. When at least the good members have the time and review the code of the others, than this code would probably not go into production. Even when these code snippets are cherry-picked they tell enough about their review practices. >have some highly atypical needs that we here on HN don't understand. Somebody else checked in another thread. You can use unary minus in VBA. [1] >One member of the development team, David McDonnell, who had worked on the Epos system side of the project, told the inquiry that “of eight [people] in the development team, two were very good, another two were mediocre but we could work with them, and then there were probably three or four who just weren’t up to it and weren’t capable of producing professional code”.