Slide 1

Slide 1 text

Productivity is Messing Around and Having Fun Trisha Gee, Gradle Holly Cummins, Red Hat QCon London

Slide 2

Slide 2 text

hi! #Gradle #RedHat

Slide 3

Slide 3 text

@trisha_gee @holly_cummins developer productivity engineering developer joy #Gradle #RedHat

Slide 4

Slide 4 text

@trisha_gee @holly_cummins are these opposites, or the same?

Slide 5

Slide 5 text

@trisha_gee @holly_cummins are these opposites, or the same? is development supposed to be fun?

Slide 6

Slide 6 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 7

Slide 7 text

#Gradle #RedHat @trisha_gee @holly_cummins why are you smiling?

Slide 8

Slide 8 text

#Gradle #RedHat @trisha_gee @holly_cummins why are you smiling? work is not a place to be happy!

Slide 9

Slide 9 text

@trisha_gee @holly_cummins As usual, Fred Brooks has the answer.

Slide 10

Slide 10 text

@trisha_gee @holly_cummins “The Joys of the Craft”

Slide 11

Slide 11 text

@trisha_gee @holly_cummins “The Joys of the Craft” 1. The sheer joy of making things

Slide 12

Slide 12 text

@trisha_gee @holly_cummins “The Joys of the Craft” 1. The sheer joy of making things 2. The pleasure of making things that are useful to other people.

Slide 13

Slide 13 text

@trisha_gee @holly_cummins “The Joys of the Craft” 1. The sheer joy of making things 2. The pleasure of making things that are useful to other people. 3. The fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work

Slide 14

Slide 14 text

@trisha_gee @holly_cummins “The Joys of the Craft” 1. The sheer joy of making things 2. The pleasure of making things that are useful to other people. 3. The fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work 4. The joy of always learning

Slide 15

Slide 15 text

@trisha_gee @holly_cummins “The Joys of the Craft” 1. The sheer joy of making things 2. The pleasure of making things that are useful to other people. 3. The fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work 4. The joy of always learning 5. The delight of working in such a tractable medium

Slide 16

Slide 16 text

@trisha_gee @holly_cummins joy has business value.

Slide 17

Slide 17 text

@trisha_gee @holly_cummins #Gradle #RedHat ΑΡΙΣΤΟΤΈΛΗΣ

Slide 18

Slide 18 text

@trisha_gee @holly_cummins #Gradle #RedHat «τελειοῖ δὲ τὴν ἐνέργειαν ἡἡδονή» ΑΡΙΣΤΟΤΈΛΗΣ

Slide 19

Slide 19 text

@trisha_gee @holly_cummins #Gradle #RedHat «Η ευχαρίστηση στην δουλειά βάζει την τελειότητα στην εργασία» ΑΡΙΣΤΟΤΈΛΗΣ

Slide 20

Slide 20 text

@trisha_gee @holly_cummins #Gradle #RedHat “Pleasure in the job puts perfection in the work.” Aristotle

Slide 21

Slide 21 text

@trisha_gee @holly_cummins the science bit

Slide 22

Slide 22 text

@trisha_gee @holly_cummins piglet litters grow https://www.flickr.com/photos/tambako/8746156155

Slide 23

Slide 23 text

#Gradle #RedHat @trisha_gee @holly_cummins research shows: fun is good for business.

Slide 24

Slide 24 text

#Gradle #RedHat @trisha_gee @holly_cummins research shows: fun is good for business.

Slide 25

Slide 25 text

@trisha_gee @holly_cummins https:/ /hbr.org/2012/01/positive-intelligence

Slide 26

Slide 26 text

@trisha_gee @holly_cummins “Your brain at positive is 31% more productive than your brain at negative, neutral or stressed. " https:/ /hbr.org/2012/01/positive-intelligence

Slide 27

Slide 27 text

@trisha_gee @holly_cummins

Slide 28

Slide 28 text

https:/ /www2.warwick.ac.uk/fac/soc/economics/staff/eproto/workingpapers/happinessproductivity.pdf

Slide 29

Slide 29 text

"Individuals [who just watched a comedy video] have approximately greater productivity." https:/ /www2.warwick.ac.uk/fac/soc/economics/staff/eproto/workingpapers/happinessproductivity.pdf

Slide 30

Slide 30 text

We can measure this at an organisational level … and see the correlation.

Slide 31

Slide 31 text

@trisha_gee @holly_cummins #Gradle #RedHat Job satisfaction is the no. 1 predictor of organizational performance.

Slide 32

Slide 32 text

@trisha_gee @holly_cummins #Gradle #RedHat Satisfaction & Well-being Performance Activity Communication & Collaboration E ffi ciency & Flow SPACE

Slide 33

Slide 33 text

@trisha_gee @holly_cummins “It’s hard to over-emphasize how unusual it is that an economic sector as large as knowledge work lacks useful standard de fi nitions of productivity.” – Cal Newport, Slow Productivity

Slide 34

Slide 34 text

@trisha_gee @holly_cummins #Gradle #RedHat Satisfaction & Well-being Performance Activity Communication & Collaboration E ffi ciency & Flow SPACE

Slide 35

Slide 35 text

@trisha_gee @holly_cummins Lines of code!

Slide 36

Slide 36 text

@trisha_gee @holly_cummins How are we doing on that?

Slide 37

Slide 37 text

@trisha_gee @holly_cummins “a developer writes 10 lines of code per day”

Slide 38

Slide 38 text

@trisha_gee @holly_cummins 10 lines per day …really?

Slide 39

Slide 39 text

@trisha_gee @holly_cummins

Slide 40

Slide 40 text

@trisha_gee @holly_cummins 12 lines per day

Slide 41

Slide 41 text

@trisha_gee @holly_cummins creator of Redis

Slide 42

Slide 42 text

@trisha_gee @holly_cummins 29 lines per day creator of Redis

Slide 43

Slide 43 text

@trisha_gee @holly_cummins will incentives get more code?

Slide 44

Slide 44 text

@trisha_gee @holly_cummins true story (from the internet): paying the team bonuses for lines of code

Slide 45

Slide 45 text

@trisha_gee @holly_cummins true story (from the internet): paying the team bonuses for lines of code for (var i = 0; i < 10; i++) { // code }

Slide 46

Slide 46 text

@trisha_gee @holly_cummins true story (from the internet): paying the team bonuses for lines of code for (var i = 0; i < 10; i++) { // code } for ( var i = 0; i < 10; i++ ) { // code }

Slide 47

Slide 47 text

@trisha_gee @holly_cummins the team made comments prettier

Slide 48

Slide 48 text

@trisha_gee @holly_cummins __ .__ .__ .__ __ _/ |_| |__ |__| ______ |__| ______ _____ ____ ____ _____ _____ ____ _____/ |_ \ __\ | \| |/ ___/ | |/ ___/ \__ \ _/ ___\/ _ \ / \ / \_/ __ \ / \ __\ | | | Y \ |\___ \ | |\___ \ / __ \_ \ \__( <_> ) Y Y \ Y Y \ ___/| | \ | |__| |___| /__/____ > |__/____ > (____ / \___ >____/|__|_| /__|_| /\___ >___| /__| \/ \/ \/ \/ \/ \/ \/ \/ \/ the team made comments prettier

Slide 49

Slide 49 text

@trisha_gee @holly_cummins the experiment lasted one day

Slide 50

Slide 50 text

@trisha_gee @holly_cummins “lines of code” is not a good productivity metric for people. or machines.

Slide 51

Slide 51 text

@trisha_gee @holly_cummins tester developer

Slide 52

Slide 52 text

@trisha_gee @holly_cummins tester developer I get a bonus for every bug I fix!

Slide 53

Slide 53 text

@trisha_gee @holly_cummins tester developer I get a bonus for every bug I fix! I get a bonus for every bug I find!

Slide 54

Slide 54 text

@trisha_gee @holly_cummins tester developer I get a bonus for every bug I fix! I get a bonus for every bug I find! … pssst… wanna buy a bug?

Slide 55

Slide 55 text

@trisha_gee @holly_cummins “visible activity” metrics

Slide 56

Slide 56 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code

Slide 57

Slide 57 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code - commit counts

Slide 58

Slide 58 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code - commit counts - pull requests

Slide 59

Slide 59 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code - commit counts - pull requests - bugs fi xed

Slide 60

Slide 60 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code - commit counts - pull requests - bugs fi xed - bugs found

Slide 61

Slide 61 text

@trisha_gee @holly_cummins “visible activity” metrics - lines of code - commit counts - pull requests - bugs fi xed - bugs found - releases

Slide 62

Slide 62 text

@trisha_gee @holly_cummins We know these metrics are fl awed so we fi nd a “better” one.

Slide 63

Slide 63 text

@trisha_gee @holly_cummins “In the modern of fi ce context, [knowledge workers] tend to rely on stress as a default heuristic” – Cal Newport, Slow Productivity

Slide 64

Slide 64 text

@trisha_gee @holly_cummins ok, so why aren't our jobs fun?

Slide 65

Slide 65 text

@trisha_gee @holly_cummins overheads

Slide 66

Slide 66 text

The 2019 Tidelift survey
 https://bit.ly/3MOEpK3

Slide 67

Slide 67 text

The 2019 Tidelift survey
 https://bit.ly/3MOEpK3

Slide 68

Slide 68 text

Even the development part can be slow and annoying

Slide 69

Slide 69 text

@trisha_gee @holly_cummins waiting

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

solution: Build Cache

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

solution: Predictive Test Selection

Slide 76

Slide 76 text

solution: Predictive Test Selection

Slide 77

Slide 77 text

solution: Predictive Test Selection

Slide 78

Slide 78 text

solution: Test Distribution

Slide 79

Slide 79 text

Flaky Tests

Slide 80

Slide 80 text

Flaky Tests

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

@holly_cummins #RedHat

Slide 83

Slide 83 text

@holly_cummins #RedHat Guillaume, my CI was red. Is there a known failure in the vertx suite?

Slide 84

Slide 84 text

@holly_cummins #RedHat Guillaume, my CI was red. Is there a known failure in the vertx suite? Guillaume, my CI was red. Is there a known failure in the kafka suite?

Slide 85

Slide 85 text

@holly_cummins #RedHat Guillaume, my CI was red. Is there a known failure in the vertx suite? Guillaume, my CI was red. Is there a known failure in the kafka suite? Guillaume, my CI was red. Is there a known failure in the gRPC suite?

Slide 86

Slide 86 text

@trisha_gee @holly_cummins toil

Slide 87

Slide 87 text

@trisha_gee @holly_cummins #Gradle #RedHat Make computers do the boring stuff solution

Slide 88

Slide 88 text

#Gradle #RedHat @trisha_gee @holly_cummins (yet) Computers don’t expect to have fun

Slide 89

Slide 89 text

#Gradle #RedHat @trisha_gee @holly_cummins automation revenge! (yet) Computers don’t expect to have fun happy, lazy developer

Slide 90

Slide 90 text

solution: “auto-Guillaume” with Develocity

Slide 91

Slide 91 text

solution: “auto-Guillaume” with Develocity

Slide 92

Slide 92 text

solution: “auto-Guillaume” with Develocity

Slide 93

Slide 93 text

solution: “auto-Guillaume” with Develocity

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

#Gradle #RedHat @trisha_gee @holly_cummins Even coding can become boring

Slide 96

Slide 96 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 97

Slide 97 text

#Gradle #RedHat @trisha_gee @holly_cummins repetitive

Slide 98

Slide 98 text

#Gradle #RedHat @trisha_gee @holly_cummins meaningless repetitive

Slide 99

Slide 99 text

#Gradle #RedHat @trisha_gee @holly_cummins meaningless repetitive

Slide 100

Slide 100 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive

Slide 101

Slide 101 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive repetitive

Slide 102

Slide 102 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive repetitive repetitive

Slide 103

Slide 103 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive repetitive repetitive

Slide 104

Slide 104 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive repetitive repetitive redundant

Slide 105

Slide 105 text

#Gradle #RedHat @trisha_gee @holly_cummins low-value meaningless repetitive repetitive repetitive repetitive redundant

Slide 106

Slide 106 text

#Gradle #RedHat @trisha_gee @holly_cummins repetitive low-value meaningless repetitive repetitive repetitive repetitive redundant

Slide 107

Slide 107 text

#Gradle #RedHat @trisha_gee @holly_cummins repetitive low-value meaningless repetitive repetitive repetitive repetitive redundant

Slide 108

Slide 108 text

No content

Slide 109

Slide 109 text

enter … developer joy

Slide 110

Slide 110 text

@trisha_gee @holly_cummins package com.example; import org.jboss.logging.Logger; public class MyService { private static final Logger log = Logger.getLogger(MyService.class); public void doSomething() { log.info("It works!"); } } example: logging

Slide 111

Slide 111 text

@trisha_gee @holly_cummins package com.example; import org.jboss.logging.Logger; public class MyService { private static final Logger log = Logger.getLogger(MyService.class); public void doSomething() { log.info("It works!"); } } example: logging import io.quarkus.logging.Log; Log

Slide 112

Slide 112 text

@trisha_gee @holly_cummins package org.acme; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringDemo { public static void main(String[] args) { SpringApplication.run(SpringDemo.class, args); } } example: declaring an application

Slide 113

Slide 113 text

@trisha_gee @holly_cummins example: declaring an application

Slide 114

Slide 114 text

@trisha_gee @holly_cummins what if… you could inherit boilerplate Hibernate queries from a superclass, instead of having to write them all? example: hibernate

Slide 115

Slide 115 text

@trisha_gee @holly_cummins @ApplicationScoped public class GreetingRepository { public Entity findByName(int name) { return find("name", name).firstResult(); } void persist(Entity entity) {} void delete(Entity entity) {} Entity findById(Id id) {} List list(String query, Sort sort, Object... params) { return null; } Stream stream(String query, Object... params) { return null; } long count() { return 0; } long count(String query, Object... params) { return 0; } } example: hibernate with panache

Slide 116

Slide 116 text

@trisha_gee @holly_cummins example: hibernate with panache @ApplicationScoped public class GreetingRepository implements PanacheRepository { public Entity findByName(int name) { return find("name", name).firstResult(); } }

Slide 117

Slide 117 text

@trisha_gee @holly_cummins @TestConfiguration(proxyBeanMethods = false) public class ContainersConfig { @Bean @ServiceConnection public PostgreSQLContainer postgres() { return new PostgreSQLContainer<>(DockerImageName.parse("postgres:14")); } } public class TestApplication { public static void main(String[] args) { SpringApplication .from(MySpringDataApplication::main) .with(ContainersConfig.class) .run(args); } } @Import(ContainersConfig.class) example: testcontainers

Slide 118

Slide 118 text

@trisha_gee @holly_cummins example: testcontainers

Slide 119

Slide 119 text

@trisha_gee @holly_cummins the only thing you need to do to make testcontainers work is not con fi gure a datasource example: testcontainers

Slide 120

Slide 120 text

@trisha_gee @holly_cummins the only thing you need to do to make testcontainers work is not con fi gure a datasource example: testcontainers

Slide 121

Slide 121 text

@trisha_gee @holly_cummins the only thing you need to do to make testcontainers work is not con fi gure a datasource quarkus also auto-invokes fl yway and liquibase example: testcontainers

Slide 122

Slide 122 text

@trisha_gee @holly_cummins lack of joy creeps up on us productivity

Slide 123

Slide 123 text

@trisha_gee @holly_cummins lack of joy creeps up on us

Slide 124

Slide 124 text

@trisha_gee @holly_cummins #Gradle #RedHat Satisfaction & Well-being Performance Activity Communication & Collaboration E ffi ciency & Flow SPACE

Slide 125

Slide 125 text

@trisha_gee @holly_cummins Dave Farley Trisha

Slide 126

Slide 126 text

@trisha_gee @holly_cummins Dave Farley Trisha

Slide 127

Slide 127 text

@trisha_gee @holly_cummins Dave Farley Trisha

Slide 128

Slide 128 text

@trisha_gee @holly_cummins Creating boredom

Slide 129

Slide 129 text

@trisha_gee @holly_cummins “Creating space”

Slide 130

Slide 130 text

@trisha_gee @holly_cummins

Slide 131

Slide 131 text

@trisha_gee @holly_cummins toil is bad idleness is … good?

Slide 132

Slide 132 text

@trisha_gee @holly_cummins Default Mode Network science con fi rms it:

Slide 133

Slide 133 text

@trisha_gee @holly_cummins

Slide 134

Slide 134 text

@trisha_gee @holly_cummins 14% took showers speci fi cally for the purpose of coming up with ideas

Slide 135

Slide 135 text

@trisha_gee @holly_cummins Holly is most productive while • Showering • Running Trisha is most productive while • Knitting • Showering

Slide 136

Slide 136 text

@trisha_gee @holly_cummins Holly is most productive while • Showering • Running Trisha is most productive while • Knitting • Showering this slide was written while running

Slide 137

Slide 137 text

@trisha_gee @holly_cummins tip: use voice memo to capture all the work you do while running * the text on this slide was originally a voice memo

Slide 138

Slide 138 text

Activities to help your DMN - knitting - running - walking - showers - gardening - unloading the dishwasher - colouring - laundry

Slide 139

Slide 139 text

@trisha_gee @holly_cummins

Slide 140

Slide 140 text

@trisha_gee @holly_cummins double-win knitting makes you productive … and you get new clothes

Slide 141

Slide 141 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 142

Slide 142 text

#Gradle #RedHat @trisha_gee @holly_cummins but what if you’re not debugging- in-your-head while running?

Slide 143

Slide 143 text

#Gradle #RedHat @trisha_gee @holly_cummins but what if you’re not debugging- in-your-head while running? what if you’re feeding chocolate

Slide 144

Slide 144 text

#Gradle #RedHat @trisha_gee @holly_cummins but what if you’re not debugging- in-your-head while running? what if you’re feeding chocolate into the o ff i ce fan, to see what happens?

Slide 145

Slide 145 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 146

Slide 146 text

#Gradle #RedHat @trisha_gee @holly_cummins we work in a creative industry

Slide 147

Slide 147 text

#Gradle #RedHat @trisha_gee @holly_cummins we work in a creative industry play helps creativity

Slide 148

Slide 148 text

@trisha_gee @holly_cummins creativity brings us joy

Slide 149

Slide 149 text

@trisha_gee @holly_cummins

Slide 150

Slide 150 text

@trisha_gee @holly_cummins Embrace the dead time

Slide 151

Slide 151 text

@trisha_gee @holly_cummins Embrace the dead time Use it well:

Slide 152

Slide 152 text

@trisha_gee @holly_cummins Embrace the dead time Use it well: - problem solving

Slide 153

Slide 153 text

@trisha_gee @holly_cummins Embrace the dead time Use it well: - problem solving - thinking

Slide 154

Slide 154 text

@trisha_gee @holly_cummins Embrace the dead time Use it well: - problem solving - thinking - staring into space

Slide 155

Slide 155 text

@trisha_gee @holly_cummins Embrace the dead time Use it well: - problem solving - thinking - staring into space - play

Slide 156

Slide 156 text

@trisha_gee @holly_cummins Embrace the dead time Use it well: - problem solving - thinking - staring into space - play Do not just move e ffi ciently from task to task

Slide 157

Slide 157 text

@trisha_gee @holly_cummins Am I the frog? Am I using stress as a proxy for productivity?

Slide 158

Slide 158 text

@trisha_gee @holly_cummins Make time for boredom Also make time for play

Slide 159

Slide 159 text

@trisha_gee @holly_cummins

Slide 160

Slide 160 text

@trisha_gee @holly_cummins

Slide 161

Slide 161 text

@trisha_gee @holly_cummins

Slide 162

Slide 162 text

@trisha_gee @holly_cummins the double win

Slide 163

Slide 163 text

@trisha_gee @holly_cummins the double win co-benefits

Slide 164

Slide 164 text

@trisha_gee @holly_cummins the double win co-benefits win-win

Slide 165

Slide 165 text

@trisha_gee @holly_cummins the double win co-benefits win-win twofer

Slide 166

Slide 166 text

@trisha_gee @holly_cummins the double win co-benefits win-win twofer überwinden

Slide 167

Slide 167 text

@trisha_gee @holly_cummins the double win co-benefits win-win twofer überwinden

Slide 168

Slide 168 text

@trisha_gee @holly_cummins productivity happiness

Slide 169

Slide 169 text

@trisha_gee @holly_cummins it’s not a trade-off. productivity happiness

Slide 170

Slide 170 text

@trisha_gee @holly_cummins productivity happiness it’s a double-win.

Slide 171

Slide 171 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 172

Slide 172 text

#Gradle #RedHat @trisha_gee @holly_cummins - be careful how you measure productivity, because that metric what you will get (do not use LOC!)

Slide 173

Slide 173 text

#Gradle #RedHat @trisha_gee @holly_cummins - be careful how you measure productivity, because that metric what you will get (do not use LOC!) - automate drudgery that stops you being effective at your job

Slide 174

Slide 174 text

#Gradle #RedHat @trisha_gee @holly_cummins - be careful how you measure productivity, because that metric what you will get (do not use LOC!) - automate drudgery that stops you being effective at your job - being happier makes you better at your job

Slide 175

Slide 175 text

#Gradle #RedHat @trisha_gee @holly_cummins - be careful how you measure productivity, because that metric what you will get (do not use LOC!) - automate drudgery that stops you being effective at your job - being happier makes you better at your job - having down time (and showers, or knitting jumpers) makes you better at your job

Slide 176

Slide 176 text

#Gradle #RedHat @trisha_gee @holly_cummins - be careful how you measure productivity, because that metric what you will get (do not use LOC!) - automate drudgery that stops you being effective at your job - being happier makes you better at your job - having down time (and showers, or knitting jumpers) makes you better at your job - this a double-win

Slide 177

Slide 177 text

@trisha_gee @holly_cummins thank you! https://hollycummins.com/ productivity-messing-around-qcon/ slides + recommended reading Win a copy of Getting to Know IntelliJ IDEA!