Just some dude.

  • 0 Posts
  • 11 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle

  • Mak'@pawb.socialtoProgrammer Humor@programming.devYes, But...
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    2
    ·
    14 days ago

    …HTTP is a high level application protocol and its errors are supposed to be around access to resources…

    I’ve had fellow developers fight me on this point, in much the same way as your parent post.

    “If you return a 404 for a record not found, how will I know I have the right endpoint?”

    You’ll know you have the right endpoint because I advertised it—in Open API, in docs, etc.

    “But, if /users/123 returns a 404, does that mean that the endpoint can’t be found or the record can’t be found?”

    Doesn’t matter. That resource doesn’t exist. So, act appropriately.






  • I’m slightly embarrassed to admit that I’m 25 years into my career and I’ve only just started to put this into practice. (I say “slightly” because, hey, I’ve been doing this without any advice or mentorship, and, maybe, one can be forgiven for not finding this stuff self-obvious…)

    Took a new position and got tired of people scheduling my lunch four out of five days a week. In addition to the meetings before and after, it often meant most of my day in meetings without a break.

    So, I threw a tentative meeting for that time slot and the number of lunchtime meetings cratered. Somehow, folks were able to figure out another time or solve it without a meeting. Only twice in four months have I been asked if that “meeting” could be moved.

    Needless to say, I’m a convert and would wholeheartedly recommend the practice—of scheduling a self-meeting, for any purpose, be it lunch or even just productive time—to folks well before they hit 25 years.