With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code...

52
Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams [email protected]

Transcript of With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code...

Page 1: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Text

Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating [email protected]

Page 2: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Recommenders  1.0

Page 3: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Call  Comple5on

3

Page 4: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Snippet  Comple5on

4

Page 5: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Overrides  Comple5on

5

Page 6: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Chain  Comple5on

6

Page 7: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Subwords  Comple5on

7

Page 8: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Are  we  already  where  we  want  to  be?

Page 9: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

How  Recommenders  1.0  works

9

Code  Recommenders  Knowledge  Base

❷Mine  data,extract  paFerns,create  recommenda5on  models

❸deliver  minedknowledge  to  Eclipse  users

❶  Analyze  source  code

Page 10: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com
Page 11: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Time  for  seeding  new  ideas...

11

Page 12: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

How  we  (want  to)  work  in  2.0

❹  developers  share  

(clicks,  comple5ons,  snippets)

Code  Recommenders  Knowledge  Base

12

Page 13: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Recommenders  1.0

13

Page 14: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

What  if  we‘d  just  count  calls...?

14

Page 15: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Crowdsourcing  constructor  comple5ons...?

15

It  learns  from  you.  From  the  very  1st  moment.

Page 16: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com
Page 17: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com
Page 18: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

18

Problems:• EF  sees  privacy  issues• EF  has  limited  resources• EF  mills  grind  slowly

• Can‘t  wait  6  months  before  we  can  evaluate  a  new  idea!

SoluAon:• Do  it  outside  Eclipse:

Page 19: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

What  is  shared?

19

{„type“: „StringBuilder“,„completion“: „append(String)“

}

Page 20: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

More  than  15.000  Comple5on  Events!

20

13%

20%

4%4%

48%

9%2%

org.eclipse.*

java.*

org.apache.*

com.google.*other

javax.*

android.*

Page 21: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

No  context-­‐awareness...

21

Page 22: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

22

How  to  fix  this?

Page 23: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

23

Breaking News:Words carry meaning!As leading scientists found out, words....

Rethin

king  Re

comme

nda/on

s

 for  Co

de  Com

ple/on

Page 24: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

24

A  simple  observa5on

You  wouldn‘t  expect  a  call  to  #dispose()  in  #createSomething(),  right?

Page 25: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

25

What  you  expect  is...

Page 26: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

How  many  words  do  you  have  for  ‟create”  ?

26

Page 27: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

27

So,  it  works  for  #createSomething  too!

Page 28: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Almost  no  difference!

28

0

25

50

75

100

0 10 20 30 40 50 60 70 80 90 100

Precision

Recall

ClassicVerbs

Interpolated  Precision  Recall  Curves  over  136.761  samples  on  JRE

Page 29: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

What  get‘s  shared?

29

{„method“: „create“„type“: „Composite“,„completion“: „setLayout(...)“

}

Page 30: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

LET‘S  BACK  UP  HERE  FOR  A  SECOND!

30

Page 31: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

31

We  get  (almost)  language  agnos5c!

Page 32: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Start  sharing!

32

Page 33: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

IF  YOU  CAN‘T  SHARE  (BUT  WANNA  USE)  ...

33

Page 34: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Your  Choice,  Neo.

34

Page 35: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Get  the  plugin...

35

Page 36: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

SNIPMATCH

36

„Snippets  for  the  World“

Page 37: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Why  do  you  use  code  templates?

37

Page 38: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

38

Safe  5me  typing

<ctrl+space>

<ctrl+space>

{<ctrl+space>

<ctrl+space>

}

Page 39: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

39

Learning  from  Snippets

Page 40: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Snippetsarrayaddarraymerg

Awesome  New  

Snippet

Snippetsarrayaddarraymerg Snippets

arrayaddarraymerg

Snippetsarrayaddarraymerg

40

Sharing  Code  Snippets?

Page 41: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Snippet  Repository

Snippetsarrayaddarraymerg

Awesome  new  

Snippet

Snippetsarrayaddarraymerg

Snippetsarrayaddarraymerg

Snippetsarrayaddarraymerg

41

Sharing  Code  Snippets

Page 42: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Snipmatch  Demo

42

Page 43: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

WHAT  ABOUT  CROWD-­‐SOURCING?

43

Page 44: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Sharing  Snippets

44

Page 45: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Sharing  Snippets

45

Page 46: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

WHAT  ABOUT  GOOD  AND  BAD  SNIPPETS?

46

Page 47: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Snippetsarrayaddarraymer

Snippetsarrayaddarraymer

Snippetsarrayaddarraymer

Snippetsarrayaddarraymer

Snippetsarrayaddarraymer

Vaadin  Youtube  +1 Vaadin  Youtube  +1Vaadin  Youtube  +1 Vaadin  Youtube  +1

47

Community  Votes

Vaadin  Youtube  +1

Snippet  Repository

Vaadin  Youtube    +5Vaadin  BuFon          +2Vaadin  Textarea    +1

Page 48: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

48

Collec5ng  implicit  &  explicit  feedback

5 0

Page 49: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Recommenders  2.0  goes  headless

49

Page 50: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Enriching  Javadoc  with  Recommenders

X

createDialogArea

protected Control createDialogArea(Composite parent)

Creates and returns the contents of the upper part of this dialog (above the button bar).

See:Subclasses that override createDialogArea also frequently override:• configureShell(Shell): 63 %• okPressed(): 51 %

Parameters:parent - the parent composite to contain the dialog area. This argument is never null.

Returns:the dialog area control. Reimplementations must not return null.

50

Drop  by  at  17:30,Silchersaal,  1st  floor,  le@  

Page 51: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

Keep  up  sharing!

51

Page 52: With Code Recommenders 2.0 into the Text future of ...€¦ · Text Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teams marcel.bruch@codetrails.com

52

@MarcelBruch+MarcelBruch

@Recommenders+Code  Recommenders

Thanks.