— 1 min read
How can I get my coworkers to write better code?
We closed with this question, yesterday. If you want to be able to motivate your coworkers to write better code, you have to know where they stand right now. I already wrote a few articles onthis topic. Follow these links, and you'll get a good idea on what to measure, how and why. You're welcome.
After reading and measuring and talking with your coworkers, you are still left with the idea of motivating them.
I am good with code and perhaps with words (you decide). Motivation is a "people-topic". This is psychology. I do know a good book, a classic that you could read: Peopleware: Productive Projects and Teams The contents in the book will help you understand how to build a great team, how to motivate people and understand their goals. You could adapt this knowledge and make them write better code. Other ideas:
Invite me to give a workshop on software design and architecture, testing or how to write better code
Try to use gamification. This could mean that you publicize the code quality metrics and make it a game to increase the score. The weekly winner gets a price (a half-day off of work?). Better: Make it a team effort. Let them all be winners because it was probably not one person that created all the code in the first place, right?
Send them to workshops, conferences or use learning sessions to help them understand how a better/different way to write code would help them with their job.
I sincerely believe that engineers, programmers, developers, coders, and hackers (which one are you?) take pride in their work. They always try to do the best they can. I haven't yet met a single person who deliberately wrote shitty code. Perhaps it was a byproduct of too little knowledge or experience. But never was it their intent. If you help them level up, they will get better. And your code and products will too.