[development] coding standard question

Doug Green douggreen at douggreenconsulting.com
Tue Aug 28 12:52:50 UTC 2007

Steve Rude wrote:
>> I vote for changing coder.module to mirror the defined coding standards.
> +1 This was the very point of my original email.
> Steve Rude
Wow, I don't read the development list for one day, and BOOM!

1.  The "performance" review is clearly identified as "under 
development, use with discretion"
2.  The TRUE/true warning is only generated by this "performance review" 
and not by the "coding standards" review.
3.  This performance optimization was submitted by sun 
(http://drupal.org/node/121388), who had some interesting ideas, but 
most of which just didn't take hold, the TRUE/true being one of them.  
The reason that true is supposedly faster than TRUE is that the latter 
is a define and the former a native constant.  Thus when processing 
TRUE, supposedly, it had to do one additional array lookup in the php C 
code.  However, as many people have pointed out, the time is either 
minuscule or non-existent.  chx says that "php is case agnostic with 
it's identifiers".  I didn't/don't know that this is true. 
4.  I'll probably remove this rule based on this discussion.

I have neglected the coder performance and security reviews.  I've 
considered removing them, but I think they are great ideas and I've been 
really hoping for more community input  (comments and patches)!  I was 
planning on talking about this some at DrupalCon. 

If you'd like to submit rules patches, please read the documentation:  
http://drupal.org/node/144172.  I think that it's a pretty nice and 
flexible system.  If you know (or can learn) regex's, you can write 
coder rules.

Doug Green
douggreen at douggreenconsulting.com

Bringing Ideas to Life with Software Artistry and Invention...

More information about the development mailing list