Why Interviewers Ask Probing Questions
When you're interviewing for a position, at every single level of that interview process, you have to prove that you've got the qualifications to do whatever job your interviewer is asking you to do. And it is their job, as an interviewer, to find and poke holes through anything you haven't got covered.
So while it may have been a little rude for your first interviewer to degrade your understanding that harshly, your response should not be to dismiss this question, but to justify it as a non-issue, backed up by your experience and understanding.
What You Can Do
Certification in the languages and core aspects of the job you're applying for can help, and are easier and cheaper to get than a full degree*, and if you have a full degree already, getting the required coursework in for an associates or bachelors level degree for your field could be easier than you think (ask an academic advisor - which I am not).
If you intend to get into this field without a degree and without certification, it is going to be much more difficult - you will have to back it up with something, either prior work experience or some quantified time spent learning the trade. "Hobbyist" programming probably isn't going to cut it - you can include it on your resume, but next to someone with professional or even academic experience, it will definitely seem inadequate unless you have a complete project or a work reference to back it up.**
In Short
In short: thehe questions, while harsh, are valid and need to be addressed. If you can, get certifications and maybe consider pursuing a degree. If you can't, find some way to back it up with either a well-documented project of your own, or job experience outside of the regular workforce.
Footnotes
*My local community college got me certification for basic programming and Java, both of which helped me fill in the gap of having a Computer Science minor.
**I had some luck here by taking on a few private web-development freelance jobs, which I could then put on my resume as work experience in web development. Any private or freelance work or project you can quantify in hours/years/jobs worked, especially with references to back it up.