WTF Bites
-
@pie_flavor I'm really surprised there's no snarky 'you need to go learn what a
for
loop is' comment. (maybe I should say 'yet' - since that's only 8 hours old)
-
@dcon Needs more
cowbelljQuery…
-
@hardwaregeek said in WTF Bites:
When a test fails, sometimes the hardest part of debugging it is figuring out whether the fault is in ... the test infrastructure.
I once took it upon myself to make one of our products pass all unit tests. I found a significant number of tests that failed because they'd to things like allocate a 12-entry buffer and then assert (and immediately fail) that it contains 15 entries.
I was actually successful. But entropy meant that when other developers started working on it again, the 0-failed-tests state only lasted a few months. Last I knew the normal "good" state was around 20 unit test failures, which, historically speaking, is actually pretty good for this product.
-
-
-
But entropy meant that when other developers started working on it again, the 0-failed-tests state only lasted a few months.
I fixed that particular problem: failing a unit test gets the merge auto-rejected and we use test coverage tracking to work out whether stuff is untested. Alas, in one of our main repositories our test coverage is only about 28% and that's embarrassing (and doesn't include most of our C code for Various Reasons, some of which are even good ones).
-
It's missing a few:
- Prime Number
- Magic Number
- Atomic Number
- Musical Number
-
@tsaukpaetra said in WTF Bites:
Hey, at least it didn't call it illegal!
Illegal ones don't get numbers, I don't think.
-
But entropy meant that when other developers started working on it again, the 0-failed-tests state only lasted a few months.
I fixed that particular problem: failing a unit test gets the merge auto-rejected and we use test coverage tracking to work out whether stuff is untested. Alas, in one of our main repositories our test coverage is only about 28% and that's embarrassing (and doesn't include most of our C code for Various Reasons, some of which are even good ones).
That would be great if this product wasn't so sprawling and legacy that it takes our CI system 8 hours to build and run a test suite.
-
@anotherusername said in WTF Bites:
@tsaukpaetra said in WTF Bites:
Hey, at least it didn't call it illegal!
Illegal ones don't get numbers, I don't think.
Oh, they still get numbers. Well, legally....
-
@anotherusername said in WTF Bites:
Illegal ones don't get numbers, I don't think.
So you just fill in NaN then?
-
That would be great if this product wasn't so sprawling and legacy that it takes our CI system 8 hours to build and run a test suite.
Sounds like ours before we threw more hardware at the problem and parallelized the crap out of everything. We also only run the most important tests on PRs and the rest every night on master (with nasty emails if something broke due to a merge).
-
// Inside try-catch-forget block timer = null; timer.Dispose(); timer.Enabled = false;
-
I just got a YouTube ad that was the entire "Let it go" music video. It linked to one of those "dress up" games for little girls.
Once again, YouTube's copyright filters manage to be both too strict and completely useless at the same time.
-
// Inside try-catch-forget block timer = null; timer.Dispose(); timer.Enabled = false;
Did this on accident (without the try-catch) in JavaScript once.
Tried to close a jQueryUI dialog after destroying it. It worked just fine in older versions, but they fixed it later and when I updated....
-
// Inside try-catch-forget block timer = null; timer.Dispose(); timer.Enabled = false;
"How do you get rid of a timer again? I just can't remember, and it's so much effort to look up..."
Even so, you could at least call methods on it first, and set it to null last. Even someone like me who doesn't deal with C-like languages at all knows how wrong this is.
-
This is so stupid:
-
Article @boomzilla quoted said in WTF Bites:
You can take the same Rorschach test and add your own captions. The team will use this data to adjust Norman’s model to see if he starts seeing less murder. We can only hope.
(Link added because the stupid article didn't include it)Oh! I like taking tests!
Let's see what I see...
Somehow, I don't think this will help much.
Edit: And I'm rather disappointed that each inkblot was mirrored. WTF?
Edit edit: Also, this was apparently published on April 1, 2018.
-
The latest "Microsoft dun goofed" story making the rounds:
From the microsoft-r-open-mro-3.5.0 postinstall script:
#!/bin/bash [...] rm /bin/sh ln -s /bin/bash /bin/sh
-
@tsaukpaetra said in WTF Bites:
Edit: And I'm rather disappointed that each inkblot was mirrored. WTF?
Inkblots are normally mirrored. You make them by blotting the paper then folding it.
-
The latest "Microsoft dun goofed" story making the rounds:
From the microsoft-r-open-mro-3.5.0 postinstall script:
#!/bin/bash [...] rm /bin/sh ln -s /bin/bash /bin/sh
Hey Microsoft, how would you like it if you installed a program on your computer and it deleted an important system file and then created a shortcut in its place?
-
@blakeyrat said in WTF Bites:
@tsaukpaetra said in WTF Bites:
Edit: And I'm rather disappointed that each inkblot was mirrored. WTF?
Inkblots are normally mirrored. You make them by blotting the paper then folding it.
TIL.
-
@ben_lubar wat
-
-
@ben_lubar said in WTF Bites:
@pie_flavor said in WTF Bites:
@ben_lubar wat
What is your confusion?
That they would brazenly do something like that.
-
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@pie_flavor said in WTF Bites:
@ben_lubar wat
What is your confusion?
That they would brazenly do something like that.
What makes you think the person who wrote those scripts did so through malice and not through incompetence?
-
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@pie_flavor said in WTF Bites:
@ben_lubar wat
What is your confusion?
That they would brazenly do something like that.
What makes you think the person who wrote those scripts did so through malice and not through incompetence?
What makes you think they did not?
-
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@pie_flavor said in WTF Bites:
@ben_lubar wat
What is your confusion?
That they would brazenly do something like that.
What makes you think the person who wrote those scripts did so through malice and not through incompetence?
What makes you think they did not?
If it were malice, they wouldn't have done it so poorly.
-
@ben_lubar You already believe them to be incompetent enough to do this through incompetence. Surely if they did it through malice, the same level of incompetence could have affected the result?
-
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
@pie_flavor said in WTF Bites:
@ben_lubar wat
What is your confusion?
That they would brazenly do something like that.
What makes you think the person who wrote those scripts did so through malice and not through incompetence?
What makes you think they did not?
If it were malice, they wouldn't have done it so poorly.
Unless they were intentionally making it look like a rookie mistake in an attempt to persuade the masses they just simply didn't know.
-
@boomzilla said in WTF Bites:
This is so stupid:
I understand why gnomes would high-five, but why would they kick each other's feet until they bleed?
-
That would be great if this product wasn't so sprawling and legacy that it takes our CI system 8 hours to build and run a test suite.
Our integration tests take something over 48 hours to run and require access to several million dollars worth of custom hardware. Our unit tests usually take a few minutes, including a full build from source (of the parts where that makes sense at all; we're using a lot of Python too). But then we're not so crazy as to extensively use C++, STL and Boost. It helps that we don't use one mega-build but rather split things up into separate builds for different bits (e.g., the system model is separate from the high performance I/O and neither are closely related to either our hardware comms or our application layout engine).
Yes, we ought to do the integration testing via regular CI builds, but that's painful because it needs a lot of infrastructure to be deployed. Our unit tests work fine with external services (Travis and a few others) and that produces pretty satisfactory results most of the time.
-
But then we're not so crazy as to extensively use C++, STL and Boost
And we are that crazy.
-
Our integration tests take something over 48 hours to run and require access to several million dollars worth of custom hardware.
DFHack doesn't have integration tests, but it takes about 1 hour to run a full build using a VM on my gaming machine and an old Core 2 Duo machine retired from my dad's dental office.
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
-
@ben_lubar said in WTF Bites:
The latest "Microsoft dun goofed" story making the rounds:
From the microsoft-r-open-mro-3.5.0 postinstall script:
#!/bin/bash [...] rm /bin/sh ln -s /bin/bash /bin/sh
Hey Microsoft, how would you like it if you installed a program on your computer and it deleted an important system file and then created a shortcut in its place?
Not as bad as the time that one of their installers (of some sort of ASP support for Apache, IIRC) replaced
/dev/null
with an ordinary file owned byroot
. It's quite amazing how many programs find that surprising; everything either blew up because it couldn't open a standard device at all, or saved a vast amount of data that really needed to be thrown away, or had the rubbish of the world pitched into it.Wouldn't work now; devfs doesn't let you do anything quite so stupid.
-
And we are that crazy.
No sympathy. Boost is well known to be pathological on the build time front as templates are really a very poor scripting language by comparison with, oh, PHP. (The generated code is potentially good, but the process to get there…)
-
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Can you launch things with a fixed seed so that they work exactly the same each time? That helps a lot with testing.
-
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Losing at all possible inputs.
-
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Can you launch things with a fixed seed so that they work exactly the same each time? That helps a lot with testing.
Fixed seeds are only fixed for that specific version of Dwarf Fortress.
However, we do have something vaguely like that: https://github.com/DFHack/scripts/blob/master/devel/prepare-save.lua
Basically, you fuck up a save in a version DFHack is known to work on and then DFHack can detect that specific type of fucked-up save when trying to figure out where global variables are located in memory.
That's not used anymore, as far as I know, since Tarn Adams added a table of named global variables to the executable that we can access.
-
@boomzilla said in WTF Bites:
This is so stupid:
I understand why gnomes would high-five, but why would they kick each other's feet until they bleed?
It's the gnome world finals in shin-kicking.
-
@anotherusername said in WTF Bites:
@tsaukpaetra said in WTF Bites:
Hey, at least it didn't call it illegal!
Illegal ones don't get numbers, I don't think.
Was ET an illegal alien? How did he phone home?
-
@scarlet_manuka said in WTF Bites:
// Inside try-catch-forget block timer = null; timer.Dispose(); timer.Enabled = false;
"How do you get rid of a timer again? I just can't remember, and it's so much effort to look up..."
Even so, you could at least call methods on it first, and set it to null last. Even someone like me who doesn't deal with C-like languages at all knows how wrong this is.I'm just impressed that they have three operations and not a single pair of them is ordered sensibly. That takes planning.
-
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Losing at all possible inputs.
There are some sequences of inputs that will never result in a game over.
For example, if your fortress is down to one vampire or werewolf stuck between some walls and everyone else is dead and has been properly memorialized and your fortress is horrible enough that nobody wants to move in, you can leave that thing running indefinitely and that last citizen will never die.
-
I understand why gnomes would high-five, but why would they kick each other's feet until they bleed?
Sounds like something a first-time Dwarf Fortress player would say.
-
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Losing at all possible inputs.
There are some sequences of inputs that will never result in a game over.
For example, if your fortress is down to one vampire or werewolf stuck between some walls and everyone else is dead and has been properly memorialized and your fortress is horrible enough that nobody wants to move in, you can leave that thing running indefinitely and that last citizen will never die.
That sounds like a bug. And it doesn't sound very fun.
-
@anotherusername said in WTF Bites:
@ben_lubar said in WTF Bites:
@tsaukpaetra said in WTF Bites:
@ben_lubar said in WTF Bites:
Challenge: You don't have to implement it, but what would an automated DFHack integration test even be?
Losing at all possible inputs.
There are some sequences of inputs that will never result in a game over.
For example, if your fortress is down to one vampire or werewolf stuck between some walls and everyone else is dead and has been properly memorialized and your fortress is horrible enough that nobody wants to move in, you can leave that thing running indefinitely and that last citizen will never die.
That sounds like a bug. And it doesn't sound very fun.
Nope, it's because vampires and werewolves can't die of hunger or thirst.
-
@ben_lubar Obviously the game needs to be modified so that they can die of boredom.
-
Today I swing by a client location to pick up a check. The only person there is a guy who would have been fired long ago if the Executive Director had some backbone. As soon as I open the door I hear a beeping. I go grab my check from the ED's desk and ask the guy who should be working somewhere else what the beeping is. He said he hadn't even heard it until I said something.
As this beeping sounded exactly like a UPS error state buzzer I go investigate. It is not a quiet thing. I have no fucking clue how he couldn't have heard it. It turns out that the beeper was the fire alarm which was in an error state and not protecting the building.
How the hell could he not hear that? It was plainly audible from his office. Two seconds on, two seconds off, at high volume. How can someone be so oblivious??
-
@scarlet_manuka said in WTF Bites:
@ben_lubar Obviously the game needs to be modified so that they can die of boredom.
Boredom is one of the weakest ones. If you end up getting a dwarf stressed enough that they give up, one of four things can happen to permanently kill off the dwarf:
- [dwarf] has gone stark raving mad!
The dwarf loses the ability to interact with items (including the ability to wear clothing or pick up food or drinks). They then run around babbling incoherently until they starve, dehydrate, or are killed by some wild animal which they no longer try to run away from. - [dwarf] is stricken by melancholy!
The dwarf will actively try to kill themself, either by throwing themself off a cliff or into a river or lake or volcano. If they can't find a place to do that, they eventually starve or dehydrate. If a dwarven mother is carrying a baby, they'll take the baby with them. - [dwarf] has gone berserk!
The dwarf tries to kill as many people as possible, often immediately being piled by nearby civilians and usually dying before the military even gets close to them. Especially bad when it's a dwarf in the military that gets this. - [dwarf] has stopped responding to the world...
The dwarf basically just gives up and lies on the floor until they die.
And as you can see, putting someone who does not need to eat or drink in a sealed box does not allow any of the four types of insanity to kill them.
- [dwarf] has gone stark raving mad!
-
@tsaukpaetra said in WTF Bites:
Let's see what I see
Is it bad that I mostly saw animals or people doing unidentified but vaguely lascivious things?