I hold the view that it is beneficial for scientists to share their ideas and techniques freely.
I wrote an opinion piece on Open Source and CFD, entitled
Science and fluid dynamics should have more open sources
It describes in about 8 pages why scientists are reluctant to let others see their code. The intended audience is academics like me, who write medium size research software and collaborate with a small group of graduate students as well as a few collaborators in other universities or companies. I try to provide an explanation based on the different ways in which academics and programmers gain reputation. I then advise a change of minds: science should be more open.
My work with many others on droplets and bubbles led to several codes, the latest being described here.