Another HUGE factor on a programmers productivity is simply their level of interest and personal motivation for this particular piece of work. If a programmer finds it interesting then they likely will be much better at it than if they are less interested or worse, actively hostile towards the work, which happens alot.