Publish pre-research code on Github? In preparation for future PhD work I came up with some ideas &amp; protypes for software components that might later become scientifically relevant, both from a CS and application viewpoint. My natural reflex to having a working proof of concept for an idea is to put it on Github under GPL. 

However all (or most) of my colleagues strongly recommend against that before I haven't built any scientific credit based on that code. Their reasoning is that someone else might "steal" the idea and "usurp" the scientific precedence.

Given that the scientific and open source communities do seem a bit detached in places this appears plausible.

Does anyone have actual experience from a similar situation? Did anyone ever have scientific credit stolen from open-sourced code? The other questions, namely 19348 and 17740, don't even mention the appropriation issue. But when it's not an issue, why are my colleagues so frightened about it?
If you make your code public, you need to think about the consequences. If your goal is to contribute toward academic research, the GPL should cover you just fine if someone wants to use your work. Remember, this means people can (and might) use your code for their own work. This doesn't stop someone from taking your incomplete idea and running with it. However, it can ensure that you are credited for your contribution (at least in the codebase) and that your code cannot be monetized for someone else's benefit. But remember, this is the internet we're talking about. Not everyone is conscientious. 

I generally go by the belief that an idea is worthless without execution. Thus, if someone beats you to the punch, it sucks but that's life. Nevertheless, the best way to curate a good idea is to get input from others, hopefully some of whom may be more knowledgeable about the topic than you or have different takes on it than you. Therefore, it's a cost-benefit trade-off. You should decide whether the risk of someone completing your idea outweighs the potential improvements you may make from sharing your work and receiving feedback. If so, don't make it public. If not, share it with the world and seek informed feedback.

I am personally inclined to go with the latter case. There's a lot of stuff out there. The chances someone steals your ideas are often pretty slim.

To answer why people are often so afraid: I think most people have tunnel vision about their work. Because everyone is an expert on their own work, it seems pretty easy to them. They've also put so much time in to it that even the most minute chance of someone taking their idea frightens them. Having read plenty of OPC (other people's code), it's usually a pretty high bar for entry in order to actually try to steal someone's ideas.