Aikido, Controller Tests, and LinkedIn
-
Upload
mdenomy -
Category
Technology
-
view
896 -
download
1
description
Transcript of Aikido, Controller Tests, and LinkedIn
@mdenomy
Thursday, January 16, 14
Aikido,Controller Tests,
and LinkedIn
Michael DenomyLaunch AcademyJanuary 16, 2014
Thursday, January 16, 14
Aikido,Controller Tests,
and LinkedIn3 things that seemingly
have nothing to do with one another
Michael DenomyLaunch AcademyJanuary 16, 2014
Thursday, January 16, 14
What’s This All About• Get you thinking about life after
Launch Academy
Thursday, January 16, 14
What’s This All About• Get you thinking about life after
Launch Academy
ABGB
lwayseettingetter
Thursday, January 16, 14
Trivia Question
Who is this, and why should you care?
Thursday, January 16, 14
Alistair Cockburn• One of the Agile Manifesto authors- http://agilemanifesto.org/
• Introduced concept of Shu-Ha-Ri to software development- Term from Aikido about 3 stages of learning
Thursday, January 16, 14
Shu-Ha-Ri
http://www.infoq.com/presentations/cockburn-bury-not-praise-agile
Shu-Ha-Ri comes up at ~31:40, but entire talk worthwhile.
Thursday, January 16, 14
What Does This Mean For You
• You are in the Shu phase- Don’t cherry pick what you think you should do- Learn a technique from your masters
• Someday you will leave these walls- Evaluate different techniques- Be open to other ways- This is Ha, incorporate different techniques
• Someday, you may get to Ri
Thursday, January 16, 14
A Practical Example•When I learned Rails....
• Started with Hartl Tutorial- When I did it there were Controller tests like
these
Thursday, January 16, 14
RSpec Docs Reinforced That
https://www.relishapp.com/rspec/rspec-rails/docs/controller-specs
Thursday, January 16, 14
That Was Me in Shu Phase• I’d learned one way of doing it
• It worked for me
• Provided a safety net“Test-driven development is a way of managing fear during programming. I don't mean fear in a bad way-but fear in the legitimate, this-is-a-hard-problem-and-I-can't-see-the-end-from-the-beginning sense.” Kent Beck - Test Driven Development By Example
Thursday, January 16, 14
Then A Few Things Happened
A perfect Shu response
A Shu comment
I reviewed some code for a Launcher’s final project
Thursday, January 16, 14
And Another Thing
Thursday, January 16, 14
Dan Calls Shenanigans!
Thursday, January 16, 14
Time for some Ha Thinking
• Polled some people in the industry
• Thought about my own practices
•Made some changes- Take more of an outside-in approach- Start with a feature test- Explore data and models without being bound
to the database/migrations- Add in model tests and migrations- Mix of controller and feature tests for edge
cases
Thursday, January 16, 14
Controller Tests I Don’t Write
• Testing the framework- e.g. index action rendering index template
• Testing template via controller test
• Assignments
Thursday, January 16, 14
Controller Tests I Do Write
•Model/association creation on posts
• Redirects on invalid data/conditions
• Flash messages
Thursday, January 16, 14
Controller Tests I Do Write
• External APIs- in conjunction with stubs
Thursday, January 16, 14
Summary• There is value in controller tests
• Starting with feature tests help me keep perspective and explore
• Risk vs Reward- Every line of code costs $- Every line of code is a potential liability
• Always be open to change
Thursday, January 16, 14
Bonus Tracks
Deleted Scenes
Alternate Endings
Interview with the director
Personalized LinkedIn Invites
Thursday, January 16, 14
Bonus Tracks
Personalized LinkedIn Invites
Thursday, January 16, 14
140 Characters Can’t Describe My Sadness
Thursday, January 16, 14
140 Characters Can’t Describe My Sadness
Thursday, January 16, 14
Good Networking Etiquette
• Send follow-up and thank you emails- Stand out from the crowd
• Get out there and talk to people- Tell them what you have done, not what
you want to do
• Personalize your LinkedIn invites
Thursday, January 16, 14
@mdenomy
Thursday, January 16, 14