How to Create High Quality Software
Pisa -- 4th August 2010
Paul Johnson
www.pjcj.net
What does quality mean?
value for some person?
fit for purpose?
as good as it can be?
as bad as you can get away with?
as good as you can get away with?
I know it when I see it?
How to Create High Quality Software
high quality people develop high quality software
but this just changes the question
for managers
how do I manage development of high quality software?
how do I get high quality developers to work on my project
how do I recognise a high quality developer?
for developers
how do I become I high quality developer?
a lot of it boils down to
managers - give your developers freedom to do their jobs
developers - use that freedom wisely
Management Responsibilities
managers need to make it possible for developers to write high quality code
don't tie your developers' hands behind their backs
appropriate working conditions
appropriate hardware
appropriate tools
Engineers' Responsibilities
Algorithms and Data Structures
distinguishes the great developers from the good
The Algorithm Design Manual by Steven S. Skiena
estimation - back of an envelope mathematics
ADTs - Abstract Data Types
Perl
current best practices
recent version of perl (5.12.1)
Use new language features unless you have a reason not to
chose modern modules
Moose
Catalyst or similar
DBIx::Class or similar
Template toolkit or similar
Perl
keep up to date
mailing lists for projects you rely on
linux
ion
zsh
vim
lists.perl.org
local Perl Mongers group
conferences
books
blogs
IRC
twitter
...
Code Structure
sub-systems
interfaces
classes / inheritance / roles
methods
encapsulation
scope
loose coupling (interact with other systems via defined interfaces)
strong cohesion (do one thing and do it well)
Programming Paradigms
procedural
object oriented
functional
logical
Version Control System
git
mercurial
darcs
svk
Code Layout
code should be beautiful
code is crafted, not thrown together
it should be a work of art
tabs / spaces
vertcal alignment
perltidy
helpful editor
Comments
describe algorithms and design decisions
code should describe itself
Class / Method / Variable names
concise
length related to scope
descriptive
unambiguous
conventions
one of the most difficult parts of programming
Defensive Programming
check input
external input
function parameters
error handling
assertions
pre and post conditions
consider how much to leave on in production
Testing
automated
TDD
unit tests
integration tests
non-functional tests
load
performance
exploratory testing
code coverage
Quality Assurance
code reviews
pair coding
static metrics
change control procedures
audits
continuous integration
Books
Code Complete by Steven C. McConnell
The Algorithm Design Manual by Steven S. Skiena