Upload
mayflower-gmbh
View
2.280
Download
0
Tags:
Embed Size (px)
Citation preview
© 2010 Mayflower GmbH
Thorsten Rinne I 12. Oktober 2010International PHP Conference 2010
Continuous Improvement in PHP projects
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 2
Senior Developer / Team LeadHead of Open Source Labs
@MAYFLOWER GMBH
@ThorstenRinne
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Continuous integration?
4
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Continuous inspection?
5
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Why do we need continuous improvement?
6
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
„Continuous improvement is better than delayed
perfection” - Mark Twain
7
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
What exactly is Continuous improvement?
8
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
„A continuous improvement process is an ongoing effort to improve products, services, or
processes. These efforts can seek "incremental" improvement
over time or "breakthrough" improvement all at once.“
9
Wikipedia
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Continuous Improvement~
KAIZEN
11
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 12
KAI=
Change
ZEN=
Good
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Your Boss needs a will for changes!
14
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
You need 3 steps for Continuous Improvement.
15
1Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 16
What are we trying to accomplish?
2Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How will we know that a change is an improvement?
17
3Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 18
What changes will result in improvements?
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
PLAN:How it should be?
20
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
DO:What and how do we do it?
22
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
CHECK:What did we achieve?
24
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
ACT:What else do we have to do?
26
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 29
XP
Code
Release Plan
Iteration Plan
Acceptence Testing
Standup Meeting
Pair Negotiation
Unit Test
Pair Programming
Months
Weeks
Days
One day
hours
seconds
seconds
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Conclusion:Combine Scrum, XP andContinuous Improvement
30
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Common problemsin PHP projects
31
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
„Shipping first time code is like going into debt. A little debt speeds development so
long as it is paid back promptly with a rewrite... The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that
debt. Entire engineering organizations can be brought to a stand-still under the debt
load of an unconsolidated implementation, object-oriented or otherwise.“
34
Ward Cunningham, 1992
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 35
rising frequency
Dead end!
Benefit per Change Request
Costs per Change Request
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 36
Always improve your codebase!
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
What is PHP_CodeBrowser?
39
I a code browser :-)
I syntax highlighting for PHP
I colored error sections found by PHP QA tools like•PHPUnit
•phpcpd
•PHP_CodeSniffer•Code Coverage
•PHPMD
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How to get PHP_CodeBrowser?
I http://github.com/mayflowergmbh/PHP_CodeBrowser
I PHPUnit PEAR channel:
I Current version: 0.9.0
I We‘ll release PHP_CodeBrowser 1.0 this month!
40
$ pear config-set preferred_state beta$ pear channel-discover pear.phpunit.de$ pear install --alldeps phpunit/PHP_CodeBrowser
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
PHP_CodeBrowser presentation
41
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Why Cinder?
43
I Integrate feedback directly
•static code analysis
•coding style
•unittests
I Decrease number of tools
I Based on existing artifacts from Continuous Integration
I Conform with IDE usabiliy guidelines
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
Cinder Features
I Eclipse Plugin
•Eclipse can be used for many languages
•Well documentated plugin infrastructure
I Reads Hudson or CruiseControl XML data
I Aggregates findings by the CI system
I Language of the project doesn‘t matter
I Periodic updates of input data
44
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How does Cinder work?
Continuous Integration
Server
45
Developer PC with Eclipse
periodically request from Cinder
CI data from CI server
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How to install Cinder?
46
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How to install Cinder?
47
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How does Cinder look like?
48
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
PHPMD features
53
I PHPMD looks for
•possible bugs
•suboptimal code
•overcomplicated expressions•unused parameters, methods, properties
I Latest release: 0.2.7
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How to get PHPMD?
I PHPMD PEAR channel
54
$ pear channel-discover pear.phpmd.org$ pear channel-discover pear.pdepend.org$ pear install --alldeps phpmd/PHP_PMD-alpha
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
How to use PHPMD?
55
univac:phpMyFAQ-2.7 thorsten$ phpmd phpmyfaq/inc/Link.php xml codesize
<?xml version="1.0" encoding="UTF-8" ?><pmd version="0.2.6" timestamp="2010-09-09T14:01:33+02:00"> <file name="/Users/thorsten/htdocs/phpMyFAQ-2.7/phpmyfaq/inc/Link.php"> <violation beginline="47" endline="627" rule="ExcessivePublicCount" ruleset="Code Size Rules" package="PMF_Link" externalInfoUrl="http://phpmd.org/rules/codesize.html#excessivepubliccount" class="PMF_Link" priority="3"> This class has a bunch of public methods and attributes </violation> <violation beginline="47" endline="627" rule="TooManyMethods" ruleset="Code Size Rules" package="PMF_Link" externalInfoUrl="http://phpmd.org/rules/codesize.html#toomanymethods" class="PMF_Link" priority="3"> This class has too many methods, consider refactoring it. </violation> ... </file></pmd>
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 56
Currently we‘re adding the Padawan rules to PHPMD.
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I 57
How to get these tools?
Continuous Improvement in PHP projects I Mayflower GmbH I 12. Oktober 2010 I
phpmd.orggithub.com/mayflowergmbh
phpunit.deopensource.mayflower.de
58
Thank you very much!
© 2010 Mayflower GmbH
Contact Thorsten [email protected]+49 89 242054-31
Mayflower GmbHMannhardtstr. 680538 München