What makes YOU stay many years in a job?

Felipe Besson
Nov 6 · 6 min read

What factors lead developers stay longer in their jobs based on the Stack Overflow's developer survey data from 2019.

Image for post
Image for post
Photo by Joshua Aragon on Unsplash

Introduction

As a developer, I probably have my own bias towards what leads me to stay longer in a job. However, I wonder in general what factors actually makes developers to stay longer in their current jobs.

I am big fan of using data over opinions. Then, I've decided to try to use a very good dataset about us (developers) to answer this question: Stack Overflow's 2019 Annual Developer Survey.

This survey data contains reviews from around 90,000 developers from 180 different countries. In 2019 survey contains 85 questions and aims to understand multiple aspects of jobs related to software development and data analytics.

I've broke my analysis down into 3 main sections below. I worked with the subset of developers who answered the following survey questions:

Which of the following best describes your current employment status ?

Answer: Employed full-time or Employed part-time

When was the last time that you took a job with a new employer ?

Answer: Less than a year ago, 1–2 years ago, 3–4 year ago or More than 4 years ago

Part I: Does the job role lead developers to stay longer in the job ?

Image for post
Image for post
Figure 1: Distribution of Last hired date by job role

The plot indicates that professionals working in management positions are longer in their current jobs. About 42% ofSenior executive/VPs and 37% of Engineering managers are more than 4 years in their current jobs. A good hypothesis would be these professionals developed big portion of their careers in the same company.

For the remaining job functions, the data suggests being less than 1 year in the current job is the most common period (in percentage) among developers. Are these professionals in the beginning of their careers ? To answer that, we can analyse what some of these developers answered for this question:

How many years have you coded professionally (as a part of your work)?

Image for post
Image for post
Figure 2: Distribution of years coding as a professional by job role

These distributions for management positions have a higher mean. Then, on average, managers have more years coding than other professionals. It may explain why most of non-managers professionals are less than 1 year in their current jobs.

Part II: Does wishing to become a manager leads developers to stay longer in a job ?

To answer, I've analysed the Last Hired Date of developers who answered this survey question:

Do you want to become a manager yourself in the future?

Image for post
Image for post
Figure 3: Distribution of Last Hired Date when developer want to become a manager

This plot reveals quite surprising findings as the data indicates that developers who do NOT wish to become a manager are longer in their current jobs. More than that, around 27% of these developers are more than 4 years in their current jobs.

About 41% of developers who wish to become a manager are less than a year in their current jobs. Finally, related to Part I of this analysis, most of developers (around 62%) who are already managers are at least 3 years in their current jobs.

Part III: What other factors lead developers to stay longer in their jobs ?

To simplify the problem, I reduced it to a binary classifier by converting Last Hired Date into a binary dependent variable:

  • Class 0: if developers are less than a year ago in their current jobs
  • Class 1: otherwise

This way, our model predict whether developers will stay more than 1 year in the current job or not. I used a Random Forest classifier model with 135 features that were all based on the Stack overflow survey data. You can find my code here.

My model had an accuracy of 73% and I was interested in understanding the importance of each feature in the prediction. I started picking randomly a sample instance classified as 1 which means the developer is more than 1 year in the current job:

Image for post
Image for post
Figure 4: Feature importance when developer is more than 1 year in the job

These are Shapley values for the model features. They explains the importance of each feature in the prediction. Feature values in pink increases the prediction. Size of the bar is the magnitude of the feature’s effect. Feature values in blue cause to decrease the prediction.

In this sample, we can observe the following features contributed more to have a positive classification (class = 1):

  • Looking for a new job (I am not interested in new job opportunities = 0) It may indicate developer is already quite some time in the current job.
  • Have good experience (at least 5 coding as a professional)
  • Have many different job roles

By analysing a larger random sample including also developers who are less than 1 year in their jobs, we have these Shapley values:

Image for post
Image for post
Figure 5: Overall feature importance in a larger random sample

It worths noting the developer professional coding experience, the fact the developer is looking for a new job or not and the person’s age have higher contribution in determining whether developer will stay longer than 1 year in the current job or not.

Conclusion

  1. Being less than 1 year in the current job is the most common period among developers. Most of managers are at least 3 years in their jobs and this longevity seems to be related to their professional coding experience.
  2. Being less than 1 year in the current job is the most common period for developers willing to become a manager in the future. And those who do NOT have this wish are longer in their current jobs.
  3. Professional coding experience, the fact the developer is looking for a new job or not and the person’s age are good proxies to predict whether developer will stay longer than 1 year in the current job or not.

This analysis was an exploratory analysis, not the result of a formal study. Then, the question is still open:

What makes YOU stay many years in a job?

My story was inspired by Josh Bernhard’s analysis: How will you break into the field? To see more about my analysis, please check my Github here.

The Innovation

A place for variety of stories from different backgrounds

Sign up for The Innovation Digest

By The Innovation

Official newsletter of The Innovation Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Felipe Besson

Written by

Passionated about data science for Search and Recommendations

The Innovation

A place for a variety of stories from different backgrounds

Felipe Besson

Written by

Passionated about data science for Search and Recommendations

The Innovation

A place for a variety of stories from different backgrounds

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store