Transcript
Page 1: Building Behavior Driven Teams - PHPCon Poland 2014

BUILDING BEHAVIOR DRIVEN TEAMS

PHPCon Poland 2014

Page 2: Building Behavior Driven Teams - PHPCon Poland 2014

Karol SójkoProject Leader @ Schibsted Tech Polska

@karolsojko

PHPers 3City organiser+

"

Ö [email protected]

#BDD #PHP

#Symfony #TDD

#ImpactMapping #Agile #Team

Page 3: Building Behavior Driven Teams - PHPCon Poland 2014

Common Team Problems

ú

Page 4: Building Behavior Driven Teams - PHPCon Poland 2014

COMMUNICATIONExpect the unexpected

Page 5: Building Behavior Driven Teams - PHPCon Poland 2014

THE GREAT WALLBetween Us

Page 6: Building Behavior Driven Teams - PHPCon Poland 2014

Rambo Developers&

Colonel Trautman Managers

Page 7: Building Behavior Driven Teams - PHPCon Poland 2014

Outdated Documentationor what’s left of it

Page 8: Building Behavior Driven Teams - PHPCon Poland 2014

Tail ChasingLike a boss

Page 9: Building Behavior Driven Teams - PHPCon Poland 2014

BoomerangsPlease don’t come back

Page 10: Building Behavior Driven Teams - PHPCon Poland 2014

What Is BDD

z

Page 11: Building Behavior Driven Teams - PHPCon Poland 2014

Full Stack BDD

V

Behavior Driven Development

Inner QualityX

Outer Quality

Quality

Spec BDD Story BDD

Page 12: Building Behavior Driven Teams - PHPCon Poland 2014

#

$

Backlog

Story BDD

Features

Scenarios

Green

Refactor

Red

StoryBDD & SpecBDD

Spec BDD

Page 13: Building Behavior Driven Teams - PHPCon Poland 2014

Impact Mappingq

Page 14: Building Behavior Driven Teams - PHPCon Poland 2014

Why

Who

HowWhat

Who

HowWhat

What…

Impact Mapping

Page 15: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Who

HowWhat

Who

HowWhat

What…

Impact Mapping

Page 16: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Readers

HowWhat

Authors

HowWhat

What…

Impact Mapping

Page 17: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Readers

Organize Events

What

Authors

Make Book Clubs Popular

What

What…

Impact Mapping

Page 18: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Readers

Organize Events

Inviting Readers

Authors

Make Book Clubs Popular

Voting for books

Creating book clubs…

Impact Mapping

Page 19: Building Behavior Driven Teams - PHPCon Poland 2014

Living Documentation`

Page 20: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Readers

Organize Events

Inviting Readers

Authors

Make Book Clubs Popular

Voting for books

Creating book clubs…

Scenario Workshop

Feature: Creating book clubs In order to make book clubs popular As a reader I want to create book clubs Scenario: Successfully creating a book club Given I am a registered user When I create a book club Then all users can join it

Page 21: Building Behavior Driven Teams - PHPCon Poland 2014

Increase Books Sale

Readers

Organize Events

Inviting Readers

Authors

Make Book Clubs Popular

Voting for books

Creating book clubs…

Refine ExamplesBeforeGiven I am a registered userWhen I create a book clubThen all users can join it

Given I am logged in as “[email protected]” When I am on book club creation pageAnd I fill in “Name” with “PHP Book Club” And I press “Create” Then a pubic book club “PHP Book Club” should exist !

After

Page 22: Building Behavior Driven Teams - PHPCon Poland 2014

Being SpecificY

Page 23: Building Behavior Driven Teams - PHPCon Poland 2014

/** * @Then a public book club :bookClubName should exist */public function aPublicBookClubShouldExist($bookClubName) { $dm = $this->getDocumentManager(); $bookClub = $dm->getRepository('AcmeDemoBundle:BookClub') ->findOneBy(array('email' => $bookClubName)); if (empty($bookClub)) { throw new \Exception(sprintf( 'Book club %s has not been found', $bookClubName )); } }

Behat steps

Page 24: Building Behavior Driven Teams - PHPCon Poland 2014

use PhpSpec\ObjectBehavior; class BookClubSpec extends ObjectBehavior{ /** * @param Acme\DemoBundle\Document\User $user */ function it_should_be_available_for_readers($user) { $user->isReader()->willReturn(true); $this->isAvailableFor($user)->shouldReturn(true); } /** * @param Acme\DemoBundle\Document\User $user */ function it_should_not_be_available_for_readers_if_premium($user) { $user->isReader()->willReturn(true); $this->setPremium(true); $this->isAvailableFor($user)->shouldReturn(false); } }

class BookClub{ protected $premium; /** * @param $premium */ public function setPremium($premium) { $this->premium = $premium; } /** * @param User $user * * @return bool */ public function isAvailableFor(User $user) { return $user->isReader() && !$this->premium; } }

PhpSpec Implementation

Page 25: Building Behavior Driven Teams - PHPCon Poland 2014

BDD in your CompanyZ

Page 26: Building Behavior Driven Teams - PHPCon Poland 2014

Business and Development

Page 27: Building Behavior Driven Teams - PHPCon Poland 2014

When you have a hammer …

Page 28: Building Behavior Driven Teams - PHPCon Poland 2014

Avoid Buzz Words

Page 29: Building Behavior Driven Teams - PHPCon Poland 2014

The Batman

Page 30: Building Behavior Driven Teams - PHPCon Poland 2014

Don’t attack every angle

Page 31: Building Behavior Driven Teams - PHPCon Poland 2014

Measure business valuesnot developers

Page 32: Building Behavior Driven Teams - PHPCon Poland 2014

Use Case #1 The Comet CultB

Page 33: Building Behavior Driven Teams - PHPCon Poland 2014

Small Team

Page 34: Building Behavior Driven Teams - PHPCon Poland 2014

4 Different Locations

Page 35: Building Behavior Driven Teams - PHPCon Poland 2014

Communication Breakdown

Page 36: Building Behavior Driven Teams - PHPCon Poland 2014

Us and Them

Page 37: Building Behavior Driven Teams - PHPCon Poland 2014

The Guesstimates

Page 38: Building Behavior Driven Teams - PHPCon Poland 2014

Rock Solid

Page 39: Building Behavior Driven Teams - PHPCon Poland 2014

Issue reincarnation

Page 40: Building Behavior Driven Teams - PHPCon Poland 2014

What to test?

Page 41: Building Behavior Driven Teams - PHPCon Poland 2014

Use Case #2 SchibstedB

Page 42: Building Behavior Driven Teams - PHPCon Poland 2014

Team building 101

Page 43: Building Behavior Driven Teams - PHPCon Poland 2014

Buzz word project

Page 44: Building Behavior Driven Teams - PHPCon Poland 2014

Mind reading

Page 45: Building Behavior Driven Teams - PHPCon Poland 2014

Achievement Unlockedf

Page 46: Building Behavior Driven Teams - PHPCon Poland 2014

Goal Comprehension

Page 47: Building Behavior Driven Teams - PHPCon Poland 2014

Release soon & adjust quickly

Page 48: Building Behavior Driven Teams - PHPCon Poland 2014

Focus on Quality

Page 49: Building Behavior Driven Teams - PHPCon Poland 2014

Client’s Trust

Page 50: Building Behavior Driven Teams - PHPCon Poland 2014

Quicker Agile Adoption

Page 51: Building Behavior Driven Teams - PHPCon Poland 2014

The Team

Page 52: Building Behavior Driven Teams - PHPCon Poland 2014

Good Reads

Page 53: Building Behavior Driven Teams - PHPCon Poland 2014

Question Time!

https://joind.in/talk/view/11851

http://behaviordriventeams.com


Top Related