Chapter 7 - While You Are Coding Flashcards

1
Q

Should we run auto-pilot when coding?

A

No. We should watch our thoughts carefully. We should be critical about our work.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Should we program by coincidence?

A

No. We should avoid programming by coincidence - relying on luck and accidental successes - in favor of programming deliberately.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Big-O notation?

A

it is a mathematical way of dealing with approximations. It uses the worst case to determine how execution time will vary based on the input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is refactoring?

A

It is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why should we refactor?

A

We should refactor our code daily because we want a clean and easy-to-change codebase. In this way, we don’t reduce team productivity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When should we refactor?

A

We should refactor when we find code that is duplicated, unclear, coupled, or outdated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why should we test our code?

A

We should write tests for our code because with them we:

  • Make sure our code works as expected
  • Document the expected behavior
  • Write better, loosely-coupled code when thinking make it testable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the basics security principles?

A
1 - Minimize Attack Surface Area
2 - Principle of Least Privilege
3 - Security Defaults
4 - Encrypt Sensitive Data
5 - Maintain Security Updates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly