Chapter 54. Learn Your IDE to Reduce Cognitive Load
Trisha Gee
I work for a firm that sells IDEs, so of course I’m going to say you should know how your IDE works and use it properly. Before that, I spent 15 years working with multiple IDEs, learning how they help developers create something useful and how to use them to easily automate tasks.
We all know IDEs provide code highlighting and show errors and potential problems, but any Java IDE can do so much more than that. Learning what your IDE is capable of and using the features that apply to your daily work can help level up your productivity.
For example, your IDE:
-
Can generate code for you so you don’t have to type it. Getters and setters,
equalsandhashCode, andtoStringare the most frequent examples. -
Has refactoring tools that can automatically move your code in a particular direction while keeping the compiler happy.
-
Can run your tests and help you debug problems. If you’re using
System.outfor debugging, it’s going to take you much longer than if you’re inspecting the values of objects at runtime. -
Should integrate with your build and dependency management system so your development environment works the same way as your testing and production environments.
-
Can even help you with tools or systems external to your application code—for example, version control, database access, or code review (remember, the ...