1. 5
    1. 6

      My guess is that in the source code it’s implemented in HTTP status code order (since that’s a fairly reasonable choice), and the autogenerated documentation doesn’t sort the method names. I think this is more a bug with the documentation generator.

      1. 1

        It looks like your guess is correct.

        https://hapi.dev/module/boom/api/?v=10.0.0#http-4xx-errors

        After re-reading the blog post, it seems the author is aware of that as well, although it’s not entirely clear what author had in mind at first:

        (They are in numeric order, but the numbers are not displayed.)

    2. 5

      This is such a low-effort posting that’s in such bad faith I’m appalled to see it here. I wish we had a “low effort” flag for such things.

    3. 3

      I would expect the source code to contain the status code in numerical order. It’s not obvious to me that it’s so much better to display HTTP status codes alphabetically rather than numerically that it’s worth hacking the doc generator to make it show status codes in an order that’s different from how they are in the source code. In fact, it’s not obvious to me that it’s better to display status codes alphabetically rather than numerically at all. At the very least, I would expect to see the 1xx, 2xx, 3xx, 4xx and 5xx codes separated, and even within a range, there’s usually some meaningful grouping (e.g temporary redirect and permanent redirect are next to each other).

      I don’t understand the point of this post.

      1. 2

        I think the problem that the author pointed out was the lack of a proper documentation experience. To my understanding, it was OK to sort the methods in numeric order but one should also reveal these numbers, not just method names, to allow the minimum time spent on looking at the docs. Respecting other’s time is a mutual thing.

    4. 3

      A workplace of mine once got a datasheet for a five-figure-USD piece of hardware that was in Comic Sans font. We did not buy this hardware.

    5. 2

      I have had to warn a client about this before.

    6. 1

      Why are these functions and not constants?

      1. 1

        Because they aren’t response codes, but methods to generate those responses.

    7. 1

      Methods sorted alphabetically is an arbitrary bikeshed-level requirement. There’s no insight in this rant.