I'd really encourage anyone new to software development leadership or mentoring to watch Bob Ross on The Joy of Painting. That patient, calm and above all encouraging style while demonstrating great technical skill is exactly what I like to see in tech leads. It's inclusive; the attitude is that anyone can learn, and the easygoing presentation speaks to the less confident in a way that other styles don't. The effects are both more positive and longer lasting than the all too common semi-benevolent dictator. It's better to show people the right way to do things and give them the confidence they can do the right thing themselves, rather than to instil the fear of failing and being found out.
There's something else I like, too. Every once in a while Bob will stumble, turn to camera and say, "we don't make mistakes here - we just have happy little accidents."
This is an attitude we could do with a lot more of in software development. Something falls over in a sprint demo? Internal beta testing reveals a flaw in the application? A code review spots a security loophole? These aren't mistakes; they're happy little accidents that prevented the problem from making it to production. What Bob does after an accident is find a way to incorporate it in the painting - to make something useful out of it. The same thing should happen in development. Make something useful out of it: fix the bug, use the flaw to start a conversation about better ways to implement the feature, organise a lunch and learn session to teach the team about the security flaw and how to prevent it.
The important thing is to always be learning and improving. Trying to paint over your mistakes only makes them bigger and more obvious. Great teams love the opportunity to find out what went wrong and improve as a result. That's what the "happy little accidents" are in software development; opportunities to make something better. That applies at every level from CSS misalignments to entire products failing to attract customers. Good companies embrace those failures and use the experiences to learn from.
Image by Matt Kimber CC-SA 3.0