News Feed
Sections




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

Pádraic Brady:
Coding Standards Humans Are Not Computers
February 11, 2014 @ 10:26:06

In his latest post Pádraic Brady shares some of his thoughts around coding standards and the existence of tools to be sure the code is exactly formatted correctly.

The problem with coding standards is not the notion of following conventions to ensure all programmer can quickly read and understand code (and other good stuff), but that someone created a tool to actually check compliance: PHP_CodeSniffer. This isn't a complaint about the operation of phpcs, but to complain about the mere fact of its existence. [...] Using the cover of such automated tools, we can make judgement calls about code quality, integrate style checks into Continuous Integration scoring schemes, complain about pull requests and patches, and generally impose a time penalty on writing code. There is a point at which common sense morphs into sheer nitpicking, and an automated tool is the perfect nitpicker.

In his opinion, coding standards should be "invisible and flexible" as well as easy to learn so the developers could learn and follow it quickly. He looks at these thoughts applied to the PSR standards and how adhering to them could quickly turn into something much more time consuming than it should. In his opinion a good coding standard is one that "limits the rules, eradicates ambiguity, formulates multiple use cases and avoids trivialities".

0 comments voice your opinion now!
coding standard psr phpcs codesniffer opinion

Link: http://blog.astrumfutura.com/2014/02/coding-standards-humans-are-not-computers/

blog comments powered by Disqus

Similar Posts

Engine Yard Blog: PHP Mentoring and the Importance of the Software Apprenticeship

Market Day: At A Glance: ASP.net vs. PHP

Michael Kimsal's Blog: Why I think PDO sucks

PHPClasses.org: Accelerate Web Pages Automatically using Google Mod_PageSpeed

Volker Dusch's Blog: How i judge frameworks - Or: Let me code in peace


Community Events

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


unittest security library voicesoftheelephpant series introduction api symfony threedevsandamaybe release laravel language framework laravel5 community opinion extension interview version podcast

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