SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
The Importance of
Documentation in Programming
Why is it important?
Without documentation, programs
may be confusing and/or make no
sense.
va r sla ying = t rue ;
va r youH it = M a t h.f loor (M a t h.ra ndom () * 2);
va r da m a ge ThisRound = M a t h.floor (M a t h.ra ndom () *
5 + 1);
va r t ot a lD a m a ge = 0;
w hile (sla ying) { if (youH it ) {
c onsole .log("You hit t he dra gon a nd did " +
da m a ge ThisRound + " da m a ge !");
t ot a lD a m a ge + = da m a ge ThisRound ;
if (t ot a lD a m a ge > = 4) {
c onsole .log("You did it ! You sle w t he dra gon!");
sla ying = f a lse ;
} e lse {
youH it = M a t h.f loor (M a t h.ra ndom () * 2);
} } e lse {
c onsole .log("The dra gon burnina t e s you! You' re
t oa st .");
sla ying = fa lse ; }}
?
Commenting
Comments can be their own line or
added to the end of a string.
Commenting
Comments can be used as a form of pseudocode to
outline intention prior to writing the actual code. In
this case it should explain the logic behind the code
rather than the code itself.
Commenting in various languages
Javascript / /
Visual Basic
C / * */
‘
General Rules for Commenting
Not every line should be commented, but any line that
performs an operation should.
Any line that causes confusion should be commented.
At the top of the program there should be comments on
its purpose and scope of the program.
Another common comment is a last revised date and
version number at the top of the program.

Más contenido relacionado

Similar a The Importance of Documentation in Programming

Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer scienceumardanjumamaiwada
 
Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Spaceramanjosan
 
Telephone directory using c language
Telephone directory using c languageTelephone directory using c language
Telephone directory using c languageMauryasuraj98
 
Chapter 2.4
Chapter 2.4Chapter 2.4
Chapter 2.4sotlsoc
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler DevelopmentLogan Chien
 
Vendredi Tech_ la programmation fonctionnelle.pptx
Vendredi Tech_ la programmation fonctionnelle.pptxVendredi Tech_ la programmation fonctionnelle.pptx
Vendredi Tech_ la programmation fonctionnelle.pptxGuillaume Saint Etienne
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxfaithxdunce63732
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part維佋 唐
 
Fundamentals of programming)
Fundamentals of programming)Fundamentals of programming)
Fundamentals of programming)jakejakejake2
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1Philip Schwarz
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfInSync2011
 
Fundamentals of prog. by rubferd medina
Fundamentals of prog. by rubferd medinaFundamentals of prog. by rubferd medina
Fundamentals of prog. by rubferd medinarurumedina
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsPhilip Schwarz
 

Similar a The Importance of Documentation in Programming (20)

Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Space
 
Telephone directory using c language
Telephone directory using c languageTelephone directory using c language
Telephone directory using c language
 
Chapter 2.4
Chapter 2.4Chapter 2.4
Chapter 2.4
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler Development
 
Vendredi Tech_ la programmation fonctionnelle.pptx
Vendredi Tech_ la programmation fonctionnelle.pptxVendredi Tech_ la programmation fonctionnelle.pptx
Vendredi Tech_ la programmation fonctionnelle.pptx
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
Ic lecture7
Ic lecture7  Ic lecture7
Ic lecture7
 
Tugas Pw [6]
Tugas Pw [6]Tugas Pw [6]
Tugas Pw [6]
 
Tugas Pw [6] (2)
Tugas Pw [6] (2)Tugas Pw [6] (2)
Tugas Pw [6] (2)
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part
 
Fundamentals of programming)
Fundamentals of programming)Fundamentals of programming)
Fundamentals of programming)
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
 
Fundamentals of prog. by rubferd medina
Fundamentals of prog. by rubferd medinaFundamentals of prog. by rubferd medina
Fundamentals of prog. by rubferd medina
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor corrections
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 

Más de Casey Robertson

Introduction to Typography
Introduction to TypographyIntroduction to Typography
Introduction to TypographyCasey Robertson
 
Concerns with Technology
Concerns with TechnologyConcerns with Technology
Concerns with TechnologyCasey Robertson
 
Production and Manufacturing Planning
Production and Manufacturing PlanningProduction and Manufacturing Planning
Production and Manufacturing PlanningCasey Robertson
 
Investigating Graphic Image Design
Investigating Graphic Image DesignInvestigating Graphic Image Design
Investigating Graphic Image DesignCasey Robertson
 
Types of Production and Manufacturing
Types of Production and ManufacturingTypes of Production and Manufacturing
Types of Production and ManufacturingCasey Robertson
 
Human Resource Management
Human Resource ManagementHuman Resource Management
Human Resource ManagementCasey Robertson
 
Introduction to Layouts in Graphic Design
Introduction to Layouts in Graphic DesignIntroduction to Layouts in Graphic Design
Introduction to Layouts in Graphic DesignCasey Robertson
 
Features in Graphic and Publication Design
Features in Graphic and Publication DesignFeatures in Graphic and Publication Design
Features in Graphic and Publication DesignCasey Robertson
 
Five Types of Partners in a Business Partnership
Five Types of Partners in a Business PartnershipFive Types of Partners in a Business Partnership
Five Types of Partners in a Business PartnershipCasey Robertson
 
Forms of Business Organization
Forms of Business OrganizationForms of Business Organization
Forms of Business OrganizationCasey Robertson
 
Factors and Regulations for the Global Economy
Factors and Regulations for the Global EconomyFactors and Regulations for the Global Economy
Factors and Regulations for the Global EconomyCasey Robertson
 
Classification of Economic Conditions
Classification of Economic ConditionsClassification of Economic Conditions
Classification of Economic ConditionsCasey Robertson
 
The Systems Approach to Design
The Systems Approach to DesignThe Systems Approach to Design
The Systems Approach to DesignCasey Robertson
 
Measuring Economic Activity
Measuring Economic ActivityMeasuring Economic Activity
Measuring Economic ActivityCasey Robertson
 

Más de Casey Robertson (20)

Workplace Hazards
Workplace HazardsWorkplace Hazards
Workplace Hazards
 
Introduction to Typography
Introduction to TypographyIntroduction to Typography
Introduction to Typography
 
Concerns with Technology
Concerns with TechnologyConcerns with Technology
Concerns with Technology
 
Technology In Business
Technology In BusinessTechnology In Business
Technology In Business
 
Business Operations
Business OperationsBusiness Operations
Business Operations
 
Production and Manufacturing Planning
Production and Manufacturing PlanningProduction and Manufacturing Planning
Production and Manufacturing Planning
 
Investigating Graphic Image Design
Investigating Graphic Image DesignInvestigating Graphic Image Design
Investigating Graphic Image Design
 
Types of Production and Manufacturing
Types of Production and ManufacturingTypes of Production and Manufacturing
Types of Production and Manufacturing
 
Levels of Management
Levels of ManagementLevels of Management
Levels of Management
 
Human Resource Management
Human Resource ManagementHuman Resource Management
Human Resource Management
 
Introduction to Layouts in Graphic Design
Introduction to Layouts in Graphic DesignIntroduction to Layouts in Graphic Design
Introduction to Layouts in Graphic Design
 
Features in Graphic and Publication Design
Features in Graphic and Publication DesignFeatures in Graphic and Publication Design
Features in Graphic and Publication Design
 
Types of Leadership
Types of LeadershipTypes of Leadership
Types of Leadership
 
Principals of Managment
Principals of ManagmentPrincipals of Managment
Principals of Managment
 
Five Types of Partners in a Business Partnership
Five Types of Partners in a Business PartnershipFive Types of Partners in a Business Partnership
Five Types of Partners in a Business Partnership
 
Forms of Business Organization
Forms of Business OrganizationForms of Business Organization
Forms of Business Organization
 
Factors and Regulations for the Global Economy
Factors and Regulations for the Global EconomyFactors and Regulations for the Global Economy
Factors and Regulations for the Global Economy
 
Classification of Economic Conditions
Classification of Economic ConditionsClassification of Economic Conditions
Classification of Economic Conditions
 
The Systems Approach to Design
The Systems Approach to DesignThe Systems Approach to Design
The Systems Approach to Design
 
Measuring Economic Activity
Measuring Economic ActivityMeasuring Economic Activity
Measuring Economic Activity
 

Último

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Último (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

The Importance of Documentation in Programming

  • 2. Why is it important? Without documentation, programs may be confusing and/or make no sense.
  • 3. va r sla ying = t rue ; va r youH it = M a t h.f loor (M a t h.ra ndom () * 2); va r da m a ge ThisRound = M a t h.floor (M a t h.ra ndom () * 5 + 1); va r t ot a lD a m a ge = 0; w hile (sla ying) { if (youH it ) { c onsole .log("You hit t he dra gon a nd did " + da m a ge ThisRound + " da m a ge !"); t ot a lD a m a ge + = da m a ge ThisRound ; if (t ot a lD a m a ge > = 4) { c onsole .log("You did it ! You sle w t he dra gon!"); sla ying = f a lse ; } e lse { youH it = M a t h.f loor (M a t h.ra ndom () * 2); } } e lse { c onsole .log("The dra gon burnina t e s you! You' re t oa st ."); sla ying = fa lse ; }} ?
  • 4. Commenting Comments can be their own line or added to the end of a string.
  • 5. Commenting Comments can be used as a form of pseudocode to outline intention prior to writing the actual code. In this case it should explain the logic behind the code rather than the code itself.
  • 6. Commenting in various languages Javascript / / Visual Basic C / * */ ‘
  • 7. General Rules for Commenting Not every line should be commented, but any line that performs an operation should. Any line that causes confusion should be commented. At the top of the program there should be comments on its purpose and scope of the program. Another common comment is a last revised date and version number at the top of the program.