Master Ruby on Rails conventions with this intermediate level vocabulary: MVC architecture, ActiveRecord associations (one-to-many, many-to-many), RESTful routes, and the use of factories for testing and development, covering core design patterns.
0 / 10 completed
1 / 10
Sarah: ‘Hey team, I’ve just merged this PR with the new payment gateway integration. It should significantly improve transaction success rates for our mobile users.’
During the code review, Mark comments: ‘Could you elaborate on how this impacts the existing error handling? Specifically, are we logging all failed transactions differently now?’
This question assesses understanding of proactive communication in a code review. Mark's comment isn’t simply checking if the PR works; it’s seeking clarification on a potential impact—specifically, how the new payment gateway affects existing error handling and logging practices. The correct response acknowledges this focus on broader implications, not just the immediate functionality of the merged code. Options A, C, and D all represent missed opportunities to engage in more thorough feedback.
2 / 10
Sarah: 'Hey team, just finished implementing the new user authentication flow. Using Devise and JWT for token generation. Looking good so far!'
During code review, your teammate Mark comments: ‘Could you add a unit test to verify that the `token_expiration` is correctly set based on the user's account age?’
Which of the following responses best addresses Mark’s feedback?
This scenario presents a common code review situation. The incorrect options often reflect either a lack of understanding about unit testing best practices (option 1) or a reluctance to engage with feedback (option 2). Option 3 demonstrates proactive engagement and knowledge application – specifically mentioning Devise's expiration strategy shows an understanding of the underlying technology and a commitment to security, which is crucial in authentication. Option 4 highlights a potential issue of not being familiar with the chosen tools and suggests abandoning established practices.
3 / 10
Sarah: ‘Hey team, just finished implementing the new API endpoint for user profile updates. It’s using Rails’ ActiveRecord association to sync data between the database and the front-end. Let me know if you spot any issues!’
During a code review of David's changes, which response best reflects constructive feedback regarding this update?
Option A: ‘That sounds great! Just make sure it’s fully tested.’
Option B: ‘Could you elaborate on how the association is handled? I’m wondering if we should consider using a separate service object to decouple the front-end from the database logic, perhaps for better scalability in the future?’
Option C: ‘The API endpoint works perfectly. No further action required.’
Option D: ‘Did you implement any error handling? It’s crucial to gracefully handle potential data validation failures.’
This question assesses understanding of nuanced feedback during a code review. Option B demonstrates proactive questioning about architectural choices (service objects) and scalability – something an intermediate developer should consider. Options A and C are too simplistic and don't probe for deeper technical concerns. Option D correctly highlights a critical aspect, but the primary focus here is on strategic design discussion, not just basic error handling.
4 / 10
During a code review for the user authentication service, Sarah comments on this PR description:
PR Title: Implement Two-Factor Authentication (2FA)
Description: Adds support for 2FA using TOTP. Includes logic for generating codes and verifying against user's device.
Which of the following responses best reflects a constructive and professional way David, the lead developer, could reply to Sarah’s comment?
Option A: "Sounds good. Just make sure we're logging enough detail for auditing purposes."
Option B: “This is a great start! Could you add more details about how the codes are stored securely and what happens if a user loses access to their device?”
Option C: “I’m not entirely clear on this. Can you explain the TOTP algorithm in simpler terms for me?”
Option D: "Okay, let's just stick with the basic implementation for now; we can add more features later."
The best response (Option B) demonstrates a collaborative and thorough approach to code review. David is asking clarifying questions about security considerations – a critical aspect of authentication – and proactively ensuring future-proofing. Options A and D are too brief or dismissive, while Option C requests an explanation that may not be necessary at this stage; David's goal should be to ensure the *implementation* meets requirements, not necessarily to understand the underlying algorithm itself.
5 / 10
During a code review of a new feature for user authentication, Sarah comments on the PR:
‘This implementation uses `bcrypt` for password hashing. While functional, it doesn't explicitly handle salting. Consider adding a random salt to each password before hashing to improve security against rainbow table attacks.’
Which of the following best describes Sarah’s comment regarding the PR?
Sarah's feedback isn't about rejecting the PR outright or dismissing bcrypt. Instead, she’s proposing an important security best practice – salting passwords before hashing. Adding a random salt prevents attackers from pre-computing hashes (rainbow tables) and dramatically increases the difficulty of cracking passwords. The key here is understanding that 'enhancement' in this context refers to strengthening the code against known vulnerabilities.
6 / 10
During a standup update, David says: 'I've been working on optimizing the database queries for the reporting service. I refactored the existing `UserStats` model to use eager loading and indexed columns. This should dramatically reduce query times.' Which of the following best describes David's action regarding performance?
Eager loading is a key Rails optimization strategy. It avoids the 'N+1' problem – where a single database query triggers multiple queries to fetch related records. Indexed columns are used for faster lookups, but aren't directly related to eager loading itself. Caching isn't mentioned in David's description.
7 / 10
You receive the following Slack message from a junior developer, Liam: 'Just pushed a fix for the broken image upload functionality. I used CarrierWave to handle the file uploads and added some error handling to catch invalid file types.' What does Liam primarily use in this scenario?
CarrierWave is a popular Ruby on Rails gem specifically designed for managing file uploads. It handles many aspects automatically – validation, storage location, security, and more. It's not an ORM or testing framework; those have different purposes.
8 / 10
Sarah writes the following PR description for a new feature:
'This commit implements a background job using Sidekiq to process large CSV imports. The job reads the CSV file, transforms the data, and inserts it into the database. This prevents long-running operations from blocking the main web server.' What is the primary benefit of using Sidekiq in this scenario?
The key benefit of using a background job system like Sidekiq is *asynchronous* execution. This means that the CSV import processing happens in the background without directly affecting the responsiveness of the main web server – crucial for maintaining application performance.
9 / 10
Mark comments on a code review: 'This endpoint uses `params[:id]` directly to access the user record. It's not robust against potential SQL injection attacks.' What is Mark primarily pointing out?
Mark is raising a critical security concern: SQL injection vulnerabilities. Directly embedding user input into database queries without proper sanitization or escaping makes your application vulnerable to malicious attacks. Parameterization helps mitigate this risk.
10 / 10
During a code review, Emily asks: 'Could you explain the rationale behind using `sanitize` on all user input before displaying it in the view?' What is the primary purpose of this practice?
Sanitization is the process of cleaning user-provided data by removing or escaping potentially harmful characters and tags. This is essential for preventing Cross-Site Scripting (XSS) attacks, where attackers inject malicious scripts into a website viewed by other users.
What does the "Ruby On Rails Conventions" vocabulary exercise cover?
This exercise tests real IT vocabulary related to ruby on rails conventions through 10 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 10 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — browse the full vocabulary exercises hub to find related modules covering adjacent IT topics and roles.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.