News for hackers. Stuff that matters.
Re:How can you not be romantic about programming? (2020) by jholman on Saturday February 20, 2021 @05:49PM (#26208745)
What you described:

  let x = 2 // runs
  x = 3;    // runs
  x = 3;    // runtime error, you made a mistake
No, I'd want a balance update to succeed. Even if it's to the same value that it already had.
Re:How can you not be romantic about programming? (2020) by wccrawford on Saturday February 20, 2021 @06:47PM (#26209271)
Or at least return a "no change" message, and not a failure result in the 400s or 500s.
Re:How can you not be romantic about programming? (2020) by fastball on Saturday February 20, 2021 @09:13PM (#26210218)
I don't think it's clear from the OC that even if they weren't using the wrong HTTP response they would want an update to succeed if it is the same value, at which point 409 could be a reasonable response code.