• 0 Posts
  • 24 Comments
Joined 1 year ago
cake
Cake day: July 15th, 2023

help-circle

  • JSON Problem Details

    https://datatracker.ietf.org/doc/html/rfc9457

    • It has a specification, so a consumer of the API can immediately know what to expect.
    • It has a content type, so a client sdk can intelligently handle the response.
    • It supports commonly needed members which are a superset of all of the above JSON examples, including type for code and repeating the http status code in the body if desired.
    • It is extensible if needed.
    • It has been defined since at least 2016.

    This specification’s aim is to define common error formats for applications that need one so that they aren’t required to define their own …

    So why aren’t you using problem details?



  • elrik@lemmy.worldtoMemes@lemmy.mlWho needs Skynet
    link
    fedilink
    English
    arrow-up
    18
    ·
    6 months ago

    The relative number here might be more useful as long as it’s understood that Google already has significant emissions. It’s also sufficient to convey that they’re headed in the wrong direction relative to their goal of net zero. A number like 14.3 million tCO₂e isn’t as clear IMO.




  • I use an app called Recipe Keeper. It’s amazing because I just share the page to the app, it extracts the recipe without any nonsense, and now I have a copy for later if I want to reuse it. I literally never bother scrolling recipe pages because of how terrible they all are, and I decide in the app if the recipe is one I want to keep.

    It also bypasses paywalls and registration requirements for many sites because the recipe data is still on the page for crawlers even if it’s not rendered for a normal visitor.








  • I disagree. You should have validation at each layer, as it’s easier to handle bad inputs and errors the earlier they are caught.

    It’s especially important in this case with email because often one or more of the following comes into play when you’re dealing with an email input:

    • You’re doing more than sending an email (for ex, creating a record for a new user).
    • The UI isn’t waiting for you to send that email (for ex, it’s handled through a queue or some other background process).
    • The API call to send an email has a cost (both time and money).
    • You have multiple email recipients (better hope that external API error tells you which one failed).

    I’m not suggesting that validation of an email should attempt to be exhaustive, but a well thought-out implementation validates all user inputs. Even the underlying API in this example is validating the email you give it before trying to send an email through its own underlying API.

    Passing obvious garbage inputs down is just bad practice.




  • Storage is probably the easier aspect to address. Storage is cheap and decentralized storage systems have existed for decades.

    The problem is bandwidth and latency. Most residential ISPs do not offer high bandwidth and low latency upstream connections, which means there’s no good way to serve the content you’re storing.

    Residential fiber is becoming more common in some areas, but often those residential plans still limit upstream or specifically have terms in their acceptable use policy that forbid such activities. Here’s an example from my fiber provider, which couldn’t be clearer:

    You may not use the Services to host any type of server.

    It’s a little silly of course, because if you were playing a game and hosting, you’re probably hosting a server! But if I were serving videos to thousands of peers, I’m sure they would notice and take issue.