Tab Content
Tab Title
Instructions
Tab Content
  1. Find comments in the code by looking for text in gray.
  2. Read the text in the comments.

STEM Connections

Comments are for the benefit of computer programmers, the humans, and they do not affect the code. Comments are helpful for making notes in complex codes. Comments not only help you as a programmer, but comments help others who may use your code in the future. Comments change to gray when written with the correct syntax.

Tab Title
Implementation
Tab Content

There are a lot of lessons you can extract from concept of comments. Comments are just for humans and do not effect the code.

1. Why would you want to comment your code? 1.

  • Comments remind you, or team, what your code was supposed to do
  • It gives you a chance to explain in words what your code is doing
  • Most jobs require programmers to comment their code.

2. Why would this be a requirement?

  • At tech companies, coders typically work in teams. As a result, it is necessary to write comments so your teammates know how and where to insert their coding contributions.
  • Comments are needed for teamwork

3. How many lines of code are in a smartphone?

  • 25-65 million lines of code (versus the less than 10 in your blink code)

4. How long would it take 1 person to write all the code for a smartphone by themselves, without any help?

  • Over 2000 years ( calculated by 25 working lines of code a day)
  • Comments are a way to communicated to your team.

5. What class in school helps with being a good team player (or communicator)?

  • Language arts (English)
  • If they answer with math or science, remind them that math and science are content, but language arts helps with delivering that content to other humans.

6. How many of you have read an essay you wrote 6 months ago and thought ‘what was I thinking?’

  • The ability to communicate with words effectively, so those around you understand your true meaning and not their own interpretation, requires concepts that are learned in language arts.

7. There are 2 ways to write out comments Line form:

  • Writing “//” allows you to write comments in a line Paragraph form:
  • Writing “/*” allows you to start writing in paragraphs (as everything below this starting symbol turns into comments) until it sees the end “*/”
Instruction Category