SlideShare une entreprise Scribd logo
1  sur  4
Different Types of Documentations for Programmers




A new developer might be confused about which kinds of documentation
are important, because we often use the very general term
documentation rather than specifying the type. Here’s a look at some
of the types of documentation out there.


Code comments

When documentation is mentioned amongst developers, comments inserted
directly into the source code are probably the most common
understanding. This is especially true for recent graduates or newer
programmers who encountered it in school, but never learned about
more rigorous forms of documentation.

Comments have lost a lot of their utility over the years. Between the
development of systems allowing longer, more descriptive variable
names and development platforms and systems that allow for other
kinds of documentation, comments no longer serve as the de facto
documentation solution. That said, code comments still have value.

Code comments should not be used to replace descriptive variable
names, though they are excellent for explaining the logic underlying
a piece of code — not necessarily the how of a code block but the
why. For example, a useful comment might be, “Spec says that a name
must be three characters long and have only letters” to explain a
piece of validation code. Comments become more useful when they
directly refer to the specification, a bug, or other external
documentation in an easy-to-reference way. “Fix for bug #598″ or
“Refer to change request A991″ can go a long way in helping future
maintainers understand the thinking behind an otherwise
incomprehensible piece of code. Writing useful comments along these
lines should become a habit if it isn’t one already.


“Self-documenting” code

Thanks to systems that allow variable, class, and function names to
be longer than they used to be, it is much easier to write “self-
documenting” code; that is to say, the names of things convey their
meaning without the need for inline comments. For example, a function
such as “prfltocnsl” does not let the potential user know what it
does as well as “PrintFloatToConsole.” Like using inline comments
wisely, this should become a standard practice for developers.


Generated API-style documentation

Some languages allow you to embed detailed documentation within the
source code in a format (typically XML) that automated tools can use
to generate packaged help. Some systems (like Visual Studio) can pick
it up and use it in other ways too. This can be a really useful, but
it is a lot of work to do something useful.

How many times have you seen the documentation for a ToString()
method read something like, “Produces the string representation of
the object.” Gee, that was… uh… completely obvious, thanks. How
about letting me know how that happens instead? For example, let’s
say you have a collection with a ToString() method. Instead of
forcing the developer to guess what the output will look like, the
documentation should provide an example of what a sample instance
looks like when ToString() is called. Likewise, too many times the
“examples” just show the obvious syntax in a basic “hello world”
context without explaining how or why you would really do any of
this.


Bug tracker, task list, or project
management system

There has been an explosion in tools that allow teams to enter bugs,
tasks, to-do lists, and so on. The tools allow items to be tracked
very granularly, and for the user to assign gobs of metadata to any
given item. With this metadata, managers can do things like make
graphs, charts, and reports showing a ton of different stats, like
average bug resolution time or the number of features implemented per
developer. Some of these systems can tie into your source code
system, so that you can easily view code check-ins in the context of
the tasks they addressed (this is a very handy feature).

While the stats that can be pulled are often of dubious relevance
towards evaluating quality or productivity, these systems have lots
of value. Being able to rapidly find and mine common bugs, change
requests, and so on is a big help. It’s also nice to not have to
wade through endless piles of separate pieces of paper, emails, or
files trying to figure out where someone stuck that change request so
you can figure out why you spent three weeks making a change that
everyone seems to hate.


UML

UML is a special file format design for documenting applications. UML
can be consumed by a variety of tools to produce documents, database
diagrams, process flowcharts, and more. Even better, some tools can
take UML and stub out applications and databases based upon it.

UML is particularly prevalent in the Java ecosystem, thanks to the
Rational Suite of tools that IBM owns. UML seems to be considered an
enterprise development tool, due to the learning curve and cost of
the tools associated with it.


Ad-hoc documents

This style of documentation is sadly too prevalent. With ad-hoc
documentation, you usually lack version control. It’s also difficult
to search and, worst of all, you tend to get multiple copies of the
documents with differences floating all over the place.

There are some uses for these kinds of files, but they work a lot
better if they are participating in a more rigorous documentation
system, such as attached to a bug ticket or change request.




Recommend Office .NET/Silverlight Component:


Spire.XLS for .NET and Silverlight

Spire.Office for .NET and Silverlight

Spire.Doc for .NET and Silverlight

Spire.PDF for .NET
Spire.DataExport for .NET

Contenu connexe

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Different types of documentations for programmers

  • 1. Different Types of Documentations for Programmers A new developer might be confused about which kinds of documentation are important, because we often use the very general term documentation rather than specifying the type. Here’s a look at some of the types of documentation out there. Code comments When documentation is mentioned amongst developers, comments inserted directly into the source code are probably the most common understanding. This is especially true for recent graduates or newer programmers who encountered it in school, but never learned about more rigorous forms of documentation. Comments have lost a lot of their utility over the years. Between the development of systems allowing longer, more descriptive variable names and development platforms and systems that allow for other kinds of documentation, comments no longer serve as the de facto documentation solution. That said, code comments still have value. Code comments should not be used to replace descriptive variable names, though they are excellent for explaining the logic underlying a piece of code — not necessarily the how of a code block but the why. For example, a useful comment might be, “Spec says that a name must be three characters long and have only letters” to explain a piece of validation code. Comments become more useful when they directly refer to the specification, a bug, or other external documentation in an easy-to-reference way. “Fix for bug #598″ or “Refer to change request A991″ can go a long way in helping future maintainers understand the thinking behind an otherwise incomprehensible piece of code. Writing useful comments along these lines should become a habit if it isn’t one already. “Self-documenting” code Thanks to systems that allow variable, class, and function names to be longer than they used to be, it is much easier to write “self- documenting” code; that is to say, the names of things convey their meaning without the need for inline comments. For example, a function
  • 2. such as “prfltocnsl” does not let the potential user know what it does as well as “PrintFloatToConsole.” Like using inline comments wisely, this should become a standard practice for developers. Generated API-style documentation Some languages allow you to embed detailed documentation within the source code in a format (typically XML) that automated tools can use to generate packaged help. Some systems (like Visual Studio) can pick it up and use it in other ways too. This can be a really useful, but it is a lot of work to do something useful. How many times have you seen the documentation for a ToString() method read something like, “Produces the string representation of the object.” Gee, that was… uh… completely obvious, thanks. How about letting me know how that happens instead? For example, let’s say you have a collection with a ToString() method. Instead of forcing the developer to guess what the output will look like, the documentation should provide an example of what a sample instance looks like when ToString() is called. Likewise, too many times the “examples” just show the obvious syntax in a basic “hello world” context without explaining how or why you would really do any of this. Bug tracker, task list, or project management system There has been an explosion in tools that allow teams to enter bugs, tasks, to-do lists, and so on. The tools allow items to be tracked very granularly, and for the user to assign gobs of metadata to any given item. With this metadata, managers can do things like make graphs, charts, and reports showing a ton of different stats, like average bug resolution time or the number of features implemented per developer. Some of these systems can tie into your source code system, so that you can easily view code check-ins in the context of the tasks they addressed (this is a very handy feature). While the stats that can be pulled are often of dubious relevance towards evaluating quality or productivity, these systems have lots of value. Being able to rapidly find and mine common bugs, change requests, and so on is a big help. It’s also nice to not have to
  • 3. wade through endless piles of separate pieces of paper, emails, or files trying to figure out where someone stuck that change request so you can figure out why you spent three weeks making a change that everyone seems to hate. UML UML is a special file format design for documenting applications. UML can be consumed by a variety of tools to produce documents, database diagrams, process flowcharts, and more. Even better, some tools can take UML and stub out applications and databases based upon it. UML is particularly prevalent in the Java ecosystem, thanks to the Rational Suite of tools that IBM owns. UML seems to be considered an enterprise development tool, due to the learning curve and cost of the tools associated with it. Ad-hoc documents This style of documentation is sadly too prevalent. With ad-hoc documentation, you usually lack version control. It’s also difficult to search and, worst of all, you tend to get multiple copies of the documents with differences floating all over the place. There are some uses for these kinds of files, but they work a lot better if they are participating in a more rigorous documentation system, such as attached to a bug ticket or change request. Recommend Office .NET/Silverlight Component: Spire.XLS for .NET and Silverlight Spire.Office for .NET and Silverlight Spire.Doc for .NET and Silverlight Spire.PDF for .NET