In all seriousness, developers who are overly optimistic are an important part of every team, especially senior developers. It just so happens that most senior developers lean towards the pessimistic and cynical side, maybe because being optimistic has burned them once too many. And yet, without optimism you’ll always schedule more time than necessary (the Buffer’s Buffer) and aim lower than you could have.
Optimism’s merits aside, you still want your developers to become better at estimating efforts and what can be done. My favorite example is when a developer, around 10am, lists 10 things they’ll get done that day when it’s pretty clear only half or so are actually doable.
What do you do at that point? At clients I often see managers, especially new ones, just tell their employees that they’ve got it all wrong and what the reasonable estimates are. That’s not managing, that’s micro-managing. There’s also the the cynic view of letting them go on with their delusions, knowing that when their deadlines whoosh by them they’ll keep on working late and putting more hours. But that’s not a healthy way to go your team going.
The right thing to do, when there’s no immediate rush or hard deadline, is to ask them a few coaching questions: How long do you think each is going to take? What is your plan for the day? When will you check up on your progress?
What will happen if you see you need more time?
Then, when the inevitable happens, you can follow up on the answers to these questions and help your team member grow and understand what it is that they missed, and how to notice their mistakes and correct course.