20 Things Developers Love About IntelliJ IDEA
It’s IntelliJ IDEA’s 20th birthday this year! To celebrate, we put together a list of 20 things developers love about IntelliJ IDEA. Creating this list was hard! It was impossible to select only 20 features that people liked about IntelliJ IDEA, so you’ll see we cheated and came up with 20 categories that may, or may not, include more than one feature. It’s clear from our developer interview series that different developers like different things about the IDE. There should be something for everyone in this list, but if there’s something we missed, add it in the comments!
IntelliJ IDEA understands the shape of our projects and either provides the functionality we need out of the box, or suggests a plugin that supports our files.
When we’re coding, IntelliJ IDEA suggests improvements or alternatives, or warns us when our code needs some attention. We can use inspections to detect potential problems, and IntelliJ IDEA also usually offers a correction for this too. We can use Alt+Enter to show intention actions, where IntelliJ IDEA suggests alternatives, for example switching between a traditional for-loop and a Streams operation.
IntelliJ IDEA can also do clever things like automatically add imports for required classes when we paste in code from elsewhere, and not only does it detect duplicate code, but it can also detect code that’s a little bit like the code we’re going to extract into a method, and suggest creating a method that lets us remove more almost-duplicated code.
Another clever thing that sometimes looks like magic is IntelliJ IDEA’s data flow analysis, which can tell us really useful things, like when a variable will never contain a null, or where its value will always be within some range.
Of course all the features are helpful to someone! But there are some things which are just so helpful that we miss them enormously in other applications.
⌥⏎ (macOS), or Alt+Enter is probably the most-used most helpful keyboard shortcut, where IntelliJ IDEA suggests different, often better, ways of doing things.
Then there’s the clipboard history, where we can copy multiple things and paste them in a different order, or come back to something that we copied ages ago but need right now.
The latest versions of IntelliJ IDEA are even more helpful. We can download our JDK (and keep it up to date) from right inside the IDE, and it will also suggest downloading Git if we don’t already have that installed.
Java <-> Kotlin converter is definitely one of my best, it made learning Kotlin very easy for me coming from a Java background.
I just do something in Java, convert to Kotlin, Boom! I now know how it's done. 🤯#IJBday20
— A Man of Many Syntax (@TeenMutantCoder) January 18, 2021
The state of flow is so important to creative productivity. IntelliJ IDEA is designed to help us stay in the flow. For example, when we’re sketching out the shape of our code but don’t want to get into the details of implementation, we can get IntelliJ IDEA to generate stub code that compiles, so we can continue to focus on the bigger picture.
#IJBday20 I'm using inline variable and extract variable all the time, almost couldn't do without it at this point!
— TheDeeKoy (@TheDeeKoy) January 18, 2021
We can use Zen Mode or Distraction Free Mode to help us to focus on just the code and to help us to stay in the zone, or we can maximize the editor. We can tune the display to remove any UI elements that might get in our way, and then use IntelliJ IDEA’s powerful keyboard shortcuts and search (like search everywhere or Find Action) to easily find or do anything without having to lift our fingers off the keyboard. We can use TODO lists and scratch files to help us to see where we were and what we planned to do next. And we can even use recent files or recent locations to remind us of our current context, so we can get straight back to what we were doing.
CMD+SHIFT+A: Find action. And I always find what I need #IJBday20
— Antonio Goncalves (@agoncal) January 18, 2021
One of the comments that kept coming up in the interview series was "it just works". Some examples were: opening Maven or Gradle projects and not having to provide additional configuration, and working within polyglot projects and being able to seamlessly switch between languages in the same IDE.
Multi-language support. One of the largest backend repo I've worked with was mixed with Python, Java, and Scala. Being able to navigate and edit in a single project was a big win.#IJBday20
— Bo (@eniton) January 18, 2021
Convention over Configuration
Although IntelliJ IDEA is powerful and extremely configurable, as users we aren’t faced with lots of configuration options in order to get started. One example is how IntelliJ IDEA will use the Maven or Gradle build configuration files to correctly set up the IDE project, there are no additional settings to specify. As users, we can assume the IDE will do the right thing under normal circumstances.
One feature that comes up again and again is Local History. Of course, we should all be committing to our favorite version control system often, but sometimes this just doesn’t happen and then… we lose everything. In these cases, Local History can help restore a developer’s code, and their sanity.
Something that most IntelliJ IDEA users have also forgotten, is we don’t have to press "save". Our work is silently saved by the IDE.
We know that a developer’s job can’t be automated away. Our job is to take what the business needs and turn it into something the computer(s) can understand. But there are bits of the job which can be automated, and we should definitely be using tools like our IDEs to do this. IntelliJ IDEA can automate so many things:
- code suggestions and completion mean we don’t have to remember and type everything.
- code generation takes care of the boilerplate, stubbing out ideas or creating the test classes so we can easily fill in our test cases.
- live templates create common code, so we fill in just the details.
- We can define the code standards in the IDE, not just the formatting but even the order that the methods appear in a class, and IntelliJ IDEA can automatically apply these standards, for example before commit.
- And we can set IntelliJ IDEA to automatically find problems with code before we commit.
Refactoring is one of the great examples of automation: instead of having to find-and-replace all occurrences of something, and manually check if this is a case that needs renaming or changing, the IDE can automatically do this for us.
Shift+F6: Fixing names is probably the most valuable refactoring. When you look at code that you or someone else wrote you don't need ambiguous or nonsensical names.
— Corneil du Plessis. ☕🦍😷 (@corneil) January 18, 2021
Everything In One Place
The IDE is an Integrated Development Environment, it means we should be able to do pretty much everything we need to do as part of our development process within one application, not just the coding and compiling. Some examples of the integrated features that people use the most are:
- Version control (particularly Git) – some developers prefer the visual representation of the history, and many prefer to use the IDE when doing a complex git operation.
- Build tools like Maven and Gradle.
- Databases – developers love to be able to see and query their databases from within the IDE, as well as get code completion for their SQL statements.
- Integration with profiling tools.
- The HTTP client code editor
- And even the integrated terminal.
The underlying thing that makes all of these help developers to be productive, is having them inside the IDE means that they don’t have to switch into a different tool, and possibly lose context while they do that switch.
Some developers think in code, some developers memorize command line arguments, and some prefer a graphical representation of their system. IntelliJ IDEA provides tools to help us visualize what’s going on, like the Git log window, the ability to generate UML, database or module dependency diagrams, and all of the numerous tool windows which give us a different view onto a specific area, like the File Structure tool window.
IntelliJ IDEA provides a lot of functionality for Java developers out of the box, but if it included everything you might ever need, it would be huge! So, there’s lots of extra functionality that can be added via plugins, either developed and maintained by JetBrains, or by third parties. If there’s a plugin that supports the type of development you’re doing, IntelliJ IDEA will often suggest it, and there are plenty of other plugins that make working with code more productive or just enjoyable.
You can even write your own plugin for the IntelliJ Platform if there isn’t one that does the trick.
IntelliJ IDEA doesn’t need to be configured to work, but it can be, and that’s really helpful for particularly complex or unusual projects, developers who like to tinker, or those who like their IDE/project/environment to be Just Right.
The Settings/Preferences dialog has a lot of settings in it! But it’s also searchable, like everything else in IntelliJ IDEA, so when we know what we’re trying to change, we can go straight to it. In fact, we can even configure the IDE without having to go to the settings at all. We can often use Search Everywhere to find the setting and toggle it on or off right there.
The code suggestions are not always about improving the code, sometimes it’s just about trying other things. With intention actions we can usually toggle to and from a particular change, so we can make a decision about what works best.
Refactoring is a well known example of how IntelliJ IDEA supports us safely experimenting with changing our code, and this works best when used together with other features, like creating and running automated tests, using build tools, and frequently committing working changes via version control. And, if all goes wrong, there’s always Local History to fall back on, which helpfully tells us when tests passed at particular points in the file’s history.
One other area where it’s easier to experiment with new things in IntelliJ IDEA, is how it supports multiple languages. It’s not so difficult to switch to using another language or set of tools if the IDE works in the same familiar way, with code suggestions, support for the relevant build and test tools, and the same intuitive navigation.
New versions of Java are released twice a year, and it’s challenging as a developer to keep up with this pace of change! Fortunately, IntelliJ IDEA always supports the latest version of Java, and often the next, upcoming version as well. Not just with code completion, but often suggesting ways to use the new Java features we might not even be aware of.
During the video interview series, a number of developers talked about how intuitive it was to get started with the IDE right away. There are wizards to help create new projects, it’s easy to open existing projects that have been configured with build systems like Maven and Gradle, the UI is designed to present us with just the things that matter, and there are at least two ways to do anything! So whether we prefer the keyboard or the mouse, whether we like to scan menu items or to type a search term, users should be able to find their way to what they need.
Simplifies Writing Code
Code completion, code generation, live templates, context-sensitive suggestions all make it quicker to write code, particularly taking care of boilerplate or predictable code. There are lots of great tricks for working in the editor too, like complete statement, multi-caret, expand and shrink selection, move lines or statements, and great support for multi-line strings. We can also do language injection into String values, so even if a SQL statement is in a Java String, for example, we still get code highlighting and suggestions!
#IJBday20 I ♥️ column select! Simple, but more handy than you'd think. Especially since I prefer the mouse and menu to shortcut macros.
— The Content 🖖 (@mightykungfool) January 18, 2021
Improves Code Comprehension
We probably spend significantly more time reading code than writing it, and IntelliJ IDEA helps us here too. Standard highlighting and formatting helps, of course, but reading can be more interactive than that. We can see the structure of a class, and find usages or navigate to declaration to find the context of a particular class, variable or method. Using quick documentation or quick definition gives us more context on something without having to go elsewhere. Parameter name hints demystify method arguments, various diff views can show us differences between files or changes over time, and code folding can hide away irrelevant sections, so we can focus on what’s needed. Split screen also helps us to see related, but not co-located, code on one screen.
We navigate through the code in order to understand the bigger picture. We can easily move between our code and its test – this often helps us understand what the code’s doing if we see what the test says it should do, Search Everywhere can take us right to anywhere we need, and we only need one shortcut to find anything in the project.
Makes Running Code Easier
Reading and writing code is all very well, but running the code or its tests is where we see if we’re getting the results we expect. IntelliJ IDEA provides lots of ways to run code, with keyboard shortcuts, gutter icons, menu items, and run anything. It has a comprehensive set of run configurations because not everything we want to run is going to be run the same way. And, of course, these configurations can be altered.
The IDE can build and run applications and tests itself, or hand that off to the appropriate build tool and provide a view on the results inside the IDE.
Helps Find Issues
No matter how hard we try, systems are rarely perfect. When something’s not giving us the behavior we expect, there are lots of tools in IntelliJ IDEA that can help us. We can use the debugger to step through and inspect our code, or even to set new values at runtime. We can even debug asynchronous code, and analyze stream operations. We can even paste stack traces from other systems, like staging or production into the stack trace analyzer to navigate straight to the problem areas.
Sometimes, the IDE even catches issues before they happen. For example data flow analysis can show us if we’ve accidentally introduced a problem, for example trying to access an array item that doesn’t exist.
It’s clear from our developer interview series that many users of IntelliJ IDEA love the IDE. And we love our users! So many of you help us make the IDE better with your suggestions and interesting use cases. IntelliJ IDEA wouldn’t have made it to twenty years without your passion. Thank you!
Join us for a free virtual event, celebrating all things IntelliJ IDEA! Hear from the creators of IntelliJ IDEA about its roadmap and its incredible features, as well as how to use them.