If I were asked to write code on a white board, I would just say, "That would be like asking me to bench press in my business suit. I can do it, but the context is wrong and it won't be pleasant or productive. So, no. Let's do something else.".
If I were asked to write a bubble sort algo (I think I saw this last week on HN)...
var sortedArray = [1,3,2].sort();
Because, at the level I operate at, it's more important to know how to use your tools than to know how to make your tools.
I would also explain, "Building software is a lot like building a house. You need an architect, a foundation guy, carpenters, maybe an interior designer to make it look nice. I can be your architect, build your foundation, frame and finish, and even some basic interior design work and you want to ask me how to build a hammer?"
Then, they either respect you for saying no or the interview is over. Either way you're better off.
Of course, if you're a low level programmer, that's not the right answer.
If I were asked to write code on a white board, I would just say, "That would be like asking me to bench press in my business suit. I can do it, but the context is wrong and it won't be pleasant or productive. So, no. Let's do something else.".
If I were asked to write a bubble sort algo (I think I saw this last week on HN)...
var sortedArray = [1,3,2].sort();
Because, at the level I operate at, it's more important to know how to use your tools than to know how to make your tools.
I would also explain, "Building software is a lot like building a house. You need an architect, a foundation guy, carpenters, maybe an interior designer to make it look nice. I can be your architect, build your foundation, frame and finish, and even some basic interior design work and you want to ask me how to build a hammer?"
Then, they either respect you for saying no or the interview is over. Either way you're better off.
Of course, if you're a low level programmer, that's not the right answer.