News for hackers. Stuff that matters.
Re:Technical Debt: Why it'll ruin your software by m463 on Friday October 23, 2020 @01:47PM (#24871992)
Sometimes it's hard to tell the difference.

for instance one smart and experienced guy I knew said if there was an error, your program should just fail instead of giving a ton of messages and recovering.

and if you're just throwing code together, that might be what you do.

on the other end of the scale, a well written "second pass through everything with cleanup" might have tastefully written code, a few relevant comments and consistency.

and then I've seen a lot of code that appears to look like that, but is copy/paste garbage. (sort of the coding equivalent of a wordpress theme)

Re:Technical Debt: Why it'll ruin your software by pjc50 on Friday October 23, 2020 @02:59PM (#24872659)
I've come round to the "fail hard and early" view, provided you can be sure in your design that it doesn't leave junk lying around. Because otherwise contaminated data and invalid states start propagating everywhere..
Re:Technical Debt: Why it'll ruin your software by quicklyfrozen on Friday October 23, 2020 @05:14PM (#24874260)
This can be fun if it's a particular client request that causes a hard failure, and the client retries several times before giving up. Before you know it, all your instances are restarting and no traffic is being handled...

So fail early, but not too hard.

Re:Technical Debt: Why it'll ruin your software by ziml77 on Saturday October 24, 2020 @12:35AM (#24876971)
Interestingly I prefer failing hard specifically for data consistency reasons. I've had to deal with systems that swallowed far too many errors and let themselves get into an inconsistent state which then caused other operations to not fail but instead persist invalid data. It's very hard to clean messes like that up (restoring a nightly backup is easy, but that's a last resort).
Re:Technical Debt: Why it'll ruin your software by darkerside on Friday October 23, 2020 @02:28PM (#24872363)
> your program should just fail instead of giving a ton of messages and recovering

I would bet that he was right in that situation, but that he was also making a nuanced statement. Not all code should fail loudly, but when it should, "recovering" can sometimes be a distraction from a very real problem that needs to be addressed by the right person.