Bad Smells in Code
&
Refactoring
PART A DUE:
11:59PM, Wednesday 17 October 2012
PART B DUE:
11:59PM, Friday 19 October 2012
10 points
Goal: This Discussion Assignment asks you to practice concepts related
to Refactoring.
Problem Statement:
Fowler describes numerous "bad smells" in code
in Chapter 3 of his book on refactoring.
Your job is to find bad smells in a program that
implements the Cave Game, and suggest refactorings
to remove the smells.
Task:
-
Develop a list of bad smells in the
CaveGame.java
program.
The list should identify the portion of smelly code,
classify the code according to Fowler Ch. 3,
and justify including this item on the list.
Also, suggest appropriate refactorings for each identified code smell.
-
Discuss this with the other members of your topic forum.
See if your discussion group can reach a consensus on this issue.
Part A (5 points)
- Part A consists of your initial suggestions to the group
- This must be more than
"Me, too!"
or "Sounds good!"
Be sure to clearly state the reasons or rationale behind your
suggestions.
If you have access to facts or other opinions that
support your opinion, cite those references.
Part B (2 + 3 = 5 points)
- Part B consists of responses to the initial posting (2 points) and the final group posting to the Main topic forum (3 points).
- This posting should include
a combined list of the smells and associated refactorings in the
CaveGame.java
program.
You may describe areas where you are in agreement
and those where you are not.
- If you include quotation or thoughts from other sources,
be sure to cite them appropriately
(author, title, publisher, page, etc.).
- You may use HTML within these messages.