A really good description of the problem is here.
It's only exacerbated when both the producers and the consumers of the software are scientists who don't think software principles are interesting and/or whose mentors don't believe in time for training on such principles. Invariably we are targetting weird platforms, too.
I recently heard someone say that about 30% of professional programmers' time is spent on build issues. If scientists are as much as half as good as full-timers, that means they spend 60% of their time on build issues, but they also have to spend 50% of their time on reading and writing discipline-related stuff. That means we get negative 10% of our time for actual productive coding. If we're lucky.