Week1 at Makers

Week 1

Peer

9.30am we meet with our peer groups. These should run stand-up style to discuss what we did yesterday and intend to do today, as well as a source of connection and support.

Week 1 peer group check-in topic

Tues

  • What do you think a peer group is for?
  • What do you want to use your peer group for?

Wed

  • What’s a priority in your life?

Thurs

  • What traits in a person do you find challenging? How do you usually handle it?

Fri

  • Name a highlight and a challenge that you experienced this week? How did you deal with the challenge?

The Golden Square Challenges (Solo & Pairs)

Phase One: Testing Bites

Work through this series of exercises designed to help you learn how to write tests with RSpec.

Phase Two: Skill Challenges

Work through this series of challenges designed to help you learn a strong test-driving, object-oriented design, and debugging practices.

Some of these challenges include Process Feedback Challenges, in which you record yourself performing the task and share it with your coach for feedback. These are tagged with a 📡.

  1. Create Your Project
  2. Test Drive a Single-Method Program(Exercise, Challenge)
  3. Design a Single-Method Program 📡(Design single method recipe template, Exercise One, Exercise Two recipe, Exercise Two, Challenge recipe, Challenge)
  4. Intermezzo: Debugging 1(Exercise One, Exercise Two, Challenge)
  5. Test Drive a Class(Exercise, Challenge)
  6. Design a Class 📡(Design a class recipe template, Exercise recipe, Exercise, Challenge recipe, Challenge)
  7. Intermezzo: Debugging 2(Exercise, Challenge)

Notes

    1. Password Checker (Challenge from Testing for errors)
1
2
3
4
  it "should return NoMethod erron when the password is integer" do
    password_checker = PasswordChecker.new
    expect{password_checker.check(123)}.to raise_error(NoMethodError)
  end

Which can pass the test, but the below is not:

1
2
3
4
5
  it "should return NoMethod erron when the password is integer" do
    password_checker = PasswordChecker.new
    result = password_checker.check(123)
    expect{result}.to raise_error(NoMethodError)
  end

The reason is the result will be assign to “NoMethodError”, so that can not go to the next step. But the first one we catch the error at the mean time.

    1. Gratitudes(Challenge from Testing Classes with Equality)
1
2
3
4
5
6
  it "should reply grateful for sunshine when the format method is called" do
    gratitude = Gratitudes.new
    gratitude.add("sunshine")
    result = gratitude.format
    expect(result).to eq "Be grateful for: sunshine"
  end

Which can pass the test, but the below is not:

1
2
3
4
5
  it "should reply grateful for sunshine when the format method is called" do
  gratitude = Gratitudes.new
  result = gratitude.add("sunshine").format
  expect(result).to eq "Be grateful for: sunshine"
end

The reason is because the format method which is defined by ourself, we can not use it in the chain method. If we use the method which ruby defined already, which should be fine. Rewrite like this:

1
2
3
4
5
 it "should reply grateful for sunshine when the format method is called" do
  gratitude = Gratitudes.new
  result = gratitude.add("Sunshine").push("hi").join(" ")
  expect(result).to eq "Sunshine hi"
end

And it pass the test.

updatedupdated2022-11-122022-11-12