Frustration Driven Development
Freelance Code Janitor
(or "a recipe to put me out of business")
Workin for the man... me!
I've been doing this a while...
... and I've seen a lot of shit
We love to talk about TDD
Most Rubyists don't write tests!
The Long & Poorly-Named Method
(or, in the words of Samuel L. Jackson, "it's Red, Green, Refactor mother%&@#er!")
Most Rubyists don't refactor!
Don't try to read this code
Stub out dependencies in test setup
Test all branches
Test all boundaries
Watch tests pass
Should User know how to rectify his own account
Hint: rectify & account
Think about it (later ;-) )
The typical "User" class
Let's face it:
Most templates suck
What if we delegate to real objects?
We still have to pick a "presenter"
Presenters probably should not be your first choice
Want to try using presenters?
Warning: I wrote this ;-)
Simple implementation but flexible
Convention driven usage but complex implementation
Fork, patch, and pull request!
"Law of Demeter" redux
You can play with your friends
You can play with your privates
You shouldn't play with your friend's privates
Not considering your audience
Stretch out with your feelings
We believe in what we do...