I know that everyone knows exactly what you're talking about when you say, "science at large," but I do not. To categorize crudely, there are two types of programming gigs:
- The kind in which you're working for the evil empire, making their mutual funds invest better, or figuring out how to sell to companies better, etc. etc.
- The kind in which you are working somewhere in the evil empire, but your project has a "pure" technology focus (or may get one). This includes open source (and open source with pay-for-support agreements :) ).
Just think about how the Apache project has benefitted science (or MySql, or even Java). The closer you can get to a pure technology focus, the more chance you have of helping. This is my answer, however...
If you want to get your geek on and have an immediate link with "science," meaning dudes (and dudettes) in white lab coats doing pure research for no personal gain... those people usually work in universities and use the research assistant or teaching assistant who "knows the most about coding" (I should know, I was there once). If you really want to help out, walk over to your local university, and head directly to the department that strikes your fancy. Ask the administrative assistants who their boss is. When you find the main administrative assistant who runs the show, they will be able to tell you which professors you can talk to, what you should wear to talk to them, and what kind of stuff you should say so they'll be interested in talking to you. Surely when you offer your services as a coder, you'll get a taker or two.
If you do this, don't forget to think about when you'll start charging money. That way you can quit your day job and just do "science at large" full time.