Excerpt from an interview with Bill Gates in the 1986 book Programmers at Work:
I think after the first three or four years, it’s pretty cast in concrete whether you’re a good programmer or not. After a few years, you may know more about managing large projects and personalities, but after three or four years, it’s clear what you’re going to be. There’s no one at Microsoft who was just kind of mediocre for a couple of years, and then just out of the blue started optimizing everything in sight.
I agree with a caveat (that may not have existed in 1986 but does now). I think certain people’s minds are better set up to do different types of programming, and it may take a few years for them to find that type of programming- and once they do, they may shine, perform significantly better. Different types of programming could be programming at a different level of abstraction (managed vs. unmanaged code), different areas (database, client, graphics, applications), or practices (OOP vs. FP).
That said, I feel like the caveat only applies to maybe 5-10% of the people that wouldn’t otherwise be good programmers.
I think the quote is important to keep in mind when doing hiring- experience can be a very poor indication of competency, skill, and mentoring ability. If you get a veteran, their potential is known, whereas someone with less than three or four years experience has some of his or her fastest growth ahead. So if you consider it that way, all other things being equal, you may be better off hiring someone with less experience.