I Before E

We all learned in school, “I before E, except after C, or when sounded like A, as in ‘neighbor’ or ‘weigh’.” That rule stuck in my brain somewhere around seventh grade, and has served me in good faith for many years.

So why is the word “weird” so weird? Shouldn’t it be “wierd“? But of course, if you spell it that way, it looks weird.