9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 8y ago · link · parent
Also it can make user feel uncomfortable, as if there is someone behind their back standing and looking what they are doing with the site.
This popup is also deceiving users. For example on the screenshot [1] we can see a human user thinking that a real person wrote a greeting to him and wasting time of his life replying to a bot.
comment 8y ago · link · parent
I don't see the problem with that. Unhandled exceptions can occur at any place of your program.
I also don't see why the unhandled exception from the background thread cannot terminate main thread. Why not? That is how unhandled exceptions are supposed to work. Terminating the program is the optimal default behaviour for any error in my opinion. This way you won't miss them.
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
He doesn't like that the callback is called immediately - but Promises just represent a result that will be available later and do not guarantee (and should not) when the function will be called. If you want to delay some function call, do it explicitly or use a delay promise.
In my opinion, the main problem with promises is broken error handling. They don't play well with exceptions. For example:
var p = Promise(function (res, rej) {
throw new RuntimeError("System is broken");
});
This code will just ignore the error. While it is expected that the runtime error would float up and terminate the program - that is what runtime errors are made for.This also makes writing tests more difficult because tests often use exceptions to indicate failure.
I have some ideas how to fix it (neither is perfect), but the comment will become too long.
comment 8y ago · link · parent
comment 8y ago · link · parent
So if you want to steal passwords, make some extension like "Mp3 Youtube Downloader" or "Ad Blocker" and get access to millions of happy users' browsers.
CSP looks like an ugly hack rather than a good solution. Why would you need to specify allowed sources for scripts if you control your HTML code? I don't understand why the author praises it. What a stupid time-wasting technology.