It is said that the word “nerd” originated at the Massachusetts Institute of Technology, where the cool kids who somehow managed to find their way to and into MIT characterized the uncool kids as knurds.  Knurd, you will note, is drunk spelled backward.  Therefore it was trendy to be drunk, whereas it was the sign of ultimate and irreversible squaredom to study, achieve, graduate with honors, and get a job.