News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Antonin Januska:
How To Write Code Comments Well
August 20, 2012 @ 10:17:42

In this new post Antonin Januska shares some reminders about what good code comments should look like - what needs to go in and what needs to stay out (you comment all your code, right?)

Code organization is a huge thing, especially for developers (because they deal with code), and often times it's a philosophical debate as to how code should be documented, if spaces should be used instead of tabs, what kind of documentation should be used and so on. Yet, what no one brings up is the dire issue of COMMENTING. We can all agree that comments are essential (and sometimes used to build half-ass documentation on big systems) but what no one really mentions is the fact that people are crappy commenters.

There's two topics he touches on that (surprisingly) it's easy for developers to forget when writing their code - "be informative" and "use consistent formatting". A lot of the issues could be helped if developers made more use of DocBlock formatting which many IDEs already have support for.

0 comments voice your opinion now!
code comments opinion docblock formatting informative


blog comments powered by Disqus

Similar Posts

Wes Shell's Blog: Quicky 1: PHP is Loosely Typed – What does that Mean?

Kristo Vaher: What you should know about API-centric web development and design

Keith Casey: Refactor vs Rebuild: New Years make New Beginnings

Bradley Holt's Blog: The Case For Rapid Release Cycles

Michael Kimsal's Blog: magic __get and __set style?


Community Events





Don't see your event here?
Let us know!


api symfony bugfix library release laravel podcast package community list introduction tips language series voicesoftheelephpant framework install interview deployment opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework