News for hackers. Stuff that matters.
Re:Hacker News doesn't validate by tdavis on Tuesday January 06, 2009 @10:37PM (#422938)
Validation 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.

Re:Hacker News doesn't validate by Freaky on Wednesday January 07, 2009 @06:42AM (#423316)
> I've given up caring and just accept the numerous annoyances, such as the entire page having to load before seeing anything (thanks, tables!)

Hm? Both Opera and Firefox render HN's tables progressively.

My main problem with HN is the almost complete lack of comment formatting; no quotes, seemingly no links other than just pasting a full URL, and as you've demonstrated, no lists except using preformatted text.

Re:Hacker News doesn't validate by dcurtis on Wednesday January 07, 2009 @01:31AM (#423097)
My biggest gripe is that the white margins on the right and left are totally screwed up in desktop browsers and especially on the iPhone (forcing it to be zoomed out). Because of the way the site is built in tables, the white borders just waste whitespace and it annoys me to absolutely no end.
Re:Hacker News doesn't validate by Tichy on Wednesday January 07, 2009 @04:39AM (#423233)
Never noticed it - maybe the white margins are intentional? I just assumed they are.
Re:Hacker News doesn't validate by fauigerzigerk on Wednesday January 07, 2009 @07:52AM (#423361)
CSS is so horrible for layouting that I find it hard to blame anyone for using tables.
Re:Hacker News doesn't validate by tdavis on Wednesday January 07, 2009 @08:11AM (#423373)
Strange. I haven't used a table for page layout since the 90s and I haven't missed them, either. Yes, it takes more effort to not use tables, but since tables are not meant for page layout it makes sense to avoid them.
Re:Hacker News doesn't validate by fauigerzigerk on Wednesday January 07, 2009 @08:16AM (#423377)
CSS isn't meant for page layout either. That's pretty obvious if you look at the kind of low level nastiness that you have to put into your code in order to get even the simplest layouts.
Re:Hacker News doesn't validate by iron_ball on Wednesday January 07, 2009 @08:31AM (#423388)
Amen. If CSS were good for page layout, we wouldn't need special CSS frameworks just to get a three-column page. A three-column page with independent column heights would not be called "the holy grail" -- it would be effortless.

CSS sucks. (edit: So do tables. Really, HTML, CSS, and Javascript all sucks. Browsers suck. The web environment sucks. We use it because of what it lets us do, not because it's a friendly programming environment.)

Re:Hacker News doesn't validate by ntoshev on Wednesday January 07, 2009 @08:40AM (#423396)
It is meant for page layout, only it's not that good at it.
Re:Hacker News doesn't validate by andreyf on Wednesday January 07, 2009 @11:27AM (#423574)
Yes, it takes more effort to not use tables, but since tables are not meant for page layout it makes sense to avoid them.

If CSS is meant for layout, and tables aren't meant for layout, wouldn't you expect CSS to be easier to use?

Re:Hacker News doesn't validate by tdavis on Wednesday January 07, 2009 @04:25PM (#423979)
Well, I should have said that tables are easier sometimes. But all the layouts that people complain about being hard in CSS are already written; it's essentially copy and paste at this point. YUI Grids, Blueprint, blah blah... just pick one.

Tables are hard for everyone but the developer (and eventually the developer unless they never change anything) for reasons you can find in this thread.

You know, I'd expect CSS to be better, not necessarily easier. It isn't CSS that makes CSS hard, it's browsers, since they all choose to render the rules slightly differently. It's the same reason JS sucks; Browser A does this, B does that. Just the way of the world.

You can use the tools as they were designed and lose a little more hair in the process, or you can cram a square peg in a round hole and use tables for layout. That's basically what it comes down to.

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.