6 ms·
Sure, but you'd be more frustrated if your app just crashed. If the app is not prepared for printing not being supported, and printing just throws an exception
by kentonv 3y ago
Sure, but you'd be more frustrated if your app just crashed.
If the app is not prepared for printing not being supported, and printing just throws an exception, the app probably just crashes. That's bad.
If the app is prepared for printing not being supported, it should be calling the explicit API to check if printing is supported, and then not displaying the UI for printing if it isn't. The article is not about these apps, it's about what to do about apps that fail to check first.
The bug is with the app, but a good platform does its best to make bad apps work anyway, rather than have them just crash.
- tsimionescu 3y agoTo me, a better solution would be for the system to pop up a notification informing the user that printing is not supported on this platform, and then whatever other solution is OK.
- hn_throwaway_99 3y ago> To me, a better solution would be for the system to pop up a notification informing the user that printing is not supported on this platform That's the whole point of this article - when you can't control the various platforms that your application is run on, you want to try to do the "least bad" thing, even if that platform didn't anticipate the situation of, in this case, telling people that printing isn't supported.
- kentonv 3y agoThe article is the other way around -- it's written from the perspective of a platform developer trying to deal with apps that didn't anticipate the situation.
- hn_throwaway_99 3y agoThanks for the clarification, you're correct. The nuance/complexity is that the platform developer must conform to a platform spec (in this case, the Windows API) that usually makes some underlying assumptions about the capabilities of the system that runs it, which may not always be correct.
- kentonv 3y agoYes, I'd add to that by pointing out that the "spec" is a de facto spec subject to Hyrum's Law, that is, people have built their apps against other implementations of the platform and inevitably don't handle any behavior not seen on those other implementations.
- nonethewiser 3y agoYes exactly, but Microsoft isnt the one who can implement that.
- tsimionescu 3y agoThis was about the Xbox printing subsystem, right? Of course they can implement that.
- nonethewiser 3y agoIt would be whoever writes the software (ie the game) for the xbox.
- tsimionescu 3y agoThe Xbox OS can very well pop up a system notification directly to the user if an unsupported API is being accessed. This is not Unix where you have to assume no UI may even exist - the Xbox OS knows full well how to draw its own dialog on the screen.
- BeFlatXIII 3y agoI waffle whether I agree with you. On the one hand, it makes sense to tell the user that clicking that juicy print button isn't going to work. On the other, it's a popup they'll have to dismiss telling them some recoverable error they cannot do anything to fix.
- nerdponx 3y ago> Sure, but you'd be more frustrated if your app just crashed. I don't know about that. If it crashes, I might not try that thing again.
- yungporko 3y agothese aren't the only two options. first of all, i certainly wouldn't be more frustrated if the app just crashed, but how about just letting the user know that the xbox can't print? why does everybody seem to think that's out of the question?
- badsectoracula 3y ago> but how about just letting the user know that the xbox can't print? why does everybody seem to think that's out of the question? Because the situation described is about an application that was made for PC (which supports printing) and a user is trying to run it on an Xbox (which doesn't support printing) with the developer never even imagining someone will try to run the program on an Xbox in the first place. You can't implement a message about an error you don't even know will happen.
- tsimionescu 3y agoThe Xbox system APIs can certainly notify the user directly. It's not like they don't have the ability to pop up system UIs.
- badsectoracula 3y agoThe Xbox can (and probably can do that while simulating the "user pressed cancel" dialog API for adding printers) but my understanding for what yungporko wrote was that the program would be the thing that lets the user know the xbox can't print.
- tsimionescu 3y agoThe original article is about how the Xbox implementation of the Windows printing subsystem should behave, from one of its designers. They considered making it throw an Exception, but decided to instead behave as if printing is supported but there are no printers, so that Windows apps would not crash. My point was that, as an end user of such apps on Xbox, my preference would have been to have the Xbox OS tell me directly that printing is not supported on this system, even if the app doesn't know about this.