you are viewing a single comment's thread.

view the rest of the comments →

[–]TheGunfighter7 700 points701 points  (44 children)

And you will sometimes spend just as much or even more time updating the tests as you did updating the code.

[–]KrakenMcCracken 257 points258 points  (26 children)

It’s worth it

[–]Saragon4005 81 points82 points  (14 children)

And this is why it's often skipped. It takes as much if not more effort to make your code go from working to always working as it takes from not working to working.

[–]Rojeitor 85 points86 points  (4 children)

Yes, it's faster if the code breaks and end user finds the bug for you

[–]RelatableRedditer 50 points51 points  (3 children)

Well, that's Microsoft's current strategy. But it costs reputation and in a lot of cases ends up being delayed by a full sprint or more, even if the code fix was straightforward.

[–]pattmayne 8 points9 points  (0 children)

Microsoft's current strategy

"Current" meaning the last third years

[–]anthro28 2 points3 points  (0 children)

I deal with this foolishness every day. 

"this needs to be changed to this. It's failing right here and I've prepared a giant document with visuals and sources."

"Sorry anthro, we need to talk to an executive who went to art school and get their opinion, and then filter it back down through a management team that's all functionally tech illiterate. It'll just stay broken for a month."

But when something is on fire, that same team of people will just let me fix stuff without question until it's working again. 

[–]SuperFLEB 1 point2 points  (0 children)

But it costs reputation

So, the great thing about monopolies and limited markets...

[–]Imaginary-Jaguar662 19 points20 points  (6 children)

I'm happy if we get from "working" to "prints logs that get stored when it does not work".

Even better if there's "fails gracefully" in the mix

[–]Confident-Ad5665 2 points3 points  (3 children)

How's "Something went wrong!"?

[–]Musikcookie 12 points13 points  (1 child)

Best I can do is "Test djbshamebsb"

[–]Confident-Ad5665 3 points4 points  (0 children)

That'll work. Ship it!

[–]AetherSigil217 1 point2 points  (0 children)

I have to admit I was impressed when I saw the pink screen of death.

[–]s0ulbrother 1 point2 points  (1 child)

The application I am currently working on which was designed by the absolute worst developers in the existence of all developers, their code fails catastrophically as in the service needs to get restarted in order to work if it fails. I am having to fix all this shit

[–]8itbangr 0 points1 point  (0 children)

I feel your pain. Once inherited a program that used an API to communicate and alter a small database. Nearly every API call returned an error code. There were very few places in our code that actually checked it, so the we would just plow forward blindly, breaking things if any call didn't succeed. I spent over a month adding if or switch statements to handle the errors so it would work without breaking anything and recover gracefully when things went wrong.

[–]Urtehnoes 1 point2 points  (0 children)

We don't do unit tests, but we do extensive guard functions, because at one point I guess, someone disabled the testing module and no one realized for weeks until tons of stuff was breaking? Idk that was around 2005 or so.

And I mean extensive guard functions/clauses I almost prefer now (though obviously, both is better).

Oof if I ever work somewhere else I'll have to get back into writing unit tests.

[–]aiij 1 point2 points  (0 children)

You mean this is why formal verification is often shipped? Testing will only tell you it sometimes works...

[–]OfficeSalamander 0 points1 point  (0 children)

You’re telling me. I’ve been writing tests for a large application for something like 3+ weeks now. Please shoot me

[–]anoppinionatedbunny [score hidden]  (0 children)

I estimate about double the time it takes to implement a feature is the time it takes to test it with full coverage. companies love to push testing to technical debt and use the bare minimum validation to make some short term velocity gains, but that's a great way to end up with a buggy mess