need 4 speed fi
TRANSCRIPT
![Page 1: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/1.jpg)
NEXT GENERATION IDEHOW CROWDSOURCING (IN) YOUR IDE SPEEDS UP
YOUR SOFTWARE DEVELOPMENT PROCESSES
![Page 2: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/2.jpg)
About me• Project Lead of Eclipse Code Recommenders • Eclipse Committer since 2010 • Plug-in Developer for 10 years (Eclipse 2.1) • Member of the Eclipse Architecture Council • Co-Lead of Java User Group Darmstadt • Speaker at JUGs, EclipseCon, JAX, JavaOne… • PhD in Computer Science • CEO of Codetrails
• Passion to improve developers day-to-day work with intelligent and practical tools - mostly using Data Mining on Big (Software Engineering) Data.
2
@marcelbruchMarcel Bruch
![Page 3: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/3.jpg)
About Codetrails• The company behind Eclipse Code Recommenders • Software Tool Developers • Data Mining Specialists • Eclipse RCP Experts & Consultants • Research Spin-off Darmstadt University of Technology
3
![Page 4: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/4.jpg)
NEXT GENERATION IDEHOW CROWDSOURCING (IN) YOUR IDE SPEEDS UP
YOUR SOFTWARE DEVELOPMENT PROCESSES
![Page 5: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/5.jpg)
Back in 1995…
5
![Page 6: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/6.jpg)
6
Your Software{ — — –}
Developer
![Page 7: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/7.jpg)
{ — — —}
7
Your Software{ — — –}
Developer
Your Software
![Page 8: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/8.jpg)
{ — — –}
8
Your Software
{ — — –}
Developer
Your Software
![Page 9: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/9.jpg)
Your Software
Your Software
9
Framework Developer
{ — — –}
{ — — –}
DeveloperApplicationDeveloper
?
!
![Page 10: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/10.jpg)
Here the problems begin…
10Documentation
{ — — –}
docs are missing!
there are no code
examples!
api is bloated!
code has many bugs!
docs are outdated!
is the api easy?
is documentation
good?does it work?
are there bugs?
where to improve?
where do you struggle?
what do you use?
what can I remove?
![Page 11: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/11.jpg)
How to leverage the crowd?
11
Documentation
Framework Developer
{ — — —} { — — —}{ — — —}{ — — —}
Application Developers
![Page 12: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/12.jpg)
How to leverage the crowd?
12
Framework Developer
{ — — —} { — — —}{ — — —}{ — — —}
{ — — —}
{ — — —}
{ — — —} { — — —}
Application Developers
{ — — —}{ — — —}
{ — — —}
{ — — —}
![Page 13: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/13.jpg)
By integrating with your IDE…
13
Usedframeworks
Source code
Debugging instructions
Viewed documentation
Runtime errors and stacktraces
Selected proposals
![Page 14: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/14.jpg)
Bad JavadocIn good documentation we trust…
![Page 15: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/15.jpg)
In API documentation we trust
15
/** * Rollsback the transaction if any and clears different lists to * start with an empty resource again. * Note that the super.doUnload is not called because that clears * the list resulting in all kinds of undesirable inverseremoves. */@Overrideprotected void doUnload() { super.doUnload();}
No? Are you sure?
![Page 16: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/16.jpg)
In those situations you wish you could…
16
/** * Rollsback the transaction if any and clears different lists to * start with an empty resource again. * Note that the super.doUnload is not called because that clears * the list resulting in all kinds of undesirable inverseremoves. */@Overrideprotected void doUnload() { super.doUnload();}
![Page 17: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/17.jpg)
…and let the committers know…
17
Hello committers, we received a user feedback for TYPE «com.your.class». The user rated the overall documentation quality as «NOT_AT_ALL_HELPFUL». In particular he/she said:
1. UNCLEAR_INFORMATION
The user provided the following comment:
«The class is deprecated but no pointers are given which other class to use instead. Please provide a hint in the class javadoc. Thanks, Frederik»
Thank you for caring.
Your friendly Javadoc Feedback Inbox
The class is deprecated but no pointers are given which other class to use instead. Please provide a hint in the class javadoc. Thanks, Frederik
Customer case study & prototype at Codetrails.
![Page 18: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/18.jpg)
No examplesA snippet says more than thousand words
![Page 19: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/19.jpg)
These I’ve a great idea moments…
19
{ — — –}
Application Developer
Product Manager
![Page 20: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/20.jpg)
How we learn about it…
20
{ — — –}
Application Developer
![Page 21: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/21.jpg)
public class HelpExample extends WizardPage {
|
But if we just could have asked Eclipse…
21Eclipse Code Recommenders Snipmatch See http://eclipse.org/recommenders/manual/#snipmatch
![Page 22: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/22.jpg)
Creating snippets for the community…
22
![Page 23: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/23.jpg)
Sharing with the community…
23
![Page 24: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/24.jpg)
Integrating Snippets into API docs
24
public class MyDialog extends Dialog { @Override protected Control createDialogArea(Composite parent) {
(automatically, of course)
![Page 25: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/25.jpg)
Codesearch reloadedMore than just ”Find References in your Workspace”…
![Page 26: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/26.jpg)
How do I…
26
void showHelp() {
// How do I get the help system? IWorkbenchHelpSystem help = |}
![Page 27: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/27.jpg)
You should ask your IDE…
![Page 28: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/28.jpg)
… obtain an instance of X?
28
void showHelp() {
// How do I get the help system? IWorkbenchHelpSystem help = |
![Page 29: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/29.jpg)
…which arguments to fill in?
29
![Page 30: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/30.jpg)
…about frequent usage patterns?
30
![Page 31: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/31.jpg)
Where does that data come from?
31Codetrails Connect Codesearch, currently closed beta
(i) eclipse workspace (ii) maven repository
![Page 32: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/32.jpg)
Overwhelming APIsWhat do you think of when you hear “bloated API”?
![Page 33: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/33.jpg)
One example…
33
@Overridepublic void create(JPanel parent) {
JButton button = new JButton(); button.|
Which method will you call next in this situation?
![Page 34: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/34.jpg)
1 of 389?
![Page 35: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/35.jpg)
A fairly trivial example…StringBuilder sb = new StringBuilder();sb.|
35
![Page 36: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/36.jpg)
StringBuilder sb = new StringBuilder();sb.|
36
{ — — –}
Application Developer
{„type“: „StringBuilder“,„completion“: „append(String)“}
What if we’d just count clicks…?
![Page 37: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/37.jpg)
We could crowdsource code completion!
37
StringBuilder sb = new StringBuilder();sb.|
Codetrails Connect Community Edition, Install from http://www.codetrails.com/connect
![Page 38: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/38.jpg)
How about argument completions?
38
@Overrideprotected Control createControl(final Composite parent) {
textWidget = new Text(parent, SWT.BORDER);textWidget.addListener(eventType, listener)
Codetrails Connect Community Edition, Install from http://www.codetrails.com/connect
![Page 39: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/39.jpg)
And when extending a framework base class?
39
public class MyDialog extends Dialog {
|
Codetrails Connect Community Edition, Install from http://www.codetrails.com/connect
![Page 40: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/40.jpg)
Successfully concluded sessions
40
crowdsourced79,5
JDT66,5
JDT as-is vs. crowdsourced
13% less terminated sessions, measured in over 400.000
sessions
![Page 41: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/41.jpg)
Bug detection, crowd-style99.5% of all developers didn’t do it like you. So…
![Page 42: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/42.jpg)
Costs fixing a bug between code and production
42
Rela
tive
cost
of a
bug
fix
Req Design Code Acceptance Production
25x
10x
1x0x0x
http://www.abeacha.com/NIST_press_release_bugs_cost.htm
![Page 43: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/43.jpg)
What’s wrong with this code?
43
@Overridepublic void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);container.setLayout(new GridLayout());
TableViewer tableViewer = new TableViewer(container);tableViewer.setUseHashlookup(false);tableViewer.addSelectionChangedListener(listener);Table table = tableViewer.getTable();tableViewer.setCellEditors(editors);tableViewer.setColumnProperties(columnProperties);tableViewer.setLabelProvider(labelProvider);tableViewer.setInput(input);
tableViewer.setContentProvider(provider);}
![Page 44: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/44.jpg)
Findbugs’ crowd ed. would find it…
44Codetrails Findbugs, currently closed alpha
![Page 45: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/45.jpg)
If no one dared to do it like this…
45
![Page 46: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/46.jpg)
Rethinking Stacktraces“People who ‘bought’ this NullPointerException typically fixed this by...”
![Page 47: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/47.jpg)
Automated Error Reporting in Eclipse Mars
47https://www.eclipse.org/community/eclipse_newsletter/2014/november/article1.php
![Page 48: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/48.jpg)
48
![Page 49: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/49.jpg)
Committers get notified about new bugs…
49
![Page 50: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/50.jpg)
Reporters get immediate feedback
50
Your report has been matched against an existing bug which was closed as FIXED with comment: Please update to the latest version. See Bug 446841 for details.
![Page 51: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/51.jpg)
51Eclipse Committer Dashboard of the Automated Error Reports plugin
![Page 52: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/52.jpg)
org.eclipse.swt.SWTException: Invalid Thread access at org.eclipse.swt.SWT.error(SWT.java:3884) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.SWT.error(SWT.java:3770) at org.eclipse.swt.widgets.Widget.error(Widget.java:463) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355) at org.eclipse.swt.widgets.ProgressBar.setSelection(ProgressBar.java:317) at org.eclipse.recommenders.stacktraces.Demo.run(Demo.java:23) at java.lang.Thread.run(Thread.java:619)
Finding similar errors (aka duplicates)
52
+ java version + bundle/jar versions + installed extensions + thread dumps + …
![Page 53: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/53.jpg)
How can we support you in writing software?Automated error reporting is nice, but…
53
![Page 54: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/54.jpg)
Debugging – the old way
54
Exception in thread “Thread-0” org.eclipse.swt.SWTException: Invalid Thread access at org.eclipse.swt.SWT.error(SWT.java:3884) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.SWT.error(SWT.java:3770) at org.eclipse.swt.widgets.Widget.error(Widget.java:463) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355) at org.eclipse.swt.widgets.ProgressBar.setSelection(ProgressBar.java:317) at org.eclipse.recommenders.stacktraces.Demo.run(Demo.java:23) at java.lang.Thread.run(Thread.java:619)
![Page 55: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/55.jpg)
Getting help – the old way
55
![Page 56: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/56.jpg)
But usually you get…
56
![Page 57: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/57.jpg)
How about sharing exceptions thatoccurred at development time?
57
Exception in thread “Thread-0” org.eclipse.swt.SWTException: Invalid Thread access at org.eclipse.swt.SWT.error(SWT.java:3884) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.SWT.error(SWT.java:3770) at org.eclipse.swt.widgets.Widget.error(Widget.java:463) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355) at org.eclipse.swt.widgets.ProgressBar.setSelection(ProgressBar.java:317) at org.eclipse.recommenders.stacktraces.Demo.run(Demo.java:23) at java.lang.Thread.run(Thread.java:619)
![Page 58: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/58.jpg)
The SWTException “Invalid thread access” you experienced is caused by calling an UI widget’s methods from a non-ui thread. See knowledge base entry #341 for further details.
Found a match!
We found a knowledge base entry that matches your stacktrace.
Telling your users what went wrong
58A concept yet, no prototype.
![Page 59: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/59.jpg)
How about stacktraces.org?
59
![Page 60: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/60.jpg)
Take aways?
60
![Page 61: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/61.jpg)
The crowd is here to stay!
61
![Page 62: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/62.jpg)
The IDE is your browser - let’s learn to use it as such
62
Usedframeworks
Source code
Debugging instructions
Viewed documentation
Runtime errors and stacktraces
Selected proposals
![Page 64: Need 4 Speed FI](https://reader030.vdocuments.site/reader030/viewer/2022020110/559e201b1a28ab1e3c8b4640/html5/thumbnails/64.jpg)
Contact Us
64
Codetrails GmbH Robert-Bosch-Str. 7 64293 Darmstadt, Germany
www: codetrails.com phone: 06151 / 2767 092 email: [email protected]
Dr. Marcel Bruch CEO
mobile: 0179 / 1317 721 email: [email protected]