MCQ Bank
When you add function, however, things are more open ended as you will add tests and break existing tests. The adding function hat is more stressful and riskier, so it's nice to wear the ______________ hat as much as possible.
- A) refactoring
- B) coding
- C) testing
- D) analysis
When you're wearing the refactoring hat, every change you make preserves observable behavior, keeps the tests green, and allows you to make many small changes without going near a ________________.
- A) assembler
- B) debugger
- C) compiler
- D) console
______________ allow you to change the implementation separately from the interface.
- A) Objects
- B) Variables
- C) Arrays
- D) Operators
In fixing bugs much of the use of refactoring comes from making ______________ more understandable.
- A) requirements
- B) code
- C) use case
- D) test case
All the smells in _______________ contribute to excessive coupling between classes or show what happens if coupling is replaced by excessive delegation.
- A) bloaters
- B) change preventers
- C) couplers
- D) dispensables
There are _______________ categories of code smells.
- A) six
- B) five
- C) four
- D) three
Refactoring can lead to simpler designs without sacrificing _______________.
- A) availability
- B) flexibility
- C) usability
- D) security
Clean code contains a minimal number of ______________ and other moving parts.
- A) pointers
- B) arrays
- C) classes
- D) loops
A _______________ is something pointless and unneeded whose absence would make the code cleaner, more efficient and easier to understand.
- A) change preventer
- B) bloater
- C) dispensable
- D) coupler
Fowler’s book assigns "names" to refactorings in the same way that the GoF’s book assigned "names" to _________________.
- A) patterns
- B) arrays
- C) structures
- D) functions
Refactoring has a special role as a complement to ________________.
- A) design
- B) test case
- C) maintainability
- D) use case
Performance optimizations often involve making ________________ harder to understand (but faster!)
- A) requirements
- B) use case
- C) test case
- D) code
Clean ______________ is easier and cheaper to maintain.
- A) UML
- B) use case
- C) test case
- D) code
In _______________, the external behavior of the system does not change.
- A) reinforcement
- B) refactoring
- C) reworking
- D) rewriting
There are _______________ bad smells in change preventers.
- A) three
- B) two
- C) five
- D) four
There are ______________ bad smells in object-orientation abusers.
- A) six
- B) four
- C) three
- D) five