Live data from Hacker News

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

devblogs.microsoft.com

31–40 of 356 posts

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

#31
post #8

I understand the logic here, and I'm aware Microsoft has a large number of convoluted backward-compatibility requirements, but this seems like drinking to solve your problems and just putting off the inevitable hangover. To be clear: what you're doing here is lying to the user and the developer. Maybe that's justified in isolation, but now this lie is one more bit of "hidden state" you have to keep track of in furthe…

This resonates with me. My computers used to crash at the app level, OS level or hardware level. Now when something goes wrong the system just kinda gets lazy and stops working. But it won’t crash. I’ve had my mac pinwheel on the login screen. I can still access the shell and file shares remotely, and even screen share to a logged in user. But login.app refuses to crash so it’ll just pinwheel. I’m glad I never forgot…

I have a suspicion that "number of crashes" got badly Goodharted inside major OS vendors. After all, you can "prevent" most crashes by just having a top-level "catch(Exception e) {}" handler, which of course just leads to the program doing nothing instead in an un-debuggable way, but hey: crashes went down! KPI achieved!

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

#32
post #15

Why /wouldn't/ I want to print something from my Xbox?

Due to the input device most people will use (controller), apps that work best on Xbox are those used to consume content like photos or videos.

You might be viewing something and want to print it, but that's clearly not desirable enough for Microsoft to build print functionality into the Xbox UI.

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

#33
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

No it's not satire. It's a demonstration of the excellence in backward compatibility and cross-compatibility that Microsoft has always been known for, and that so-called modern players like Google and Apple don't take seriously.

Just because an XBox can't print doesn't mean that an app that prints shouldn't run on XBox. It should just mean that the printing function shouldn't run. How to achieve that is exactly what Raymond Chen, a Microsoft and Windows veteran, is trying to explain here.

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

#34

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…

The issue is that sometimes you need to implement an API which existing clients are already using. You can't go back in time and re-compile, much less re-write the clients.

It all depends on how the clients are currently using the API. If the clients are already testing for NotSupportedException, then that's what you should return. But if not, you need a different approach.

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

#36

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.

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

#37

I understand the logic here, and I'm aware Microsoft has a large number of convoluted backward-compatibility requirements, but this seems like drinking to solve your problems and just putting off the inevitable hangover. To be clear: what you're doing here is lying to the user and the developer. Maybe that's justified in isolation, but now this lie is one more bit of "hidden state" you have to keep track of in furthe…

as the article says, the correct solution is to provide an API that applications can access to check if the functionality is offered at all.

functions that return correct null responses isn't the ideal behaviour, it's the fallback for when you're already off the happy path.

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

#38
post #10

People are reacting negatively as expected, but stuff like this is exactly why you can click on a file that was written in Word '97 or a game that was compiled for MS-DOS three decades ago and it opens on your computer exactly as expected. Backwards compatibility is always messy. You either do it imperfectly or don't do it at all.

A file that was written in Word '97 did not even open exactly as expected on two different computers 25 years ago. Formatting depended on the installed printer drivers. Good luck with that document today.

My LaTeX files from 35 years ago, on the other hand - they just do fine.

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

#39
post #10

People are reacting negatively as expected, but stuff like this is exactly why you can click on a file that was written in Word '97 or a game that was compiled for MS-DOS three decades ago and it opens on your computer exactly as expected. Backwards compatibility is always messy. You either do it imperfectly or don't do it at all.

Umm but you can’t find a current version of Word that actually does that. Try it sometime.

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.

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

#40
post #22

Earlier quoted context omitted.

Except now you have lost the ability to run all the software that cannot be fixed and recompiled for whatever reason.

You could still offer the mocked APIs, but have them be opt-in. Also, having the compiler throw an error doesn't mean that an older, already compiled executable won't work.

> Also, having the compiler throw an error doesn't mean that an older, already compiled executable won't work.

And when the older, already compiled executable calls the API, how do you make things "work"? That's exactly what the article is about.

Post reply on HN