This course will introduce you to refactorings and the IDE features that will help you to perform them in an effective way. You will learn to recognize refactoring opportunities in code and to deal with them. Using automatic IDE refactorings, you will transform code to improve its structure, readability, and maintainability.
The course consists of 8 sections. Each section focuses on one group of refactorings and provides brief theory and several small tasks for practice. We will move on from small local refactoring changes to more complex ones, which affect the entire project architecture.
Topics covered:
- refactoring definition;
- code quality and code smells;
- kinds of refactoring techniques;
- IDE refactoring features;
- code style and formatting;
- code style schema and EditorConfig;
- automatic formatting using IDE;
- naming rules;
- rename refactoring;
- move refactoring;
- pull up and push down refactoring;
- extract refactoring;
- inline refactoring;
- design patterns and their relationships with refactoring.
Before starting this course, check the following requirements.
- Your computer needs to have a stable internet connection.
- Git version control system needs to be installed on your computer (link to the git site: https://git-scm.com/).
- Make sure that the path to the root folder of the course does not contain spaces, special characters, or non-Latin characters.
- Make sure that you use the IntelliJ IDEA with version at least
2023.1.1
. - Make sure that you use the EduTools plugin with version at least
2023.1
.
The course is integrated into the IntelliJ IDEA IDE, which has a free Community license. You can use this license to complete the course. If you have some troubles with the course installation, feel free to contact us by email at education@jetbrains.com.
This course is available on JetBrains Marketplace and can be installed from the IntelliJ IDEA IDE directly, but you can also use it in the Course Creator mode or create a course archive from the source code.
You can create a course preview from the source code:
-
Clone the repository:
git clone https://github.com/jetbrains-academy/refactoring-course.git
-
Build the project:
./gradlew build
-
Install the EduTools plugin from JetBrains Marketplace.
-
Create a new course preview.
You can create a course archive from the source code:
-
Clone the repository:
git clone https://github.com/jetbrains-academy/refactoring-course.git
-
Build the project:
./gradlew build
-
Install the EduTools plugin from JetBrains Marketplace.
-
Create a new course archive.
To run tests locally, you just need to build the project and run the following command:
./gradlew test
The tests use the Java Reflection API under the hood to check the user's tasks.
If you have questions about the course or the tasks or if you find some errors, you can ask questions and participate in discussions in repository issues.
Please be sure to review the project's contributing guidelines to learn how to help the project.