Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

hi!

Slide 3

Slide 3 text

@holly_cummins developer productivity engineering developer joy

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

@holly_cummins As usual, Fred Brooks has the answer.

Slide 6

Slide 6 text

#Gradle #RedHat @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 7

Slide 7 text

No content

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Toil

Slide 10

Slide 10 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 11

Slide 11 text

#Gradle #RedHat @trisha_gee @holly_cummins Let's Write More Code solution

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

#Gradle #RedHat @trisha_gee @holly_cummins 10 lines per day …really?

Slide 15

Slide 15 text

#Gradle #RedHat @trisha_gee @holly_cummins 12 lines per day

Slide 16

Slide 16 text

#Gradle #RedHat @trisha_gee @holly_cummins 29 lines per day

Slide 17

Slide 17 text

#Gradle #RedHat @trisha_gee @holly_cummins can we fi x that?

Slide 18

Slide 18 text

#Gradle #RedHat @trisha_gee @holly_cummins incentives? solution

Slide 19

Slide 19 text

#Gradle #RedHat @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 20

Slide 20 text

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

Slide 21

Slide 21 text

#Gradle #RedHat @trisha_gee @holly_cummins the experiment lasted one day

Slide 22

Slide 22 text

#Gradle #RedHat @trisha_gee @holly_cummins Can AI help us write more code? solution

Slide 23

Slide 23 text

#Gradle #RedHat @trisha_gee @holly_cummins 70% unnecessary code

Slide 24

Slide 24 text

#Gradle #RedHat @trisha_gee @holly_cummins LLMs are much better at writing code than deleting it.

Slide 25

Slide 25 text

#Gradle #RedHat @trisha_gee @holly_cummins is this the equivalent of ascii art comments?

Slide 26

Slide 26 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 27

Slide 27 text

#Gradle #RedHat @trisha_gee @holly_cummins even old-school code assistance produces bloat /** * @return Returns the xyz. */ public String getXyz() { return xyz; } /** * @param xyz * The xyz to set. */ public void setXyz(String xyz) { this.xyz = xyz; }

Slide 28

Slide 28 text

#Gradle #RedHat @trisha_gee @holly_cummins comments and commit messages should have a why

Slide 29

Slide 29 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 30

Slide 30 text

#Gradle #RedHat @trisha_gee @holly_cummins should we be trying to create more lines of code?

Slide 31

Slide 31 text

#Gradle #RedHat @trisha_gee @holly_cummins Is a developer’s job writing code?

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 34

Slide 34 text

#Gradle #RedHat @trisha_gee @holly_cummins “41% of all code right now is AI generated” – Emad Mostaque, Stability CEO

Slide 35

Slide 35 text

#Gradle #RedHat @trisha_gee @holly_cummins “41% of all code [that is being written using Copilot] right now is AI generated” – Emad Mostaque, Stability CEO

Slide 36

Slide 36 text

#Gradle #RedHat @trisha_gee @holly_cummins copilot users accepted 30% of its suggestions copilot produced 40% of the codebase uh oh, what does that say about the information density?

Slide 37

Slide 37 text

#Gradle #RedHat @trisha_gee @holly_cummins “negative lines of code”

Slide 38

Slide 38 text

#Gradle #RedHat @trisha_gee @holly_cummins you pay your junior developers to write code you pay your senior developers to delete code

Slide 39

Slide 39 text

#Gradle #RedHat @trisha_gee @holly_cummins if code is so boring a machine can predict it, maybe it shouldn’t be there?

Slide 40

Slide 40 text

enter … developer joy

Slide 41

Slide 41 text

@trisha_gee @holly_cummins #Gradle #RedHat 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 42

Slide 42 text

@trisha_gee @holly_cummins #Gradle #RedHat 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 43

Slide 43 text

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

Slide 44

Slide 44 text

@trisha_gee @holly_cummins #Gradle #RedHat @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 @ApplicationScoped public class GreetingRepository implements PanacheRepository { public Entity findByName(int name) { return find("name", name).firstResult(); } }

Slide 45

Slide 45 text

@holly_cummins #RedHat @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 46

Slide 46 text

@holly_cummins #RedHat 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 47

Slide 47 text

@holly_cummins #RedHat but … … the reason Fred Brooks’s developers wrote 10 lines of code a day wasn’t because they were busy writing boilerplate

Slide 48

Slide 48 text

#Gradle #RedHat @trisha_gee @holly_cummins What else are developers doing?

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

#Gradle #RedHat @trisha_gee @holly_cummins Measure, don’t guess.

Slide 54

Slide 54 text

measure local build and test times

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

#Gradle #RedHat @trisha_gee @holly_cummins What gets measured is what gets optimised, make sure to measure the right thing

Slide 58

Slide 58 text

@holly_cummins #RedHat SPACE • Satisfaction & Well-being • Performance • Activity • Communication & Collaboration • Ef fi ciency & Flow

Slide 59

Slide 59 text

#Gradle #RedHat @trisha_gee @holly_cummins McKinsey productivity is so wrong. Because it is.

Slide 60

Slide 60 text

“E ffi ciency means to do things in the right way (repeatable, controllable, scalable). E ff ectiveness means to do the right thing (trial and error, risk taking, adaptability). " Lex Sisney - Organizational Physics: The Science of Growing a Business”

Slide 61

Slide 61 text

Lex Sisney - Organizational Physics: The Science of Growing a Business” “E ffi ciency means to do things in the right way (repeatable, controllable, scalable). E ff ectiveness means to do the right thing (trial and error, risk taking, adaptability). Unless you design against it, ef fi ciency will tend to overpower and snuff out effectiveness."

Slide 62

Slide 62 text

#Gradle #RedHat @trisha_gee @holly_cummins Dave Farley Trisha

Slide 63

Slide 63 text

#Gradle #RedHat @trisha_gee @holly_cummins Creating boredom

Slide 64

Slide 64 text

#Gradle #RedHat @trisha_gee @holly_cummins “Creating space”

Slide 65

Slide 65 text

#Gradle #RedHat @trisha_gee @holly_cummins toil is bad idleness is … good?

Slide 66

Slide 66 text

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

Slide 67

Slide 67 text

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

Slide 68

Slide 68 text

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

Slide 69

Slide 69 text

#Gradle #RedHat @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 70

Slide 70 text

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

Slide 71

Slide 71 text

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

Slide 72

Slide 72 text

#Gradle #RedHat @trisha_gee @holly_cummins knitting is useful for a wide range of fi elds aside

Slide 73

Slide 73 text

#Gradle #RedHat @trisha_gee @holly_cummins

Slide 74

Slide 74 text

#Gradle #RedHat @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 75

Slide 75 text

#Gradle #RedHat @trisha_gee @holly_cummins Make time for boredom Also make time for play

Slide 76

Slide 76 text

#Gradle #RedHat @trisha_gee @holly_cummins Fun has business value.

Slide 77

Slide 77 text

@holly_cummins #RedHat piglet litters grow faster if they play more https://www. fl ickr.com/photos/tambako/8746156155

Slide 78

Slide 78 text

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

Slide 79

Slide 79 text

@holly_cummins #RedHat

Slide 80

Slide 80 text

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

Slide 81

Slide 81 text

@holly_cummins #RedHat Research shows: Fun is good for business.

Slide 82

Slide 82 text

job satisfaction is the no. 1 predictor of organizational performance

Slide 83

Slide 83 text

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

Slide 84

Slide 84 text

#Gradle #RedHat @trisha_gee @holly_cummins creativity makes us happy

Slide 85

Slide 85 text

#Gradle #RedHat @trisha_gee @holly_cummins Remember SPACE? The S is developer Satisfaction An important metric in SPACE

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

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

Slide 88

Slide 88 text

«Η ευχαρίστηση στην δουλειά βάζει την τελειότητα στην εργασία» Αριστοτέλης

Slide 89

Slide 89 text

“Pleasure in the job puts perfection in the work.” Aristotle

Slide 90

Slide 90 text

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

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

@holly_cummins #RedHat the double win co-benefits win-win twofer überwinden

Slide 93

Slide 93 text

#Gradle #RedHat @trisha_gee @holly_cummins zero-sum is not enough “The only initiatives that will positively impact performance are ones which increase throughput while simultaneously decreasing cost.”

Slide 94

Slide 94 text

@holly_cummins #RedHat using AI to generate code that shouldn’t even be there the double-lose

Slide 95

Slide 95 text

@holly_cummins #RedHat - be careful how you measure productivity (not LOC!) - get rid of drugdery 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 96

Slide 96 text

@holly_cummins thank you hollycummins.com/productivity- messing-around-devoxx/ slides + resources Win a copy of Getting to Know IntelliJ IDEA!