I always believed that there is an important distinction between off-topic questions which are... well, “plain off-topic”, and the ones which are off-topic because they simply belong on a different SE site, which in case of Programmers.SE is StackOverflow, by lack of other migration paths.
Those which are off-topic without having a chance to be migrated to StackOverflow (either because their quality is too low or because they are off-topic on SO too for any other reason) should be closed. Answering them would be a sort of positive reinforcement for those questions, so... don't answer them.
Those which are off-topic simply because they belong on StackOverflow are a very different beast. They can be good, valid, well formulated questions, which have no reason for being downvoted or unanswered of they were posted on StackOverflow in the first place. They also have a good chance being migrated instead of simply closed.
When encountering this second type of questions on Programmers.SE, I find it natural to vote for migration, as well as to write an answer (when I know the answer) even before the question is actually migrated. As I explained previously, this seems like a good and harmless thing for Programmers.SE. The positive/negative reinforcement thing doesn't really apply here: the original poster made a small and understandable mistake, the community migrated the question where it belongs, no harm done.
Recently, I received a comment from a well-respected member of our community, suggesting that I shouldn't do that.
[...] It makes no sense to answer an off-topic question, on the off-chance that it might actually get migrated to the correct one. Most off-topic questions on Programmers get closed, not migrated.
What do you think one should do in such situation? If a question is about to be closed as off-topic (and eventually migrated to Stack Overflow), should I, while being personally convinced that it is a good candidate for migration:
Avoid answering it, given that I won't probably bother tracking the question until it is closed/migrated in order to answer/upvote it after that?
Answer it, hoping that community will be of the same opinion as me that the question should be migrated, instead of simply being closed?
Do something else?