The first question to ask is whether the company publishes salary information. It's not common, but some do, and it's becoming more common.
I do not mean stuff like "our base salary for junior developers is X". I mean "Jane F. the CEO makes X", "Bob G. the technical manager makes Y", "Jo S. the developer makes Z".
If they disclose salary information to the dollar along with any benefits, then you should easily be able to find out where you stand.
Negotiate raises upfront. Tell them "I want X for the first 6 months, and an increase to Y" after that. X should be something you're pretty happy with. Y should be something you're very happy with.
Expect a raise every year. Let your boss know three months in advance: "My X-year anniversary is coming up in a few months, I intend for us to agree on a raise or some equivalent by that time." You are letting them know what to expect and to give them time to plan.
"some equivalent" gives you leeway to negotiate a 4-day work week, or extra vacation, or financial support for professional training or personal activities
Remember: you work in an industry where you can get a 20% raise every 6 months just by switching companies. Your employer knows that too. Still, they won't give you a raise out of the goodness of their heart. If they do, it's an undersized raise that took too long and you have only yourself to blame.
Any business pays employees because those employees can generate more value for the business than the business has to pay. This means there's an upper limit to what they can and will afford. This means you don't have to worry about them "overpaying" for you. THEY ONLY WILL PAY WHAT THEY ARE WILLING AND ABLE TO AFFORD.
Talk to as many people as you can and find out what they make. Some people won't like to talk about it, and that's okay. You may not feel comfortable asking people about it, and that's not okay. You need to do your research.
In addition to finding out what other people make, ask other people what they think of offers you receive. Not "should I take this?" but "I have been offered X to do Y - does that sound fair to you?" An experienced person is going to ask you a bunch of questions that will make YOU think about whether it's fair and whether you should take it.
Here is my salary history, working primarily as a "Rails programmer" plus all the stuff that goes along with it. The dates are rough but the numbers are spot on:
2004-2005 - contract PHP programmer - $15/hr to $30/hr (Grand Junction, CO)
2006 - Rails programmer - $55k/yr w/ 0.25% stock options, no other benefits. Company in San Francisco, I live in Grand Junction still. Then I moved to SF. $55k/yr in SF is not tons of fun.
True story: I asked to go to RubyConf, they said: "we want to send you, but we're worried you'll get lots of job offers and you'll find out we're horribly underpaying you and you'll leave". I went to RubyConf, got lots of job offers, found out they were horribly underpaying me, and I left.
2007 - $90k/yr, 1% stock options, full benefits - San Francisco
I turned down $250k/yr in order to go to...
2008 - $70-80/hr subcontrator - San Francisco
2009 - $95k/yr, full benefits (I quit after 3 months)
2009 - $95k/yr for first 6 months, $110k/yr after that. 0.75% stock options, full benefits
mid-2010 I went indie for a few years.
2014 - $95k year 1, $125k year 2, $150k year 3, 1.5% stock options (I quit after 6 months)
I'll be happy to answer any questions. It's a data point of only one person, but it does show you how I progressed salary-wise over a 10+ year career so far. I hope this information proves helpful (I know that it has to many of my friends, some of whom used it to negotiate better salaries, and some of whom told me I should have gotten more!)