Chapter 7 - While You Are Coding Flashcards
Should we run auto-pilot when coding?
No. We should watch our thoughts carefully. We should be critical about our work.
Should we program by coincidence?
No. We should avoid programming by coincidence - relying on luck and accidental successes - in favor of programming deliberately.
What is the Big-O notation?
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.
What is refactoring?
It is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
Why should we refactor?
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.
When should we refactor?
We should refactor when we find code that is duplicated, unclear, coupled, or outdated.
Why should we test our code?
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.
What are the basics security principles?
1 - Minimize Attack Surface Area 2 - Principle of Least Privilege 3 - Security Defaults 4 - Encrypt Sensitive Data 5 - Maintain Security Updates