This question, in an interview, seems to be likely to be illegal in many jurisdictions.
Sure, ask about competency and capability, but not years of experience.
By asking about age you started programming, you may be discriminating against parental income levels, family situation, schooling, gender and all sorts of other things.