Examines some of the fundamental problems with the way the industry thinks about software "engineering", and breaks some notions in order to find useful ways of improving your code quality, and your skills and discipline as a developer.
8. What people usually think
Estimating costs
Projecting deadlines
Managerial BS!
9. Client Spec Sheet some paraphrased)
(actual bullet points,
Flash intro with no load time
User account logins, password optional
Ajax chat
“Like Google”
15. Cognitive Dissonance *
Engineers deal with tangible, immutable
constraints, like gravity
The practice of developing software is
an inherently creative discipline
* Thank you, Jones
16. Cognitive Dissonance
Developer constraints (scope, schedule,
budget) potentially / often in flux
Software is inter-related; working on one
part changes the others
No project is exactly the same as another
17. Conclusion
It’s not useful to measure high-level,
intangible things like whole projects
This is where scrum comes in handy
Instead, we can use lower-level, more
concrete measurements
22. Backing up...
What is a metric?
Measurement assigns numbers based on well-
defined meaning
- Sometimes the environment must be
modified
- Special development procedures that track
various activities - Wikipedia (paraphrased)
You can cheat and use booleans, too
23. Notes on continuous integration
A build system
Runs on every code commit
Runs tests
Reports
25. PHP Code Sniffer
PEAR Package:
http://pear.php.net/package/PHP_CodeSniffer
Checks conformance of a set of files against
a series of classes called “sniffs”
29. Measuring code complexity
Cyclomatic complexity
Directly measures the number of linearly
independent paths through a program's
source code.
a.k.a. 1 + the number of times it branches
33. Measuring documentation coverage
Check it out:
http://thechaw.com/api_generator
A series of rules
Assigns weights based on docblock content
and various docblock tags
34. Measuring documentation coverage
Basic checks:
Do doc tags exist?
Incomplete @param tags?
Do @param tags match actual params?
Does it have a @link to the man page?
36. Profiling
Get timing / memory usage on every test run
Granular, get statistics per test method
Using continuous integration, code is profiled
on each commit, all on a granular level
42. Finding things to measure
CakePHP Inspector class
CakePHP Parser class
Based on the awesome work of Sean Coates
http://github.com/scoates/tokalizer