Which of the following is NOT a recommendation for naming
functions/methods?
a. The name should reflect what the function/method does.
b. Names should be consistent across the entire code base.
c. The name should reflect how the function/method is
implemented.
Which of the following statements best describes optimal clean
code?
a. The design that minimises effort to read and change the code
is optimal as it enables programmers to evolve the programs as
requirements change.
b. The design that includes the most clever programming tricks
is optimal as it minimises the total size of the source code.
c. The shortest possible code (that minimises the number of
characters across all source files) is optimal, as it takes the
least time to write and read.
d. The design consisting of one class is optimal as it minimises
dependencies and cognitive effort required to locate code.
e. The design that maximises coupling is optimal as it tightly
integrates the code in the classes.
f. The design consisting of a large number of classes each with
five or less methods is optimal, as it minimises the cognitive
effort required to understand each class.
d. The name should favour clarity over length.
Which of the following is NOT a recommendation for naming functions/methods? a. The name should reflect what the functio
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am