Back to Freecodecamp

Task 33

curriculum/challenges/english/blocks/learn-how-to-document-code-for-a-project/65e93a6cca356414bb39c4a6.md

latest2.3 KB
Original Source
<!-- (Audio) Brian: You should comment on any complex or tricky parts of your code. You can also explain what certain functions do, and clarify the purpose of variables. Try to ensure that your comments are clear and concise. -->

--description--

Listen to the audio and answer the question.

--questions--

--text--

What does Brian instruct about commenting in code?

--answers--

Comment only on the easy parts of the code

--feedback--

Brian's advice is actually the opposite; he suggests commenting on the complex or tricky parts.


Focus on clarifying the coding language used

--feedback--

While clarity is important, Brian specifically advises commenting on tricky parts, functions, and the purpose of variables.


Comment on complex parts, explain functions, clarify variables, and make comments clear and concise


Avoid commenting on functions and variables

--feedback--

Brian recommends explaining functions and clarifying variables, not avoiding commenting on them.

--video-solution--

3

--scene--

json
{
  "setup": {
    "background": "company2-center.png",
    "characters": [
      {
        "character": "Brian",
        "position": {
          "x": 50,
          "y": 15,
          "z": 1.2
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "7.1-2.mp3",
      "startTime": 1,
      "startTimestamp": 21.34,
      "finishTimestamp": 33.82
    }
  },
  "commands": [
    {
      "character": "Brian",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Brian",
      "startTime": 1,
      "finishTime": 4.9,
      "dialogue": {
        "text": "You should comment on any complex or tricky parts of your code.",
        "align": "center"
      }
    },
    {
      "character": "Brian",
      "startTime": 4.9,
      "finishTime": 9.58,
      "dialogue": {
        "text": "You can also explain what certain functions do and clarify the purpose of variables.",
        "align": "center"
      }
    },
    {
      "character": "Brian",
      "startTime": 10.02,
      "finishTime": 13.48,
      "dialogue": {
        "text": "Try to ensure that your comments are clear and concise.",
        "align": "center"
      }
    },
    {
      "character": "Brian",
      "opacity": 0,
      "startTime": 13.98
    }
  ]
}