Passing the Joel Test
      in the PHP World


               
Who am I?
●
    Lorna Mitchell
●
    PHP Developer at Ibuildings
●
    Editor at http://techportal.ibuildings.com
●
    Host at DPC 2010
●
    Personal site http://lornajane.net
●
    Twitter: @lornajane
Who is Joel?
●
    Joel Spolsky
●
    Founder of Fog Creek Software
●
    Blogs at http://joelonsoftware.com
●
    Author of numerous books, particularly Best
    Software Writing
●
    Co-founder of http://stackoverflow.com
What is the Joel Test?
●
    12 questions about your organisation
●
    "... a highly irresponsible, sloppy test to rate the
    quality of a software team"
●
    Rule-of-thumb for best practice
●
    How does it apply to PHP?
The Joel Test (1-6)
●
    Do you use source control?
●
    Can you make a build in one step?
●
    Do you make daily builds?
●
    Do you have a bug database?
●
    Do you fix bugs before writing new code?
●
    Do you have an up-to-date schedule?
The Joel Test (7-12)
●
    Do you have a spec?
●
    Do programmers have quiet working
    conditions?
●
    Do you use the best tools money can buy?
●
    Do you have testers?
●
    Do new candidates write code during their
    interview?
●
    Do you do hallway usability testing?
What is the Joel Test For?
●
    Scoring your current organisation
●
    Improving your current organisation
●
    Scoring your next organisation




                 http://jobs.joelonsoftware.com
     
Source Control
●
    Central storage
●
    Change history
●
    Enables collaboration
●
    Manage multiple versions
Source Control Solutions
●
    CVS
    ●
        http://www.nongnu.org/cvs/
●
    Subversion (svn)
    ●
        http://subversion.tigris.org/
●
    Git
    ●
        http://git.or.cz/
●
    Bazaar (bzr)
    ●
        http://www.bazaar-vcs.org/
Centralised Source Control


           repo
                         user


 user
                        user
           user
Distributed Source Control


            repo
                         repo


 repo
                        repo
           repo
Distributed Source Control
●
    Local machine has repository
●
    Has full history
●
    Commit locally
●
    Commit globally later
Recommendations

                     subversion




Designers                                      Managers
using TortoiseSVN                              using WebSVN
                    Developers
                    using command line
                    IDE plugins
                    git-svn, bzr-svn bridges
Resources
●
    git-svn
    ●
        http://www.kernel.org/pub/software/scm/git/docs/git-svn.html

●
    bzr-svn
    ●
        http://bazaar-vcs.org/BzrForeignBranches/Subversion

●
    WebSVN
    ●
        http://www.websvn.info/

●
    TortoiseSVN
    ●
        http://tortoisesvn.tigris.org/
     
     
PHP is Interpreted
●
    So do we care about builds?
What's in a Build?
●
    Code compilation
●
    Document generation
●
    Test suite execution and feedback
●
    Packaging
●
    Application deployment
Sounds like ...
    Continuous Integration
       and Deployment

                
Deployment
●
    Automated deployment
    ●
        upload code
    ●
        apply database patches
    ●
        handle uploaded files and existing database
    ●
        populate caches
    ●
        switch over to new version
●
    Automated rollback
Continuous Integration
●
    A running process
●
    Responds to commit (and/or hooks)
●
    Performs tasks
    ●
        No "forgetting" to run the tests
●
    Gives feedback
Continuous Integration
Continuous Integration
Continuous Integration Solutions
●
    Hudson https://hudson.dev.java.net/
●
    phpUnderControl http://phpundercontrol.org/
●
    Xinc http://sourceforge.net/projects/xinc/
●   COMPULSORY




                      
I have a personal bug tracker
Bug Trackers
●
    Capture features/tasks
●
    Who does what?
●
    Progress for each task, keep updated
●
    Can reallocate items
Bug Tracker Solutions
●
    Trac http://trac.edgewall.org/
●
    Mantis http://www.mantisbt.org/
●
    Jira http://www.atlassian.com/software/jira/
●
    Eventum http://forge.mysql.com/wiki/Eventum/
●
    RedMine http://www.redmine.org
●
    Arbit http://arbittracker.org
●
    Mtrack http://bitbucket.org/wez/mtrack/
     
Joel Says
●
    Keep bugs near to zero
●
    Cannot estimate bug fix time
●
    Minimise unknowns
Capturing Bugs
●
    As a minimum, record bug
●
    Buggy behaviour
●
    Expected behaviour
●
    Smallest possible replication case
How to Report a Bug
                                      http://tinyurl.com/8vx3s
  ●
      http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
                     if a computer does anything unexpected, freeze


                                       Try to remember as much detail as

it's not worth reporting that the      you can about what you were doing to

program generated an error             it when it did fall over, and if you see

unless you can also report what        any patterns, mention them. Anything

the error message was.                 you can provide has to be some help.


             Some of the worst bug reports I've ever
             seen come from programmers
     
     
Scheduling Workflow

   collect
requirements



    write       separate into
specification   discrete tasks



                estimate task
                  duration
Who Estimates?
●
    Ideally the do-er
●
    At least someone who could do it
●
    Never cut estimates
Specification
●
    Holds the information needed for each task
●
    May include acceptance criteria
●
    More detail means fewer misunderstandings
    ●
        mockups/pictures
    ●
        form fields
Schedule
●
    What each person is doing
●
    When it is due to finish
●
    Can record progress/actions
●
    What is next
Agile and Timings
●
    Agile development is reactive
●
    Always on time at start of sprint
●
    Estimates and spec detail can
    be prepared per sprint
Burndown Charts
●
    List of tasks
●
    Tasks have estimates
●
    Sprint is as many tasks as you have man-hours
Burndown Example
Burndown Example


Task                       Est im at e M on Tue Wed Thu Fr i
Assemble pre-built frame          2     2    2    2    2       2
Paint exterior                    2     2    2    2    2       2
Paint windowframes                1     1    1    1    1       1
Decorate bedrooms                 8     8    8    8    8       8
Decorate kitchen                  7     7    7    7    7       7
Decorate bathroom                 5     5    5    5    5       5
Decorate reception rooms          7     7    7    7    7       7
Fit carpets                       5     5    5    5    5       5
Add furniture                     1     1    1    1    1       1
Burndown Example
Burndown Example


Task                       Est im at e M on Tue Wed Thu Fr i
Assemble pre-built frame          2     0    0    0    0       0
Paint exterior                    2     0    0    0    0       0
Paint windowframes                1     1    1    1    1       1
Decorate bedrooms                 8     8    8    8    8       8
Decorate kitchen                  7     5    5    5    5       5
Decorate bathroom                 5     5    5    5    5       5
Decorate reception rooms          7     7    7    7    7       7
Fit carpets                       5     5    5    5    5       5
Add furniture                     1     1    1    1    1       1
Burndown Example
Burndown Example
Burndown Example
     
Interruptions



     Meetings



                Email


      Phone
     
Tools
●
    Software
●
    Hardware
●
    Resources
●
    All cost money (or time, or effort)
Software
●
    IDE
    ●
        Zend Studio
    ●
        Visual Studio
    ●
        many free alternatives
●
    Graphics
    ●
        Photoshop
    ●
        Paint Shop Pro
    ●
        free alternatives
Hardware



        
     
     
     
Resources
●
    Magazines
    ●
        php|architect
●
    Site memberships
    ●
        Experts' Exchange (pay per question)
    ●
        Safari
●
    Books
●
    Conferences/Events
     
Assessing Candidate Code
●
    During interview
●
    As part of recruitment process
●
    Ibuildings uses this
●
    The coding task makes a big impression on the
    candidate
     
     
Testers are not
     developers


            Developers are not
                      testers
                   
Tools for Testing in PHP
●
    Unit Testing
    ●
        PHPUnit http://phpunit.de
    ●
        SimpleTest http://simpletest.org
    ●
        phpt http://qa.php.net/write-test.php
●
    Browser Testing
    ●
        Selenium http://seleniumhq.org/
That was the Joel Test
      ... what's missing?


                
Do you use test-driven
        development?


               
Do you avoid reinventing
          the wheel?


                
Do you support the
    professional development
      of your employees?

                
And?
?
              Questions?

http://joind.in/1249

                        

Passing the Joel Test in the PHP World (phpbnl10)

  • 1.
    Passing the JoelTest in the PHP World    
  • 2.
    Who am I? ● Lorna Mitchell ● PHP Developer at Ibuildings ● Editor at http://techportal.ibuildings.com ● Host at DPC 2010 ● Personal site http://lornajane.net ● Twitter: @lornajane
  • 3.
    Who is Joel? ● Joel Spolsky ● Founder of Fog Creek Software ● Blogs at http://joelonsoftware.com ● Author of numerous books, particularly Best Software Writing ● Co-founder of http://stackoverflow.com
  • 4.
    What is theJoel Test? ● 12 questions about your organisation ● "... a highly irresponsible, sloppy test to rate the quality of a software team" ● Rule-of-thumb for best practice ● How does it apply to PHP?
  • 5.
    The Joel Test(1-6) ● Do you use source control? ● Can you make a build in one step? ● Do you make daily builds? ● Do you have a bug database? ● Do you fix bugs before writing new code? ● Do you have an up-to-date schedule?
  • 6.
    The Joel Test(7-12) ● Do you have a spec? ● Do programmers have quiet working conditions? ● Do you use the best tools money can buy? ● Do you have testers? ● Do new candidates write code during their interview? ● Do you do hallway usability testing?
  • 7.
    What is theJoel Test For? ● Scoring your current organisation ● Improving your current organisation ● Scoring your next organisation http://jobs.joelonsoftware.com
  • 8.
       
  • 9.
    Source Control ● Central storage ● Change history ● Enables collaboration ● Manage multiple versions
  • 10.
    Source Control Solutions ● CVS ● http://www.nongnu.org/cvs/ ● Subversion (svn) ● http://subversion.tigris.org/ ● Git ● http://git.or.cz/ ● Bazaar (bzr) ● http://www.bazaar-vcs.org/
  • 11.
    Centralised Source Control repo user user user user
  • 12.
    Distributed Source Control repo repo repo repo repo
  • 13.
    Distributed Source Control ● Local machine has repository ● Has full history ● Commit locally ● Commit globally later
  • 14.
    Recommendations subversion Designers Managers using TortoiseSVN using WebSVN Developers using command line IDE plugins git-svn, bzr-svn bridges
  • 15.
    Resources ● git-svn ● http://www.kernel.org/pub/software/scm/git/docs/git-svn.html ● bzr-svn ● http://bazaar-vcs.org/BzrForeignBranches/Subversion ● WebSVN ● http://www.websvn.info/ ● TortoiseSVN ● http://tortoisesvn.tigris.org/
  • 16.
       
  • 17.
       
  • 18.
    PHP is Interpreted ● So do we care about builds?
  • 19.
    What's in aBuild? ● Code compilation ● Document generation ● Test suite execution and feedback ● Packaging ● Application deployment
  • 20.
    Sounds like ... Continuous Integration and Deployment    
  • 21.
    Deployment ● Automated deployment ● upload code ● apply database patches ● handle uploaded files and existing database ● populate caches ● switch over to new version ● Automated rollback
  • 22.
    Continuous Integration ● A running process ● Responds to commit (and/or hooks) ● Performs tasks ● No "forgetting" to run the tests ● Gives feedback
  • 23.
  • 24.
  • 25.
    Continuous Integration Solutions ● Hudson https://hudson.dev.java.net/ ● phpUnderControl http://phpundercontrol.org/ ● Xinc http://sourceforge.net/projects/xinc/
  • 26.
    COMPULSORY    
  • 27.
    I have apersonal bug tracker
  • 28.
    Bug Trackers ● Capture features/tasks ● Who does what? ● Progress for each task, keep updated ● Can reallocate items
  • 29.
    Bug Tracker Solutions ● Trac http://trac.edgewall.org/ ● Mantis http://www.mantisbt.org/ ● Jira http://www.atlassian.com/software/jira/ ● Eventum http://forge.mysql.com/wiki/Eventum/ ● RedMine http://www.redmine.org ● Arbit http://arbittracker.org ● Mtrack http://bitbucket.org/wez/mtrack/
  • 30.
       
  • 31.
    Joel Says ● Keep bugs near to zero ● Cannot estimate bug fix time ● Minimise unknowns
  • 32.
    Capturing Bugs ● As a minimum, record bug ● Buggy behaviour ● Expected behaviour ● Smallest possible replication case
  • 33.
    How to Reporta Bug http://tinyurl.com/8vx3s ● http://www.chiark.greenend.org.uk/~sgtatham/bugs.html if a computer does anything unexpected, freeze Try to remember as much detail as it's not worth reporting that the you can about what you were doing to program generated an error it when it did fall over, and if you see unless you can also report what any patterns, mention them. Anything the error message was. you can provide has to be some help. Some of the worst bug reports I've ever seen come from programmers
  • 34.
       
  • 35.
       
  • 36.
    Scheduling Workflow collect requirements write separate into specification discrete tasks estimate task duration
  • 37.
    Who Estimates? ● Ideally the do-er ● At least someone who could do it ● Never cut estimates
  • 38.
    Specification ● Holds the information needed for each task ● May include acceptance criteria ● More detail means fewer misunderstandings ● mockups/pictures ● form fields
  • 39.
    Schedule ● What each person is doing ● When it is due to finish ● Can record progress/actions ● What is next
  • 40.
    Agile and Timings ● Agile development is reactive ● Always on time at start of sprint ● Estimates and spec detail can be prepared per sprint
  • 41.
    Burndown Charts ● List of tasks ● Tasks have estimates ● Sprint is as many tasks as you have man-hours
  • 42.
  • 43.
    Burndown Example Task Est im at e M on Tue Wed Thu Fr i Assemble pre-built frame 2 2 2 2 2 2 Paint exterior 2 2 2 2 2 2 Paint windowframes 1 1 1 1 1 1 Decorate bedrooms 8 8 8 8 8 8 Decorate kitchen 7 7 7 7 7 7 Decorate bathroom 5 5 5 5 5 5 Decorate reception rooms 7 7 7 7 7 7 Fit carpets 5 5 5 5 5 5 Add furniture 1 1 1 1 1 1
  • 44.
  • 45.
    Burndown Example Task Est im at e M on Tue Wed Thu Fr i Assemble pre-built frame 2 0 0 0 0 0 Paint exterior 2 0 0 0 0 0 Paint windowframes 1 1 1 1 1 1 Decorate bedrooms 8 8 8 8 8 8 Decorate kitchen 7 5 5 5 5 5 Decorate bathroom 5 5 5 5 5 5 Decorate reception rooms 7 7 7 7 7 7 Fit carpets 5 5 5 5 5 5 Add furniture 1 1 1 1 1 1
  • 46.
  • 47.
  • 48.
  • 49.
       
  • 50.
    Interruptions Meetings Email Phone
  • 51.
       
  • 52.
    Tools ● Software ● Hardware ● Resources ● All cost money (or time, or effort)
  • 53.
    Software ● IDE ● Zend Studio ● Visual Studio ● many free alternatives ● Graphics ● Photoshop ● Paint Shop Pro ● free alternatives
  • 54.
  • 55.
       
  • 56.
       
  • 57.
       
  • 59.
    Resources ● Magazines ● php|architect ● Site memberships ● Experts' Exchange (pay per question) ● Safari ● Books ● Conferences/Events
  • 60.
       
  • 61.
    Assessing Candidate Code ● During interview ● As part of recruitment process ● Ibuildings uses this ● The coding task makes a big impression on the candidate
  • 62.
       
  • 63.
       
  • 64.
    Testers are not developers Developers are not testers    
  • 65.
    Tools for Testingin PHP ● Unit Testing ● PHPUnit http://phpunit.de ● SimpleTest http://simpletest.org ● phpt http://qa.php.net/write-test.php ● Browser Testing ● Selenium http://seleniumhq.org/
  • 66.
    That was theJoel Test ... what's missing?    
  • 67.
    Do you usetest-driven development?    
  • 68.
    Do you avoidreinventing the wheel?    
  • 69.
    Do you supportthe professional development of your employees?    
  • 70.
  • 71.
    ? Questions? http://joind.in/1249