Refactor, Refactor, Refactor!

  • Duplicates
  • Functions and variables with unclear names
  • An excessive amount of text in one method
  • A superfluous amount of comments
  • Incorrectly formatted code fragments
  1. Getting rid of duplicated code
  2. Breaking up a long method into smaller pieces by extracting new methods from sections of the lengthier method
  3. Breaking up a class that has too many responsibilities into smaller, more targeted classes or subclasses
  4. Moving methods from a class to another. Often this is done so the methods reside in the same class as the data they operate.

--

--

Penultimate CS Student @ University of Indonesia

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fikri Adidharma

Fikri Adidharma

Penultimate CS Student @ University of Indonesia