Practice Elixir & Phoenix developer English through realistic code review scenarios: JWT authentication with Guardian, rate limiting with Hammer, Ecto queries, and OTP GenServer design discussions.
0 / 5 completed
1 / 5
Liam: 'Just finished implementing the new user authentication flow. Using Phoenix’s `Guardian` module for JWTs and added a simple rate limiting middleware to protect against brute force attacks. Looks good!'
During code review, your colleague, Maya, comments: ‘I'm seeing you're using `Guardian`. Could you elaborate on the specific configuration options you’ve set for it? Specifically, I want to understand how you handled expiry times and what rate limit you’ve applied.’
Which of the following responses best addresses Maya’s concerns?
The correct answer highlights the importance of explicitly stating configuration choices. Maya isn't questioning whether Guardian is *appropriate* (option A), but rather *how* it was configured. Options B, C, and D present overly simplistic or misleading statements – implying automatic behaviour where there isn’t one, or a lack of understanding about core settings like expiry times and rate limits within the `Guardian` module. Understanding these specifics demonstrates proactive communication and attention to detail during code review.
2 / 5
Sarah: ‘Hey team, just merged the new user authentication flow into Phoenix. It’s using JWT for tokens and a dedicated schema in Postgres. Let me know if you spot any issues!’
During a code review, Mark comments:
‘Could you explain why we’re persisting the entire JWT payload instead of just the user ID? Seems like a potential security risk if this data gets exposed.’
This question tests understanding of secure coding practices in Elixir/Phoenix. While persisting the entire JWT payload isn't inherently wrong, it’s generally considered a security risk because it exposes more data than strictly necessary. The key here is recognizing that exposing sensitive information—even if intended for future use—can create vulnerabilities. Mark's comment highlights this concern effectively.
3 / 5
Liam: "Hey team, just finished implementing the new user profile endpoint. It uses Phoenix’s Repo to fetch data and Ecto.Query to filter by ID. I've added comprehensive tests for all scenarios."
This comment demonstrates a good start, showing Liam’s use of Phoenix tools. However, it's missing crucial elements for a code review. A strong response would highlight the importance of validating request payloads (to prevent bad data), and discussing error handling and logging mechanisms—a developer should always consider how failures will be managed and tracked. The comment also doesn't address potential performance bottlenecks or database interactions.
4 / 5
Sarah: 'Hey team, just finished implementing the new user authentication flow using Phoenix’s Guardian. I've added rate limiting with Hammer to prevent brute-force attacks and ensured proper logging of all failed attempts. The API endpoint now returns a 401 Unauthorized if credentials are invalid after three attempts, followed by a 429 Too Many Requests after six. I’m using the Ecto.Repo for database interactions.'
Which of the following best summarizes Sarah's update during a code review?
This question tests understanding of common phrasing used when describing a completed implementation during a code review. The key here is that Sarah is detailing *what* she did and *why*. Option A is incorrect because rate limiting is explicitly mentioned. Option C is wrong as it misrepresents the focus; authentication logic is implied, not stated directly. Option D also misses the crucial point about how Hammer contributes to security – preventing abuse.
5 / 5
Sarah: ‘Hey team, just pushing a PR with the new user authentication flow. Using Phoenix's live_view to handle real-time updates and integrating with our existing Guardian service. Let me know if you spot any issues!’
During code review, your colleague, Mark, comments: ‘Could you explain the rationale behind using a separate Guardian service instead of directly hashing passwords in the live view? It seems like a potential security risk.’ Which response best addresses Mark's concern and aligns with best practices?
This question assesses understanding of security best practices within Elixir/Phoenix development. Option 2 is incorrect because directly hashing passwords in a live view is indeed a significant security risk – it exposes the password hash to potential vulnerabilities. Option 1 dismisses Mark's concern without justification and doesn’t highlight the benefits of abstraction. Option 3 accurately explains why decoupling authentication logic into a separate service, like Guardian, improves flexibility and adds a crucial defense against attacks, while option 4 is a completely inappropriate response demonstrating a lack of awareness.
What does the "Elixir & Phoenix Code Review English" vocabulary exercise cover?
This exercise tests real IT vocabulary related to elixir & phoenix code review english through 5 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 5 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.