Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 20 pages
Exam (elaborations)

Clean Code Set 2 Questions and Answers

Document preview thumbnail
Preview 3 out of 20 pages

Clean Code Set 2 Questions and Answers

Content preview

Clean Code | Set 2 Questions and Answers with 100% Correct
Answers | Latest Version

Question 1.
messy code is okay to meet a deadline. You can clean it up later (true/false)

Correct Answer: false!


Question 2.
names should vary in small ways (true/false)

Correct Answer: false!


Question 3.
duplicate code can often be eliminated with a function (true/false)

Correct Answer: true!


Question 4.
attributions in the code can be useful (true/false)

Correct Answer: false!


Question 5.
interspersed comments make the code easier to read (true/false)

Correct Answer: false!


Question 6.
variables should be kept private so others cannot depend on them (true/false)

Correct Answer: true!


Question 7.
exceptions should provide context to determine the source and location of an error
(true/false)

Correct Answer: true!


Question 8.
challenges with third party software include: (select all that apply)
- learning the third party software
- integrating the third party software
- third party vendors must share our domain terms
- third party software must be rewritten using our domain terms

Correct Answer: - learning the third party software
- integrating the third party software!

,Question 9.
readability is the key to clean tests (true/false)

Correct Answer: true!


Question 10.
methods that manipulate more instance variables are more cohesive (true/false)

Correct Answer: true!


Question 11.
a parallel redesign is usually required to fix messy code (true/false)

Correct Answer: false!


Question 12.
use number series (a1, a2,... aN) to distinguish names (true/false)

Correct Answer: false!


Question 13.
a function that handles errors should do nothing else (true/false)

Correct Answer: true!


Question 14.
details should appear at the top of the file before the high-level concepts (true/false)

Correct Answer: false!


Question 15.
chains of method calls make code easier to read (true/false)

Correct Answer: false!


Question 16.
returning a special case object is preferred to returning null (true/false)

Correct Answer: true!


Question 17.
the provider of third party code and the user of the provided interface have a tension
related to different objectives (true/false)

Correct Answer: true!


Question 18.
in TDD, you write all of the tests before you write any code (true/false)

, Correct Answer: false!


Question 19.
smaller classes are easier to comprehend and test (true/false)

Correct Answer: true!


Question 20.
productivity decreases asymptotically to zero over time with messy code (true/false)

Correct Answer: true!


Question 21.
comments that explain intent behind a decision can be useful (true/false)

Correct Answer: true!


Question 22.
dummy scopes/bodies do not need to be visible (true/false)

Correct Answer: false!


Question 23.
data structures and objects provide similar capabilities (true/false)

Correct Answer: false!


Question 24.
one boundary of our systems is the interface to third party software (true/false)

Correct Answer: true!


Question 25.
tests lessen the fear of making changes to the code (true/false)

Correct Answer: true!


Question 26.
classes should begin with a list of public static constants if any (true/false)

Correct Answer: true!


Question 27.
keeping code clean at all times is not a cost effective solution (true/false)

Correct Answer: false!

Document information

Uploaded on
September 8, 2026
Number of pages
20
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Favorgrades
3.8
(193)
Sold
830
Followers
376
Items
53697
Last sold
2 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions