Fatskills
Practice. Master. Repeat.
Study Guide: Comp. Sci and Programming Basics: Software Development Lifecycle Documentation
Source: https://www.fatskills.com/bsc-cs/chapter/software-development-lifecycle-documentation

Comp. Sci and Programming Basics: Software Development Lifecycle Documentation

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~4 min read

Concept Summary

  • Documentation is the process of creating and maintaining written records of code, including comments, function descriptions, and variable explanations.
  • Good documentation is essential for code readability, maintainability, and collaboration among developers.
  • Documentation can be created using various tools and techniques, such as comments, docstrings, and documentation generators.
  • Effective documentation should be concise, accurate, and up-to-date, making it easy for others to understand the code.
  • Documentation is not just a one-time task, but an ongoing process that requires regular updates and maintenance.

Questions


WHAT (definitional)

  • What is documentation in the context of programming?
  • Answer: Documentation is the process of creating and maintaining written records of code.
  • Real-world example: A programmer writes comments to explain the purpose of a function in a codebase.
  • Misconception cleared: Documentation is not just about writing comments, but also includes function descriptions and variable explanations.
  • What is the purpose of documentation in programming?
  • Answer: The purpose of documentation is to improve code readability, maintainability, and collaboration among developers.
  • Real-world example: A team of developers uses documentation to understand and modify a complex codebase.
  • Misconception cleared: Documentation is not just for others, but also for the programmer themselves to understand their own code.
  • What are some common tools and techniques used for documentation?
  • Answer: Common tools and techniques include comments, docstrings, and documentation generators.
  • Real-world example: A programmer uses a documentation generator to create HTML documentation for their code.
  • Misconception cleared: Documentation is not just about writing text, but also includes visual aids and diagrams.

WHY (causal reasoning)

  • Why is documentation important for code maintainability?
  • Answer: Documentation helps others understand the code and make changes without breaking it.
  • Real-world example: A programmer updates a codebase without breaking it because they understand the code thanks to good documentation.
  • Misconception cleared: Documentation is not just for others, but also helps the programmer themselves to understand and modify their own code.
  • Why is documentation necessary for collaboration among developers?
  • Answer: Documentation helps developers understand each other's code and work together more efficiently.
  • Real-world example: A team of developers uses documentation to understand and modify a complex codebase.
  • Misconception cleared: Documentation is not just for large teams, but also for solo developers to understand their own code.
  • Why is documentation an ongoing process?
  • Answer: Code changes over time, and documentation must be updated to reflect these changes.
  • Real-world example: A programmer updates documentation as they modify a codebase.
  • Misconception cleared: Documentation is not a one-time task, but an ongoing process that requires regular updates.

HOW (process/application)

  • How do you write effective comments in code?
  • Answer: Write clear, concise comments that explain the purpose and functionality of the code.
  • Real-world example: A programmer writes a comment to explain the purpose of a function in a codebase.
  • Misconception cleared: Comments should not just explain what the code does, but also why it does it.
  • How do you create docstrings for functions and classes?
  • Answer: Use a consistent format and include information such as function parameters, return values, and usage examples.
  • Real-world example: A programmer uses a docstring to explain the purpose and usage of a function.
  • Misconception cleared: Docstrings are not just for functions, but also for classes and modules.
  • How do you use documentation generators to create documentation?
  • Answer: Use tools such as Sphinx or Javadoc to generate HTML documentation from comments and docstrings.
  • Real-world example: A programmer uses a documentation generator to create HTML documentation for their code.
  • Misconception cleared: Documentation generators are not just for large projects, but also for small ones.

CAN (possibility/conditions)

  • Can documentation be created manually or automatically?
  • Answer: Both manual and automatic methods can be used to create documentation.
  • Real-world example: A programmer writes comments manually, while a documentation generator creates HTML documentation automatically.
  • Misconception cleared: Documentation is not just created manually, but also automatically using tools and techniques.
  • Can documentation be used for code analysis and testing?
  • Answer: Yes, documentation can be used to analyze and test code, such as using docstrings to generate test cases.
  • Real-world example: A programmer uses docstrings to generate test cases for their code.
  • Misconception cleared: Documentation is not just for human consumption, but also for machine analysis and testing.
  • Can documentation be used for code refactoring and optimization?
  • Answer: Yes, documentation can be used to identify areas of code that need refactoring or optimization.
  • Real-world example: A programmer uses documentation to identify areas of code that need refactoring.
  • Misconception cleared: Documentation is not just for understanding code, but also for improving its performance and maintainability.

TRUE/FALSE (misconception testing)

  • Statement: Documentation is only necessary for large codebases.
  • Answer: FALSE
  • Real-world example: A solo developer uses documentation to understand and modify their own code.
  • Misconception cleared: Documentation is not just for large teams, but also for solo developers.
  • Statement: Documentation is a one-time task that does not require regular updates.
  • Answer: FALSE
  • Real-world example: A programmer updates documentation as they modify a codebase.
  • Misconception cleared: Documentation is not a one-time task, but an ongoing process that requires regular updates.
  • Statement: Documentation is only necessary for explaining complex code.
  • Answer: FALSE
  • Real-world example: A programmer uses documentation to explain the purpose and functionality of a simple function.
  • Misconception cleared: Documentation is not just for complex code, but also for simple code.


ADVERTISEMENT