Simple design and Testing by @zspencer for @rubytaiwan
-
Upload
zee-spencer -
Category
Technology
-
view
717 -
download
3
description
Transcript of Simple design and Testing by @zspencer for @rubytaiwan
“Simple”Design and Testing
by @zspencer for @rubytaiwan on May 31, 2011http://www.zacharyspencer.com
@rubytaiwan
Wednesday, June 1, 2011
WTF is “SIMPLE?!”
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Everything is in my language of choice
It’s all in a single method!
Took the fewest keystrokes!
It’s aesthetically clean!
I just like it!
Wednesday, June 1, 2011
Maximizing the amount of work *not* done
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
• The Users/Customers
• The Stakeholders/Sponsors
• The Team/You
For Who?
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/57634636@N00/5134293410/
Your Users
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/the_warfield/4992455554/
Your Stakeholders
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/reinholdbehringer/1073165898/
Your Team
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Ok. How?
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Radiate InformationCenter Design On The UserWrite Changeable Code
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Radiate InformationCenter Design On The UserWrite Changeable Code
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Ok. How?
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
4 Rules for Simple Design
* Pass All Tests * Duplicate No Behavior or Configuration * Express Intent Clearly and Consistently * Have No Superfluous Parts
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
All Tests Must Pass!
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Automated Story Tests
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Automated Unit Tests
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/rogersmith/4947063094/
Exploratory Testing
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/vermininc/3327459367/
No Duplication
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/spine/2076612679/
Smell Yer Code!
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Duplication Smells!
• Reinvented Wheel
• Combinatorial Explosion
• Middle Man
• Greedy Methods/Modules
• Data Classes
• Procedural Code
• Repeated Value
• Big Classes
http://rubylearning.com/blog/2010/11/08/how-does-your-code-smell/
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/spacelion/263948300/
Express IntentClearly + Consistently!
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/freeparking/2247693823/
Reveal Why
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/cinderellas_blog/255282013/
(Re)Name Stuff
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
www.flickr.com/photos/22746515@N02/2989699245/
Extract and Move Stuff
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
Some More Smells!
• Uncommunicative Name
• Type Included in Name
• Inconsistent Names
• Long Parameters
• Global Variables
• Dynamic Code Creation
• Comments
• Complicated Booleans
http://rubylearning.com/blog/2010/11/08/how-does-your-code-smell/
Wednesday, June 1, 2011
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
http://www.flickr.com/photos/altuwa/4530651461/
No Superfluous Parts!
Wednesday, June 1, 2011
Photo Credits
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
• Kids Using iPads: Kathy Cassidy
• The Boardroom: The Warfield
• Software Team at Work: Reinhold Behringer
• Passing Test: Davey Brown
• Spy Plane: Roger Smith
• Octuplet Consumers: Vermin Inc.
• Smelling Wine: Rick
• Walmart Storefront: Walmart Corporate
• Breakdancer: Gueorgui
• Alfred Lord Tennyson: freeparking
• The Pelican: Cindy Andrie
• Earth Mover: Bert Kaufmann
• Rube Goldberg Machine: Sebastian B
Wednesday, June 1, 2011
More Learnin’
@zspencer -- http://www.zacharyspencer.com -- @rubytaiwan May 31, 2011
• A List of Books and Articles on Simple Design and Testing: http://bit.ly/simple_design_and_testing
• Other Resources I Think Are Awesome (Broken Down by Speciality): http://bit.ly/zspencer_recommends
• Pillars Free Webinars: http://pillartechnology.com/content/webinarbrowse
• Other Free Pillar Resources: http://pillartechnology.com/page/agilelinks
Wednesday, June 1, 2011