Closed iamjamestan closed 3 years ago
It's not based on what things are good/bad for code quality.
SLAP is good e.g., it makes the code easier to read
Coupling is bad e.g., it makes the code harder to maintain/test
EDIT: deleted not
@damithc I believe why James was confused was because he wasn't sure what "code quality" is meant to mean, when in this case it merely pointed to bad practices. In the finals it would be more explicit right? I think students may be confused on this front, including myself.
@damithc I believe why James was confused was because he wasn't sure what "code quality" is meant to mean, when in this case it merely pointed to bad practices. In the finals it would be more explicit right? I think students may be confused on this front, including myself.
Yes, I'll make sure it is stated clearly in the exam questions.
It's not based on what things are good/bad for code quality. SLAP is good e.g., it makes the code easier to read Coupling is bad e.g., it makes the code harder to maintain/test
Hi @damithc, I belive your reply is referring to increasing SLAP and increasing coupling. But how do we infer from this question that your intention was to refer to increasing? i.e increasing magic literals reduce code quality, decreasing magic literals improve code quality etc? Just nice for this question looking at the decreasing / increasing should yield the same answer however that is not true in general.
It's not based on what things are good/bad for code quality. SLAP is good e.g., it makes the code easier to read Coupling is bad e.g., it makes the code harder to maintain/test
It should have read:
It's
notbased on what things are good/bad for code quality.
Sorry for the typo.
Hi @damithc, I belive your reply is referring to increasing SLAP and increasing coupling. But how do we infer from this question that your intention was to refer to increasing? i.e increasing magic literals reduce code quality, decreasing magic literals improve code quality etc? Just nice for this question looking at the decreasing / increasing should yield the same answer however that is not true in general.
🤔 Hmm... Think of drugs ruin lives. No ambiguity right? magic literals reduce code quality should be clear too? :-)
In this question, I got the correct answer of "2", and my rationale was "a and d" since Magic Numbers and SLAP are mentioned in the code quality section in the textbook here.
However, from the general comments below, it mentions that "a c" should be the correct rationale instead. May I ask how does coupling reduce code quality as stated in the question? My impression is that coupling is not related to code quality since it is under the design fundamentals section of the textbook. Thank you!