Programming Principles Flashcards

1
Q

DRY

A

Don’t Repeat Yourself. If you’re repeating code, you should find a way to dynamically generate it, such as by using a function and function parameters.

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

4 Steps of the problem-solving process

A
  1. Understand the Problem. Know what is known, what is unknown, and what you’re trying to find
  2. Make a plan. Before writing any code, come up with an approach (or a few!) and decide what will work best
  3. Execute the plan. Write the actual code, testing things along the way. Make sure your final tests include every edge-case you can think of
  4. Review the solution. Can it be improved? Is it optimized? Does it cover every erroneous input or weird data you can imagine?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly