Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Web developer for less than a year here, so just offering my perspective on what "new web devs" know these days. I know there are status codes beyond 200 and 404, and work with maybe a dozen in regular rotation. I know there are probably hundreds more, but until they are in more regular use I think it would just inhibit clarity to use them (just like how using less precise language paradoxically makes your prose clearer sometimes). This is sort of a chicken and the egg problem, but the paradigm could definitely shift if the marginal usefulness is high enough.

URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

Of course I know about HTTP verbs PUT and DELETE and HEAD-- is there really any web dev who doesn't? And I am pretty rigorous about using the appropriate one (unlike with status codes).

I don't have an opinion on how apps are isolated from the web and don't have interlinks between them. Don't really use mobile apps myself except utility ones like Spotify and Netflix.



You should put a bit of effort into making sure you use the most appropriate status code.

If a client isn't already aware of the code, it decides what to do based on the first number:

- 1xx - continue receiving content

- 2xx - finished receiving content

- 3xx - follow redirect

- 4xx - client error occurred, show error page

- 5xx - server error occurred, show error page

So there is no harm in using better (but less commonly known) codes


- 1xx - Don't Refresh Yet

- 2xx - You Don't Need Refresh

- 3xx - We're dealing with Refresh for you

- 4xx - Don't Bother Refreshing

- 5xx - Refresh, You Might Get Lucky


5xx - try again later, if applicable.


> URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

It's a universal namespace, just like UUIDs, but with just enough extra sauce to make it theoretically possible to do interesting things with it. So 'urn:isbn:0451450523' might represent The Last Unicorn, and if you fed it to your Kindle it might enable you to buy it, and if you fed it into Nook ditto, and if you fed it into Project Gutenberg you might get a notice that it won't fall out of copyright until A.D. 3172, and if you fed it into your browser it might do any of those things or just look it up on ibiblio or Wikipedia.

Unfortunately, like many good ideas, it didn't take off because folks couldn't imagine a profitable use for it.


Looks a lot like the resource names on AWS [1]

<!-- AWS Elastic Beanstalk application version --> arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment

<!-- IAM user name --> arn:aws:iam::123456789012:user/David

<!-- Amazon RDS tag --> arn:aws:rds:eu-west-1:001234567890:db:mysql-db

<!-- Amazon S3 bucket (and all objects in it)--> arn:aws:s3:::my_corporate_bucket/*

http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-na...


It should. There's a reason for that. :)


What's the reason, and why didn't they just use URNs?


The reason is because they're based off the same principle. "ARN" stands for "Amazon Resource Name".

I don't know why they didn't use URNs. Probably because nobody else does.


I think the implication is meant to be "they look like URNs because they are".


Except that they're not; rather, they're ARNs. URNs must begun with 'urn:'. It doesn't make a lot of sense that they're not URNs, but…they're not.


My guess: "nobody uses URNs generally, so might as well save four bytes off every one?"


> I know there are probably hundreds more

Actually there aren't. There are like 60. It really shouldn't take too long to read over them: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes


> URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

The idea of a globally unique, permanent identifier that would resolve to a URL to indicate the current location of a resource is fairly commonplace, isn't it? We've tried to bolt all sorts of equivalents onto the existing URL infrastructure without them.


Do you know where to find the canonical list of HTTP status codes? If the answer's "yes", you're probably OK.


Yes... Wikipedia.


To the downvoters: sure, Wikipedia is not the canonical source (that would be IANA's list[0]). But Wikipedia mostly gets it right and also lists some of the "non-standard but can be encountered in the wild" ones.

I actually prefer the Wikipedia page[1] exactly because it includes more than just the canonical subset. For example, 451 is not yet official, but pretty much as close as you can get to a standard without having an actual standard (well, there's a draft).

[0]: http://www.iana.org/assignments/http-status-codes/http-statu... [1]: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes


> Of course I know about HTTP verbs PUT and DELETE and HEAD-- is there really any web dev who doesn't?

Yes: I've interviewed some. Very few realise there's any more than GET/PUT/POST/DELETE, which astonished me: surely everyone's left an HTTP debugger running while updating an SVN repo or browsing a WebDAV share?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: