The fix either takes a long time, or the solution takes a long time to find

Meme
The fix either takes a long time, or the solution takes a long time to find

Posted Jan 5, 2021, 10:47 AM UTC

49415
darkdimensiongd:c::bash:•

I've pretty much accepted that the amount spent investigating an issue is not relate to how big the fix is.

My worst example was trying to understand why when reading a texture would work on Linux, but would display random(ish) colors on Windows. Turns out when reading binary files on windows, you need to specify that to the operating system, otherwise it tries to read it as a text file.

The solution was changing a "r" to "rb". Literally one character, which took me more hours than I'd like to admit to debug. That pull request didn't look very impressive ...

40
Wizard_Knife_Fight•

I hate spending days on a problem to send up a PR to my team of a monstrous two lines or so. So, so embarrassing lol

9
tinydonuts:c::g::j::cs::cp::perl:•

Some of the most impactful fixes are just a line or two.

4
gman1cusOP•

Lol! That's a rough one.

3
itstommygun•

This is accurate 99% of the time, or maybe more.

Coding a fix usually isn't hard. It's usually just one more method, a simple math issue, or a try/catch. None of those things take long to do.

Finding said bug is always the part that takes the longest. Especially when using the debugger isn't helping, like when the issue is only happening with live/prod data and not with your test data.

8
aaahsellschun•

And the issue is some obscure racing condition that happens only every other week or so during production...

4
HazelCheese•

This story is marked as 1 point but it took two weeks, what went wrong X?

6
Loves_Poetry:js:•

That's when you should have a speech prepared about code quality and predictability and why it's important to have good quality code, so that estimates remain somewhat predictable

3
Sn0H0ar•

Just modify the points!

1
reckless_commenter•

Even worse: Realizing and fixing such a bug in code that processes a big data set... followed by throwing out thee old data that took two weeks to process, and reprocessing the data set for another two weeks.

Source: me.

4
Isgrimnur•

What if the true bug was the friends we made along the way?

3
[deleted]•

When you have to spend days for a float: right to not f* up the whole page, but can write a 500 line function with almost optimal code in a few hours...

2
BobasaurlikesBoba•

Semicolon boys?

2
ThePaperPilot:js: •

Hopefully not. Any decent editor should point out the lack of a semicolon long before the code is even compiled, and even then hours? I can't even imagine what the code would look like for a missing semicolon to be that hidden

1
JennaSys•

The only thing worse than spending all day tracking down a bug that was just caused by a careless typo, is spending all day on tracking down a bug - and NOT finding it.

2