How to use KPIs to measure software development productivity

Posted on December 21st, 2022

There are lots of reasons to measure the productivity of your R&D team, including understanding the overall level of the team’s performance, developing benchmarks, tracking progress, identifying high and low performers, improving processes and operations, justifying your investments, and determining resource allocation. 

But if you’ve ever attempted to measure your software team’s productivity, you’ve probably run across several snags in the process – from trying to define what productivity actually means, to attempt to identify the metrics that reflect that definition. 

This post discusses the various challenges involved in measuring dev productivity and offers a KPI strategy to help you really understand the performance of your R&D teams. 

Defining software engineering productivity

Before you can even start to measure productivity, you need to define it. Usually, productivity is defined in terms of inputs and outputs, where you divide your output by your input to get your ROI. Using this method, we could, theoretically, measure the input and output of a software developer as follows:

Input:

  • Salary
  • Amount of hours worked

Output:

  • Software features
  • Documentation
  • Deployments
  • Bug fixes
  • PRs

It’s easy to see the problem, since it’s so difficult to measure the outputs themselves. Good measurements of output should have a strong correlation with revenue. However, if we break down the metrics for measuring those outputs, the correlation tends to be pretty weak. 

For example, one common metric for measuring developer productivity is lines of code (LOC). The thing is, for several reasons, more isn’t always better. For example:

  • Developer A might write significantly more lines of code than Developer B, but is it good code? Will Developer A’s code introduce more bugs to the system than Developer B’s? 
  • The more code you have, the more resources you need to maintain it
  • Developer A might be less skilled than Developer B, and could be assigned to less challenging features that have lower customer value

Further, the difference between physical lines of code and logical lines of code adds to the complexity involved in measuring LOC. 

Considering the flaws inherent in defining software development productivity using inputs and outputs, it makes more sense to define it as a measurement of your team’s ability to quickly and efficiently create useful, good-quality software that’s easy to maintain and has high customer value. 

Now that we’ve defined dev team productivity, we can try to figure out how to measure it. 

Identifying the right KPIs

The reality is, there’s no one metric that can be used to assess productivity, since each KPI, on its own, lacks important context. We’ve already discussed some of the problems inherent in measuring lines of code, but there are similar issues involved in all commonly used productivity metrics:

  • Code-based metrics

    In addition to lines of code, other code-based metrics include commits, pull requests, code review turnaround time, code churn (also referred to as “rework), code coverage, closed change requests, and bug fixes. While all of these metrics are possible indicators of productivity, the same issues apply: They’re all missing important context and can be gamed in a variety of ways that almost always sacrifice quality.

  • Velocity

    Velocity measures the amount of work your team can complete during an average sprint. The team assigns points to each story (based on estimated complexity, risk, and repetition), then calculates the average amount of points achieved each sprint over a period of time (minimum 5 sprints). This is one way to track your team’s overall progress and figure out how realistic your team’s goals are.
    However, if we look at how we’ve defined productivity, it’s easy to see how quality can be sacrificed to maintain or improve velocity. Cognitive bias can also play a part by inflating the amount of points assigned to each story.

  • Function points

    Function points are units that measure the functionalities that a software service or product delivers to its end users, meaning what the software can do in terms of tasks and services. The advantage of function points is they are relatively agnostic to the technology model as well as the dev model used. These points are assigned using the Function Point Analysis (FPA) rules, which include 5 components: external inputs (EI), external outputs (EO), inquiries (EQ), internal logic file (ILF), and external logic file (ELF). However, since the assignment of function points is made by the team, they’re subjective and can be manipulated.

  • Pull requests

    Pull request metrics, such as time to merge, lead time, size, flow ration, and discussions, have increased in popularity recently as a way to measure development productivity. However, tracking these metrics doesn’t factor in the effort or impact of the work performed. It can also be unfair to developers who are working on a legacy codebase, compared to developers working on a greenfield project.

  • Sprint burndown chart

    This is a graphic representation of how much work has been completed during a sprint and the total amount of work remaining in the sprint. While good for identifying issues such as scope creep and oversaturation of features, it lacks several important factors as well as the context needed to get the full picture.

  • Evaluations

    Both manager and peer evaluations are a good way to give real context to the performance of your team, however, they are highly subjective and can be subject to abuse or bias.

Combining weighted KPIs to measure your team’s productivity

Every company and development team is different, with its own set of dynamics and processes. Using a combination of the above metrics, then weighting them (and fine-tuning the weighting over time) in terms of their importance to your team and company leadership, is a good way to measure your team’s overall performance, dynamics, and the efficiency of your processes. 

For example, you create a set of criteria, such as correlation with revenue, continuous delivery, high quality, function to user, team cooperation, objectiveness, etc. 

Then score each metric on a scale of 1-5, based on how well that metric meets the above criteria. For example, you might give Pull Request metrics a high score for team cooperation, but a low score for correlation with revenue. While functionality points could score high for revenue correlation, they might score low for objectiveness. 

Once scored, you can weigh these KPIs using the scores, in order to reach a final productivity score that more accurately reflects your team’s performance. In addition, multiple metrics are less subject to abuse and bias than any single metric. 

It’s also important to measure the entire team vs. each individual member, since the true scope of software team productivity is far larger than any one developer on your team. 

Yes, each team member’s success has real value, but since we’re trying to increase the creation of useful, high-quality, easy-to-maintain software, many more factors must be taken into account in order to get a real understanding of your team’s productivity.

Summary

Since single KPIs can be misleading when measuring software engineering productivity, we recommend using a combination of weighted KPIs, which can offer more in-depth and nuanced insights into your software team’s performance. 

About Tabnine Enterprise

Tabnine Enterprise is an AI code generation tool that helps software engineering teams write high-quality code faster and more efficiently, accelerating the entire SDLC. Designed for use in enterprise software development environments, Tabnine Enterprise offers a range of features and benefits, including the highest security and compliance standards and features, as well as support for a variety of programming languages and IDEs.

What is Jenkins Pipeline and how to create pipelines with Blue Ocean

Posted on October 8th, 2020

No one likes a broken night build. Not the testers, not DevOp, and especially not the developers who then need to scramble to find, blame, fix the issue, then commit said fix to the code. All before they even consume their morning dose of caffeine after a long night of coding.

Because of this universal (and justified) dislike of broken builds, the concepts of continuous delivery and continuous integration (CI/CD) came to be and were quickly adopted by R&D teams. One of the oldest and most popular solutions for implementing end-to-end CI/CD in application development lifecycles are Jenkins Pipelines.

Before we dive into the specifics of building and adding Jenkins Pipeline to your projects, it’s worth understanding what continuous delivery and continuous integration actually are. And also why you need them in your life.

What are CI/CD (Continuous Delivery and Continuous Integration)?

Continuous Integration (CI) and Continuous Delivery (CD) are both popular DevOps practices that are part of a software development pipeline/orchestration approach. They are often abbreviated and merged as “CI/CD”, though each refers to a different set of processes and events.

Continuous Integration (CI) is a development methodology that assumes frequent (and thus “continuous”) integration of code into a shared repository. It includes development, code analysis, unit testing, code coverage calculations, and build activities. Many of the tasks are executed using various automation tools.

Continuous Delivery (CD) is the process of deploying changes into production in a way that prevents broken code from finding its way onto software in live environments. The goal of CD is to ensure that the code is always in a deployment-ready state for all supported environments, regardless of the number of developers that may be making changes to it at any time.

What is Jenkins Pipeline?

Jenkins Pipeline (or simply “Pipeline” with a capital “P”) is a series of events or tasks performed in a specific sequence to transform the code from version control into a stable software product by employing a suite of plugins in Jenkins. Thus, enabling the implementation and integration of Continuous Delivery processes within Jenkins.

A Jenkins pipeline contains several states (or stages): build, deploy, test and release. Interlinked and sequential, each state contains events that make for a continuous delivery pipeline.

What is a JenkinsFile?

Jenkins Pipeline has a customizable and scalable automation system that lets you build distribution pipeline scripts – also dubbed “Pipeline as Code”. Written as plain text in Groovy Domain Specific Language (DSL), these scripts are called JenkinsFile and are surprisingly easy to write and comprehend.

A JenkinsFile stores the entire CI/CD process as code on the local machine. As such, the file can be reviewed and checked into a Source Code Management (SCM) platform (be it Git or SVN) along with your code. Hence, the term “Pipeline as Code”.

There are two different types of syntax you can use to construct the Jenkins pipeline, each drastically different in approach from the other: declarative and scripted.

Scripted pipeline syntax

With the Scripted pipeline, the JenkinsFile is written on the Jenkins user interface instance. It then runs on the Jenkins master with the help of an executor (agent). The code is defined inside node blocks, so it takes relatively few resources to translate the scripted pipeline into individual commands.

Declarative pipeline syntax

The Declarative pipeline is a newer approach to creating pipelines by allowing the reading and writing of the pipeline code. As it contains a predefined hierarchy to design pipelines, it makes it easier to organize and control all the aspects of pipeline execution

With Declarative pipeline syntax, code is written within a JenkinsFile in pipeline blocks that can then be checked into the SCM of your choice.

Blue Ocean for Jenkins Pipelines

Generally speaking, most opt for Declarative pipelines over Scripted not only because of its abundant syntactical attributes. The approach and syntax are generally a lot more intuitive and easy to learn, especially with the introduction of Blue Ocean for Jenkins Pipelines.

Blue Ocean has been compared to a shiny layer of paint on top of the fully functional vehicle that is Jenkins Pipeline. Blue Ocean for Jenkins Pipeline, essentially the Jenkins Pipeline GUI, is a suite of plugins that introduces improved UX, as well as a set of tools to visualize the jobs getting executed in a personalized view for every member in a team.

Moreover, you don’t need knowledge of any scripting language in order to create Jenkin Pipeline projects. But it sure does help.

How to build a Jenkins Pipeline project in Blue Ocean

Before you can get started with your very first Jenkins pipeline, you will need to install Jenkins, the Jenkins Pipeline plugin and the Blue Ocean plugin package. Once you have all the ingredients, you can start setting up your Jenkins Pipeline project.

The Blue Ocean UI makes Pipeline project creation an ocean breeze. Not only does it help you set up the project, but it also automatically creates and writes your JenkinsFile for you, while you manage the project with little to no manual scripting.

Start by accessing Blue Ocean in your Jenkins menu.

If you have no Pipeline projects in this instance on Jenkins, you’ll see a welcome window offering you to create your first Pipeline.

If it’s not your first visit, you will instead see the dashboard, where you can choose to add a New Pipeline under the Pipelines tab.

Clicking the link will start a user-friendly wizard, beginning with selecting the location of your code.

Unsurprisingly, configuring most of the above options is fairly straight-forward and similar. The only differences lay in authentication and token generation process for each.

For example, we can choose Git and proceed to connect to a local or remote (via SSH) git repository by entering its URL.

Enter your repository URL, and Jenkins will provide you with a public key. Since you want to give Jenkins permissions to make commits, you should create a new service user and add the public key to it. Then simply click Create Pipeline

This will prompt Blue Ocean to scan your repository’s branches for a Jenkinsfile, commencing a Pipeline run for each branch containing one. If Blue Ocean cannot find any Jenkinsfile, it will create one for you. You will, of course, need to help it out using the Pipeline Editor.

By default, the right pan of the editor UI shows the Pipeline Settings. Here, you can define the agent used by the pipeline, as well as environment variables.

In the left and main pane of the editor UI you will see your Pipeline Editor, where you can start adding pipeline stages, and populating them with steps, each including different tasks.

To add your first stage, click on the + icon and enter a meaningful name for the stage, like Build.

Then, click + Add Step to add the first step to this stage. For example, select Shell Script and enter mvn clean install -Dlicense.skip=true. You can then add Print Message steps along the stage to indicate the process to the user and ease logging and troubleshooting.

Finally, before you can run your pipeline, you need to save your project in source control by simply clicking save. This will bring up the Save Pipeline prompt, where you can leave a comment describing the changes made to Jenkinsfile.

Clicking on Save & run will save any changes to the pipeline as a new commit. Then it will start a new Jenkins Pipeline Run based on those changes. Finally, Blue Ocean will navigate to the Activity View for this pipeline.

Summary

Pipeline as Code is becoming an increasingly DevOps concept. It is also one that has been adopted by many leading tools like Azure DevOps.

However, Jenkins Pipeline is a much more rounded and mature solution for end-to-end CI/CD process integration and implementation. Especially if you take into account the ease-of-use and cross-team collaboration features Blue Ocean brings to the table.

What autocomplete can do for your productivity

Posted on April 1st, 2020

Back in the days when I was a junior dev I used to marvel at my supervising senior dev’s ability to create code at insanely breakneck speed.

Within moments, he’d have a working piece of code with prototyped data, almost ready and in a semi-working state. There were a lot of tabs pressed, his fingers never leaving the keyboard to touch the mouse for the duration of his demonstration.

While my coding speed is not the same pace and speed as him, my productivity, however, is not too shabby. Over the past few years, I’ve picked up a few things here and there, mostly around things to do with how to efficiently use your keyboard and code editor.

The power of autocomplete

There are two ways to look at autocomplete — First, lazy coders use autocomplete. Second, you have to be crazy not to use every tool in your productivity toolkit.

Personally, I see autocomplete as a merge of these two worldviews. After all, if we didn’t want to save time or increase productivity in one way or another we wouldn’t be writing software to begin with.

What autocomplete can do for your code and productivity

So how does autocomplete work?

There are two common types of autocomplete.

1. automated boilerplate generator that gives you the entire scaffold of classes, functions, methods, and service providers.

2. Inline suggestions as you type. These types of autocomplete solutions can leverage AI and if you use the tool for long enough, it starts to see the patterns in your code and become predictive towards what you’re planning to type next.

The more you use a particular tool, the more intuitive it becomes over time as it familiarizes itself with the libraries and frameworks you’re using.

In a way, it becomes a secondary external brain that you explicitly control. The autocorrect feature is still passive in nature, but intuitive enough to be your friendly and high efficient helper.

Why deep learning matters

Not all autocomplete tools will be able to do this. Some will just go off predictive suggestions based on the encoding algorithm of the codebase. 

Those that are powered by deep and machine learning allow the tool to be much more automated in the way that suggests what you’re most likely trying to achieve, making it better as a predictive coding tool than just your regular autocomplete.

The major difference between autocomplete and deep learning-based autocomplete is that the latter has the power to adapt to your personal coding style, systematic thinking and ways of handling specific tasks

Normal autocomplete simply offers predictive code completion based on the probable outcome, rather than other metrics such as context, historical decisions, code style and framework/library that’s current in the developer’s focus. 

More taps than clicks

When it comes to autocomplete, you’re more likely to keep your fingers on the keyboard and therefore maintain your flow state.

Flow state is the state of deep concentration that many of us enter when we’re intensely focused on something. It’s the mental space where we are so absorbed in our own thoughts that our productivity and output is at its highest.

However, the flow state can easily be broken. This is often through changes in the way to perform tasks, or our thoughts get interrupted by the need to switch the way we output our code.

In our case, it can be as easy as the jump between the keyboard and your mouse. Your thoughts can get interrupted, bringing you to a halt in your processes.

When it comes to autocomplete, your flow is maintained and accelerated as you are no longer limited by your typing speed or need to pause for syntax debugging.

Why?

Because autocomplete does all the initial typing required for you.

Predictive = partial automation

The thing with autocompleted code is that the ones with machine learning can have predictive abilities, meaning that your brain is exported to machine learning.

The more you use a particular autocomplete tool, the more it learns your patterns and requirements, making it easier and faster to work with. Not only that, but you also become familiar with what to expect.

As the AI is able to become more accurate in its predictions, it takes you less time to think about the actual act of coding and focus on the business rules, in addition to the structural and architectural parts of your code.

The more you use autocomplete, the less time you spend figuring out how to ‘spell’ your code out. Your attention is shifted towards the important task of getting the building blocks for your application right. 

Learning through coding

For a lot of us who are starting out in the world of commercial coding, autocomplete can also help you become a better developer in the long run.

There are many things that aren’t taught in online courses and college classes. Sure, you can learn how to code but the actual application of coding can be a challenging task, especially if you’re working on a pre-existing project.

The difference between school and real projects is that you’re often inheriting code from others. You’re not in an isolated sandbox where everything is neat and cohesive. There will be legacies. There will be bugs. There will be shaky logic that made sense when it was first created.

This is where autocomplete comes in. 

In a way, autocompleted code is like training wheels for new developers, as much as it is a productivity tool for seasoned engineers. This is because auto-complete lets you code without actually writing the code.

Maybe just the first part or two — but the rest is written out for you and it becomes a matter of modifying what is needed. If AI and machine learning is involved, then you’re in a fantastic space to learn in context. 

Because autocomplete isn’t just about filling in the blanks. Rather, it’s a productivity and quality tool packaged into one.

Final thoughts

Auto-complete may sound like such a basic thing to have in your IDE but it can save you a ton of time in the long run.

It’s not about being lazy and not manually typing out each line of code. Besides, manual work is the sign of an inefficient developer anyway.

Automation is key for increased productivity and auto-complete falls in this category.

As a developer, autocomplete has helped me personally on two fronts — speed and delivery accuracy. I’m dealing with fewer errors, in addition to reduced questions from junior developers. Why? Because autocomplete had reduced the amount of time they need to spend on incorrect syntax and improper code creation.

Why auto-complete won’t solve all your coding problems, it can surely help reduce a good portion of them, especially when your brain is in the flow state and running at a particularly increased speed.

The last thing you want when you’re in the middle of stringing your thoughts together is to have your flow state interrupted, sending the web of business rules you’re carefully constructing inside your head crashing into a wall. Why? Because you’re stuck trying to make a syntax or reference error go away.

When things break, it’s usually enough to also break our flow.

It happens. 

And for some of us, it happens more than others.

When using autocomplete as a learning tool, it can make you a better developer. It can help you grow your knowledge base and reduce the number of alerts and warnings that comes through from your code. 

Autocomplete as a tool to help you code faster, increase code stability across the team, unite the codebase in format and syntax style, in addition to contributing towards reducing the number of days you might spend on a particular feature or functionality. 

How to automate your workspace and write less code

Posted on February 10th, 2020

When it comes to developing robust software, your workspace setup can determine your overall productivity. As engineers, our code workspace also doubles up as the tool that helps us create the code we need. Our overall efficiency depends on how well our workspace is set up.

A well-structured workspace with good processes can help you remain in your flow state longer, keep you emersed and help you stay focused on your tasks. Distractions caused by manual work will eventually slow you down, along with repetitive tasks that contribute to the overall time sinks in your code creation process. 

Writing less code is not just about the number of lines you produce or characters you end up typing. Rather, it’s also about how much of the manual and repetitive stuff you can do without

Here are a few things you can do to reduce to amount of actual code you need to personally create, reduce the amount of time you spend doing certain tasks, increase your overall productivity and ultimately write less code.

1. Use auto-complete template code

There are perks and quirks to writing all your code personally. However, after you’ve been coding for a certain number of hours, you’ll start to see patterns in your code.

These patterns often make up structural templates and foundational outlines in your code. When it comes to using pre-made code, code templates or snippets are designed with best practices. They’re structured in a way that ensures the ability to uniformly create your code. This comes in handy especially for team environments and when you need to share code around

code snippets in java
Get this snippet

Snippets offer standardization and when paired with auto-complete, the process of generating code is significantly reduced. This leaves you with more time to think about the code, how it should fit together and what it needs to do to satisfy the feature’s requirements. 

2. Using AI auto-complete

AI code completions can not only take boilerplates a step further but can introduce a new level of efficiency. AI based completions can offer you helpful suggestions that you can accept or reject based on context and historical actions. 

C++ Code Completions by Tabnine

Rather than just guessing what you’ll type next, code completion IDE plugins, like Codota and Tabnine, act as an auto-code complete tool that also offers up examples that are relevant to your coding context. 

In contrast to other plugins, Codota pools usage data together (without actually seeing your code) in order to fuel the coding prediction process and help you create your code faster

3. Learn and Implement short keys

The point of optimizing your workspace is to reduce the number of keystrokes you need to press in order to complete your tasks. The act from moving between the keyboard and your mouse can also break your flow state due to the movement changes. 

Predefined actions often address the commonly used actions that developers perform that’s beyond the act of coding. For example, in Android Studio, if you want to quickly jump to the source, you can just press Ctrl + Enter or F4. This will significantly save you a great deal of time in a manual search, especially for larger applications. 

When it comes to workspaces, IntelliJ, Android Studio, and Eclipse all have the ability for you to configure keyboard shortcuts to suit your most commonly performed actions

For IntelliJ and Android Studio, you can configure this via Settings/Preferrences or Ctrl+Alt+S. Then all you have to do is select keymap. You can’t change the predefined keymaps but you can modify any other shortcuts that you may need to access your code editor’s other features.

shortcuts for android studio
Android Studio Shortcuts: Full List

For Eclipse, this functionality is found under General > Keys

4. Integrate with project management tracking tools

Not many developers do this enough when it comes to their workspaces. Businesses often use some sort of project management tool such as Asana and Jira to track tasks, project progress, sprints, and burndowns.

If the project management tool is made for developers, chances are that there will also be an integration tool that’s available for your IDE

In IntelliJ, you can connect your IDE up to a tasks server (available via Tasks > Servers) without the need to download anything in addition. Your team will need to set up a server URL, along with a project ID in order to view and associate your code to the right task.

For IntelliJ and Jira, there is a plugin called Atlassian Connector that will allow your IDE to monitor and update issues without the need to navigate away and into a browser. 

jira for intellij

5. We need to talk about linters

When we write code, it’s not always perfect the first time around. Sometimes, when we write code, we spend a good amount of time trying to get braces and brackets in the right places and with the right spacing. They may seem small at first but those seconds do eventually add up to minutes, which can snowball into an hour here and there throughout the entire project. 

Sometimes, we find ourselves sidetracked and distracted by the act of cleaning up formats and getting things to look right only to have it destroyed when new code is added.

That’s where linters comes into play.

Code lint is annoying and cumbersome to maintain. It sticks out as minor annoyances that can turn your code into a sloppy mess if not maintained regularly. It comes in the form of physical styling of the code and potential programmatic errors that may not be immediately evident until you run it. 

Linters takes away the manual task of checking your code, automatically formats it to standard and flags any errors for you to review. Linters can also help standardize your code across teams and reduce any discrepancies on style and formatting. 

This, in turn, reduces your need to worry about how things should look and let you focus on the important parts of the application creation process. 

6. Are your settings synced?

Sometimes you’re not always working on the same machine. Or perhaps you’ve just upgraded your workspace. Whatever the scenario, most IDEs have a sync option that allows you to move your personal settings around without the need to manually set it all up again.

For IntelliJ, you can do this by using the IDE Settings Sync functionality. For this, you’ll need a JetBrains account and all your settings will be synced to this. 

IDE Settings Sync for Intellij

For Eclipse, using version control like Git will allow you to automatically import workspace configurations for a particular project into your IDE. However, you should note that issues can occur if you link multiple repositories together and you don’t have them all available on your current machine. This is because your workspace configuration is project-based and linking multiple projects together can cause an issue with syncing. 

Final thoughts

When it comes to productivity, there’s more to it than just the number of lines you can produce within a time block. As we all know, the process of creating code itself requires other actions that eventually add up to form your day as a developer.

Your flow state plays an important role in maintaining the velocity of your thoughts and setting up your workspace to help maintain it can make or break your ability to maximize the impact of your concentration. 

Flow is the moment where you are completely immersed in your work. Breaking flow can add more than just the seconds it took to do the task. The additional time also includes getting back into the flow and picking up your train of thoughts all over again. The simple act of moving between keyboard and mouse can sometimes be just enough to break your flow.

Little tweaks such as using boilerplates, code completion, learning the keybindings, and linters can make your workflow just a little bit smoother. These things can help smooth up what would usually be road bumps in your thought processes, and therefore help prevent you from slowing down every time something minor and repetitive needs to be done. 

21 IntelliJ shortcuts to boost your productivity

Posted on December 9th, 2019

Using keyboard shortcuts in Intellij IDEA can save you a lot of time, increase your productivity and help keep your wrists healthy. We’ve collected the top 21 must-know shortcuts and keystroke combinations to take your Intellij mastery to the next level.

Being productive while coding is not just about avoiding social media and other annoying distractions. When you remove all the external noise, it’s just you, your IDE of choice, your keyboard, mouse, and a caffeinated beverage. One of these is usually unnecessary – the mouse.

Why Keyboard Shortcuts Are Awesome

It’s not that we have anything against pointing devices, but let’s face it – those are the tools of graphic designers. And even graphic designers use (usually one-handed) keyboard shortcuts in their work. When you’re in that lightning-speed code-typing mode, looking for menu items is nothing but a distraction, even when you know exactly what you are looking for.

morpheus and keyboard shortcuts

For a developer to waste precious time moving their hand from the keyboard to the mouse and back is simply ineffective. All those little seconds really do add up in damaging the overall efficiency of your work. In addition, it can cause fatigue and pain in the wrist and arm from the frequent switching between input devices.

Top 21 Productivity-Boosting Intellij IDEA Shortcuts

Now that you installed some plugins, you’re fully convinced of the value of memorizing and using keyboard shortcuts instead of clicking on menus, we have some great news! Intellij IDEA can do pretty much all you need it to without you even touching the computer mouse of trackpad to execute a command. 

That said, there’s really no reason for you to memorize the full Intellij IDEA default keymap sheet, though you might want to print the page applicable to your OS of choice and hang it somewhere you can easily see around your workstation.

So which of the 100+ shortcuts should you memorize? We picked the top 21 in boosting productivity, and sorted them into categories according to use. Note that we used the default OS and Intellij keymap, and the key combinations assume a Windows OS. If you use a Mac or run Linux, you can easily “convert” the shortcuts using the official Intellij IDEA keymap sheet.

teach keyboard shortcuts

Navigating

One of the main challenges in “quitting the mouse” with Intellij IDEA is learning to navigate between files, tabs and sections of code using keyboard shortcuts. It’s actually more effective than using a mouse and guess what? No leaning on the up and down keys is involved!

1. Go to declaration / implementation – Ctrl + B / Ctrl + Alt + B

When you need to find the declaration of a method, all you need to do is select the method and press Ctrl+B on your keyboard. Need the implementation section instead? Press Ctrl + Alt + B to jump to the method implementation.

2. Navigate to last edit location – Ctrl + Shift + Backspace

“Wait, so where was I typing last?” will never be a question you ask yourself when going back to work after lunch. Simply press Ctrl + Shift + Backspace and you’ll be taken to the last edit location in the file.

3. Switch between tabs – Ctrl + Tab

Everyone knows how useful the Alt + Tab key combination is, especially when switching between, let’s say, Google (or your social media account) and the IDE. Now, you can also switch quickly and easily between open files in the same way with Ctrl + Tab.

4. View recent files – Ctrl + E

Want to open a recent file? Pressing Ctrl + E will let you navigate the list of recent files and pick the one you wish to open in a tab.

5. Go to line – Ctrl + G

When a coworker yells across the room “Check line 732!” you don’t need to go on a scrolling marathon. Simply press Ctrl + G and go directly to the line in question.

6. Navigate to test – Ctrl + Shift + T

Jumping between implementation and testing classes is a breeze with this handy key combination. Added bonus – if your implementation class doesn’t have a test class, Ctrl + Shift + T will automatically create one for you using your default testing framework. 

Searching

Finding what you need in thousands of lines of code across multiple documents is no easy task when done manually and is a bit like finding a needle in a haystack of code. Fortunately, there are several search functions (with keyboard shortcuts) in Intellij IDEA to help you locate the code segments, classes, methods or other resources you’re looking for as quickly as possible.

7. Comprehensive search – Double Shift

Look for anything anywhere with this handy double-press. Using TAB switches the resulting cluster, left arrow key will show history, right arrow key will move forward, and the most recent files are shown by default.

8. Find class – Ctrl + N

Looking for something classy? To find the class you seek simply press Ctrl + N and type the name. You don’t even need to write the full name, and you can use asterisks (*) as wildcards.

9. Find resource – Ctrl + Shift + N

When you’re not looking for classes but rather for text or configuration files, Ctrl + Shift + N will do just in a fashion similar to that for finding classes.

10. Show usages – Ctrl + Alt + F7

Ever looked at a component in the code and ask yourself “Wait, what does this do?” before going on a long quest to answer that question? Never again! Ctrl + Alt + F7 shows all usages of the current method, class or variable in a popup where you can easily navigate between locations where it was used.

Editing

As a coder, what you usually do is write and edit code. Those important keystrokes of genius that make the words in the IDE turn into working applications. Some keystrokes are unnecessary and repetitive. These shortcuts will help eliminate those so every one of your keystrokes counts.

11. Expand / shrink selection – Ctrl + W / Ctrl + Shift + W

Selecting code sections with a mouse is a drag. Aside from being a pun, it’s also a great way to miss important bits which we would rather not miss. Instead, you can use Ctrl + W to expand the selection intelligently and Ctrl + Shift + W to shrink it.

12. Basic code completion – Ctrl + Space

“Type less, do more,” is the main idea behind this keyboard shortcut (and the two that follow it). This important shortcut will autocomplete your code, but much like the default autocomplete on your mobile, is not perfect. It is, however, very widely used.

13. Smart code completion – Ctrl + Shift + Space

Smart code completion is much more effective as it will only display the autocomplete options relevant to context by filtering the list of suggestions to show only classes, variables, fields and methods of the type that can be expected.

14. Complete statement – Ctrl + Shift + Enter

The bane of any and every developer from day one of the job are those missing characters in statements like parentheses and semicolons. This keyboard shortcut helps eliminate those and can be a lifesaver on long nights of coding.

15. Show intention actions and quick-fixes – Alt + Enter

Another helpful keyboard shortcut to improve your code is Alt + Enter that will automatically fix highlighted errors or warnings, then improve or optimize the selected code construct.

16. Duplicate line – Ctrl + D

Anyone who’s ever written code will tell you no key combination is more useful than good old Ctrl + C and Ctrl +V. In Intellij IDEA you can duplicate lines by pressing Ctrl + D. Note that you can also do this with whole sections of code.

17. Comment line – Ctrl + /

Deleting code is rare. More often than not, you will comment out lines of code for testing purposes or various reasons. Commenting out lines is made quick and easy by then pressing Ctrl + / no matter where you are in the line.

Refactoring

One of the main strengths of Intellij IDEA is its refactoring functions and opportunities. The most used ones have shortcuts you’ll probably memorize pretty quickly if you refactor your code a lot.

18. Extract method – Ctrl + Alt + M

To extract code to a new method or lambda expression simply select it and press Ctrl + Alt + M.

19. Rename – Shift + F6

Renaming in Intellij requires some setting up before using. If you don’t adjust renaming options (double-pressing Shift + F6), you might find that it will also rename occurrences in text. Pressing Shift + F6 once will rename the selected element across your entire codebase.

Compiling / Debugging

The last two keyboard shortcuts need no explanation as they map to two of the most commonly used functions of an IDE – making projects, debugging and running them.

20. Make project – Ctrl + F9

21. Run / debug – Shift + F10 / F9

Those are just our favorite shortcuts, and only 21 of them. Which are yours? Tell us in the comments.