SlideShare a Scribd company logo
1 of 20
Download to read offline
“To #comment or not?”
A data-driven look at conflicting attitudes towards
commenting and documentation.
@veronica_hanus #devopsdays
@veronica_hanus
Don’t Repeat
Yourself! Keep
it D.R.Y.!
Undocumented
code isunusable!
Comments as a learner’s first documentation
Purpose of comments:
➔ Summary: authorship, purpose
➔ Describe functions
➔ Clearify “tricky code”/unclear
decisions
Allowing:
➔ Easier stand-alone doc-writing!
➔ A “notepad”
➔ Tell why!
@veronica_hanus
@veronica_hanus
Best practices we can (usually) get behind
Code is the “how”,
comments are the “why”
Don’t Waste Everyone’s
Time (WET)
Line-by-line show lack of
understanding
Docstrings should
have inputs, outputs,
transformation
Outdated comments
== lies
Too much is too much
Always! Maybe?
@veronica_hanus
@veronica_hanus
@veronica_hanus
“JUST CODE
BETTER”Thanks, people of the Internet!
Getting answers is hard!
We hear...Advice
The way you learn
is an antipattern!
- Refactor
- Code better
- Don’t use comments
- Use only the right
comments
- Only code matters
@veronica_hanus
[Subtext] HEY Newbie! Your struggle BORES ME &
shows you are a bad programmer!
KTHXBYE
Design has methods
& tools!
Comments can:
- Label
- Questions
- Notes
- Outline
- Storage
- References
- Support
overwhelmed
learners
@veronica_hanus
@veronica_hanus
Short answer:
- Current/recent use: Comment uncertainty,
Function-level comments, Clarification, Unused code,
Other
- When comments added: Scoping & planning, As
functions written, Pairing, As I learn people don’t
understand, Clean-up
- How long programming?
- How long professionally?
- Path to programming?
Agree/Disagree:
- Comments:
- Help me remember what my code does
- Clarify my thinking
- Help me learn
- Save time
- Delete before projects is shared
- Uncomfortable writing
- Yes to function-level, no in-line
- Clear code is self-documenting
Conflicting results & looking deeper
@veronica_hanus
@veronica_hanus
NO YES
Higher
frequency
@veronica_hanus
Not certain
Each function
In-line
Unused code
@veronica_hanus
Not certain
Each function
In-line
Unused code
Scoping
Experiment
Completing program
Pairing/learning
When others
misunderstand
“A global patchwork of Github & Gitlab
repositories don’t just contain software
-- they contain our shared
understanding & collaboration around
common interests & problem solving.”
Jono Bacon in his forward to “The Business Value of Developer Relations”
@veronica_hanus
Comments teach
us about
ourselves.
@veronica_hanus
What can we do?
➔ Remember our overwhelmed learner
➔ Advise current them, not future them!
➔ Suggest a deep dive & reading others’ code?
What can we say? What do they need?
➔ Someone is learning their attitudes toward
documentation from you
Rethink comments
➔ Comments == docs?
➔ Comments teach us about ourselves @veronica_hanus
@veronica_hanusMake your own! https://www.ascii-art-generator.org/
👇Your company recruiting a
DevRel or Dev Advocate?👇
🙌@veronica_hanus🙌
🙏 Each of you for coming,
DevOpsDays Chicago team for
the opportunity, & the ~170
internet-folk who have shared
their “comments on comments” <3
I tweet at @veronica_hanus
Non-tweeters 👋me@veronicahanus.com
Survey: http://bit.ly/comment-use
Video & Slides 🔜
http://veronicahanus.com/talks
🙌Write the comments you wish you had!

More Related Content

Similar to DevOpsDays Chicago 2019 "To comment or not to comment?"

LSE SADL workshop 3 2015
LSE SADL workshop 3 2015LSE SADL workshop 3 2015
LSE SADL workshop 3 2015
LSESADL
 
Evaluation of online learning
Evaluation of online learningEvaluation of online learning
Evaluation of online learning
shatha al abeer
 

Similar to DevOpsDays Chicago 2019 "To comment or not to comment?" (20)

APIdays Paris 2019 - Continuous Documentation by Kenigbolo Meya Stephen, BCaster
APIdays Paris 2019 - Continuous Documentation by Kenigbolo Meya Stephen, BCasterAPIdays Paris 2019 - Continuous Documentation by Kenigbolo Meya Stephen, BCaster
APIdays Paris 2019 - Continuous Documentation by Kenigbolo Meya Stephen, BCaster
 
Code Quality Makes Your Job Easier
Code Quality Makes Your Job EasierCode Quality Makes Your Job Easier
Code Quality Makes Your Job Easier
 
How to Attract & Survive Media Attention as PhD
How to Attract & Survive Media Attention as PhDHow to Attract & Survive Media Attention as PhD
How to Attract & Survive Media Attention as PhD
 
Open-Source Project Tools for Corporate Projects?
Open-Source Project Tools for Corporate Projects?Open-Source Project Tools for Corporate Projects?
Open-Source Project Tools for Corporate Projects?
 
Writing world language
Writing world languageWriting world language
Writing world language
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Overcoming the Challenges to Creating an Online User Experience
Overcoming the Challenges to Creating an Online User ExperienceOvercoming the Challenges to Creating an Online User Experience
Overcoming the Challenges to Creating an Online User Experience
 
4 t presentation slides version 5apdf
4 t presentation slides version 5apdf4 t presentation slides version 5apdf
4 t presentation slides version 5apdf
 
4T Presentation 2014
4T Presentation 20144T Presentation 2014
4T Presentation 2014
 
EFL Writing for Digital Natives: Reimagining instruction for new realities.
EFL Writing for Digital Natives: Reimagining instruction for new realities.EFL Writing for Digital Natives: Reimagining instruction for new realities.
EFL Writing for Digital Natives: Reimagining instruction for new realities.
 
Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)
 
LSE SADL workshop 3 2015
LSE SADL workshop 3 2015LSE SADL workshop 3 2015
LSE SADL workshop 3 2015
 
Information Architecture Heuristics
Information Architecture HeuristicsInformation Architecture Heuristics
Information Architecture Heuristics
 
Collaborative Information Architecture
Collaborative Information ArchitectureCollaborative Information Architecture
Collaborative Information Architecture
 
NLJUG speaker academy 2023 - session 1
NLJUG speaker academy 2023 - session 1NLJUG speaker academy 2023 - session 1
NLJUG speaker academy 2023 - session 1
 
Editing for the web
Editing for the webEditing for the web
Editing for the web
 
INTENT Presentation IALIC 2012
INTENT Presentation IALIC 2012INTENT Presentation IALIC 2012
INTENT Presentation IALIC 2012
 
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
World Usability Day 2014 - Keene State College - Usable Documentation - Kevin...
 
Build Your Own Contributors, One Part At A Time
Build Your Own Contributors, One Part At A TimeBuild Your Own Contributors, One Part At A Time
Build Your Own Contributors, One Part At A Time
 
Evaluation of online learning
Evaluation of online learningEvaluation of online learning
Evaluation of online learning
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 

DevOpsDays Chicago 2019 "To comment or not to comment?"

  • 1. “To #comment or not?” A data-driven look at conflicting attitudes towards commenting and documentation. @veronica_hanus #devopsdays
  • 2. @veronica_hanus Don’t Repeat Yourself! Keep it D.R.Y.! Undocumented code isunusable!
  • 3. Comments as a learner’s first documentation Purpose of comments: ➔ Summary: authorship, purpose ➔ Describe functions ➔ Clearify “tricky code”/unclear decisions Allowing: ➔ Easier stand-alone doc-writing! ➔ A “notepad” ➔ Tell why! @veronica_hanus
  • 5. Best practices we can (usually) get behind Code is the “how”, comments are the “why” Don’t Waste Everyone’s Time (WET) Line-by-line show lack of understanding Docstrings should have inputs, outputs, transformation Outdated comments == lies Too much is too much Always! Maybe? @veronica_hanus
  • 8. Getting answers is hard! We hear...Advice The way you learn is an antipattern! - Refactor - Code better - Don’t use comments - Use only the right comments - Only code matters @veronica_hanus [Subtext] HEY Newbie! Your struggle BORES ME & shows you are a bad programmer! KTHXBYE
  • 9. Design has methods & tools! Comments can: - Label - Questions - Notes - Outline - Storage - References - Support overwhelmed learners @veronica_hanus
  • 11. Short answer: - Current/recent use: Comment uncertainty, Function-level comments, Clarification, Unused code, Other - When comments added: Scoping & planning, As functions written, Pairing, As I learn people don’t understand, Clean-up - How long programming? - How long professionally? - Path to programming? Agree/Disagree: - Comments: - Help me remember what my code does - Clarify my thinking - Help me learn - Save time - Delete before projects is shared - Uncomfortable writing - Yes to function-level, no in-line - Clear code is self-documenting Conflicting results & looking deeper @veronica_hanus
  • 15. Not certain Each function In-line Unused code Scoping Experiment Completing program Pairing/learning When others misunderstand
  • 16. “A global patchwork of Github & Gitlab repositories don’t just contain software -- they contain our shared understanding & collaboration around common interests & problem solving.” Jono Bacon in his forward to “The Business Value of Developer Relations” @veronica_hanus
  • 18. What can we do? ➔ Remember our overwhelmed learner ➔ Advise current them, not future them! ➔ Suggest a deep dive & reading others’ code? What can we say? What do they need? ➔ Someone is learning their attitudes toward documentation from you Rethink comments ➔ Comments == docs? ➔ Comments teach us about ourselves @veronica_hanus
  • 19. @veronica_hanusMake your own! https://www.ascii-art-generator.org/
  • 20. 👇Your company recruiting a DevRel or Dev Advocate?👇 🙌@veronica_hanus🙌 🙏 Each of you for coming, DevOpsDays Chicago team for the opportunity, & the ~170 internet-folk who have shared their “comments on comments” <3 I tweet at @veronica_hanus Non-tweeters 👋me@veronicahanus.com Survey: http://bit.ly/comment-use Video & Slides 🔜 http://veronicahanus.com/talks 🙌Write the comments you wish you had!