It really depends on who's saying it and their relationship to me. If it's someone that has gotten better grades than me insulting my intelligence, I'll be very hurt, but if it's some teenager or someone who is clearly not as smart, the insult doesn't sting as I know that they aren't in a position to judge accurately.
I have a major case of impostor syndrome as well, so if someone insulted something like my programming, where I often worry that it's not good enough, I would probably be pretty hurt. I avoid that though by often not working on coding with other people so no one has a reason to say anything about it.