Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Need 4 Speed FI
1. NEXT GENERATION IDE
HOW CROWDSOURCING (IN) YOUR IDE SPEEDS UP
YOUR SOFTWARE DEVELOPMENT PROCESSES
2. 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
Marcel Bruch
@marcelbruch
3. 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
4. NEXT GENERATION IDE
HOW CROWDSOURCING (IN) YOUR IDE SPEEDS UP
YOUR SOFTWARE DEVELOPMENT PROCESSES
8. { ——– }
8
Your Software
{ — —– }
Developer
Your Software
9. Your Software
Your Software
9
Framework
Developer
?
{ ——– }
{ — —– }
ADpepvleicloaptioenr
Developer
!
10. Here the problems begin…
Documentation
10
{ ——– }
docs are
missing!
there are
no code
examples!
docs are
outdated!
api is
bloated!
code has
many bugs!
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?
11. How to leverage the crowd?
11
Documentation
Framework
Developer
{ ——— }
{ — —— { } ——— }
Application
Developers
{ — —— }
13. By integrating with your IDE…
13
Debugging
instructions
Source code
Used
frameworks
Selected
proposals
Viewed
documentation
Runtime errors
and stacktraces
15. 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.
*/
@Override
protected void doUnload() {
super.doUnload();
}
No? Are you sure?
16. 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.
*/
@Override
protected void doUnload() {
super.doUnload();
}
17. …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.
19. These I’ve a great idea moments…
19
{ ——– }
Application
Developer
Product
Manager
20. How we learn about it…
20
{ ——– }
Application
Developer
21. But if we just could have asked Eclipse…
public class HelpExample extends WizardPage
{
|
21
Eclipse Code Recommenders Snipmatch
See http://eclipse.org/recommenders/manual/#snipmatch
24. Integrating Snippets into API docs
24
public class MyDialog extends Dialog {
(automatically, of course)
@Override
protected Control createDialogArea(Composite parent) {
33. One example…
33
@Override
public void create(JPanel parent) {
JButton button = new JButton();
button.|
Which method will you
call next in this situation?
35. A fairly trivial example…
StringBuilder sb = new StringBuilder();
sb.|
35
36. What if we’d just count clicks…?
StringBuilder sb = new StringBuilder();
sb.|
36
{ ——– }
Application
Developer
{
„type“: „StringBuilder“,
„completion“: „append(String)“
}
37. We could crowdsource code completion!
37
StringBuilder sb = new StringBuilder();
sb.|
Codetrails Connect Community Edition,
Install from http://www.codetrails.com/connect
38. How about argument completions?
38
@Override
protected 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
39. And when extending a framework base class?
39
public class MyDialog extends Dialog {
|
Codetrails Connect Community Edition,
Install from http://www.codetrails.com/connect
40. Successfully concluded sessions
40
crowdsourced
79,5
JDT
66,5
JDT as-is vs. crowdsourced
13% less terminated sessions,
measured in over 400.000
sessions
42. Costs fixing a bug between code and production
42
Relative cost of a bugfix
25x
10x
0x 0x 1x
Req Design Code Acceptance Production
http://www.abeacha.com/NIST_press_release_bugs_cost.htm
43. What’s wrong with this code?
43
@Override
public 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);
}
44. Findbugs’ crowd ed. would find it…
Codetrails Findbugs, currently closed alpha 44
50. 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.
52. Finding similar errors (aka duplicates)
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)
52
+ java version
+ bundle/jar versions
+ installed extensions
+ thread dumps
+ …
54. 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)
57. How about sharing exceptions that
occurred 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)
58. Telling your users what went wrong
Found a match!
We found a knowledge base entry that matches your stacktrace.
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.
A concept yet, no prototype. 58
62. The IDE is your browser - let’s learn to use it as such
62
Debugging
instructions
Source code
Used
frameworks
Selected
proposals
Viewed
documentation
Runtime errors
and stacktraces