Your colleague seems to be insecure about his competence. Too bad he is trying to cure that by talking down others. If he is really that ignorant, he will be let go soon, I believe. Don't get upset over such people. My suggestion is to ignore his silly comments instead of fighting him directly. You have to expose his imcompetency in front of your boss and/or other co-workers, like pointing out his fault when you have a project review etc., and keep good documentation so that you alway have facts to back you up. Never even appear to get personal, if you let others feel you two have a feud, it will weaken your fact-based comment on him.