When I was in high school, I spent one of my summers working in a lab. The professor had a small lab, so I was given my own project, and made enough progress on it to publish a paper.
While I was working there, one of the PhD students started taking a keen interest in my work, and she kept wanting to discuss the problem, asking about details of my methodology, etc. She even started replicating my work and literally rewriting my code to produce the same graphs that I was getting. She was not originally assigned to the project, but I was happy to discuss the problem with her, because I enjoyed my project and wanted to talk about it with as many people as possible.
At the end of the summer she asked me to send her the slides from the talk I gave at group meeting. A few months later my supervisor told my brother that she presented my work at a conference without mentioning my name. (He never told me directly, probably because he thought I'd be sad.)
Anyway, my dad (who is a professor) was very mad about this, and told me I should write a draft of the journal paper myself so the professor would feel obligated to give me first authorship instead of that PhD student. A few months later I sent him the draft, and he didn't give me first authorship, but did give me coauthorship on three different papers, one of which was only marginally related to what I did. I got into my top choice of college (and graduate school), but this was one of the more traumatic experiences I had as a teenager, and ever since this incident I've sworn off academia as a career option.
Do you think I should have done anything differently, and what would you have done in this situation?