At my workplace, I organize a tiny hackathon that's sponsored by our company then we all have to build a product that solves something specific. And that is useful too.
And most times we engage in a coding fight where we pick a random project and whoever completes it first will take all the money "Just a very little money for motivation". Because most people get motivates if they see something really beautiful and they become motivated to build such too.
But seriously, the only motivation is when we developers are sorrounded with people that are highly skilled than we do.