Lets get this straight- this was a completely incompetent interview. It should not take a full day. A half day is a bit extravagant, but acceptable because a company wants to be conservative. Taking someone from programming question to programming question tells you right there that the company is incompetent in its hiring process, which means it isn't going to hire good people, which means you'll not be working in the best environment.

Seriously- if you're asked to write code in an interview, your interviewer is incompetent at the job he's been tasked with. This means whether you pass or not, the interview is capricious and a waste of time. It also tells you a great deal about the management of the company.

Being asked the write code is what junior programmers do when they are put into this situation, gleeful at the chance to try and make a candidate squirm and still full of enough hormones to see a potential new hire as a challenge to their position. Anyone with experience in software development knows it is not a performance art and that this kind of challenge is all about the interviewers ego, not about producing useful information. You can figure out what you need to know simply by talking to the candidate (and if you can't, you shouldn't be interviewing.) It really is a tragedy that this kind of cargo cult questioning has become so common, but it is also why companies are so messed up. Bad hiring processes produce bad teams.

But of course, the problem with bad teams is they don't know they are bad.

Patio you are being judgmental towards this guy based on your projections of your own inadequacy (e.g. feeling the need to be deferential to people who are abusing you.)

Politely leaving an interview with a company that has proven to you that, not only is it not a good fit, but they are incompetent at interviewing is not "socially inept", it is actually quite the opposite. It is the meek nerd who is afraid of what others think of him who will subject himself to abuse only to avoid an akward situation or confronting someone.

If people's skins are so thin that they cannot handle you canceling the interview, when they are clearly in the wrong, then that's their problem.

You can't limit your life by other people's insecurities.

The idea that an interview is some sort of power affair where the meek come and beg for the charity of a job is silly.

Showing integrity by not wasting people's time-- whether it is by having a quality interview process, or by leaving one that is a waste of time, should be honored. And anyone who gets upset that someone else exhibits integrity, well, are they really going to be much of an ally in the future.

Also, for what its worth, I've worked in software for 20+ years, and worked for a lot of startups. Only once have I worked with someone at one company and then worked with them again at a later company, and it was a complete coincidence. When I have gone looking for work, I've tended to limit myself to 5 interviews because that would give me 4 offers and a callback.

To do 5 interviews in short time (because I didn't want to have to answer an offer when I still had interviews that hadn't yet happened) you can't be doing all day interviews! That would be 5 days right there, and by the time I went to the 4th one, I'd already have 2-3 offers waiting for an answer!

Doing the all day interview is, itself, an indication that the company is only looking for desperate people.