Whitespace Sins
henrysmith.org3 pointsby h2s0 comments
> visually represent logical segments of the code
This is exactly the use case in which function definitions excel. Use functions for this, not comments. # Try to read the configuration file.
If this wasn't already obvious without the comment, then the code is a mess. Tidy the code up instead of painting over the problem with comments. http://foo.ploeh.dk/customers/1234/orders
You'd have http://foo.ploeh.dk/DC884298C70C41798ABE9052DC69CAEE
And you'd have to get that URL out of the response to another request you'd already made. I never liked this idea, and the linked article provides a really strong counterargument to this approach to HATEOAS. When browsing a website, decisions on what links will be
clicked are made at run time. However, with an API, decisions
as to what requests will be sent are made when the API
integration code is written, not at run time. Could the
decisions be deferred to run time? Sure, however, there isn't
much to gain going down that route as code would still not be
able to handle significant API changes without breaking.
Fuck off.