Coder Presentation Boston

50 %
50 %
Information about Coder Presentation Boston

Published on February 7, 2009

Author: douggreen

Source: slideshare.net

Boston DrupalCon A Developer's Assistant: Using Coder for Module Developers & Maintainers By Doug Green [email_address] [email_address]

http://drupal.org/project/coder A Developer's Assistant Coder Module Overview History Developer Module, built for you (and me) What does it do? Credit code-style.pl Credit contributors: snpower, webchick, nancyw

Coder Module Overview

History

Developer Module, built for you (and me)

What does it do?

Credit code-style.pl

Credit contributors: snpower, webchick, nancyw

Style Review Comment Review SQL Review Upgrade Reviews (4.7.x, 5.x, 6.x) Security & Performance Reviews What is a Review? A Developer's Assistant

Style Review

Comment Review

SQL Review

Upgrade Reviews (4.7.x, 5.x, 6.x)

Security & Performance Reviews

What is a Review?

spaces, tabs, indentation string concatenation global variable names, camelCase positioning of curly { } ... and more ... What does the style review check? See http://drupal.org/node/114774 A Developer's Assistant

spaces, tabs, indentation

string concatenation

global variable names, camelCase

positioning of curly { }

... and more ...

What does the style review check?

See http://drupal.org/node/114774

spacings and indentation within comments $Id$ several uses of @see What does the comment review check? See http://drupal.org/node/318 A Developer's Assistant

spacings and indentation within comments

$Id$

several uses of @see

What does the comment review check?

See http://drupal.org/node/318

capitalization of SQL keywords brackets around {table} SQL LIMIT instead of db_query_range() What does the SQL review check? A Developer's Assistant

capitalization of SQL keywords

brackets around {table}

SQL LIMIT instead of db_query_range()

What does the SQL review check?

FAPI Menu Schema API Info File changes ... much much more ... What does the upgrade review check? See http://drupal.org/node/114774 A Developer's Assistant

FAPI

Menu

Schema API

Info File changes

... much much more ...

What does the upgrade review check?

See http://drupal.org/node/114774

not enough, difficult problem SQL injection through variables REQUEST_URI instead of request_url() What does the security review check? See http://drupal.org/node/28984 A Developer's Assistant

not enough, difficult problem

SQL injection through variables

REQUEST_URI instead of request_url()

What does the security review check?

See http://drupal.org/node/28984

Download from project page, install, and enable Setup defaults on admin/settings/coder http://localhost/coder - selection form http://localhost/coder/defaults http://localhostcoder/core - all of core $ drush coder ... How do I Use Coder? A Developer's Assistant

Download from project page, install, and enable

Setup defaults on admin/settings/coder

http://localhost/coder - selection form

http://localhost/coder/defaults

http://localhostcoder/core - all of core

$ drush coder ...

How do I Use Coder?

Selection Form / Settings Form A Developer's Assistant

Selection Form / Settings Form

What To Review A Developer's Assistant

What To Review

Run from Drupal 5 Run from Drupal 6 (recommended) Catches Quite a Bit... But it's just a tool that makes suggestions You are Smarter than Coder Drupal 5.x -> 6.x Upgrade Review A Developer's Assistant

Run from Drupal 5

Run from Drupal 6 (recommended)

Catches Quite a Bit...

But it's just a tool that makes suggestions

You are Smarter than Coder

Drupal 5.x -> 6.x Upgrade Review

drush coder drush coder style drush coder panels drush coder core drush coder all drush coder no-coder Drush – Drupal Shell A Developer's Assistant

drush coder

drush coder style

drush coder panels

drush coder core

drush coder all

drush coder no-coder

Drush – Drupal Shell

cvs co DRUPAL-5—2 + DRUPAL-5 branches 1,843 modules 5,191 files 265 critical errors 35,950 warnings 109,000 minor warnings Coder Style Review of all of Drupal A Developer's Assistant

cvs co DRUPAL-5—2 + DRUPAL-5 branches

1,843 modules

5,191 files

265 critical errors

35,950 warnings

109,000 minor warnings

Coder Style Review of all of Drupal

1. Use an indent of 2 spaces, with no tabs 2. missing spaces 3. extra trailing spaces 4. string concatenation 5. curly braces { should end a line, not start one 6. camelCase 7. indent secondary line of comment one space Most Common Errors A Developer's Assistant

1. Use an indent of 2 spaces, with no tabs

2. missing spaces

3. extra trailing spaces

4. string concatenation

5. curly braces { should end a line, not start one

6. camelCase

7. indent secondary line of comment one space

Most Common Errors

ββ if (!$table) { βββββ $as .= '_orderby'; βββββ $alias = $field; ββ } should be ββ if (!$table) { ββββ $as .= '_orderby'; ββββ $alias = $field; ββ } 111,153 warnings... views.module, line 66, 67 1. Use an indent of 2 spaces with no tabs A Developer's Assistant

111,153 warnings... views.module, line 66, 67

1. Use an indent of 2 spaces with no tabs

if(!isset ($node)){ $node=array('status' => 1); } should be if (!isset($node)) { $node = array('status' => 1); } 35,262 warnings 2. missing spaces A Developer's Assistant

35,262 warnings

2. missing spaces

/** β * Output a confirmation form β * β * β This function returns a complete form for confirming an action. A link is β * β offered to go back to the item that is being changed in case the user β β * β changes his/her mind. β * 29,205, system.module +2126 3. extra trailing spaces A Developer's Assistant

29,205, system.module +2126

3. extra trailing spaces

'#title' => $module . ' module', should be '#title' => $module .' module', 23,679, update.php +359 4. string concatenation A Developer's Assistant

23,679, update.php +359

4. string concatenation

'#title' => $module . ' module', should be '#title' => $module .' module', 13,712 5. curly braces { should end a line, not start one A Developer's Assistant

13,712

5. curly braces { should end a line, not start one

$testBucket = variable_get('mm_s3_bucket', ... should be $test_bucket = variable_get('mm_s3_bucket', ... 11,126, stdClass is an exception 6. camelCase A Developer's Assistant

11,126, stdClass is an exception

6. camelCase

/** * Format a password field. */ should be /** * Format a password field. */ 6,281, form.inc +1604 7. indent 2 nd line of comment one space A Developer's Assistant

6,281, form.inc +1604

7. indent 2 nd line of comment one space

show review of views from the browser show from drush demo 1.x upgraded to Drupal 6.x 6.x upgrade review A Developer's Assistant

show review of views from the browser

show from drush

demo 1.x upgraded to Drupal 6.x

6.x upgrade review

7.x upgrade review Continue to improve security review Create patch files – somewhat possible Parse & code flow analysis – probably not The Future of Coder A Developer's Assistant

7.x upgrade review

Continue to improve security review

Create patch files – somewhat possible

Parse & code flow analysis – probably not

The Future of Coder

[email_address] http://drupal.org/project/coder A Developer's Assistant

Add a comment

Related presentations

Related pages

Coder Presentation Boston, SlideSearchEngine.com

Coder Presentation Bostonby douggreen ... Boston DrupalCon A Developer's Assistant: Using Coder for Module Developers & Maintainers By Doug Green [email ...
Read more

Medical Billing Services in Boston ...

Medical Billing Services - Boston, Massachusetts. Boston, the capital of Massachusetts is one of the most expensive cities in the United States.
Read more

Top 10 Presentation Tips from Presentation Camp Boston ...

I attended Presentation Camp Boston, a bar-camp style conference, on 24-Oct-2009. There were many good ideas and presentation tips. Among them, these are ...
Read more

Doug Green - HubSlide

Presentation from Florida Drupal Camp 2014 https: ... Coder Presentation Szeged 7 months ago. General . Coder Presentation Boston
Read more

Boston Presentation - Documents

2. In L1 acquisition, perception precedes production. 3. There is agreement among some that a similar precedence relationship exists in L2 acquisition ...
Read more

Coding for Pelvic Reconstruction Surgery - Boston Scientific

Presenter: Melanie Witt, RN, CPC, ... 24OCT2012 The purpose of this presentation is to provide you with general information and key ... coder Link each ...
Read more

Coder Training | LinkedIn

View 354 Coder Training posts, presentations, experts, and more. Get the professional knowledge you need on LinkedIn.
Read more

Dreamforce 2016 Sessions - success.salesforce.com

Transformation starts here. Sessions are all about learning, growing your success, and making your customers love you. And with more than 2,000 of them ...
Read more