Note that letting companies know your expected compensation is only beneficial when you know that it's extraordinarily high and you wish to no waste time in many interview processes. Less senior engineers should refrain from leaking salary expectations - there's no reason to lowball yourself.
Good point, if your number is lower than what they would have offered, don't tip your hand because most likely (there are some exceptions) they will offer what you're asking.
If you do that and it's less than what the company would otherwise offer, they'll offer that instead. By putting it your CV you've effectively given away all negotiating leverage whereas the company having to list a range still means there is room for negotiation, but they can't be sneaky and pay some people significantly less than others for the same work (except however far they can get away with that within the range).
You are correct, and I should have noted that it was a poor attempt at sarcasm.
Given that the job market is already asymmetric and skewed in favour of companies, job seekers shouldn't be the ones giving away any signals, although, in reality, it is how it already works.
Not necessarily. Hiring is expensive and low balling candidates means they are more likely to consider other options. Recruiters often lead with pay, most candidates are going to be bombarded with linked in messages showing their "market value".
If those recruiters hook one of your low-balled employees, your recruitment costs have doubled, your projects have lost a productive team member, and the next person might ask for even more money.
My I low-balled myself on my first real job. The hiring manager flat out told me that the roll started at $15k+, and offered me $20k more than I asked for, which happened to be exactly the same salary offered to other members of my cohort.
1. Before you go to the interview, let them know your expected compensation
2. Counter with your desired compensation. If you're worth it, you'll get it.