7 ms·
Hacker News doesn't validate
- invisible 18y agoOh no, big deal. Google doesn't validate: http://validator.w3.org/check?uri=http%3A%2F%2Fgoogle.com&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.606 http://validator.w3.org/check?uri=http%3A%2F%2Fgoogle.com... Standards don't always dictate quality.
- cgranade 18y agoThat said, the W3C validator does reveal several issues with the HN code. Sure, they aren't do-or-die issues, but they do have an effect. The validator reports that alt text is missing for several issues, that many attributes are missing quotemarks and that the DOCTYPE is missing. These issues harm accessibility and robustness.
- aneesh 18y agoIn fact, MSN seems to be the only site in the Alexa top 20 that does validate. (But Live.com and Microsoft.com don't validate, so Microsoft isn't consistent about validating)
- est 18y agohttp://validator.w3.org/check?uri=http://wikipedia.org http://validator.w3.org/check?uri=http://wikipedia.org
- Jem 18y agoJustifying something "because someone else does it like that" is akin to childhood playground antics. "But miss, I only kicked him because he kicked me first!" As my mum always says: two wrongs don't make a right.
- invisible 18y agoI wasn't saying it was justified because google does it too, I was saying it doesn't dictate quality. Many think google has a lot of quality (which is probably most important), and the same for HN. Making silly analogies to justify standards compliance is just plain dumb if you want to play the name game.
- Jem 18y agoSorry, I must have missed the part where I was making any justification for standards compliance.
- brett 18y agoI'd be pretty shocked if it did.
- deleted 18y ago[deleted]
- aston 18y agopg's stated before he treats HTML as nothing more than object code. If it runs acceptably on all platforms, who cares what it looks like?
- kwamenum86 18y agocode that does not validate is more lielly to break with browsers updates.
- andrewtj 18y agoIn my experience preemptive fixes are akin to procrastination when there's no empirical evidence to necessitate the change.
- michaelneale 18y agothat's an awesome quote - can I borrow it ??
- andrewtj 18y agosure
- run4yourlives 18y agoThat assumes that there's extra work in coding to standard. In fact, it's quicker to do so.
- tomjen 18y agoReally - adding a doctag is faster than not adding it? That seems incorrect to me.
- andreyf 18y agoI think gp is talking about the long-run. That is, getting things to render right on all browsers, on all devices, printed, etc. Have you ever tried printing a thread? It's bearable, not certainly but pretty.
- bprater 18y agoI've still yet to understand why people care so much about validation. We can barely get browsers to render things the same way, but we flip out because some folks don't close their tags. I've never figured it out.
- sharkbrainguy 18y agoInvalid (x)html puts some browsers into a "quirks" mode, which makes it harder to get some things to work.
- eli 18y agoBut... the site does work, no?
- run4yourlives 18y agoNot always, no.
- randallsquared 18y agoIt would probably go farther toward validation if "<!DOCTYPE html>" was stuck on the top. :) And, since that's HTML 5, there are a lot of tags that don't need closing.
- fauigerzigerk 18y agoI'm far from being militant about it, but one reason for conforming to specs is that it makes writing browsers more productive. So the people writing browsers can create new features or make their code faster instead of trying to keep up with all kinds of quirks in everyday HTML. If one browser maker accepts a particular non-standard quirk, all others will have to follow. Sometimes this isn't a bad thing (XmlHTTPRequest) but it slows down browser development. Since browser makers can't keep up, web developers see browser incompatibilities and that makes them move to things like Fash/Flex. So basically, the effect is that the web becomes more proprietary the more non-standard quirks have to be supported. But still, there is clearly a tradeoff between conforming to standards, using what works to increase your own productivity, and experimenting with new things to innovate. It's not black and white in my view.
- mattmaroon 18y agoJust be glad it wasn't built on Viaweb.
- deleted 18y ago[deleted]
- ryanb 18y agoHN also uses tables. (gasp)
- est 18y agow3c is a joke! http://validator.w3.org/check?uri=http://www.w3.org/TR/ http://validator.w3.org/check?uri=http://www.w3.org/TR/
- kleevr 18y agoat least not worse than msft: http://validator.w3.org/check?uri=http://w3.org/ http://validator.w3.org/check?uri=http://w3.org/
- ScottWhigham 18y agoFrontPage?
- run4yourlives 18y agoOne validation error on the entire site is hardly a joke.
- tdavis 18y agoValidation is by far the least of this site's markup concerns... * Font tags * Tables For Everything (tm) * Inline styles * Inline Javascript * Crazy URLs (&whence=<gibberish>) * Deprecated tag attributes I could go on. I mean, it doesn't even have a Doctype. Technically, you could self-invalidate it by looking at the first source line. I've given up caring and just accept the numerous annoyances, such as the entire page having to load before seeing anything (thanks, tables!) Edit: Actually, the only thing I still care about is that other sites don't see this as acceptable and do it too.
- ars 18y agoWhat's wrong with inline styles and javascript?
- run4yourlives 18y agoInvalidates the best practice of "separation of content from presentation".
- qqq 18y agoThe code that generates it might have those things separate.
- xenophanes 18y agoThe code that generates it might have those things separate.
- run4yourlives 18y agoYes, but I'd gladly let a designer loose on my css, and an editor loose on the content, but neither of them will go anywhere near my code.
- ntoshev 18y agoSo it's a matter of personal preference after all. pg doesn't have another person for graphical design of the site.
- kleevr 18y agoFeature request: It would be cool to have the option to see HN comments in chronological order (with second order being hierachy) but still with otherwise standard point-marking/voting. I think this is a feature I've been secretly wanting in sites like reddit and HN, because I think it is fundamentally different to watch a conversation unfold. Like pure chronilogical markers so one could step through the conversation as it happens; hopping from anchor to anchor in the order they first appeared... because that would be sweet...
- Tritis 18y agoI second that. Fark.com uses flat comments and it makes it incredibly easy to pick up a discussion of interest at a later time. Vs Slashdot.org, Digg, Reddit, or Here where a story can have twice the (possibly even insightful!) comments yet the last comment on the page is still the same from 6 hours earlier.
- perezd 18y agoSTOP THE PRESSES! I swear this comes up every few months. Afterall, this site is so non-compliant, I am surprised anyone even comes here!
- cosmo7 18y agoWell this explains all the crazy moderation my comments get.
- run4yourlives 18y agoSave it. PG feels that HTML is simply object code. The argument that standards would make his life easier is not one he accepts. (Regardless of whether this is true or not)
- mynameishere 18y agoJust tested this on one of my sites. 48 errors. Damn. Wish I had 48 middle fingers to respond with.
- icey 18y agoMay I suggest recursion?
- Andi 18y agoAND WHO CARES?
- juliend2 18y agoME
- ksvs 18y agoTry Bureaucrat News.
- fx 18y agoOMG, shut down HN now! it uses table and doesn't validate. Who's going to save semantic web now?
- pogos 18y agoThe best validator is a browser.
- amr 18y agoWhich browser?
- fauigerzigerk 18y agoSince this site doesn't have a doctype, it doesn't claim to conform to any standard. So what does validation mean if you don't have a spec to validate against? What could be discussed is whether it's good to build on web specs or not.
- mhp 18y agoWho cares?!!?!
- pkrumins 18y agoIt truly doesn't matter!
- tylermenezes 18y agoWho cares? Really? Does this site load? Is it fast? Then what exactly is the problem? Validation ensures that standards-compliant browsers will, in the future, render the page correctly. If the people behind the code are willing to rewrite it, fine, it's their choice. It makes no difference for anyone outside of the team whether it validates or not. Most browsers don't even respect the standards fully.