It wasn’t your brainpower that was lacking. That was a completely valid question, and his answer should have been “I don’t know, but I can put you in touch with a colleague in computer science who can help.”
As a teaching academic, I’m sorry you had that experience. We’re not all pretentious assholes.
ETA: I have a Scottish proverb hanging on a poster in my office: “Forgive your enemy, but remember the bastard’s name.” Live a good life and be excellent to others; that’s the best revenge.