- Jan 2022
-
thecodebarbarian.com thecodebarbarian.com
-
Seems easy, right? How about the below code, what will it print? new Promise((_, reject) => reject(new Error('woops'))). catch(error => { console.log('caught', err.message); }); It'll print out an unhandled rejection warning. Notice that err is not defined!
-
- Aug 2021
-
stackoverflow.com stackoverflow.com
-
Good catch, @Hokascha. The project claims support for cross-domain iframes, but reading the docs reveals that it does still require server access to the embedded domain.
-
- Apr 2021
-
unix.stackexchange.com unix.stackexchange.com
-
Notice the use of Enter key after backslash in the sed command.
-
- Feb 2021
-
sobolevn.me sobolevn.me
-
we also wrap them in Failure to solve the second problem: spotting potential exceptions is hard
-
Almost everything in python can fail with different types of exceptions: division, function calls, int, str, generators, iterables in for loops, attribute access, key access, even raise something() itself may fail. I am not even covering IO operations here. And checked exceptions won’t be supported in the nearest future.
-
You still need to have a solid experience to spot these potential problems in a perfectly readable and typed code.
-
print will never be actually executed. Because 1 / 0 is an impossible operation and ZeroDivisionError will be raised.
-
-
stackoverflow.com stackoverflow.com
-
If you teach your users to trust that URL bar is supposed to not change when they click links (e.g. your site uses a big iframe with all the actual content), then the users will not notice anything in the future either in case of actual security vulnerability.
-
- Dec 2020
-
github.com github.com
-
Can we just forward/bubble all events emitted by the underlying input element?
-
- Oct 2020
-
leiss.ca leiss.ca
-
Good risk management is inherently simple; adding too many complexities increases the likelihood of overlooking the obvious.
-
- Sep 2020
-
www.javascriptjanuary.com www.javascriptjanuary.com
-
The problem I have with this approach to state and prop variables is that the difference between them is very blurry. In React you can clearly see that a prop is an input to component (because of clear function notation), and that state is something internal. In Svelte they are both just variables, with the exception that props use export keyword.
This is something I've seen before: people noticing that Svelte is missing some kind of naming convention.
React has use___ convention, for example. Without that, it makes it hard to see the difference between and know just from the name that a function is an (mentioned in the other article I read) action and not a event handler or even component, for example.
-
-
-
Just throwing in <div class="{$$props.class || ''} otherChildClass"></div> seems the easiest, and it'll avoid undefined classes. I feel like many aren't noticing the undefined values getting inserted in their classes.
-
- May 2020
-
weather.com weather.com
-
These options have almost deceptively similar wordings, with only subtle difference that is too hard to spot at a glance (takes detailed comparison, which is fatiguing for a user):
- can use your browser’s information for providing advertising services for this website and for their own purposes.
- cannot use your browser’s information for purposes other than providing advertising services for this website.
If you rewrite them to use consistent, easy-to-compare wording, then you can see the difference a little easier:
- can use your browser’s information for providing advertising services for this website and for their own purposes.
- can use your browser’s information for providing advertising services for this website <del>and for their own purposes</del>.
Standard Advertising Settings
This means our ad partners can use your browser’s information for providing advertising services for this website and for their own purposes.
Do Not Share My Information other than for ads on this website
This means that our ad partners cannot use your browser’s information for purposes other than providing advertising services for this website.
-
-
-
I reckon that it was: less a communication failure more a failure to pay attention – no disrespect intended. Given the unfortunate coincidence, it's almost entirely understandable that everyone concerned lost sight of Mozilla's forewarning.
-