Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 978 Bytes

initial_solution.md

File metadata and controls

19 lines (12 loc) · 978 Bytes

Initial Solution

Translate your pseudocode into code. If your pseudocode is not easy to implement, modify it, and re-attempt to code it.

You will encounter challenges where you need to write your own tests and others where tests will be written for you in RSpec.

You should write your own tests. Always begin coding by running your tests. What do they return? Do they all fail?

When you think your code should pass the first failing test, either:

  1. Run the spec file again using the rspec command if the tests are in RSpec.
  2. Run the file with your driver test code.

If your solution passes your first test(s), work on translating the next bit of pseudocode to pass the next test.

If it fails, try to figure out why it's still failing and modify your code accordingly.

When you've passed each test, give yourself a pat on the back! Then take a break before trying to refactor. It's good to give your eyes a rest so they can more easily see places to improve.