Lecture 6 - Reading Code

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:10 PM on 11/6/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

What is the main goal when writing code according to SCC 111?

To write code that’s a pleasure to read.

2
New cards

Why is reading code compared to reading great books for a writer?

Being able to read great code is just as important for a programmer as reading greater books is for a writer.

3
New cards

How should comments in code be characterized?

Comments are brief descriptions that clarify the code for easier understanding.

4
New cards

What are the two types of comment syntax mentioned?

Single line comments use // and block comments use /* and */.

5
New cards

What should comments add to the code?

Comments should add value and clarify confusing parts without being overly verbose.

6
New cards

What is one suggestion for maintaining consistency in comments?

Plan your code and write comments either beforehand or as you go along.

7
New cards

What is one guideline for writing readable code?

Indent code contained within braces.

8
New cards

What should you avoid at the end of lines of code?

Leaving whitespace at the end of lines.

9
New cards

What naming convention should be followed when declaring variables?

Follow 'camelCase' when declaring variables.

10
New cards

What is an important practice for variable names in code?

Use meaningful variable names.