

Ruby on Rails default templates now comes with HTML5 doctype - laktek
http://github.com/rails/rails/commit/01d92021e69f54def1ec8103b2b99f907dd88ec4#diff-3

======
pilif
this is not at all related to the essence of the commit, but as the rails guys
are using git which brings us the beauty that is rebase -i, why is this commit
so incredibly bad?

It mixes functional changes and whitespace changes. It even contains
functional changes not related to the commit message.

I would never dare to submit a commit like this into our internal repository,
much less to a public one.

I know. Just nitpicking, but having the possibility of creating "clean"
commits in a reasonable amount of time is one of the nice features of git. Why
not use them?

~~~
lzell
"I would never dare to submit a commit like this into our internal repository,
much less to a public one."

Never? Are your deadlines infinitely flexible? I try my best to adhere to
single purpose commits too, but being under the gun I know I've slipped on a
few (hundred) occasions. And no, I don't go back and split commits.

~~~
jrockway
_And no, I don't go back and split commits._

After all, that will make it all the more fun the next time you are under a
deadline, and you are wondering why that commit broke something. You have the
added benefit of having to imagine what you were thinking a few months ago, in
addition to debugging. Fun!

In other news, writing tests is a waste of time when you are under a deadline.
It mostly works in the browser!

~~~
lzell
Ease up on the sarcasm. I get it, you write perfectly descriptive commit
messages and your apps are perfectly tested. I was cutting the original
committer some slack because he was guilty of something that most of us are
guilty of.

------
look_lookatme
Rails 3 is supposedly going to add helpers for adding HTML5 data attributes (
<http://ejohn.org/blog/html-5-data-attributes> ) at some point, too.

------
Corrado
Ok what's the downside to using the new doctag? What about old IE6 users? I
have a new site going online tomorrow and would be willing to go HTML5 as long
as it won't kill older browsers.

~~~
ned
You mean a doctype. IE6 users won't be affected if you declare the HTML5
elements in JS, as described here: [http://html5doctor.com/how-to-get-
html5-working-in-ie-and-fi...](http://html5doctor.com/how-to-get-
html5-working-in-ie-and-firefox-2/)

------
laktek
Also, tag helpers for audio and video HTML5 tags have been pushed to edge
rails - <http://bit.ly/PGV5B>

So doctype change must've been made mainly to support these tags.

------
prodigal_erik
Apparently this isn't a typo, HTML 5 really has no DTD. Hasn't the industry
already wasted enough developer-years trying to parse tag soup? Are we really
going to make this disastrous blunder _again_?

~~~
rimantas
What blunder are you talking about? HTML4.01 has DTD, XHTML1.0 has DTD, did it
help in any way? Tag soup is already there and will stay for a long time. From
all the specs so far HTML5 has the best description how to deal with it.

~~~
prodigal_erik
Yes, I do think they helped. Before HTML 2, validation didn't exist, so
whether or not a document's markup made any sense was merely an opinion. "Best
viewed with" was the order of the day because there was no way to know whether
a browser would handle a document reasonably other than testing them together.

The web mostly interoperates now, but if we eliminate validation with HTML 5 I
fully expect a return to the trainwreck we faced in 1995.

~~~
rimantas
First, not having DTD is not the same as not being able to validate: there is
a validator for HTML5, validator.nu. You can also use XML serialization of
HTML5 and XML tools to make sure your document is valid XML.

Second, having means to validate markup does not mean that authors will care
and do that: what portion of document having doctype with dtd slapped on top
are actually valid? Good markup is not produced by tools, but by those who
care.

~~~
prodigal_erik
Thanks! <http://about.validator.nu/#pitch> seems to be using a RELAX NG schema
instead of a DTD, which is fine, though it's not clear where the schema
actually came from. The draft alludes to "Criteria that cannot be expressed by
a DTD, but can still be checked by a machine", and that's a good sign. But I
can't find any formalized list of those criteria, and that's really not.

And sure, there will always be overworked or ignorant authors who roll out
slipshod work. But I at least want it to be _possible_ to expect better, as it
was not before we had the first DTD for HTML.

