I wrote a (quite frankly dull and rambly) blog post about my upbringing to try to figure out why it made me an engineer, and it's pretty much the same. I was encouraged to tinker and nothing was ever discouraged. The only discouragement was lack of knowledge from careers and university advisors at school who didn't even tell me computer science was an option (for uni or a career).
I think that kind of upbringing helps, heck it's crucial. However, a lot of social signals can easily curtail it - peer pressure for not being girly and being called names etc (never happened to me, but I know others it did happen to).
Sad, but true. I know my daughter dealt with a bit of this a couple of years ago and we did a lot of bolstering of her self-confidence and talking through various scenarios during that period, until she eventually got to the point where she realized the issue was theirs, not hers. Fortunately, since then, she hasn't let it bother her and hasn't looked back and, really, once the kids involved saw that it didn't bother her, the shut up.
I was actually teased/bullied a lot as a kid, particularly around age 11-12, but it was more about my disability (I'm legally blind) than the stuff I was into. I kept a low profile at school and most of the kids doing the teasing didn't know me well enough to know my geek ways. I come from a long line of stubborn, though, so it didn't really have a lasting impact.
I think that kind of upbringing helps, heck it's crucial. However, a lot of social signals can easily curtail it - peer pressure for not being girly and being called names etc (never happened to me, but I know others it did happen to).