Depends on why you're failing. If you're misreading the people in the room, try this Rands article: http://www.randsinrepose.com/archives/2007/09/25/the_button....

But I wonder if it's not something else. The way you describe what you "like" is interesting, and then you write:

> It's so bad that I don't even remember how my old programs work even though I'm pretty sure I'm the one who wrote it.

Did you write your old programs?

I don't mean, did you assemble them, or did you get them working, or did you construct them. I mean, did you write them?

There is so much code out there today that it's hard to write a program without some personal discipline. It's very straightforward to find two or three things that are similar to what you want, and copy and paste one bit here and two bits there and make things fit and have a working program that does something.

But, copy-and-paste, or batteries-included, however you look at it, that's a different skill set than thinking through a problem critically and logically and algorithmically and writing a solution from scratch, and that's a different skill set than doing it in a preferred language in an idiomatic style without looking anything up, and that's a different skill set than doing it on a team with people other than you who have to understand it and deploy it in production and maintain it.

The last company I worked for, technical interviews were to determine three things:

1. Are you lying to us? Do you actually know all the things on your resume? We had a genuine 8, maybe even a 9, in JavaScript in-house, if you said you were an 8 or a 9, oh, man, you really got a grilling, and most people couldn't keep up. We had people that good in various subjects. Most people are 5s or 6es.

2. Where are your limits? Everyone has them. I'm a 7 in interaction design, say. I've been doing it for seven years. I know many of the things I'm not good at, but I also know how to correct for them. It's hard to throw me a curveball, but, strictly speaking, I also don't think I'll ever progress past a 7, because if I'm staying on top of my game, there's always something I won't know that I am also actively pursuing. We would press the interview until the person admitted they didn't know and explained how they'd figure it out, or they'd keep bullshitting us and they'd fail.

3. Where do you go deep? When hiring for our Java and Oracle developers and DBAs, we needed people who had gone deep into Java and Oracle stuff. Not, "I'm a good programmer because I have critical thinking and logic skills, and I'll look stuff up in the reference manual when I need to remember a function name," but "I've been working exclusively with Java or Oracle or whatever for ten years and I know function names and weird edge case bugs by heart and I wrote that book you have on your desk." When I was a developer, I was like that with semantic HTML and cross-browser issues, but I couldn't do that today. If you're a generalist and you're interviewing for a specialist role, we'd weed you out pretty quick.

If you're a generalist, and you're getting stumped, maybe it's because you're applying for specialist roles. Maybe your resume is a little over-confident and you talk a good game on the phone, which is why they're not weeding you out sooner. If that's the case, try vetting the jobs you're applying for better, rather than trying to game the interviews, too.