I recently read Chris Coyier’s article entitled Show Markup in CSS Comments. I was actually a bit angry that so many responses praised this and so few were turned off from the idea. I appreciate the idea of making things easier for working with CSS, but there are just so many better alternatives.
Some were quick to point out that this is a maintenance nightmare. That is my biggest concern with the coding style. Coyier does well to say:
Yes, this would require maintenance. If it doesn’t make it easier for yourself or for the people you are providing the code to, don’t do it.
I’m guessing that those who attempt this “technique” will soon find out that they won’t be doing it for long, likely due to the intense headaches it will induce. Coyier also mentions that a tool could be created to automate this. Am I way off here, but isn’t there a tool already for this? Another window? Split view? A second (or third) monitor?
Like I mentioned earlier, making things easier is great, but whenever you’re considering using comments to make things easier, try again, “Comments are always failures.”1
1. Robert Martin – Clean Code
Post Footer automatically generated by Add Post Footer Plugin for wordpress.