39
Human Interactions In Human Interactions In Programming Programming Rob DeLine Rob DeLine Researcher Researcher HIP HIP Microsoft Corporation Microsoft Corporation

Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Human Interactions In ProgrammingHuman Interactions In Programming

Rob DeLineRob DeLineResearcherResearcherHIPHIPMicrosoft CorporationMicrosoft Corporation

Page 2: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

HIP Makes Development ToolsHIP Makes Development Tools

Software Tools

HCI andInfoVis

CSCW andSocial

Computing

HIP

…as if software were made by people…working together

Page 3: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

User-Centered Tool DesignUser-Centered Tool Design

We study software developmentWe study software development Recording current practiceRecording current practice Observing in the labObserving in the lab

and in the fieldand in the field Evaluating tool solutionsEvaluating tool solutions

We create new toolsWe create new tools Based on what we observeBased on what we observe Releasing within MicrosoftReleasing within Microsoft Influencing Microsoft productsInfluencing Microsoft products

Page 4: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Studying SoftwareStudying SoftwareDevelopment At MicrosoftDevelopment At Microsoft

Thomas LaToza, Gina Venolia, and Rob DeLineThomas LaToza, Gina Venolia, and Rob DeLine““Maintaining Mental Models: A Study of DeveloperMaintaining Mental Models: A Study of DeveloperWork Habits.” Work Habits.” In Proc. ICSE 2006In Proc. ICSE 2006

Thomas LaToza, Gina Venolia, and Rob DeLineThomas LaToza, Gina Venolia, and Rob DeLine““Maintaining Mental Models: A Study of DeveloperMaintaining Mental Models: A Study of DeveloperWork Habits.” Work Habits.” In Proc. ICSE 2006In Proc. ICSE 2006

Page 5: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Strong notion of individual code ownership (77% agree)

Long-term code ownership (2.6 years on current code base)

Page 6: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Very strong notion of team code ownership (92% agree)

Feature teams are small (93% are 3±1) and collocated

Strong notion of individual code ownership (77% agree)

Long-term code ownership (2.6 years on current code base)

Page 7: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Team code ownership forms a moat

Dev Lead

Dev

Dev

Dev lead is liaison to other teams

Page 8: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Cross-team docs are less plentiful (4.8 versus 8.0 docs/year), but are more likely to be design-reviewed (87% versus 83%) and updated (63% versus 51%)

Design docs define the moat

Page 9: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Unit tests (79% of respondents) defend the moat by isolating perturbations

Page 10: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Clone-and-own instead of taking a dependency

Page 11: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Architecture

Devs carry rich models of code in their heads

Implementation

Social network

To-do’s, wishlists

Meta-info about the code

12

3

12

31

23

12

3

Worst for the “team historian”

Page 12: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Dev lead mentoring

Newcomers must pick up the mental model

New hire document

Reading the code

Asking around

12

3

12

31

23

Dive in and fix bugs

Page 13: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

12

3

12

31

23

Rationale is the #1 problem

Why it’s implemented the way it is (82% agree)Whether it’s temporary code (73%)How it works (69%)What it’s trying to do (62%)

12

3

Page 14: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

12

3

12

31

23

Investigating rationale Tries to understand code directly

Reads code (42% of the time)Debugger (20%)Diffs versions (16%)Examines results (9%)Trace statements (8%)

12

3

Page 15: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

12

3

12

31

23

Investigating rationale Does not read specs, design docs, e-mail

Does not send e-mail (unless crossing team boundaries)

12

3

Page 16: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

12

3

12

31

23

Investigating rationale Walks down the hall to the right person(causing an interruption)

12

3

Syncs mental models

Returns and becomes productive

Records nothing of this!

Page 17: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Where This Model Came FromWhere This Model Came From

Initial survey – 157 developersInitial survey – 157 developersanswered 205 questionsanswered 205 questions

Interviews – five devs, six dev leadsInterviews – five devs, six dev leads

Card sortCard sort

Follow-up survey – 187 developers Follow-up survey – 187 developers answered 187 questionsanswered 187 questions

Initial survey – 157 developersInitial survey – 157 developersanswered 205 questionsanswered 205 questions

Interviews – five devs, six dev leadsInterviews – five devs, six dev leads

Card sortCard sort

Follow-up survey – 187 developers Follow-up survey – 187 developers answered 187 questionsanswered 187 questions

Page 18: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Observed ProblemsObserved Problems

Retaining and sharing design decisionsRetaining and sharing design decisionsFinding the rationale behind codeFinding the rationale behind code

Understanding the impact of changesUnderstanding the impact of changes

Reducing the mental burdenReducing the mental burdenLearning the team’s artifacts as a newcomerLearning the team’s artifacts as a newcomer

Keeping the model up-to-date in your headKeeping the model up-to-date in your head

Attention and interruptionAttention and interruptionSwitching tasks to handle interruptionsSwitching tasks to handle interruptions

Juggling tasks to avoid being blockedJuggling tasks to avoid being blocked

Can we improve access to existing team artifacts?

Can we encourage the team to record more?

Page 19: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: BridgeProject: Bridge

What:What: Full-text search over code, Full-text search over code,check-ins, bugs, email, specs…check-ins, bugs, email, specs…

How:How: SQL index and link-analysis scoring SQL index and link-analysis scoring

Status:Status: invent ► develop ► evaluate ► deploy invent ► develop ► evaluate ► deploy

Who:Who: Gina Venolia Gina Venolia

Gina Venolia, “Textual Allusions to Artifacts inGina Venolia, “Textual Allusions to Artifacts inSoftware-related Repositories.”Software-related Repositories.”In Proc. Mining Software Repositories 2006In Proc. Mining Software Repositories 2006

Page 20: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

etc.etc.

EmailEmail

Product

Studio

Product

StudioShare Point

Share Point

Source

Depot

Source

Depot

Project: BridgeProject: BridgeProject: BridgeProject: Bridge

Links fromLinks fromSource schemaSource schemaStructured documentsStructured documentsPlain-text allusionsPlain-text allusionsComputed Computed relationshipsrelationships

Team TracksTeam Tracks

etc.etc.

Graph gives basis forGraph gives basis forLink-analysis scoringLink-analysis scoring

Diary of an artifactDiary of an artifact

RecommendationsRecommendations

etc.etc.

Links fromLinks fromSource schemaSource schemaStructured documentsStructured documentsPlain-text allusionsPlain-text allusionsComputed Computed relationshipsrelationships

Team TracksTeam Tracks

etc.etc.

Graph gives basis forGraph gives basis forLink-analysis scoringLink-analysis scoring

Diary of an artifactDiary of an artifact

RecommendationsRecommendations

etc.etc.

From: Joe CoderTo: Project XYZ Dev TeamSubject: Re: account bug

I managed to repro bug #3242 on my machine last night. I think it might have to do with the Account.Add method that got changed in the last push. I’ll take a look.

From: Joe CoderTo: Project XYZ Dev TeamSubject: Re: account bug

I managed to repro bug #3242 on my machine last night. I think it might have to do with the Account.Add method that got changed in the last push. I’ll take a look.

Page 21: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: Bridge BrowserProject: Bridge Browser

Page 22: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: CodifierProject: Codifier

What:What: Programmer’s search tool Programmer’s search tool

How:How: Code-specific indexing for Windows Code-specific indexing for Windows Desktop Search; code-centric Desktop Search; code-centric presentation of resultspresentation of results

Status:Status: invent ► develop ► invent ► develop ►evaluate ► deployevaluate ► deploy

Who:Who: Andrew Begel Andrew Begel

Page 23: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

12

3

12

31

23

Remember this story?

Walks down the hall to the right person(causing an interruption)

12

3

Syncs mental models

Returns and becomes productive

Records nothing of this!

Page 24: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Barriers To Recording KnowledgeBarriers To Recording Knowledge

Information outside the code is suspectInformation outside the code is suspect

Code comments have overheadCode comments have overheadChanging the code requires write permission Changing the code requires write permission and a check-inand a check-in

Check-ins trigger review processes,Check-ins trigger review processes,merge conflicts, test suite runs,merge conflicts, test suite runs,automatic analyses, etc.automatic analyses, etc.

Comments feel too authoritativeComments feel too authoritative

No good way to scribble notesNo good way to scribble notesin the marginsin the margins

Page 25: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: JotNetProject: JotNet

What:What: A shared annotation system A shared annotation systemfor codefor code

How:How: VS plug-in, annotations stored VS plug-in, annotations storedin XML filesin XML files

Status:Status: invent ► develop ► invent ► develop ►evaluate ► deployevaluate ► deploy

Who:Who: Rob DeLine and Gina Venolia Rob DeLine and Gina Venolia

Page 26: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: JotNet ScreenshotProject: JotNet ScreenshotProject: JotNet ScreenshotProject: JotNet Screenshot

Page 27: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Studying DevelopersStudying DevelopersLearning Unfamiliar CodeLearning Unfamiliar Code

Page 28: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Code Navigation Is A ProblemCode Navigation Is A Problem

We ran an initial observational studyWe ran an initial observational studyInefficient navigation to find task-relevant codeInefficient navigation to find task-relevant code

Misleading results of text searchesMisleading results of text searches

Disorientation from too much navigation, too many Disorientation from too much navigation, too many open filesopen files

Ko, Aung and Myers found similar resultsKo, Aung and Myers found similar results35% of task time was just navigation35% of task time was just navigation

Robert DeLine, Amir Khella, Mary Czerwinski,Robert DeLine, Amir Khella, Mary Czerwinski,and George Robertson, “Towards understandingand George Robertson, “Towards understandingprograms through wear-based filtering.”programs through wear-based filtering.”In Proc. Symp. on Software Visualization, 2005In Proc. Symp. on Software Visualization, 2005

Robert DeLine, Amir Khella, Mary Czerwinski,Robert DeLine, Amir Khella, Mary Czerwinski,and George Robertson, “Towards understandingand George Robertson, “Towards understandingprograms through wear-based filtering.”programs through wear-based filtering.”In Proc. Symp. on Software Visualization, 2005In Proc. Symp. on Software Visualization, 2005

Can we make navigation more efficient?

Can we make navigation less of a mental burden?

Page 29: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: Team TracksProject: Team Tracks

What: Recommend methods related toWhat: Recommend methods related tothe current onethe current one

How: Log navigation and then deriveHow: Log navigation and then derivemethod-to-method affinity graphmethod-to-method affinity graph

Status: invent ► develop ► evaluate ► deployStatus: invent ► develop ► evaluate ► deploy

Who: Rob DeLine, Mary Czerwinski, George Who: Rob DeLine, Mary Czerwinski, George Robertson, Piali Choudhury, and Amir KhellaRobertson, Piali Choudhury, and Amir Khella

DeLine, Czerwinski and Robertson,DeLine, Czerwinski and Robertson,“Easing Program Comprehension by“Easing Program Comprehension bySharing Navigation Data.” Sharing Navigation Data.” In Proc. VL/HCC 2005In Proc. VL/HCC 2005

Page 30: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation
Page 31: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Evaluating Team TracksEvaluating Team Tracks

Lab study with 16 experienced developersLab study with 16 experienced developersFour tasks in 1 hour on 3 KLOC Tetris game in C#Four tasks in 1 hour on 3 KLOC Tetris game in C#

9 used Team Tracks, 7 did not9 used Team Tracks, 7 did not

Tasks followed by quiz about the codeTasks followed by quiz about the code

Task performance improvedTask performance improvedFor two warm-up tasks, everyone finished themFor two warm-up tasks, everyone finished them

For task with localized changes,For task with localized changes,no significant differenceno significant difference

For task with scattered changes, 7/9 finished with For task with scattered changes, 7/9 finished with Team Tracks; 1/7 finished withoutTeam Tracks; 1/7 finished without

Quiz performance also better with Team TracksQuiz performance also better with Team Tracks

Page 32: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: Code ThumbnailsProject: Code Thumbnails

What:What: Single-file (1D) and Single-file (1D) andmulti-file (2D) overviewsmulti-file (2D) overviews

How:How: Micro-font rendering of file Micro-font rendering of file

Status:Status: invent ► develop ► evaluate ► deploy invent ► develop ► evaluate ► deploy

Who:Who: Rob DeLine, Mary Czerwinski, Brian Rob DeLine, Mary Czerwinski, Brian Meyers, Gina Venolia, Steven Drucker, and Meyers, Gina Venolia, Steven Drucker, and George RobertsonGeorge Robertson

DeLine, Czerwinski, Meyers, Venolia, Drucker and DeLine, Czerwinski, Meyers, Venolia, Drucker and Robertson “Code Thumbnails: Using spatial memoryRobertson “Code Thumbnails: Using spatial memoryto navigate source code” to navigate source code” To appear in VL/HCC 2006To appear in VL/HCC 2006

Page 33: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Project: Code Thumbnails OverviewProject: Code Thumbnails Overview

Page 34: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Evaluating Code ThumbnailsEvaluating Code Thumbnails

Formative study with 11 participantsFormative study with 11 participantsSame setup as Team Tracks studySame setup as Team Tracks study

Participant does additional targeted search taskParticipant does additional targeted search task

We logged commands in the development We logged commands in the development environment for 5 of 11environment for 5 of 11

CT used for many navigation stepsCT used for many navigation steps

During targeted search, CT used in 64% of trialsDuring targeted search, CT used in 64% of trials

We’re doing a new study to look at performanceWe’re doing a new study to look at performance0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

1 2 3 4 5

Participant

Per

cen

t o

f A

ctio

ns

Click symbol searchresultSolution Explorer

Go To Definition

Click text searchresultCTD double-click

CTD thumbnail click

CTD title click

CTS scrollbar scroll

CTS thumbnail click

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

1 2 3 4 5

Participant

Per

cen

t o

f A

ctio

ns

Click symbol searchresultSolution Explorer

Go To Definition

Click text searchresultCTD double-click

CTD thumbnail click

CTD title click

CTS scrollbar scroll

CTS thumbnail click

Page 35: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Current StudiesCurrent Studies

Page 36: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

Next Steps In User ResearchNext Steps In User Research

Current studiesCurrent studiesGeographically distributed developmentGeographically distributed developmentGina VenoliaGina Venolia

Observations of bug fixing Observations of bug fixing Rob DeLine and intern Andy KoRob DeLine and intern Andy Ko

Code maps for team coordination Code maps for team coordination Gina Venolia and intern Mauro CherubiniGina Venolia and intern Mauro Cherubini

Studies in the next yearStudies in the next yearIn-depth ethnography of a team for a monthIn-depth ethnography of a team for a month

Observations of task switching and interruptionObservations of task switching and interruption

Page 37: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

research.microsoft.com / hip

Page 38: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation

© 2006 Microsoft Corporation. All rights reserved.Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft,

and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 39: Human Interactions In Programming Rob DeLine ResearcherHIP Microsoft Corporation