Cyclomatic complexity (McCabe, 1976) counts the independent paths through code by counting decision points (if, while, for, case, &&, ||) and adding one. A function with no branches has complexity 1; each branch adds to it. High cyclomatic complexity means more paths to test and reason about, correlating with defect rates and maintenance difficulty. Many teams flag functions above ~10 for refactoring. It directly informs test coverage: you need at least that many test cases to exercise every independent path.
2 / 5
How does cognitive complexity differ from cyclomatic complexity?
Cognitive complexity (introduced by SonarSource) was designed to better reflect human readability rather than testability. A flat switch statement has high cyclomatic complexity but is easy to read, so cognitive complexity scores it low. Conversely, deeply nested conditionals are hard to follow, so cognitive complexity penalizes nesting heavily. It also penalizes flow-breaking jumps (break, continue, goto). The two metrics are complementary: cyclomatic tells you how many tests you need; cognitive tells you how painful the code is to maintain.
3 / 5
In the SOLID principles, what does the "S" (Single Responsibility Principle) state?
The Single Responsibility Principle states that a module should have one reason to change — it should serve a single actor or concern. If a class handles both report formatting and database persistence, then a change in reporting requirements and a change in storage both force edits to the same class, increasing the risk of breakage and merge conflicts. Splitting responsibilities yields smaller, more cohesive, independently testable units. SOLID is Single responsibility, Open-closed, Liskov substitution, Interface segregation, and Dependency inversion.
4 / 5
What is the difference between coupling and cohesion?
The classic design goal is low coupling, high cohesion. Coupling is the degree to which one module depends on the internals of another — tightly coupled modules break each other when changed, so you want loose coupling (depend on stable interfaces, not implementations). Cohesion is how focused and related the elements within a module are — a highly cohesive module does one well-defined thing. A well-designed system has modules that are internally cohesive but externally loosely coupled, making them easier to change, test, and reuse independently.
5 / 5
What does it mean to pay down "technical debt interest"?
The technical debt metaphor (Ward Cunningham) frames shortcuts as borrowing: you ship faster now but owe later. The interest is the recurring extra cost the debt imposes on every subsequent change — slower features, more bugs, harder onboarding. Unlike principal (the cost to fix it once), interest compounds the longer the debt remains. This framing helps teams prioritize: debt in frequently-changed, high-traffic code has high interest and should be paid down first; debt in stable, rarely-touched code may be fine to leave. A debt register makes this trade-off explicit.
What does the "Code Quality Engineering" vocabulary exercise cover?
This exercise tests real IT vocabulary related to code quality engineering 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.