SlideShare a Scribd company logo
Comment soup
with a pinch of types,
served in a leaky bowl
Pooja Rani
Manuel Leuenberger
Software Composition Group
Bern, Switzerland
!2
A Pinch of Types
The Leaky Bowl
How gradual types can
be useful for migration
A startling encounter
in the VM world
The Comment Soup
How do comments evolve?
How do developers
write comments?
How do developers write comments?
How do class comments evolve over time?
What is the impact of template on the comments?
What information is present in class comments?
What is the writing style of developers?
!3
!4
Playground to play with code
Developers express their code
!5
Playground to play with words
Developers express themselves
!6
Note that to encode a String as Base64, you first
have to encode the characters as bytes using a
character encoder.
See also http://en.wikipedia.org/wiki/Base64
Part of Zinc HTTP Components.
Warning
Link
Dependency
!7
Wow! I am the biezer shape 4 4 control points.
Maybe we need roassal3 now with a better system for
bezier lines
Excitement,
Future discussion
!8
/**
* Options for connecting through a proxy
*
* Note that not all types may be supported,
depending on
* the platform and compilation options.
*/
Missing Java
documentation
!9
asdasd For the sake of commenting
Warning
Link
Dependency
Random information
Excitement,
Future
discussionWord of advice
Coding guideline
Warning
Link
Dependency
Random information
Excitement,
Future
discussionWord of advice
Coding guideline
!12
15% comments
85% code
How do developers write comments?
How do class comments evolve over time?
What is the impact of template on the comments?
What information is present in class comments?
What is the writing style of developers?
!13
!14
0
2000
4000
6000
8000
1 2 3 4 5 6 7
Pharo versions


#Classes
Without comments
With comments
Evolution of Class Comments
Evolution of Class Comments
!15
Pharo versions


#Classes
1 2 3 4 5 6 7
Without comments
With comments
How do developers write comments?
How do class comments evolve over time?
What is the impact of template on the comments?
What information is present in class comments?
What is the writing style of developers?
!16
Developers are guided by a default template
!17
!18
Please comment me using the following template inspired by Class Responsibility
Collaborator (CRC) design:
For the Class part: State a one line summary. For example, "I represent a
paragraph of text".
For the Responsibility part: Three sentences about my main responsibilities -
what I do, what I know.
For the Collaborators Part: State my main collaborators and one line about how
I interact with them.
Public API and Key Messages
- message one
- message two
- (for bonus points) how to create instances.
One simple example is simply gorgeous.
Internal Representation and Key Implementation Points.
Implementation Points
Comment markup?
!19
I am an abstract class to define an Item use by a tree data source of Fast
table.
Description
-------------------------------------------------
I define the basics methods needed by a FTTreeDataSource.
I use FTTreeItem to manage my elements and I am use by a FTFastTable.
Public API and Key Messages
-------------------------------------------------
- #data. anObject from: aFTTreeDataSource
This is my constructor that is use by FTTreeDataSource and myself
Example
------------------------------------------------
Should not be instanciate.
Internal Representation and Key Implementation Points.
-------------------------------------------------
Instance Variables
dataSource: I am the dataSource that holds this Item.
children: I am a collection of Items calculate by the item. I contains
the chldren of the Item.
Comment markup!
Key Messages
Intent
!20
Numberofclasses
0
750
1'500
2'250
3'000 Intent
Responsibility
Collaborators
PublicA
PI
Exam
ple
InternalD
etails
InstanceVariable
Template sections found in classes
Template sections
6000 classes
Pharo 7
!21
Numberofclasses
0
35
69
104
138
Intent
Responsibility
Collaborators
PublicA
PI
Exam
ple
InternalD
etails
InstanceVariable
Template sections found- Manual analysis
Template sections
138 random classes
Pharo 7
!22
Class References
Warnings
Links
Steps
Precondition
Observations
License
Suggestions
Dependency
Reference to external docs
Clarification
Extension
Discourse
Coding guideline
Number of classes
0 10 20 30 40
Extra Information - Manual analysis
Extra categories
100 random classes
Pharo 7
How do developers write comments?
How do class comments evolve over time?
What is the impact of template on the comments?
What information is present in class comments?
What is the writing style of developers?
!23
What information is present in class comments?
!24
Intent
Responsibility Collaborators Public API
Example Internal Details Instance Variable
Dependency Reference to external docs
ClarificationExtension Discourse
Coding guideline
Class References
Warnings
LinksSteps
Precondition
License
Suggestions
Observations
Comment Soup
What information is present in class comments?
!25
Intent
Responsibility Collaborators Public API
Example Internal Details Instance Variable
Dependency Reference to external docs
ClarificationExtension Discourse
Coding guideline
Class References
Warnings
LinksSteps
Precondition
License
Suggestions
Observations
Template
Inspired
Extra but
frequent
Extra but
rare
How do developers write comments?
How do class comments evolve over time?
What is the impact of template on the comments?
What information is present in class comments?
What is the writing style of developers?
!26
!27
Comments of length 2-5 lines, have lengthy sentences
Use first person pronouns
Writing style
Different warning words
No formatting standards followed
Inconsistent parentheses
– Penelope J. Corfield
“All people are living histories – which is why
History matters”
!1
And now for something
completely different
Gardening the Ecosystem
!2
The EMF is dead,
long live the EMF!
!3
!4
Andnowforsomething
completelydifferent
I am lazy
!5
I am lazy
very, very lazy
!6
Swapping dependencies
!7
A Pinch of Types
How gradual types can be useful for migration
!8
!9
Andnowforsomething
completelydifferent
The Leaky Bowl
A startling encounter in the VM world
!10
How to write two lines of
code in two months
!11
How to write two lines of
code in two months
- (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {
@autoreleasepool {
...
}
}
!12
The Bern Experience
• People put effort in commenting classes, not only for new,
but also old classes

• Comment template impacts developers, structure helps

• The ecosystem needs love

• Dynamically typed does not mean no types

• Deeper integration of code transformation tools
!13

More Related Content

Similar to Comment soup with a pinch of types, served in a leaky bowl

Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Søren Lund
 
API Workshop: Deep dive into code samples
API Workshop: Deep dive into code samplesAPI Workshop: Deep dive into code samples
API Workshop: Deep dive into code samples
Tom Johnson
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentation
Tom Johnson
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
Søren Lund
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automation
kieranjacobsen
 
CommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - IntroductionCommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - Introduction
cadorn
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
STC-Philadelphia Metro Chapter
 
Design Patterns- Course for students .pptx
Design Patterns- Course for students  .pptxDesign Patterns- Course for students  .pptx
Design Patterns- Course for students .pptx
khaledmohamedadelkam
 
Weekly Session with the local .NET Developer Community
Weekly Session with the local .NET  Developer CommunityWeekly Session with the local .NET  Developer Community
Weekly Session with the local .NET Developer Community
kazimanzurrashid
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
Blue Elephant Consulting
 
C# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy todayC# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy today
Afonso Macedo
 
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
APIs And SDKs  Breaking Into And Succeeding In A Specialty MarketAPIs And SDKs  Breaking Into And Succeeding In A Specialty Market
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
Bill Dubie
 
Learn java theory presentation
Learn java theory presentationLearn java theory presentation
Learn java theory presentation
Mark John Lado, MIT
 
Web2Expo NY 2009 Presentation
Web2Expo NY 2009 PresentationWeb2Expo NY 2009 Presentation
Web2Expo NY 2009 Presentation
Lauren Cooney
 
WordCamp Pune 2017- WordPress Coding standards
WordCamp Pune 2017- WordPress Coding standardsWordCamp Pune 2017- WordPress Coding standards
WordCamp Pune 2017- WordPress Coding standards
Swapnil Patil
 
Writing code for people
Writing code for peopleWriting code for people
Writing code for people
Alexey Ivanov
 
Good code, Bad Code
Good code, Bad CodeGood code, Bad Code
Good code, Bad Codejosedasilva
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
Nordic APIs
 
Web Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website PlanningWeb Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website Planning
clement swarnappa
 

Similar to Comment soup with a pinch of types, served in a leaky bowl (20)

Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016
 
API Workshop: Deep dive into code samples
API Workshop: Deep dive into code samplesAPI Workshop: Deep dive into code samples
API Workshop: Deep dive into code samples
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentation
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automation
 
CommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - IntroductionCommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - Introduction
 
Code Review
Code ReviewCode Review
Code Review
 
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
 
Design Patterns- Course for students .pptx
Design Patterns- Course for students  .pptxDesign Patterns- Course for students  .pptx
Design Patterns- Course for students .pptx
 
Weekly Session with the local .NET Developer Community
Weekly Session with the local .NET  Developer CommunityWeekly Session with the local .NET  Developer Community
Weekly Session with the local .NET Developer Community
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
C# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy todayC# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy today
 
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
APIs And SDKs  Breaking Into And Succeeding In A Specialty MarketAPIs And SDKs  Breaking Into And Succeeding In A Specialty Market
APIs And SDKs Breaking Into And Succeeding In A Specialty Market
 
Learn java theory presentation
Learn java theory presentationLearn java theory presentation
Learn java theory presentation
 
Web2Expo NY 2009 Presentation
Web2Expo NY 2009 PresentationWeb2Expo NY 2009 Presentation
Web2Expo NY 2009 Presentation
 
WordCamp Pune 2017- WordPress Coding standards
WordCamp Pune 2017- WordPress Coding standardsWordCamp Pune 2017- WordPress Coding standards
WordCamp Pune 2017- WordPress Coding standards
 
Writing code for people
Writing code for peopleWriting code for people
Writing code for people
 
Good code, Bad Code
Good code, Bad CodeGood code, Bad Code
Good code, Bad Code
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
 
Web Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website PlanningWeb Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website Planning
 

More from Pharo

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
Pharo
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a preview
Pharo
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in Pharo
Pharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI
Pharo
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
Pharo
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alpha
Pharo
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
Pharo
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
Pharo
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
Pharo
 
XmppTalk
XmppTalkXmppTalk
XmppTalk
Pharo
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchain
Pharo
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
Pharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017
Pharo
 
Pharo 6
Pharo 6Pharo 6
Pharo 6
Pharo
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with Pharo
Pharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bits
Pharo
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the Refactorings
Pharo
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM Performance
Pharo
 
Git with Style
Git with StyleGit with Style
Git with Style
Pharo
 
Pharo JS
Pharo JSPharo JS
Pharo JS
Pharo
 

More from Pharo (20)

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a preview
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in Pharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alpha
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
 
XmppTalk
XmppTalkXmppTalk
XmppTalk
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchain
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017
 
Pharo 6
Pharo 6Pharo 6
Pharo 6
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with Pharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bits
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the Refactorings
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM Performance
 
Git with Style
Git with StyleGit with Style
Git with Style
 
Pharo JS
Pharo JSPharo JS
Pharo JS
 

Recently uploaded

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 

Recently uploaded (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 

Comment soup with a pinch of types, served in a leaky bowl

  • 1. Comment soup with a pinch of types, served in a leaky bowl Pooja Rani Manuel Leuenberger Software Composition Group Bern, Switzerland
  • 2. !2 A Pinch of Types The Leaky Bowl How gradual types can be useful for migration A startling encounter in the VM world The Comment Soup How do comments evolve? How do developers write comments?
  • 3. How do developers write comments? How do class comments evolve over time? What is the impact of template on the comments? What information is present in class comments? What is the writing style of developers? !3
  • 4. !4 Playground to play with code Developers express their code
  • 5. !5 Playground to play with words Developers express themselves
  • 6. !6 Note that to encode a String as Base64, you first have to encode the characters as bytes using a character encoder. See also http://en.wikipedia.org/wiki/Base64 Part of Zinc HTTP Components. Warning Link Dependency
  • 7. !7 Wow! I am the biezer shape 4 4 control points. Maybe we need roassal3 now with a better system for bezier lines Excitement, Future discussion
  • 8. !8 /** * Options for connecting through a proxy * * Note that not all types may be supported, depending on * the platform and compilation options. */ Missing Java documentation
  • 9. !9 asdasd For the sake of commenting
  • 13. How do developers write comments? How do class comments evolve over time? What is the impact of template on the comments? What information is present in class comments? What is the writing style of developers? !13
  • 14. !14 0 2000 4000 6000 8000 1 2 3 4 5 6 7 Pharo versions 
 #Classes Without comments With comments Evolution of Class Comments
  • 15. Evolution of Class Comments !15 Pharo versions 
 #Classes 1 2 3 4 5 6 7 Without comments With comments
  • 16. How do developers write comments? How do class comments evolve over time? What is the impact of template on the comments? What information is present in class comments? What is the writing style of developers? !16
  • 17. Developers are guided by a default template !17
  • 18. !18 Please comment me using the following template inspired by Class Responsibility Collaborator (CRC) design: For the Class part: State a one line summary. For example, "I represent a paragraph of text". For the Responsibility part: Three sentences about my main responsibilities - what I do, what I know. For the Collaborators Part: State my main collaborators and one line about how I interact with them. Public API and Key Messages - message one - message two - (for bonus points) how to create instances. One simple example is simply gorgeous. Internal Representation and Key Implementation Points. Implementation Points Comment markup?
  • 19. !19 I am an abstract class to define an Item use by a tree data source of Fast table. Description ------------------------------------------------- I define the basics methods needed by a FTTreeDataSource. I use FTTreeItem to manage my elements and I am use by a FTFastTable. Public API and Key Messages ------------------------------------------------- - #data. anObject from: aFTTreeDataSource This is my constructor that is use by FTTreeDataSource and myself Example ------------------------------------------------ Should not be instanciate. Internal Representation and Key Implementation Points. ------------------------------------------------- Instance Variables dataSource: I am the dataSource that holds this Item. children: I am a collection of Items calculate by the item. I contains the chldren of the Item. Comment markup! Key Messages Intent
  • 22. !22 Class References Warnings Links Steps Precondition Observations License Suggestions Dependency Reference to external docs Clarification Extension Discourse Coding guideline Number of classes 0 10 20 30 40 Extra Information - Manual analysis Extra categories 100 random classes Pharo 7
  • 23. How do developers write comments? How do class comments evolve over time? What is the impact of template on the comments? What information is present in class comments? What is the writing style of developers? !23
  • 24. What information is present in class comments? !24 Intent Responsibility Collaborators Public API Example Internal Details Instance Variable Dependency Reference to external docs ClarificationExtension Discourse Coding guideline Class References Warnings LinksSteps Precondition License Suggestions Observations Comment Soup
  • 25. What information is present in class comments? !25 Intent Responsibility Collaborators Public API Example Internal Details Instance Variable Dependency Reference to external docs ClarificationExtension Discourse Coding guideline Class References Warnings LinksSteps Precondition License Suggestions Observations Template Inspired Extra but frequent Extra but rare
  • 26. How do developers write comments? How do class comments evolve over time? What is the impact of template on the comments? What information is present in class comments? What is the writing style of developers? !26
  • 27. !27 Comments of length 2-5 lines, have lengthy sentences Use first person pronouns Writing style Different warning words No formatting standards followed Inconsistent parentheses
  • 28. – Penelope J. Corfield “All people are living histories – which is why History matters”
  • 29. !1 And now for something completely different
  • 31. The EMF is dead, long live the EMF! !3
  • 34. I am lazy very, very lazy !6
  • 36. A Pinch of Types How gradual types can be useful for migration !8
  • 38. The Leaky Bowl A startling encounter in the VM world !10
  • 39. How to write two lines of code in two months !11
  • 40. How to write two lines of code in two months - (void) pumpRunLoopEventSendAndSignal:(BOOL)signal { @autoreleasepool { ... } } !12
  • 41. The Bern Experience • People put effort in commenting classes, not only for new, but also old classes • Comment template impacts developers, structure helps • The ecosystem needs love • Dynamically typed does not mean no types • Deeper integration of code transformation tools !13