Documenting your Code – Is it Important?



Code documentation

Should a developer be documenting code?

There are several manuals, reference guides, documents that are available in online to help people in gaining more knowledge on codes, however it is a good practice for you to document your code. Special attention needs to be given to developer’s documentation. The documentation process includes the following stages: pre-development documentation, documentation stage and the post development documentation.

A developer need to ask himself/herself, certain questions before he/she begins with the documentation work. The questions which generally arise are:

  • Do you prepare a detailed impact analysis document before starting with the implementation of a piece of functionality in your application?
  • Do you document the test cases before starting to write a code?
  • Do you write comments during coding?
  • Do you compose a comprehensive API document after coding?

If the answer to all the questions above is a ‘Yes’, then you are in the right direction.  One must follow a streamlined documentation approach and realize the advantages of documentation.

This article explains the importance of documenting and emphasizes on the fact that coders should take interest in documentation. This article further, provides the developers certain suggestions on the best practices in documentation for the projects, which need to be considered.

1.Pre-development documentation

A developer unit test case document forecasts the smallest possible parts in a code base before coding. This helps developers to cover all the possible scenarios and cases while writing a piece of code, which gives the most efficient and error free program for your application.

Having an impact analysis document before implementing a new functionality for your ongoing project helps the entire team to understand the impact of new feature in the system before it is implemented.

  • Accurate analysis of implications of a proposed change or functionality helps in better brainstorming of the ideas with the team. It, also, helps in better estimation of the time that is required to complete certain functionality.
  • Most importantly, composing an impact analysis will help you foresee the risks or complications in the implementation. Sometimes, a change request, which looks simple, might turn into a coding error.  Nobody wants to face an unexpected complication in the project workflow and everyone will prefer a smooth implementation.

2.Documentation during development

Coding explains you ‘how’ and commenting explains you ‘why’. To make life easier for the next developer, codes should be written and rewritten to be as clear as possible. Comments do the job of explaining what the compiler doesn’t have access to i.e. why the code is there. Adding comments in order to explain how your code does its job.

“To comment or not to comment” there is an amount of interesting debate within the developer community regarding the usefulness or desirability of comments.

For example, here, the reference is to comments like this:

Code in program



And this,

Code comments

Code commenting is more of a futuristic aspect. Even though the modern programming languages are quite precise, one must talk about the intent of the code at the time of writing. There are chances that you might forget your own code after a while. Therefore, it is of utmost importance that you pen down whatever is necessary and important.

3.Post-development documentation

After all the hard work, you need to put in a bit of effort to yield a successful outcome.

API documentation is the most commonly used programmer’s documentation. It is a reference document which describes a software’s code, the parameters a programmer sends (or the request sent) to the software. It reveals what the software does and response from the software.

API documentation includes information about the code and gives details about the APIs that the developers use to connect or interface with the software application. API documents can be extremely long and repetitive. But, at the same time, API Documentation tools are proved to be helpful.

API documentation is as important as the product itself.


Documentation requires time and effort; just like everything else in life. Thus, a developer is supposed to put in effort into documentation of the codes. This investment will help you and the project in the long run.

It’s time to change the stereotypical thought that real programmers don’t document and let the developer ecosystem know that the coders do spend their valuable time in coding and documentation.

So, get started today!


Bisileesh P.B

.Net Developer, RapidValue

How can we help you?