Ruby on Rails default templates now comes with HTML5 doctype
github.com
github.com
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?
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.
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!
Git diff is awfully useful in displaying things like inconsistent newlines, inconsistent whitespace and it helps you keeping whitespace and code changes separate.
And then there's "git add -i" which makes it very easy to go through a file change by change and commit parts of the changes. This feels dangerous, but to keep whitespace changes separate from functional changes, it's very powerful and not dangerous at all.
Fixing a commit like this takes maybe 20 seconds more than just committing it and considering the amount of time you save when you try to fix the bug in that commit (of course there is one), it's totally worth the hassle.
Note that this relies on git features. If you don't have git, I totally agree with your point. But my comment was about a commit made with git.
To make a point: Have a look at the last change in the commit. How are these <th> tags related to the HTML5 conversion?
Now when they go back to the changes in a few weeks, wouldn't they be glad to see these changes in its own commit with its own message?
(Cue the "omg, it can break stuff!" comments in 3... 2... 1...)
So doctype change must've been made mainly to support these tags.
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.
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.
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.
http://www.slideshare.net/sideshowbarker/html5-and-xhtml2/
Previously I was quite pro XHTML but now, not so much. Mike mentioned in his talk that he did not think that XHTML 2 specification would ever come to fruition and it appears that he was correct. The XHTML 2 Working Group's charter will expire at the end of this year and not be renewed. So it's looking more and more likely that HTML 5 is our future.
Mike seemed like a knowledgeable guy with his head screwed on right. I don't think he and the others working on HTML 5 would be doing anything to set the web back. I'm sure there will be good options for people to validate their HTML 5 mark-up.
More clearly, you are conflating two things: a Document Type Definition, which HTML5 does not have (since it is not an SGML application) and a Document Type Declaration, which HTML5 does have.
The former is (glossing over a lot here) an SGML document outlining the grammar and vocabulary of a particular markup language. The latter is a statement that a document uses a particular markup language. And such a statement does not require or imply the existence of a corresponding formal SGML definition of the language.
The downside is you don't have "drop this file into an SGML parser and it works". But since that never worked with real-world SGML-based HTML anyway, the upside is that you get a parsing mechanism which actually handles the sorts of things you'll encounter in the wild.