11 Matching Annotations
  1. Jul 2021
  2. Feb 2021
    1. Literally, everything in this example can go wrong. Here’s an incomplete list of all possible errors that might occur: Your network might be down, so request won’t happen at all The server might be down The server might be too busy and you will face a timeout The server might require an authentication API endpoint might not exist The user might not exist You might not have enough permissions to view it The server might fail with an internal error while processing your request The server might return an invalid or corrupted response The server might return invalid json, so the parsing will fail And the list goes on and on! There are so maybe potential problems with these three lines of code, that it is easier to say that it only accidentally works. And normally it fails with the exception.
    2. Exceptions are just like notorious goto statements that torn the fabric of our programs.
    1. As you can see, we end up with a lot of boilerplate if-statements. The code is more verbose. And it’s difficult to follow the main logic.
    2. In JavaScript, we have a built-in language feature for dealing with exceptions. We wrap problematic code in a try…catch statement. This lets us write the ‘happy path’ in the try section, and then deal with any exceptions in the catch section. And this is not a bad thing. It allows us to focus on the task at hand, without having to think about every possible error that might occur.
    3. And they are not the only way to handle errors.
    4. In this article, we’ll take a look at using the ‘Either monad’ as an alternative to try...catch.
  3. Jul 2020
    1. “Up north you’d collect lightning bugs and you’d watch them and then you’d let them go again,” Gail said. “I thought it was really cool. I mean, you are looking and trying to figure out how they fly and how that little light works.”

      Isn't curiosity how you fall in love with something or someone ?

    2. Ed says rescuing people is easier because they can tell you what’s wrong with them.

      How interesting that rescuing animals is harder than rescuing people

  4. Mar 2017
    1. I am an outsider who thought that perhaps I could lay a set of parallel sidetracks next to the well-worn ones of System B, an underground railway designed to lift up, carry forward, and sustain those fleeing the plight of System B.

      identity

      escape

  5. Jun 2016
    1. There are so many narratives that could have happened here. The obvious story is that there is this savage attacking a defenseless woman and child until a strong and powerful spaniard came to the rescue. On one hand, this is right and just and must happen to keep the savages at bay. But there are two sides to every story. Here could be a man driven from his home by the spanish. He could have watched his family murdered before his eyes and is out for vengeance. Without first hand account for this, who knows what the guidelines could be.