Live data from Hacker News

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

devblogs.microsoft.com

291–300 of 356 posts

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

#291

Earlier quoted context omitted.

> If the platform changed and Angry Birds crashed Angry Birds doesn't print AFAIK. The scenario is an app being run on a platform that doesn't meet its declared system requirements. If an app requires Windows, and customer tries to run it instead on Xbox OS, then he should be surprised it even launches. He should not be surprised if it crashes on print. > customer would not accept "but look at all of these other Angr…

https://en.wikipedia.org/wiki/Metaphor Telling customers "well go use this other platform" is not an effective way to build or grow a platform.

> Telling customers "well go use this other platform" is not an effective way to build or grow a platform.

Honesty is the best policy.

Telling customers they should expect to run apps that don't support your platform is not honest.

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

#292

Earlier quoted context omitted.

The situation is "What should happen if an app tries to print on an Xbox?". I do not believe code that tries to print often runs on app startup.

Printing is one example of this pattern - there are plenty of reasons APIs end up unsupported Printing may also run on startup. Consider software for a vinyl cutter which looks for the device when beginning.

> Printing is one example of this pattern

Then my point stands.

> Consider software for a vinyl cutter

On Xbox?? Good grief.

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

#293
post #273
post #272

Earlier quoted context omitted.

This is great and all until you completely ignored the fact that wine exists and went on to call user space design questions by Microsoft “trivial”. I could also start listing ways that the Linux kernel maintains backwards compatibility with not just software but hardware that’s decades old but the list would get too long. No one is complaining that Microsoft has too much backward compatibility, it’s their utter disr…

Linux kernel on its own doesn't run software.

> Linux kernel on its own doesn't run software.

Linux runs /sbin/init.

Which you can make any executable you want.

Not to mention initial RAMdisk (loaded by a bootloader like grub) which can be of arbitrary size & loaded up with an arbitrary ton of goodness.

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

#295
Everyone here is hung up on doing "nothing" and handling "errors" and I feel like the post does a poor job explaining how it is not just swallowing everything that's going wrong and going kumbaya. The actual context is that the author is doing emulation/compatibility for software that will not change, and that's very different from most contexts. This is especially confusing because Microsoft often blurs the line between the two themselves, and that's not actually what is being talked about here at all.

Really, emulation is all about telling lies. Your Xbox doesn't actually have a way to attach a printer. You're running a game on Linux, not Windows. Your fake iPhone is actually a ARM server in AWS. The point here is that if you're going to lie you better do so convincingly. That's because you need existing applications to still work! When Microsoft says you can port your existing Windows app to Xbox the promise for the Windows app was that it would be able to print, and so Xbox needs to lie for that to happen.

This is very different from a normal error. If a program does a use after free, and you silently pretend the bug doesn't exist by working around it, then you're not doing anything correctly. That's because nobody promises that your existing use after frees will be bug-for-bug compatible on a new platform.

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

#296
post #122

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…

The point of the article, in large part, is that when you’re designing an alternative runtime for a new platform, it is up to you what conditions are considered to be errors. Deciding to make a component of the runtime “inert” exists before and above the decision to make the implementation panic. In this specific case: it is up to Microsoft to decide what the semantics of “printing on an Xbox” are. It could be an err…

> In this specific case: it is up to Microsoft to decide what the semantics of “printing on an Xbox” are. It could be an error; or it could be something that “could be supported in theory in the future, but for now has no way to actually accomplish it.” This is a design choice, not a development choice.

Anything wrong with "print to file"? There'd be no dead tree output but (file) output nonetheless & printing as a function should work.

Btw love the title of this article!

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

#297

Earlier quoted context omitted.

> So many people commenting on this article seem to have fundamentally misunderstood what the situation/scenario even is Agreed 100%. Those people have overlooked that this is about attempting to run apps on an unsupported OS. And when printing, the OS attempting to gaslight the user into thinking the fail is his fault for not connecting a printer.

The apps are being run on a supported OS which doesn't have all features. Your framing is bizarre.

If this app supported Xbox OS, then how come:

"The app that the user installed on the Xbox was probably tested primarily, if not exclusively, on a PC"

??

Note that Xbox OS is not Windows. If an app says "requires Windows", then it means requires Windows.

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

#298
post #179

Earlier quoted context omitted.

So it 'simply returns to main loop'. I.e., the user hits [Print] and then it maybe flickers and goes back to the home screen. How in heck is that more useful than App reporting that "I can’t find any printers"?

> the user hits [Print] and then it maybe flickers and goes back to the home screen. And reports the exception.

The idea is to accommodate apps that just didn't handle the exception, or handled the exception by crashing, probably because they only tested the app on a PC, where printing was always available.

> Well, the wrong thing to do is to have the printing functions throw a Not­Supported­Exception. The app that the user installed on the Xbox was probably tested primarily, if not exclusively, on a PC, where printing is always available. When run on an Xbox, the exception will probably go unhandled, and the app will crash. Even if the app tried to catch the exception, it would probably display a message like “Oops. That went badly. Call support and provide this incident code.”

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

#299

Earlier quoted context omitted.

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

If you "doubt" it, please provide a specific example of what you believe is inaccurate in the document rendering.

I doubt it because, as I said, Word did not even render the document the same on two different installations back in the day. Contrary to LaTeX, there is really no way to know what "opens on your computer exactly as expected" even means. We do not know what the original author intended it to look like, because we do not know how the document looked like to them.

As long as there is no retroactive interpretation, like it happened with RGB, for example, the "doubt it" will stand.

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

#300

Earlier quoted context omitted.

> the user hits [Print] and then it maybe flickers and goes back to the home screen. And reports the exception.

The idea is to accommodate apps that just didn't handle the exception, or handled the exception by crashing, probably because they only tested the app on a PC, where printing was always available. > Well, the wrong thing to do is to have the printing functions throw a Not­Supported­Exception. The app that the user installed on the Xbox was probably tested primarily, if not exclusively, on a PC, where printing is alwa…

> probably because they only tested the app on a PC

If they made an app only for PC, why would they test it on Xbox??

If they wanted their app to run on Xbox, why would they not make an Xbox version, and test it there??

RC's scenario is taking an app made for only Windows PC and running it on Xbox. I wonder if he has found even one example which permits this in the licence.

Post reply on HN