When two parties sit down for a job interview, they owe it to each other to be honest. That seems like a fairly obvious statement. But I'm not just talking about on the surface here. Both parties need to come to the table prepared to be forthright about what they're looking for. And this cuts through all of the other long-standing advice about interviews like showing up on time, turning negatives into positives and all of that. Let me give an example.
I interviewed at a company in Chicago a few years ago. I first spoke with one of their developers on the phone. They seemed to be doing things that interested me so I accepted an in-person interview. One of the first things I was told by the hiring manager was "we work a lot of hours here. We regularly work 50-60 hours, even 80 is not uncommon. Is that something you're comfortable with?" I paused. I immediately knew my answer was "no", but I was struggling with that age old advice about never being disparaging during an interview. At the same time, it felt strange to me to give an affirmative answer. It was untruthful, and all it would do is prolong the process which would end up wasting my time and theirs since I was not interested and not a good fit for them. So I decided to answer honestly. I said "No, I'm not comfortable with that. I'm OK working some extra hours when it's an extenuating circumstance, but I think that when it's persistent, it surfaces a problem in your process somewhere that needs to be found and fixed."
I expected to be roundly dismissed. But instead, the interviewer told me that he appreciated my honesty. He explained that they knew they had more work to do than their current staff level could handle and that's why there was a hiring push. The rest of the interview went very well. As he walked me out, he mentioned that my answer to the hours question raised a red flag, but that otherwise he thought I was a really strong candidate. I told him that they were doing some really cool things and that I appreciated him laying out the hours expectation but that I'm not comfortable giving up that much of my time. And we went our separate ways. But that interview really opened my eyes to the value of determining your ideal situation.
As programmers, we are inundated with options. We're not in an industry where a job offer is a gift. There is a lot of demand and each of those companies have different processes, different goals, different expectations, different benefits, different pay structures, etc. You owe it to yourself to spend time thinking about what is important to you in regards to your work situation. And then make sure you find out as much about that as you can when you interview somewhere. Don't be scared to ask questions. And more importantly, don't be scared to tell a prospective employer that you wouldn't be a good fit and explain why.
The same goes for companies, although they admittedly have a slightly harder job. There are a lot of programmers out there. There is a lot of supply and a lot of demand. Companies need to figure out what kind of employees they want. The harder part is that they have to make sure that their working environment can support those employees. Will your current way of work set the employees you want up to succeed? Or will it work against them? I saw a tweet recently that said "Good employees in a poor system are commonly mistaken for poor employees." Good and poor are too black and white. I think that an employee's potential can be severely hampered when they're in an environment that works against that potential. And that's bad both for the employee and the employer.
Another key point for companies: don't conflate where you are now with where you'd like to go in the future. I've seen this often. If you tell an interviewee that you're something that you're not (yet), they may arrive as a new employee and be put off immediately. If, instead, you honestly tell them about how things are now, including your goals for the future, they'll take the job if that future is the place they want to be. They may also help get you there!
We need to stop thinking of the hiring and interviewing process like we do the courting process. Potential employees are making life decisions and companies are making decisions that affect their bottom line. With the stakes being so high, it makes a lot of sense for both sides to spend time evaluating what a 'good fit' means and figuring out how to project your values to one another.