Passing The Joel Test In The PHP World

download Passing The Joel Test In The PHP World

If you can't read please download the document

Transcript of Passing The Joel Test In The PHP World

Passing the Joel Test in the PHP World

Who am I?

Lorna Mitchell

PHP Developer at Ibuildings

Personal site http://lornajane.net

European Rep for phpwomen.org

PHPNW organiser

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

Comparison Scores

Microsoft: 12/12

Ibuildings: 8 or 9

eZ Components: 8 or 9

Red Embedded: 10

Your organisation ?

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/

Traditional Source Control

userrepouseruseruser

Distributed Source Control

repo

reporeporeporepo

Distributed Source Control

Local machine has repository

Has full history

Commit locally

Commit globally later

Recommendations

subversionDevelopersusing command lineIDE pluginsgit-svn, bzr-svn bridgesDesignersusing TortoiseSVNManagersusing WebSVN

svn: existing backups, hooks, stable server

Resources

git-svnhttp://www.kernel.org/pub/software/scm/git/docs/git-svn.html

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

WebSVNhttp://www.websvn.info/

TortoiseSVNhttp://tortoisesvn.tigris.org/

Ask Me This In The Bar

Branching

Tagging

Versions

http://www.flickr.com/photos/barnaby_s/2689622236/

PHP is Interpreted

So do we care about builds?

What's in a Build?

Code compilation

Document generation

Test suite execution and feedback

Application deployment

Packaging

caches like APC actually do compile + store

Ask Me This In The Bar

Deployment Scripts

Rollback

Databases

Sounds like Continuous Integration

Continuous Integration

A running process

Responds to commit (and/or hooks)

Performs tasks

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/

Hosted Optionsgithub

sourceforge

bug trackers integrate with source control

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://www.chiark.greenend.org.uk/~sgtatham/bugs.html

it's not worth reporting that the program generated an error unless you can also report what the error message was.

if a computer does anything unexpected, freeze

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

Try to remember as much detail as you can about what you were doing to it when it did fall over, and if you see any patterns, mention them. Anything you can provide has to be some help.

Users like this are like a mongoose backed into a corner: with its back to the wall and seeing certain death staring it in the face, it attacks frantically, because doing something has to be better than doing nothing. This is not well adapted to the type of problems computers produce.

Instead of being a mongoose, be an antelope. When an antelope is confronted with something unexpected or frightening, it freezes. It stays absolutely still and tries not to attract any attention, while it stops and thinks and works out the best thing to do. (If antelopes had a technical support line, it would be telephoning it at this point.) Then, once it has decided what the safest thing to do is, it does it.

Scheduling Workflow

collect requirements

write specification

separate into discrete tasks

estimate task duration

Who Estimates?

Ideally the do-er

At least someone who could do it

Never cut estimates

drop hourly rates

absorb overrunBUT DO NOT CUT ESTIMATES

Schedule

What each person is doing

When it is due to finish

Can record progress/actions

What is next

Specification

Holds the information needed for each task

May include acceptance criteria

More detail means fewer misunderstandingsmockups/pictures

form fields

Agile and Timings

Agile development is reactive

Always on time at start of sprint

Estimates and spec detail can be prepared per sprint

http://www.flickr.com/photos/uk_parliament/2524365036/

Burndown Charts

List of tasks

Tasks have estimates

Sprint is as many tasks as you have man-hours

Burndown Example

Burndown Example (Mon)

Burndown Example (Tue)

Burndown Example (Wed)

Burndown Example (Thu)

Burndown Example (Fri)

Interruptions

Meetings

Phone

Email

Phone: and those nearbyMeetings: and what time of dayEmail: expected instant response?

Its about control

Telecommute helps

Tools

Software

Hardware

Resources

All cost money (or time, or effort)

Software

IDEZend Studio (250)

Visual Studio (200)

many free alternatives

GraphicsPhotoshop (450)

Paint Shop Pro (400)

free alternatives

Hardware

http://www.flickr.com/photos/stefanyasin/2434657543/

http://www.flickr.com/photos/spadgy/313251515/

http://www.flickr.com/photos/artnow/1351601518/sizes/l/

http://www.flickr.com/photos/bfionline/3117948329/

Resources

Magazinesphp|architect (25 / year)

Site membershipsExperts' Exchange (pay per question)

Safari (155 / year)

Books

Ask Me This In The Bar

Free resources

How to train your employer

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 TestingPHPUnit

SimpleTest

phpt

Browser TestingSelenium

Points Missing from Joel's Test?

Do you use test-driven development?

For each taskwrite test

test fails

write code

test passes

End up with a suite of tests covering application

ties in to continuous integration and automated testing

Do you avoid reinventing the wheel?

PEAR/PECL

Frameworks

Javascript libraries/frameworks

Beware license restrictions

Do you help your employees to develop themselves professionally?

Resources

Courses

Events

Encourage advancement

And?

http://joind.in/612

?

Questions?

TaskEstimateOwnerMonTueWedThuFriBuy drinks3Kevin33330Make cake2Lorna20000Make sandwiches6Lorna66430Set table2Lorna22220Decorate cake7Lorna77752

???Page ??? (???)20/09/2009, 22:28:42Page /