According to StackOverflow’s latest yearly survey of 50,000+ developers, these are the Top 5 reasons developers stay happy in their jobs:

#5: They believe in your company’s mission.

It’s cliché, I know, but it turns out it’s even true for developers.

And really, it’s one of the basic truths of life — we all want to follow some sort of mission that gives meaning to what we do.

Otherwise, you’re just a code monkey.

I’ll give you an example — the mission of my own development company, X-Team, is this…

To create a flatter world where extraordinary developers have access to incredible opportunities regardless of where they live.

Considering our developers come from 30+ countries and believe in living without borders, it’s a mission they can grasp and relate to. They want to be a part of that sort of movement.

What movement is your company leading, and do your developers care about it?

#4: They get to improve an existing app.

Developers love getting to walk in to a new job, see a giant mess, and be the superhero who gets to re-write, re-factor, or optimize the crap out of the existing crap.

The same is true for most jobs. Who doesn’t want to get the credit for making a site load 10x faster, or making videos load ads faster and ultimately make the company more money?

Some call it ego, others just like a good challenge. Either way, developers have a little Barney in them…

#3: They get control over product decisions.

Now I can already see every product manager reading this reacting like so:

The thought of a developer having any say in a product’s direction can be terrifying.

But what I’ve found is often the case is an unnecessary wall between development and product teams. Both sides think they’re against each other and that neither side wants to hear each other’s opinions.

In reality, it’s the opposite. Dev teams want to collaborate with product (as evidenced by this finding), and product teams want to hear from dev teams about new tech and how to make their products cooler.

But you’ll never get there until you open the communication and let each side have a seat at the big boys table.

#2: They get to build something new.

Developers love shiny new toys. Just look at the JavaScript community — there’s a new shiny framework released every day it seems.

If you force a developer to keep maintaining an old, outdated codebase and never get an opportunity to play with the new tech that their buddies are talking about at the bar, they won’t stick around long.

Even if your codebase is outdated, find opportunities to let your developers build small tools with new tech as side projects that help your company in another way.

#1: They keep learning and growing.