But one is encouraged (and is your job) and the other should be avoided (or you should be _really_ discreet).
And everybody oogles. It's just that men have a harder time being discreet about it :)
Also, many junior devs are fresh out of college, where boob-staring is a fond past time and hitting on classmates is a normal thing. But that's not acceptable in the work place.
They might also not be used to talking to women about code if their classes are predominately male. There are a lot of unrealized biases and bad habits that can go away with time and experience, but this is a good reminder for the introverted and extroverted alike: the women on your team are geeks just like you. Geek out with them!
Aside: I had to catch one of my own bad habits writing this post. I initially wrote "girls" instead of "women", which can be marginalizing terminology.
2) If someone is mean to you. Like really _mean_ to you, tell them. (Or tell team lead etc...) Some examples are: - UX guy jumping up on you grabbing your keyboard while in the middle of complicated rebase = not ok! - other developers not talking to you/ not helping you because they feel superior = not ok! - random people coming up to your desk demanding you take immediate action because they experienced 'some bug' = not ok! - people sending you cryptic emails "everything looks fucked up" = ... relax, tell them to send screenshots
3) Take breaks! I actually think this is one of the hardest points and I still cannot get myself up sometimes for breaks - but yeah - fucking take breaks! You don't need to go out with the smokers every 40 mins, but try to break for lunch and mayyybeee socialize (if your co-workers are actually sociable)
4) I can't believe I'm actually posting this but - if you happen to be a straight male and there's a female on the team... ugh... don't stare at her boobs or at her in general - talk to her about code - yes there are female coders out there and fyi they are just like you so don't be too creepy and listen to what they have to say about your code. -__-