News for hackers. Stuff that matters.
Re:Hacker News doesn't validate by ars on Wednesday January 07, 2009 @12:13AM (#423036)
What's wrong with inline styles and javascript?
Re:Hacker News doesn't validate by tdavis on Wednesday January 07, 2009 @01:07AM (#423082)
Aside from separation of content and presentation as mentioned, it creates serious accessibility issues and page bloat, among various other problems which we in the standards movement have tried to impart upon fellow developers for years. I encourage you to look into these issues. Here's a write-up I found from Mozilla, but there are many: https://developer.mozilla.org/en/The_Business_Benefits_of_We...
Re:Hacker News doesn't validate by ntoshev on Wednesday January 07, 2009 @06:57AM (#423324)
Can you elaborate on the accessibility issues and page bloat, because the link doesn't. It lists "Increase traffic" and "Happier staff" among the benefits. Do you think pg would be happier if he followed some guidelines for web design? ;)
Re:Hacker News doesn't validate by tdavis on Wednesday January 07, 2009 @08:07AM (#423369)
I think pg would be less happy because he'd have to admit I was right about this whole silly standards thing ;)

As for your questions: The page bloat issue is pretty apparent: it takes a lot more markup to wrap everything in tables than it does to use floated / positioned block elements such as <div/>. Individually marking up each <font/> tag with color, bgcolor, etc. also wastes a shitload of bytes.

Accessibility is another issue entirely, but is generally hindered by inline Javascript because such JS is not based on progressive enhancement; rather, it directly hijacks events on specific elements rather than improving the experience for JS-enabled browsers. In the case of HN, it appears that "vote" links work with or without Javascript, though the latter loads a blank page after voting. This is certainly better than the alternative. Additionally, superfluous markup has a tendency to disrupt the functioning of assisted-reading devices such as screen readers.

There's a whole world of people out there advocating the use of web standards, all for very practical reasons. I'm not going to re-post all their thoughts and arguments here, but if you're not educated in the matter I highly recommend becoming so, if for no other reason than understanding what we crazy people are screaming about. Many people far more dedicated than I have written countless articles on the matter; a good place to start would be Roger Johansson's blog: http://www.456bereastreet.com/ but there are many others.

Re:Hacker News doesn't validate by jrockway on Wednesday January 07, 2009 @03:13PM (#423881)
Yeah, maybe. Invalid or not, HN is the only social news site that I know of that works well in emacs-w3m and on my phone. It also works better in Conkeror than Reddit.

So while it may be un-accessible, it works better than the sites that are accessible.

Re:Hacker News doesn't validate by Tichy on Wednesday January 07, 2009 @04:38AM (#423232)
I thought inline styles are a web standard (not sure about Javascript, but there are standards for it, too).
Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @12:47PM (#423696)
They are, they're just not a best practice.

Editing css outside of your html without having to worry about inline styles is a lovely thing to do.

Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @12:29AM (#423050)
Invalidates the best practice of "separation of content from presentation".
Re:Hacker News doesn't validate by xenophanes on Wednesday January 07, 2009 @01:20AM (#423092)
The code that generates it might have those things separate.
Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @01:53AM (#423112)
Yes, 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.
Re:Hacker News doesn't validate by ntoshev on Wednesday January 07, 2009 @06:52AM (#423321)
So it's a matter of personal preference after all. pg doesn't have another person for graphical design of the site.
Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @12:21PM (#423665)
Well, you could take the same argument and use it regarding source control, but that doesn't invalidate the fact that it's a best practice.
Re:Hacker News doesn't validate by wlievens on Monday January 19, 2009 @09:26AM (#440456)
Excellent point. It's like complaining that a compiler generates unreadable machine code.
Re:Hacker News doesn't validate by gruseom on Wednesday January 07, 2009 @03:02AM (#423170)
"Best practices" have no intrinsic value.
Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @12:35PM (#423682)
Of course they do. Best Practices are a result of several people finding fault in various implementation methods, usually sometime after initial implementation.

They're not the law, but unless there's a pretty specific reason to not follow them, you can bet that they'll save you heartache sometime in the future.

Re:Hacker News doesn't validate by gruseom on Wednesday January 07, 2009 @01:08PM (#423715)
Perhaps I should have italicized intrinsic. Those practices are means, not ends. People don't pay for them, and users don't care. I'm not saying they have no value, but their value is relative. So when I notice someone, or myself, treating them as absolute (as, for example, equating "object-oriented" with "good" programming, as was common 10 years ago), to me that's a red flag.

In the case of HN, if you can't point to anything about the site itself that matters as a result, then going on about standards compliance and best practices seems irrelevant.

Re:Hacker News doesn't validate by run4yourlives on Wednesday January 07, 2009 @02:14PM (#423797)
I don't disagree with that.