I find it highly useful to get right to the point in discussions with potential employers and discuss salary right away. I've been burned a few times by companies that simply weren't willing to pay enough. Even if what I want is fairly higher than what's on offer, for a really good position I might consider it.
It seems a stretch to say you were burned. The company has no idea how much you are worth (to them, not an abstract company) until they interview you. The offer you got is not necessarily the same as the offer that somebody else might get; perhaps your offer was much lower because you seemed like a poor fit.
I wasted my time on a coding project for them, so burned is indeed correct, though it was my own fault. I actually never got an offer. They just told me what they thought would be the maximum as they really liked the project. Also, I learned never to do that again.
This last round of contract hunting for me was similar. Every single organization wanted an 8+ hour project to prove my skills but half the salaries ended up being <80k. So I started having to state base contract rates up front.