VOOZH about

URL: https://www.geeksforgeeks.org/blogs/what-is-indentation-documentation-and-program-maintenance/

⇱ What is Indentation, Documentation and Program Maintenance? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

What is Indentation, Documentation and Program Maintenance?

Last Updated : 15 Jul, 2025

Indentation improves the readability of the code. It is mainly used for code inside looping statements, control structures, functions etc. as good intended code is easy to maintain and is good looking. It makes the code more readable and easy to understand. Some programming languages like Python made indentation mandatory instead of using brackets, It makes code easy to read and understand.

Some Rules for indentation are:

  • Each nested block should be properly indented and spaced with a tab space.
  • All braces should start from a new line then the code comes following the end braces from a new line.

Example of Some Good Indentation Practices

1. Using Indentation in conditional statements.

Output:

b is greater than a

2. Using indentation in looping statements.

Output:

GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks
GeeksforGeeks

Documentation

Documentation is a very important aspect of programming. Good documentation in programs make it easy for user to read and understand the code. This is done by inserting comments in the necessary places to make the code readable and more understandable for user. Documentation is basically for users of the code to understand it even without the help of programmer. Add Comments in code and explain the code line and the code will be well Documented.

Example: 

Program Maintenance

Once the Program is made, it is saved and stored as a software package. After some time if the program needs improvement or modification, the saved program is modified and saves effort and time as programs need not to made from the very beginning. Hence Modifications will meet the purpose only. Program maintenance is done as:

  • Keep the last program.
  • Modify the program for required improvements.
  • Do not make new program from scratch, just use the last saved program.
  • Save time and effort.
Comment
Article Tags:
Article Tags: