Live data from Hacker News

If you're just going to sit there doing nothing, at least do nothing correctly

devblogs.microsoft.com

101–110 of 356 posts

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#101

The specific thing the author is suggesting is correct (components should suffer before users do), but I take great offense to their framing. "There may be times where you need to make an API do nothing." "The wrong thing to do is to have the printing functions throw a Not­Supported­Exception." No, no, absolutely no - what the author is describing is a hack to support a shitty client. Yes, you have to do this sometim…

No, not a shitty client, just one that was written before you decided to make this change. If your API breaks it while it doesn't change, it's the API that's being shitty, not the client.

It depends. Did the API document that it could raise an exception if printing isn't supported? Is that unhandled in the client? Then yes, it's a shitty client.

If you're talking about making backwards-incompatible breaking changes to an API, that's another thing.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#102

I've learned this as "swallowing errors" and IMO it's a poor practice. Not only does it not solve the issue at hand (you cannot print on an xbox), but it actively hides how broken the software is, which makes bug discovery and testing much harder. This is one thing I like about Go's panic. You're mostly not supposed to use it or recover from it at run time. It serves as a great vehicle to blare loud sirens at testing…

>It serves as a great vehicle to blare loud sirens at testing time that you (the programmer) screwed up (and that's ok, we all do), and it's time to figure out where and how to fix it :)

Right, but if you read the article, the author is talking less about the developer experience and more about the user experience. "blare loud sirens" is great if you're a tester/developer, not so much if you're an end user. When it comes to the end user, "swallowing errors" is preferable to crashing.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#103
I love and hate this. On a visceral level I don't like dealing with issues via malicious compliance.

OTOH I absolutely agree this is a good call if your goal is for more users to be able to run more software on your platform, even if printing is broken.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#104
post #66

Earlier quoted context omitted.

A file from 1997? Maybe if you get lucky, but there's also a good chance that it will simply look wrong in any office application you try. With Word you can't even guarantee that reopening the file on the same computer & version won't change its formatting. That was the reason I learned TeX. And games? Microsoft broke numerous games by shutting down GFWL. I had to pirate Dark Souls as my original copy wasn't playable…

>With Word you can't even guarantee that reopening the file on the same computer & version won't change its formatting. Source? This seems utterly bizarre.

Difficult to prove considering that was a decade ago, but it did happen to me. Randomly changed font in a random paragraph, randomly repositioned images, etc. Maybe I accidentally broke the document in some way, I don't know, but Word certainly failed to restore it to the exact state it was saved in, and it was always on the same PC and software.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#105

Earlier quoted context omitted.

Here's a rather large (5MB) vintage 1996 Microsoft Word document: https://archive.org/download/cd-pn-0527a/CD_ROM.ISO/APPENDIX... That file opens and appears to render just fine for me in Word 2016. This has been my experience w/ Office files in general. Old files open and render very well in newer versions.

The point made above was "opens exactly as expected" . So, does it look like the authors intended in 1996? I doubt it.

Just flipping thru it I'm not seeing obvious issues. In terms of being usable for reference I think it's reasonable. The diagrams and tables look intelligible and not garbled. Layout isn't visible screwed-up.

Will it be a 1-to-1 with printed output from 1996? Probably not.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#106
post #87

> the function for installing a printer can return immediately with a result code that means “The user cancelled the operation.” I hope this is never shown to the user, because one of the most infuriating things that can happen is when the computer tells me that I did something I actually didn't.

Or more broadly, don't do something unbidden on my behalf then complain when it doesn't work. I swear 75% of the times I've daydreamed about a return to a single-tasking OS like DOS was on account of software trying to 'help' me.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#107
post #4

"The idea here is to have the printing functions all behave in a manner perfectly consistent with printing being fully supported, yet mysteriously there is never a printer to print to." This must be satire. Otherwise I can't comprehend how something as infuriating as this could be presented as a good or smart thing to do UX-wise

Ahh I completely misunderstood the article from a quick reading. It seems like the only solution to a tricky problem.

Thanks to anyone who replied to me pointing that out. It's a good example of when one should read the article more closely before commenting!

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#108

I've learned this as "swallowing errors" and IMO it's a poor practice. Not only does it not solve the issue at hand (you cannot print on an xbox), but it actively hides how broken the software is, which makes bug discovery and testing much harder. This is one thing I like about Go's panic. You're mostly not supposed to use it or recover from it at run time. It serves as a great vehicle to blare loud sirens at testing…

Error design depends on context. For most of the systems I work on, fail fast on request for anything out of spec is the correct design. B2B/Microservices/API focused systems. Windows however has focused on bending over backwards to provide compatibility (including memory patching popular software that was broken, like Simcity https://arstechnica.com/gadgets/2022/10/windows-95-went-the-... ). In the context of a user desktop where a user has no control of correcting the system code, the final experience is more important that correctness in many cases. It doesn't matter who is "in the wrong". Microsoft learned that it doesn't matter why the BSOD occurred, just that bad software/hardware was giving them the bad reputation.

So yeah, fail fast/halt catch fire on any invalid input/condition is my personal preferred design, but I can see the value in this approach in this environmental context. The important thing here is that context and not applying either dogmatically. Don't take Mr Chen's approach in reactor or HFT designs for example. Fantastic approach for game engines.

Re: If you're just going to sit there doing nothing, at least do nothing correctly

#110
post #67

Earlier quoted context omitted.

>the same DVI file. Which is used by approximately no one. Good luck uploading your resume in DVI.

Good luck uploading your CV in PDF. I tried that a few times and got moaned at a load that my CV must be in Word format. In the end I converted the PDF into images, and created a Word document in OpenOffice (this was a while ago) with one page image per page. Got moaned at for that too.

The only reason they want your resume at all is to run a keyword extractor over it. If you know this, why are you making their job harder?
Post reply on HN