Comments for Fun and Profit
My Happy Cog colleague, Jenn Lukas, wrote a nice post on The Nerdary about commenting your code. She mentions that when she’s doing front-end templates, she uses PHP to write comments instead of HTML. Our friend Ryan Masuga mentioned in the comments how he uses EE template comments to do the same.
Commenting my code has become practically second nature for me at this point, and I’ve recently started commenting my code before I even write it if I’m ever doing anything clever or tricky, to give myself a plan of attack for my code. I’ve never much preferred HTML comments, and as I mentioned in my comment to Jenn’s post, I even had a nasty situation where IE6 was crashing on a page until I removed a seemingly innocuous HTML comment.
I recommend you do the same, and maybe even create a Textmate/Coda/editor-of-choice snippet to make your EE comments even easier.
Share on Twitter
Erik Reagan — 09:42 on 01.13.2011
I comment the heck out of my EE templates. You can get a glimpse into my commenting structure from my slides of Documenting ExpressionEngine (from the last EngineSummit)
http://www.slideshare.net/erikreagan/documenting-expressionengine