Re:Polish trains lock up when serviced in third-party workshops
by serf on Tuesday December 05, 2023 @11:03AM
(#38532615)
I guess a charitable interpretation is that the compressor manufacturer set an 'expiry date' to ensure replacement of a vital component.
(but it's probably just shady business.)
Re:Polish trains lock up when serviced in third-party workshops
by Ukv on Tuesday December 05, 2023 @11:28AM
(#38533013)
Also the wrong way to implement an expiry data, since it'd work fine again when the day goes below 21 or month below 11, even if the year is 2021 or greater - which seems to be what happened if they only noticed it in November 2022 rather than 2021.
Re:Polish trains lock up when serviced in third-party workshops
by garblegarble on Tuesday December 05, 2023 @12:05PM
(#38533616)
It might lead to a fault that appears more realistic - it'll go away for a bit in December before coming back again... if the engineers say the compressor's good but the computer fails it intermittently, that seems like a good point to get the manufacturer involved which is what they wanted to force
Re:Polish trains lock up when serviced in third-party workshops
by TeMPOraL on Tuesday December 05, 2023 @11:58AM
(#38533485)
Yeah, that's not a component expiry date. This reads more like "fire a warning shot in November, and then fuck the operator over during Christmas". It feels like trying to maximize damage, as 21-31 December is exactly where a huge chunk of population travels to visit their family homes, and many of them do so via trains.
Re:Polish trains lock up when serviced in third-party workshops
by JAlexoid on Tuesday December 05, 2023 @12:21PM
(#38533872)
Nah... I just bet that this is some dev, that doesn't know how to deal with dates.
I had a recently "senior" dev give me a SQL query with similar where clause, when asked to query data after Sept 1, 2022 (where moy >= 9 and dom => 1 and year => 2022)
Re:Polish trains lock up when serviced in third-party workshops
by lstamour on Tuesday December 05, 2023 @01:25PM
(#38534915)
In case anyone is confused, the problem is that dates loop, such that moy=1, dom=1, year=2023 will not match despite being greater than Sept 1, 2022. Technically, then, if you wanted this logic to work you would have to add a second “or” clause that handles the edges missed, e.g. (moy >= 9 AND year = 2022) OR (year > 2022) though you would need a different edge case if your dom wasn’t 1. The easier approach, of course, is to just compare dates or timestamps directly.
Re:Polish trains lock up when serviced in third-party workshops
by CryptoBanker on Tuesday December 05, 2023 @12:46PM
(#38534302)
What good reason is there for hard coding dates that shutdown trains?
Re:Polish trains lock up when serviced in third-party workshops
by thaumasiotes on Tuesday December 05, 2023 @01:22PM
(#38534879)
That's when the compressor's going to fail, obviously. ;D
Re:Polish trains lock up when serviced in third-party workshops
by TeMPOraL on Tuesday December 05, 2023 @01:24PM
(#38534911)
Right. How did that famous adage go? "The best way to predict the future is to invent it."
Re:Polish trains lock up when serviced in third-party workshops
by raphman on Tuesday December 05, 2023 @05:33PM
(#38537865)
The best way to predict a crime is to commit it.
(with apologies to Alan Kay who coined the original saying)
Re:Polish trains lock up when serviced in third-party workshops
by ThrowAwayAcc-- on Wednesday December 06, 2023 @06:48AM
(#38542670)
Orginally, this train was schedulded to go to depot for maintenance on 21.11.2021, but it broke down a few days earlier and was sent to this bigger maintenance until after New Year. But because of this ifs structure, it stopped out of depot a year later, unintentionally.
Re:Polish trains lock up when serviced in third-party workshops
by pixel8account on Tuesday December 05, 2023 @02:16PM
(#38535595)
Very charitable. The "expiry date" was set to the next servicing date and there was no way for competition to fix this hardcoded date and this was not documented in the official documents. Clearly a way to force buyers to use the "official" service.
Re:Polish trains lock up when serviced in third-party workshops
by idonotknowwhy on Tuesday December 05, 2023 @04:40PM
(#38537306)
Reminds me of those work arounds for share ware in the 2000s,when I you had to say the system time back
Re:Polish trains lock up when serviced in third-party workshops
by jabroni_salad on Tuesday December 05, 2023 @06:06PM
(#38538195)
broke: the lifespan of this moving part is measured in operational hours
woke: this part will be reported as broken during the last week of november and december, 2022 ONLY.
Re:Polish trains lock up when serviced in third-party workshops
by bombcar on Tuesday December 05, 2023 @11:24AM
(#38532934)
The real crime is not using a standard date time library and a simple > 2021-11-21
Re:Polish trains lock up when serviced in third-party workshops
by rollcat on Tuesday December 05, 2023 @12:29PM
(#38533994)
Even being evil requires a certain level of competence. It's how we actually catch any of them.
Re:Polish trains lock up when serviced in third-party workshops
by p_l on Tuesday December 05, 2023 @12:10PM
(#38533702)
Can be often problematic on PLCs and the programming environment exposed to programmer.
Re:Polish trains lock up when serviced in third-party workshops
by cj on Tuesday December 05, 2023 @12:21PM
(#38533862)
Personally I prefer measuring time as seconds that have passed since January 1st, 1970.
Re:Polish trains lock up when serviced in third-party workshops
by Faaak on Tuesday December 05, 2023 @04:55PM
(#38537486)
And then your train is 32bits and stops working in 2038 ;-)
Re:Polish trains lock up when serviced in third-party workshops
by pixel8account on Tuesday December 05, 2023 @02:18PM
(#38535622)
This is a reason why it was detected a year later - the train service was delayed and it spent late November and whole December in service. So the "expiration" intended for 2021 only manifested in 2022.
Re:Polish trains lock up when serviced in third-party workshops
by delfinom on Tuesday December 05, 2023 @03:55PM
(#38536781)
This was programmed into a PLC, not traditional code.
PLCs are basically environments designed for mere technicians being able to adjust code in very clear concise fashion. It can be way more verbose, but the logic is clear and solid for decades of operation.
It doesn't require reading an api documentation on version X of a library downloaded from NPM 15 years ago nor rebuilding an entire project to the latest dependencies.
Re:Polish trains lock up when serviced in third-party workshops
by radu_floricica on Thursday December 14, 2023 @09:06AM
(#38641448)
A reason to code it like this is to avoid that specific date to appear in the compiled code.
> if the day is greater than or equal to 21, and
> if the month is greater than or equal to 11, and
> if the year is greater than or equal to 2021
> then report a compressor failure.