with code recommenders 2.0 into the text future of ...€¦ · text eclipse goes crowd! with code...

Post on 26-Jul-2020

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Text

Eclipse goes crowd! With Code Recommenders 2.0 into the future of collaborating teamsmarcel.bruch@codetrails.com

Recommenders  1.0

Call  Comple5on

3

Snippet  Comple5on

4

Overrides  Comple5on

5

Chain  Comple5on

6

Subwords  Comple5on

7

Are  we  already  where  we  want  to  be?

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

Time  for  seeding  new  ideas...

11

How  we  (want  to)  work  in  2.0

❹  developers  share  

(clicks,  comple5ons,  snippets)

Code  Recommenders  Knowledge  Base

12

Recommenders  1.0

13

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

14

Crowdsourcing  constructor  comple5ons...?

15

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

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:

What  is  shared?

19

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

}

More  than  15.000  Comple5on  Events!

20

13%

20%

4%4%

48%

9%2%

org.eclipse.*

java.*

org.apache.*

com.google.*other

javax.*

android.*

No  context-­‐awareness...

21

22

How  to  fix  this?

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

24

A  simple  observa5on

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

25

What  you  expect  is...

How  many  words  do  you  have  for  ‟create”  ?

26

27

So,  it  works  for  #createSomething  too!

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

What  get‘s  shared?

29

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

}

LET‘S  BACK  UP  HERE  FOR  A  SECOND!

30

31

We  get  (almost)  language  agnos5c!

Start  sharing!

32

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

33

Your  Choice,  Neo.

34

Get  the  plugin...

35

SNIPMATCH

36

„Snippets  for  the  World“

Why  do  you  use  code  templates?

37

38

Safe  5me  typing

<ctrl+space>

<ctrl+space>

{<ctrl+space>

<ctrl+space>

}

39

Learning  from  Snippets

Snippetsarrayaddarraymerg

Awesome  New  

Snippet

Snippetsarrayaddarraymerg Snippets

arrayaddarraymerg

Snippetsarrayaddarraymerg

40

Sharing  Code  Snippets?

Snippet  Repository

Snippetsarrayaddarraymerg

Awesome  new  

Snippet

Snippetsarrayaddarraymerg

Snippetsarrayaddarraymerg

Snippetsarrayaddarraymerg

41

Sharing  Code  Snippets

Snipmatch  Demo

42

WHAT  ABOUT  CROWD-­‐SOURCING?

43

Sharing  Snippets

44

Sharing  Snippets

45

WHAT  ABOUT  GOOD  AND  BAD  SNIPPETS?

46

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

48

Collec5ng  implicit  &  explicit  feedback

5 0

Recommenders  2.0  goes  headless

49

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@  

Keep  up  sharing!

51

52

@MarcelBruch+MarcelBruch

@Recommenders+Code  Recommenders

Thanks.

top related