understanding the mind of a developer

26
Understanding the Mind of a Developer and so........... Find More Defects Brian Robinson Mental Performance Coach (former software engineer and “defect finder”)

Upload: deborah-house

Post on 31-Dec-2015

27 views

Category:

Documents


2 download

DESCRIPTION

Understanding the Mind of a Developer. Find More Defects. and so. Brian Robinson Mental Performance Coach (former software engineer and “defect finder”). Inspire you to…. Q U A L I T Y. O F L I F E. consider what drives testers and developers. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Understanding the Mind  of a  Developer

Understanding the Mind of a

Developerand so...........

Find More Defects

Brian RobinsonMental Performance Coach(former software engineer and “defect finder”)

Page 2: Understanding the Mind  of a  Developer

thin

k more

about i

ntera

ctio

ns with

dev

eloper

s

think more about developer’s

problem areas

consi

der

what

dri

ves

test

ers

and

deve

lope

rs

QUALITY

OF

LIFE

INSPIRE YOU TO….

Page 3: Understanding the Mind  of a  Developer

MenuWho Am I and what am I doing here ?

Very Short Theory Of The Mind

The Mind Of A Developer

Developer’s Problem Areas

Tips - How To Approach Developers

Page 4: Understanding the Mind  of a  Developer

R-ComplexReptilian BrainInstinct, survival, eating, aggression, dominance, reproducing....Responds by one of the 3-F’sFight, Flight or Faint !

Limbic SystemMammalian BrainEmotions, parenting, mood, memory, “value judgements.”

NeocortexPrimate Brianlanguage, abstraction, planning, self-awareness, logical analysis

Page 5: Understanding the Mind  of a  Developer

I am “watching”

65%what you

are “saying”

I am “feeling”

28% what you

are “saying”

It’s hard to

concentrate on what you are saying

because I can only

hear 7% of it!

Page 6: Understanding the Mind  of a  Developer

I want food, I want

warmth,I want to

SURVIVE !

I want to feel safe,

I want to be wanted

I want to learnI want meaning

I want to contribute

Page 7: Understanding the Mind  of a  Developer

Social Needs

Esteem Needs

Self-Actualisation

Motivation

Page 8: Understanding the Mind  of a  Developer
Page 9: Understanding the Mind  of a  Developer
Page 10: Understanding the Mind  of a  Developer

Who’s in The Driving Seat ?

The elephant will go anywhere the rider chooses…..

As long as the elephant agrees

Page 11: Understanding the Mind  of a  Developer

Who Do You Think You Are Talking To ?

Oh no !That’s my 10th

this week

Thanks. I’ll take a

look.

I just can’t do this wor

k

I thought I was good, but I

am not

I HATE that tester ! They are always so pleased

when they break my programs

Hey !Look at this !I found this

REALLY cool defect in your

program !

Page 12: Understanding the Mind  of a  Developer

Who Do You Think You Are Listening To ?

Oh no !That’s my 10th

this week

Thanks. I’ll take a

look.

I just can’t do this wor

k

I thought I was good, but I

am not

I HATE that tester ! They are always so pleased

when they break my programs

Hey !Look at this !I found this

REALLY cool defect in your

program !

Erm, erm. Ok.

Thanks.

Page 13: Understanding the Mind  of a  Developer

Who is driving the show now ?

Thanks. I’ll take a

look.Erm, erm.

Ok. Thanks.

Oh No! He seems annoyed.

Maybe its a feature I

haven’t heard about

Why do these

developers get so

annoyed. Don’t they

understand. I am here to

lift the quality.

Well, if he is going to take it like that then

he can struggle to recreate

the defect on his own.

Page 14: Understanding the Mind  of a  Developer

PraiseProblemPraise

Page 15: Understanding the Mind  of a  Developer

Developer’s Weakspots

Page 16: Understanding the Mind  of a  Developer

Interfaces, Interfaces, Interfaces

Page 17: Understanding the Mind  of a  Developer

Man-Machine Interface

TestData set sizesUsabilityProgrammers design interfaces to fit programming/database structures

TestData speedAmounts of dataData formatProgrammers will reuse the same data messaging irrespective of destination

TestDisplay typesProgrammers will reuse and “hope” it fits all browsers

TestSpecific needs for specific usersProgrammers will reuse and “hope” it fits all needs

Page 18: Understanding the Mind  of a  Developer

Database Interfaces

Simultaneous Update

Database DeadlockLock Escalation

Orp

han

Rec

ords

Transaction DesignSequence and PK Allocation

Page 19: Understanding the Mind  of a  Developer

Name : Fred SmithMarried : NoAddress : 12, The Street, Newtown

Name : Fred SmithMarried : NoAddress : 12, The Street, Newtown

Name : Fred SmithMarried : NoAddress : 12, The Street, Newtown

Name : Fred SmithMarried : YesAddress : 12, The Street, Newtown

Name : Fred SmithMarried : NoAddress : 25, The Way, Oldtown

Database Interfaces – Simultaneous Update

!!!! !!!!!!!!!!!!!!Lost Update

Page 20: Understanding the Mind  of a  Developer

Database Interfaces –Primary and Foreign Keys

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :TextDept No : Integer FK

Personnel No Name Married Address Dept No

16 Bert Jackson No 14, The Lane.... 3

12 Fred Smith Yes 27, Cold Road.... 1

Database Table. Department

Dept no : Integer PKName : Text

Dept No Name

1 Accounts

2 Purchasing

3 IT

Primary Keys Foreign Key

Page 21: Understanding the Mind  of a  Developer

Personnel No. = Max +1 (16)Name : Bert JacksonMarried : NoAddress : 14, The Lane, Toptown

Personnel No. = Max+1 (16)Name : George BurnsMarried : YesAddress : 25, Avenue, Fishtown

Database Interfaces – Sequence and Primary Key Allocation

Select Max(personnelno)From employee

Returns 15

Select Max(personnelno)From employee

Returns 15

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :Text Personnel No Name Married Address

16 Bert Jackson No 14, The Lane....

FAIL !!!!Primary Key Violation

Key Already ExistsOR

Even WorseUpdates Existing Record!!!!!!

Page 22: Understanding the Mind  of a  Developer

Database Interfaces – Orphan Records

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :TextDept No : Integer FK

Personnel No Name Married Address Dept No

16 Bert Jackson No 14, The Lane.... 3

12 Fred Smith Yes 27, Cold Road.... 5

Database Table. Department

Dept no : Integer PKName : Text

Dept No Name

1 Accounts

2 Purchasing

3 IT

Primary Keys Foreign Key

????

Page 23: Understanding the Mind  of a  Developer

Database Interfaces – Lock Escalation

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :TextDept No : Integer FK

Personnel No Name Married Address Dept No

16 Bert Jackson No 14, The Lane.... 3

12 Fred Smith Yes 27, Cold Road.... 1

....

......

2018071 Capt Kirk No 17, Starship Ent....

3

Database Table. Department

Dept no : Integer PKName : Text

Dept No Name

1 Accounts

2 Purchasing

3 IT

Delete From Dept where DeptNo = 2

If there is no index on Deptno in Employee then this will lock the whole Employee table

Not Always necessary –Depends on size of tables

Ask the DBA – He can be a great friend

Page 24: Understanding the Mind  of a  Developer

Database Interfaces – Deadlock

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :TextDept No : Integer FKSalary : Double

Database Table. Department

Dept no : Integer PKName : TextHeadOffice : Boolean

When we update rows most DBMS’s will lock the rows to be updated

Program 1Update Department set HeadOffice = Y Where Deptno= 1

Update Employee set deptno = 1 Where empno= 27865

Program 2

Update Department set name = Acountancy Where Deptno= 1

Update Employee set salary = 400,001 Where empno= 27865

P1 P2

P1 P2

Deadlock !!P1 and P2 are waiting for each other

Page 25: Understanding the Mind  of a  Developer

Database Interfaces – Transaction Design

Very important for maintaining consistency of database

Database Table. Employee

Personnelno : Integer PKName : TextMarried : BooleanAddress :TextDept No : Integer FK

Personnel No

Name Married Address Dept No Salary

16 Bert Jackson No 14, The Lane....

3 37,231

12 Fred Smith Yes 27, Cold Road..

1 43,987

.... .... .... .... ... ....

301 Bernard Stock

Yes 75, Gold Lane..

3 21,243

Database Table. Department

Dept no : Integer PKName : TextManager : Integer FK

Dept No Name Manager

1 Accounts 12

2 Purchasing 295

3 IT 16

We are promoting Bernard Stock to be manager of IT

Update employee set salary=65,238, deptno=1 where empno=301

Update Dept set manager=301 What if it fails here ????

Begin Transaction

End Transaction (or Commit)

Page 26: Understanding the Mind  of a  Developer

Talk to the developer’s Elephant – the driver will understand in the end – it might take time

Look after your own elephant

Think before you interact with the developer

Help the developer with his interfaces – he NEEDS it !!!

Test is a job about human interactions – learn more about how we function as humans

Get close to the DBA – he will love you for it !