A Comprehensive List of RB109 Practice Problems & Other Tips
This article is meant to provide you with tons of practice problems to help you prepare for the RB109 Written and Live assessments so I won’t reiterate what Launch School and other students have said many times other than a few helpful tips:
- Don’t operate in a bubble. Attend study sessions and find other students to study with (post in the
#101-109-study-groupin Slack). Plus it’s a great way to meet other students!
- Create a repository of clear and concise definitions of all concepts, methods, etc listed in the study guide. You can reference this when you’re taking your Written assessment.
- Create your own code examples to help reinforce concepts and truly test your understanding.
- Embrace the process. You will encounter peaks, troughs, and plateaus through your Launch School journey. Embrace them, identify your gaps, and don’t hesitate to slow down or go back.
- You’ll know you’re ready to take each assessment when you can answer questions quickly and calmly while touching on all of the main points.
Preparing for the Written Assessment
Preparing for your first assessment is probably going to be intimidating. You might realize you have some gaps in your knowledge or you struggle to remember syntax or even how to clearly articulate your thoughts.
All of the resources provided by Launch School and the students were created to help you succeed.
If you haven’t already, I’d recommend you read the following articles before diving into my practice problems:
- The 109 Study Guide and all linked articles. Review all of the concepts listed in the study guide.
- Srdjan’s 4-part blog series: Part 1, Part 2, Part 3, Part 4
- Callie’s article on how to prep for the assessment
Below the example, I’ve linked to a list of problems that you can work through and write out what the code is doing line-by-line. Your goals for answering each example are: What does the code output and/or return? Why? and What concept does the example demonstrate?
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]new_array = arr.select do |n|
n + 1
line 6will output an array
[1, 2, 3...10]and return an array
[1, 2, 3...10]
line 1we initialize the local variable
arrand assign to it an
Arrayobject with integers
line 3we initialize the local variable
new_arrayand assign it to the return value of:
lines 3-5we invoke the
selectmethod on the local variable
arrand pass in the
do..endblock as an argument. As the select method iterates over each element in the array, it passes it to the block parameter
n. The code on
n, but nothing is done with this.
- This problem demonstrates the concept of truthiness. The
selectmethod returns a new array based on the return value of the block. If the return value evaluates to
truethen the element is selected. Since everything in Ruby is truthy other than
nil, the code on
line 4evaluates to
Did some of this make sense? None of it? You’re going to learn so much while you’re preparing for the assessment that you’ll surprise yourself when you look back on this problem in a week or two.
I hope you enjoy these problems as much as I did:
How did I know when I was ready to take the written assessment? I was comfortable answering any of the practice questions in less than 7–8 minutes max (you should be able to answer between 4–6 minutes on average).
Preparing for the Live Assessment
Thanks to Megan Turley for seeding the initial documents below. I cleaned them up, linked to relevant videos, and added other helpful information where possible.
I found it best to work through these problems and then compare answers with other students. Live coding study sessions with other students are also helpful in preparing you for the assessment — you’ll need to verbalize your PEDAC process and troubleshoot along the way. I estimate I studied with other students between 20–25 hours.
As you work through these problems take some time to learn new methods that you might come across in other student’s answers. One of my favorite methods is
I hope you found some value in this article and the accompanied docs and I look forward to seeing you in future courses!
P.S. let me know if there’s an error above.