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.
[ Parent
| on HN ]
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.