Mini-assignment: More on Refactoring
- Due 3 Mar 2023 by 17:59
- Points 1
- Submitting a text entry box, a website url, or a file upload
Small group assignment
Create a table with at least one entry per group member where you describe a refactoring and your experience with it in terms of effort (low/medium/high), how often you have used it (never/rarely/often), and the outcome (in a few words). You can use the Wikipedia page on refactoring Links to an external site. for guidance and consistent terminology. Note that the list on the Wikipedia page is not comprehensive by any means.
You can estimate the effort and outcome if you have not used a given refactoring before.
Use this table to capture some of your experience at the beginning of (or early in) the last assignment. It may help you to guide your choice in the task there, whether to choose a refactoring or a different issue to work on.
Example:
Refactoring | Effort | How often used | Outcome |
Rename field | low | often | more consistent naming, better readability |
Extract method | ... | ... | ... |
Change static fields to singleton instance | high | rarely | makes code thread-safe; high effort due to having to rewrite much code to manage state and pass reference to given (singleton) object instance |
Do not copy the last item into your table unless you have something significant to add based on your own experience or insight.
Points
This exercise is mandatory but will not be graded. The intention is to make you reflect on refactorings that you have used, or to look into a few refactorings and estimate what their effort and outcome may be.
Lecture
Video
Lecture recording (16:11)