Skip to content

平成22年度 秋期 ITパスポート試験 問43

This question's explanation and your answers so far.

問43
頻出度★☆☆

変数の命名規則やコメントの書き方など,プログラムの標準的な記述方式を定める目的として,適切なものはどれか。

出典 平成22年度 秋期 ITパスポート試験 問43
解説

問 43

  • Incorrectア

    Clarifying when and what kind of tests are to be performed is the role of a test plan (test specification), not the purpose of a coding standard. A coding standard is a rule that unifies how code is written; it says nothing about when tests are carried out or what kinds of tests are used. Following the standard may end up reducing defects, but that is a separate matter from a test plan.

  • Incorrectイ

    A specification document is a deliverable of the upstream process that comes before code is written, and improving its quality is the job of other measures such as reviews and standard document templates. A coding standard applies from the stage of writing code onwards, so it cannot improve the quality of a specification that has already been completed. The process each one applies to does not match.

  • ウ

    正解 The correct answer is ウ. Rules that fix things such as variable naming conventions and how to write comments are called a coding standard (coding convention), and their greatest purpose is to improve the maintainability of software code. A program is not finished once it has been written: bug fixes and new functions keep on being added afterwards, and the people in charge change over time. If each person writes in a different style, other people (including yourself a few months later) need a lot of time to work out what the code does, and mistakes caused by misunderstanding happen more easily. Once the way of writing is unified, you can guess what a variable is for just by looking at its name and read the intent of the processing from the comments, so readability goes up and, as a result, the effort and the risk involved in fixing and improving the code go down. This effect of “easy to read, therefore easy to fix” is exactly the improvement of maintainability, so ウ is appropriate as the purpose.

  • Incorrectエ

    What improves the quality of database design is standards concerning database design, such as normalization, data modeling, and naming rules for tables and columns. What this question lists are variable naming conventions and how to write comments, that is, rules about writing programs, so the target is not database design.

ここがポイント
  • Coding standard (coding convention) = rules that unify the way a program is written, such as variable naming conventions, how to write comments, and indentation. Their purpose is to raise the readability of the code and thereby improve the maintainability of the software (how easy it is to fix and improve).
  • Questions about standards and conventions can be sorted out by asking “which process does the standard cover, and what does it target”: a test plan = the testing process; the quality of a specification = the upstream design and requirements processes; database design standards = database design; a coding standard = the code itself in the programming process.
用語

Your answers