demo-driven research in lugano

Post on 10-May-2015

441 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

I used this set of slides for a lecture I gave for the PhD students from the University of Lugano on how to do research.

TRANSCRIPT

Yogi Berra

You’ve got to be carefulif you do not knowwhere you are going,because you might not get there.

demo-drivenresearch

www.tudorgirba.com

demo-drivenresearch

www.tudorgirba.com

challengedesigndemolisten

enable

research?

research improvesthe status quo

the status quo?

the status quothe existing state of affairs

post-it

the status quothe existing state of affairs

the status quothe sum of our assumptions

Tom de Marco

It’s not what you don’t know that kills you,it’s what you know that isn’t so

the status quothe sum of our assumptions

researchrevealing what no one revealed before

demo-drivenresearch

www.tudorgirba.com

challenge

demo-drivenresearch

www.tudorgirba.com

challengedesign

demo-drivenresearch

www.tudorgirba.com

challengedesign

demo-drivenresearch

www.tudorgirba.com

challengedesign

present

to Understand Software Evolution

Modeling History

vorgelegt von

Tudor Gîrba

von Rumänien

Inauguraldissertation der Philosophisch-naturwissenschaftlichen

Fakultät der Universität Bern

Leiter der Arbeit:

Prof. Dr. Stéphane DucasseProf. Dr. Oscar Nierstrasz

Institut für Informatik und angewandte Mathematik

To provide a genericmeta-model for expressing software evolution analyses, we need to recognize evolution as an explicit phenomenon and model it as a first class entity.

to Understand Software Evolution

Modeling History

vorgelegt von

Tudor Gîrba

von Rumänien

Inauguraldissertation der Philosophisch-naturwissenschaftlichen

Fakultät der Universität Bern

Leiter der Arbeit:

Prof. Dr. Stéphane DucasseProf. Dr. Oscar Nierstrasz

Institut für Informatik und angewandte Mathematik

content

content form

content form

content form

yesterday’s weather

30%

30% 90%

yesterdayWeatherProbabilityWithTopPreviousWENM: topPreviousWENMandTopCurrentENM: topCurrentENM | currentVersions previousClassHistoriesSortedByWENM yesterdayWeatherHits last2VersionsTopHistories last2Versions last2HistoriesSortedByENM x valuesCount previousVersionsTopHistories previousVersionsTopHistoriesNames over | currentVersions := OrderedCollection new. currentVersions addLast: (self allVersionNames at: 1).

yesterdayWeatherHits := 0.

(2 to: self allVersionNames size) do: [: i | self smelly: 'this algorithm is too big and complex'.

previousClassHistoriesSortedByWENM := (self classHistories selectFromReferenceVersionCollection: currentVersions) sortBy: [:a :b | a value getWENM >= b value getWENM]. currentVersions addLast: (self allVersionNames at: i).

previousVersionsTopHistories := OrderedCollection new.

x := previousClassHistoriesSortedByWENM first value getWENM. valuesCount := 0.

previousClassHistoriesSortedByWENM do: [ :each | (each value getWENM ~= x) ifTrue: [ valuesCount := valuesCount + 1. x:= each value getWENM]. (valuesCount < topPreviousWENM) ifTrue: [ previousVersionsTopHistories addLast: each] ].

last2VersionsTopHistories := OrderedCollection new.

last2Versions := OrderedCollection new. last2Versions addLast: (self allVersionNames at: (i-1)). last2Versions addLast: (self allVersionNames at: i). last2HistoriesSortedByENM := (self classHistories

(each value getWENM ~= x) ifTrue: [ valuesCount := valuesCount + 1. x:= each value getWENM]. (valuesCount < topPreviousWENM) ifTrue: [ previousVersionsTopHistories addLast: each] ].

last2VersionsTopHistories := OrderedCollection new.

last2Versions := OrderedCollection new. last2Versions addLast: (self allVersionNames at: (i-1)). last2Versions addLast: (self allVersionNames at: i). last2HistoriesSortedByENM := (self classHistories selectFromReferenceVersionCollection: last2Versions) sortBy: [:a :b | a value getWENM >= b value getWENM].

x := last2HistoriesSortedByENM first value getENM. valuesCount := 0. last2HistoriesSortedByENM do: [ :each | (each value getENM ~= x) ifTrue: [ valuesCount := valuesCount + 1. x:= each value getENM]. (valuesCount < topCurrentENM) ifTrue: [ last2VersionsTopHistories addLast: each] ]. previousVersionsTopHistoriesNames := previousVersionsTopHistories collect: [ :each | each value name]. over := false.

last2VersionsTopHistories do: [:each | ((previousVersionsTopHistoriesNames includes: (each value name)) and: [over not]) ifTrue: [ yesterdayWeatherHits := yesterdayWeatherHits + 1. over := true]. ]. ].

^yesterdayWeatherHits/(self size - 1) asFloat.

yesterdayWeatherProbabilityWithTopPreviousWENM: topPreviousWENMandTopCurrentENM: topCurrentENM | currentVersions previousClassHistoriesSortedByWENM yesterdayWeatherHits last2VersionsTopHistories last2Versions last2HistoriesSortedByENM x valuesCount previousVersionsTopHistories previousVersionsTopHistoriesNames over | currentVersions := OrderedCollection new. currentVersions addLast: (self allVersionNames at: 1).

yesterdayWeatherHits := 0.

(2 to: self allVersionNames size) do: [: i | self smelly: 'this algorithm is too big and complex'.

previousClassHistoriesSortedByWENM := (self classHistories selectFromReferenceVersionCollection: currentVersions) sortBy: [:a :b | a value getWENM >= b value getWENM]. currentVersions addLast: (self allVersionNames at: i).

previousVersionsTopHistories := OrderedCollection new.

x := previousClassHistoriesSortedByWENM first value getWENM. valuesCount := 0.

previousClassHistoriesSortedByWENM do: [ :each | (each value getWENM ~= x) ifTrue: [ valuesCount := valuesCount + 1. x:= each value getWENM]. (valuesCount < topPreviousWENM) ifTrue: [ previousVersionsTopHistories addLast: each] ].

last2VersionsTopHistories := OrderedCollection new.

last2Versions := OrderedCollection new. last2Versions addLast: (self allVersionNames at: (i-1)). last2Versions addLast: (self allVersionNames at: i). last2HistoriesSortedByENM := (self classHistories

yesterdayWeatherProbabilityWithTopPreviousWENM: topPreviousWENMandTopCurrentENM: topCurrentENM | currentVersions previousClassHistoriesSortedByWENM yesterdayWeatherHits last2VersionsTopHistories last2Versions last2HistoriesSortedByENM x valuesCount previousVersionsTopHistories previousVersionsTopHistoriesNames over | currentVersions := OrderedCollection new. currentVersions addLast: (self allVersionNames at: 1).

yesterdayWeatherHits := 0.

(2 to: self allVersionNames size) do: [: i | self smelly: 'this algorithm is too big and complex'.

previousClassHistoriesSortedByWENM := (self classHistories selectFromReferenceVersionCollection: currentVersions) sortBy: [:a :b | a value getWENM >= b value getWENM]. currentVersions addLast: (self allVersionNames at: i).

previousVersionsTopHistories := OrderedCollection new.

x := previousClassHistoriesSortedByWENM first value getWENM. valuesCount := 0.

previousClassHistoriesSortedByWENM do: [ :each | (each value getWENM ~= x) ifTrue: [ valuesCount := valuesCount + 1. x:= each value getWENM]. (valuesCount < topPreviousWENM) ifTrue: [ previousVersionsTopHistories addLast: each] ].

last2VersionsTopHistories := OrderedCollection new.

last2Versions := OrderedCollection new. last2Versions addLast: (self allVersionNames at: (i-1)). last2Versions addLast: (self allVersionNames at: i). last2HistoriesSortedByENM := (self classHistories

present

present

past

present

past future

present

past future

present

past future

present

past future

prediction hit

present

past future

YesterdayWeatherHit(present):

past:=all.topChanged(beginning, present) future:=all.topChanged(present, end)

past.intersect(future).notEmpty()

prediction hit

hit hit hit

YW = 3 / 8 = 37%

hit hit hit hit hit hit hit

YW = 7 / 8 = 87%

yWFor: yesterdayCheck for: tomorrowCheck | hits | hits := (self detailedYWFor: yesterdayCheck for: tomorrowCheck) sum: [ :each | each isEmpty ifTrue: [0] ifFalse: [1]]. ^ hits / (self versions size - 2)

yWFor: yesterdayCheck for: tomorrowCheck ^ ( 3 to: self versions size ) collect: [ :i | | yesterday tomorrow | yesterday := self selectByExpression: yesterdayCheck appliedFromVersionIndex: 1 toVersionIndexAndPresentInIt: i - 1. tomorrow := self selectByExpression: tomorrowCheck appliedFromVersionIndexAndPresentInIt: i - 1 toVersionIndex: self versions size. yesterday intersectWith: tomorrow ]

content form

content form

demo-drivenresearch

www.tudorgirba.com

challengedesign

present

demo-drivenresearch

www.tudorgirba.com

challengedesigndemo

demo-drivenresearch

www.tudorgirba.com

challengedesigndemo

demo-drivenresearch

www.tudorgirba.com

challengedesigndemolisten

Reviewers are never stupid

demo-drivenresearch

www.tudorgirba.com

challengedesigndemolisten

demo-drivenresearch

www.tudorgirba.com

challengedesigndemolisten

enable

it’s not Lupus

established

established

disr

uptiv

e

established

WhatWhereWhenWhoHow

WhatWhereWhenWhoHow Why

demo-drivenresearch

www.tudorgirba.com

challengedesigndemolisten

enable

top related