Improving Developer Productivity with DevSpace
What makes developers happy and productive? If you talk to people who work in the tech industry, they will likely all have opinions on it, but there’s no clear, shared definition of developer productivity. So how can we measure developer productivity? And how can we improve it?
As someone working for a company that makes tools for developer workflows, these questions are very interesting for me. I recently read a paper that appeared in ACM Queue magazine which has a fascinating take on those questions. The article was written by Nicole Forsgren, Margaret-Anne Storey, Chandra Maddila, Thomas Zimmermann, Brian Houck, and Jenna Butler. I’m going to refer to them as “the authors” or “Forsgren et al.” in this post.
There’s a lot of compelling information in the post, but the biggest part of it is made up by explaining SPACE, a framework that the authors created for understanding developer productivity. I will give you a condensed explanation of the framework below, but I encourage you to read their post if this topic interests you.
The team at Loft has built several tools to help with developer productivity, but the best-known tool we’ve made is DevSpace. DevSpace is a free and open source tool that allows developers who are building apps that run in Kubernetes clusters to be more efficient. I thought it would be interesting to look at the different ways DevSpace can help with productivity in light of the SPACE framework.
If you’re not familiar with DevSpace, we have a great introduction in the docs, including a quickstart. But I’ll give you some of the TL;DR here too. With DevSpace, you can develop against a local Kubernetes cluster or one running in your cloud provider. Instead of rebuilding your container after every change made, DevSpace hot reloads your code in the container that’s already running. In the case of an app written in Go, for example, DevSpace can compile the binary and ship it to the already running container instead of going through a new container build process every time you want to see how your updated code works. There are other advantages to developing with DevSpace, too, like defining your development workflow in code.
Let’s take a look at how the features of DevSpace fit into the SPACE framework.
#The SPACE Framework and DevSpace
SPACE is made up of five categories: Satisfaction and well-being (S), Performance (P), Activity (A), Communication and collaboration ©, and Efficiency and flow (E).
#Satisfaction and well-being
The paper states that “Satisfaction is how fulfilled developers feel with their work, team, tools, or culture; well-being is how healthy and happy they are, and how their work impacts it.” As the authors point out, there is a proven correlation between productivity and satisfaction.
This category is dear to my heart. Anyone who has written code for a living knows how frustrating it can be to wait for things. Having to rebuild and deploy containers after every small change is painful enough, let alone having to wait until the code goes through regression tests to see your changes. Being able to hit Save in your IDE and see the results of your changes quickly not only helps with cycle times but with both satisfaction and well-being.
As the authors point out, problems with satisfaction and well-being can lead to burnout and other adverse outcomes. In the paper, Forsgren et al. cite a book called Happiness and the Productivity of Software Engineers, which covers a study of why developers become unhappy. The book states that most of the things that impacted developer happiness negatively “came from technical factors related to the artifact (software product, tests, requirements and design document, architecture, etc.) and the process.”
That surprised me a bit to read, but it also makes a lot of sense. Many things go along with writing code, but in the end, if the technical tools you rely on daily aren’t efficient, it’s going to lead to frustration. That frustration can lead to other things like burnout and difficulty retaining talented developers. I’ve seen shops reduced to a cycle of pain, where morale is terrible and people leave because of it, which hurts morale even more. It can be tough to repair a situation like that.
Performance refers to the outcomes of the software development process, including software quality and the impact of what the team is building.
DevSpace is designed for developing microservices. When you set up a project in DevSpace, you can define other services that yours depends on in your devspace.yaml file. This allows you to spin up those dependencies easily and test against them instead of relying on mocks while you test locally. No local dev environment will ever be exactly like production, but the closer we can get, the better. What if the API in one of your dependencies changes, but the mocks in your tests aren’t updated?
Having a more functionally accurate local development environment can definitely impact service quality.
Activity metrics are things like the volume of work being done by developers, the number of deployments, incidents, etc. These metrics are ones that people often point to when they look at developer productivity. But as Forsgren et al. point out, “These metrics can be used as waypoints to measure some tractable developer activities, but they should never be used in isolation to make decisions about individual or team productivity because of their known limitations.”
With DevSpace you can spin up your development environment with a git clone and then a single command. Between that and DevSpace’s hot reloading, you can work faster and commit more. DevSpace lets you focus more on what fulfills you - building apps and features.
#Communication and collaboration
This category covers things like transparency, how expertise is shared, the quality of code reviews, and onboarding new team members.
We talked about the ability to define a project and its dependencies in the devspace.yaml file. Another benefit of that is improved communication. By defining developer workflows as code, we can cut down some of the confusion that comes up when a team works on a project together. Have you ever checked a page in Confluence to see when it was last updated and then done the mental math to try to guess if the documentation was still accurate? With DevSpace, you can look at devspace.yaml to see what the workflow is. It’s being used all of the time, so you know it’s current.
This is also a benefit to onboarding. New engineers on your team can learn how devspace.yaml and answer more of their own questions.
#Efficiency and flow
You’ve probably heard about the idea of flow states and even experienced them yourself. This category covers both the individual version of being in a flow state, but also how changes flow through the system. Things like interruptions can impact flow, and factors like the number of handoffs that the code goes through. The authors point out that this category can affect the previous ones, both positively and negatively. Optimizing for individual flow can hurt collaboration, for example.
This is another area where I think DevSpace’s hot reloading can have a compelling impact, at least on an individual level. DevSpace can automatically deploy your changes to your development cluster and do it quickly. Instead of having to drop out of your flow state to manage builds, you can see results automatically after hitting Save. If you do need to rebuild a container instead, DevSpace can do that too.
As the paper mentioned, optimizing for individual flow states can have a negative impact on other things like communication and collaboration. Cutting down on meetings can help flow and hurt collaboration, for example. But there’s no such negative impact using DevSpace’s hot reloading. It cuts down on the annoying time required to set up and continuously update your local environment, which leaves more time for deep flow work and communication about important things such as features.
The paper from Forsgren et al. is a fascinating look at the topic of developer productivity, and I encourage you to read it in detail. As we’ve seen, using DevSpace in your developer workflow can help address the categories in the SPACE framework with different levels of impact. At the end of the day, developers want to be productive. They want to be shipping their work and doing it with tools that enable them to move faster.
DevSpace is free and open source. If you’re interested in DevSpace, you can watch this short video for a demo on how it works or dive right in and try the quickstart yourself. If you have questions, you can find us in the Loft Slack or the #devspace channel in the Kubernetes Slack.