Top Banner
Reducing Passive Interruptions
101

Reducing passive interruptions

Jan 23, 2017

Download

Software

Andrei Tognolo
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Reducing passive interruptions

Reducing Passive Interruptions

Page 2: Reducing passive interruptions

@andreitognologithub.com/[email protected]

Page 3: Reducing passive interruptions

Modern software development includes automated testing strategies and automated deployment pipelines that take the

friction out of the deployment process

Mary Poppendieck

http://www.leanessays.com/2015/08/friction.html

Page 4: Reducing passive interruptions

Unit tests Functional tests

Deploystaging

Deploy production

Smoke test

Page 5: Reducing passive interruptions
Page 6: Reducing passive interruptions
Page 7: Reducing passive interruptions

Come on… It’s just a few seconds!

Page 8: Reducing passive interruptions
Page 9: Reducing passive interruptions
Page 10: Reducing passive interruptions
Page 11: Reducing passive interruptions
Page 12: Reducing passive interruptions
Page 13: Reducing passive interruptions
Page 14: Reducing passive interruptions
Page 15: Reducing passive interruptions
Page 16: Reducing passive interruptions

A programmer takes between 10-15 minutes to start editing code after resuming work from an interruption

Programmer Interruptedby Chris Parnin2013-01-19

Unacceptable!

Page 17: Reducing passive interruptions

Every time you are interrupted you lose the context

Con

text

Page 18: Reducing passive interruptions

Flow

(…) is the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment

in the process of the activity.

"Scout Girl in Concentration" by Randy

Page 19: Reducing passive interruptions
Page 20: Reducing passive interruptions
Page 21: Reducing passive interruptions
Page 22: Reducing passive interruptions
Page 23: Reducing passive interruptions
Page 24: Reducing passive interruptions

It’s because my server takes

4 minutes to restart!

Page 25: Reducing passive interruptions

Coding Verifying

4 minutes

Page 26: Reducing passive interruptions

Verifying

While you’re waiting for the feedback, you are actually being interrupted!

Page 27: Reducing passive interruptions

Passive Interruption

Period of time in which we are interrupted, waiting for a feedback in order to resume our flow of thinking

Page 28: Reducing passive interruptions

The passive interruption has similar effect of the interruption

caused by a person

Hypothesis

I’m not being interrupted because I can think about the next steps while I’m waiting

Page 29: Reducing passive interruptions

I’m not being interrupted because I can think about the next steps while I’m waiting

Are you sure

VerifyCode Verify CodeVerifyCode Code

Page 30: Reducing passive interruptions

I’m not being interrupted because I can think about the next steps while I’m waiting

Are you sure

VerifyVerifyCode CodeVerify Code

Page 31: Reducing passive interruptions

Well, you can write a lot of code and after that you can test it all together

The passive interruption has similar effect of the interruption

caused by a person

Hypothesis

Page 32: Reducing passive interruptions

Well, you can write a lot of code and after that you can test it all together

Are you sure

VerifyCode Verify CodeVerifyCode Code

Page 33: Reducing passive interruptions

Well, you can write a lot of code and after that you can test it all together

Are you sure

VerifyCode

Page 34: Reducing passive interruptions
Page 35: Reducing passive interruptions
Page 36: Reducing passive interruptions
Page 37: Reducing passive interruptions

Much of agile thinking is about setting up feedback loops so that we can learn more quickly

Martin Fowler

Page 38: Reducing passive interruptions

It isn’t because you can write a lot of code and after that you can test it

Are you sure

VerifyCode

Page 39: Reducing passive interruptions

It isn’t because you can write a lot of code and after that you can test it

Are you sure

VerifyCode VerifyCode VerifyCode VerifyCode

baby steps!

Page 40: Reducing passive interruptions

Coding Verifying

4 minutes?

How long do you have to wait to receive the feedback of a code line that you just wrote?

Page 41: Reducing passive interruptions

Coding Verifying

1 minute?

How long do you have to wait to receive the feedback of a code line that you just wrote?

Page 42: Reducing passive interruptions

Coding Verifying

30 seconds?

How long do you have to wait to receive the feedback of a code line that you just wrote?

Page 43: Reducing passive interruptions

To design quickly and confidently, we need to be able

to try out ideas and verify hypotheses

as fast as we think of them

Bret Victor@worrydream

Page 44: Reducing passive interruptions

Conditions for Flow

from Wikipedia

The task at hand must have clear and immediate feedback

Page 45: Reducing passive interruptions

I love utopias. Not because they show us the path, but because they point us the right direction

Page 46: Reducing passive interruptions
Page 47: Reducing passive interruptions
Page 48: Reducing passive interruptions
Page 49: Reducing passive interruptions
Page 50: Reducing passive interruptions

Back in 2007…

Verifying

Compile

(4 minutes of passive interruption)

CodeCreate

packageRestart Server Login

Go to the page Check

Page 51: Reducing passive interruptions

Recently…

Verifying

Compile

No compilation process

CodeCreate

packageRestart Server Login

Go to the page Check

Page 52: Reducing passive interruptions

Recently…

Verifying

Nodemon automatically reloads the server

CodeRestart Server Login

Go to the page Check

Page 53: Reducing passive interruptions

Recently…

Verifying

Use of permalink

Code LoginGo to

the page Check

Page 54: Reducing passive interruptions

Recently…

Verifying

Use of permalink

Code Refresh Check

Page 55: Reducing passive interruptions

Recently…

Verifying

Code Refresh Check

(1 second of passive interruption)

Page 56: Reducing passive interruptions
Page 57: Reducing passive interruptions
Page 58: Reducing passive interruptions

Passive interruption

Page 59: Reducing passive interruptions

FigwheelBruce Hauman

@bhauman

Page 60: Reducing passive interruptions

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!

Page 61: Reducing passive interruptions

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!

Page 62: Reducing passive interruptions

Cool… But I have a application to maintain

I cannot just change the technologies that we use

Page 63: Reducing passive interruptions

Generating a pdf report

Page 64: Reducing passive interruptions

Generating a pdf report

Go to the page Code

Fill some fields Download Open Check

(passive interruption)

Page 65: Reducing passive interruptions

Generating a pdf report

Page 66: Reducing passive interruptions

Generating a pdf report

<html> . . .

</html>

.pdf PDF Reader

Application

wait for change

curl

Page 67: Reducing passive interruptions

Generating a pdf report

Go to the page Code

Fill some fields Download Open Check

(passive interruption)

Page 68: Reducing passive interruptions

Generating a pdf report

Code Check

Immediate Feedback!

Page 69: Reducing passive interruptions

Generating a pdf report

Page 70: Reducing passive interruptions

CRUD for Companies(create, read, update and delete)

Page 71: Reducing passive interruptions

CRUD for Companies

Search Insert Verify

Page 72: Reducing passive interruptions

CRUD for Companies

Page 73: Reducing passive interruptions

CRUD for Companies

Page 74: Reducing passive interruptions

CRUD for Companies

Page 75: Reducing passive interruptions

CRUD for Companies

Search Insert Verify

Page 76: Reducing passive interruptions

Writing the "save" method

Page 77: Reducing passive interruptions

Search Insert Verify

Writing the "save" method

(passive interruption)

Page 78: Reducing passive interruptions

Writing the "save" method

Page 79: Reducing passive interruptions

Writing the "save" method

Run the test Code Check

(passive interruption)

Page 80: Reducing passive interruptions

Coding Verifying

How long do you have to wait to finish the execution of an automated test?

Page 81: Reducing passive interruptions

Coding Verifying

30 seconds?

How long do you have to wait to finish the execution of an automated test?

Page 82: Reducing passive interruptions

Coding Verifying

15 seconds?

How long do you have to wait to finish the execution of an automated test?

Page 83: Reducing passive interruptions

Coding Verifying

Instantly!

How long do you have to wait to finish the execution of an automated test?

Page 84: Reducing passive interruptions

If it (test) takes ten seconds just to start testing, toss it! Allow nothing to slow down your tests.

Test Time 03 September 2014

by Robert C. Martin (Uncle Bob)

Page 85: Reducing passive interruptions

Running an automated test

Page 86: Reducing passive interruptions

Running an automated test

JPA

Hibernate

(specification)

(implementation)

another impl

(implementation)

Page 87: Reducing passive interruptions

Running an automated test

Hibernate

Page 88: Reducing passive interruptions

Running an automated test

Hibernate(17 seconds for one class)

Page 89: Reducing passive interruptions

Running an automated test

Hibernate(17 seconds for one class)

Raiden JPA

Page 90: Reducing passive interruptions

Running an automated test

Hibernate(17 seconds for one class)

Raiden JPA (3 seconds for one class)

Page 91: Reducing passive interruptions

Writing the JavaScript to call the save

Page 92: Reducing passive interruptions

Writing the JavaScript to call the save

Search Insert Verify

(passive interruption)

Page 93: Reducing passive interruptions

Writing the JavaScript to call the save

Search Insert Verify

Which step takes more time?

Page 94: Reducing passive interruptions

Writing the JavaScript to call the save

Search Insert Verify

Which step takes more time?

Page 95: Reducing passive interruptions

Writing the JavaScript to call the save

Page 96: Reducing passive interruptions

Writing the JavaScript to call the save

Go to search Check

Click on Add

Open Firebug

Call the function

Click on save

Page 97: Reducing passive interruptions

Writing the JavaScript to call the save

Go to search Check

Click on Add

Open Firebug

Call the function

Click on save

Page 98: Reducing passive interruptions

Writing the JavaScript to call the save

Go to search Check

Click on Add

Double click

Click on save

Page 99: Reducing passive interruptions

It’s not just about the right tools…

It’s about be aware of the passive interruptions

… and reduce them!

Page 100: Reducing passive interruptions

@andreitognologithub.com/[email protected]

Gracias! is hiring!

http://join.thoughtworks.com/

Page 101: Reducing passive interruptions

http://blog.ninlabs.com/2013/01/programmer-interrupted/

- Bret Victor - http://vimeo.com/36579366

- Martin Fowler - http://martinfowler.com/bliki/FrequencyReducesDifficulty.html

- Chris Parnin - http://blog.ninlabs.com/2013/01/programmer-interrupted/

- Flow - https://en.wikipedia.org/wiki/Flow_(psychology)

- Developing ClojureScript With Figwheel - https://www.youtube.com/watch?v=j-kj2qwJa_E

- Uncle Bob - http://blog.cleancoder.com/uncle-bob/2014/09/03/TestTime.html

References