DEV Community

kealanheena
kealanheena

Posted on • Updated on

Weekend Challenge - Airport

So over the weekend, we were given the challenge of making an airport programme. It had to consist of classes and methods, we had to write an RSpec file for it too. This wasn't too hard tho because it was similar to the Boris bike challenge. The weekend challenges seem to build what we learned throughout the week, which ensures we fully understand the things we learned and lets us know what we need to work on.

I didn't have too much trouble with this challenge. I think I need to get used to RSpec and classes mainly. I got everything done except preventing the plane from landing in a different airport if it was already another airport. Which I realised in the morning was because I should've put the land in the plane class. I seem to be struggling with splitting up the classes which I'll work on this week.

We also did pair-reviews on Monday which was helpful because I got a chance to see how someone else did the challenge and some of their code could’ve solved my problem. It was refreshing getting a different perspective on the same challenge. They also showed me the "before" block in RSpec which would have stopped me repeating myself so much. The "before" block runs the code in it before doing the tests under it. I think this is a brilliant way of checking your code because it can reveal any blind spots.

Top comments (0)