[ad_1]
| submitted by /u/Bamboozle_ [comments] |
[ad_2]
/u/Bamboozle_
Source link
Humor | ReportWire publishes the latest breaking U.S. and world news, trending topics and developing stories from around globe.
[ad_1]
Pike pike pike pike Pike pike pike.
Lincoln KC
repeated
"I never knew Bank of America Bank of America Bank of America was among
the major partners of Bank of America."
"Extra tokens, or just a stutter?" asks
Joel
"An errant alt-tab caused a needless google search, but thankfully
Gemini's AI summary got straight-to-the-point(less) info.
It is nice to see the world's supply of Oxford commas all in once place.
"
Alessandro M.
isn't the first one to call us out on our WTFs.
"It’s adorable how the site proudly supports GitHub OAuth
right up until the moment you actually try to use it.
It’s like a door with a ‘Welcome’ sign that opens onto
a brick wall." Meep meep.
Float follies found
Daniel W.
doubly-precise.
"Had to go check on something in M365 Admin Center, and
when I was on the OneDrive tab, I noticed Microsoft was
calculating back past the bit. We're in quantum
space at this point."
Weinliebhaber
Michael R.
sagt
"Our German linguists here will spot the WTF immediately
where my local wine shop has not. Weiẞer != WEIBER. Those
words mean really different things." Is that
20 euro per kilo, or per the piece?
[ad_2]
Lyle Seaman
Source link
[ad_1]
|
Termite wins the unexpected first, but chanderite wins ultimate final submitted by /u/sultanshihab |
[ad_2]
/u/sultanshihab
Source link
[ad_1]
Industrial machines are generally accompanied by “Human Machine Interfaces”, HMIs. This is industrial slang for a little computerized box you use to control the industrial machine. All the key logic and core functionality and especially the safety functionality is handled at a deeper computer layer in the system. The HMI is just buttons users can push to interact with the machine.
Purchasers of those pieces of industrial equipment often want to customize that user interface. They want to guide users away from functions they don’t need, or make their specific workflow clear, or even just brand the UI. This means that the vendor needs to publish an API for their HMI.
Which brings us to Wendy. She works for a manufacturing company which wants to customize the HMI on a piece of industrial equipment in a factory. That means Wendy has been reading the docs and poking at the open-sourced portions of the code, and these raise more questions than they answer.
For example, the HMI’s API provides its own set of collection types, in C#. We can wonder why they’d do such a thing, which is certainly a WTF in itself, but this representative line raises even more questions than that:
Int32 Count { get; set; }
What happens if you use the public set operation on the count of items in a collection? I don’t know. Wendy doesn’t either, as she writes:
I’m really tempted to set the count but I fear the consequences.
All I can hear in my head when I think about “setting the Count” is: “One! One null reference exception! Two! TWO null reference exceptions! HA HA HA HA!”
[ad_2]
Remy Porter
Source link
[ad_1]
I’ve had the misfortune of working in places which did source-control via comments. Like one place which required that, with each section of code changed, you needed to add a comment with your name, the ticket number, and the reason the change was made. You know, the kind of thing you can just get from your source control service.
In their defense, that policy was invented for mainframe developers and then extended to everyone else, and their source control system was in Visual Source Safe. VSS was a) terrible, and b) a perennial destroyer of history, so maybe they weren’t entirely wrong and VSS was the real WTF. I still hated it.
In any case, Alice‘s team uses more modern source control than that, which is why she’s able to explain to us the story of this function:
public function calculateMassGrossPay(array $employees, Payroll $payroll): array
{
return [];
}
Once upon a time, this function actually contained logic, a big pile of fairly complicated logic. Eventually, a different method was created which streamlined the functionality, but had a different signature and logic. All the callers were updated to use that method instead- by commenting out the line which called this one. This function had a comment added to the top: // it shouldn't enter here.
Then, the body of this function got commented out, and the return was turned into an empty array. The comment was expanded to what you see above. Then, eventually, the commented-out callers were all deleted. Years after that, the commented out body of this function was also deleted, leaving behind the skeleton you see here.
This function is not referenced anywhere else, not even in a comment. It’s truly impossible for code to “enter here”.
Alice writes: “Version control by commented out code does not work very well.”
Indeed, it does not.
[ad_2]
Remy Porter
Source link