Cambridge-native Mindy Kaling returned to her hometown on Wednesday gave a commencement address at the 2014 Harvard Law School Class Day.

During her 17-minute speech at the student-recognition ceremony, she shared advice to the soon-to-be lawyers and poked fun at herself, her alma mater and even the students she addressed.

Of Dartmouth, where Kaling graduated in 2001 with a bachelor's degree in playwriting, she said:

"On the surface, it would appear that I an unconventional choice to be here today. To be honest, I don't know much about the law. I graduated in 2001 from Dartmouth College, an academic institution located in lawless New Hampshire, where, when you arrive, you are given a flask of moonshine and a box of fireworks and you are told simply to 'go to town.' Except there is no town; there is only a forest and a row of fraternity houses that smell like urine.

Actually, little known fact - Dartmouth has a law school. It's just one semester, and its coursework is entirely centered on how to beat a DUI."

Kaling added that she prepared for her speech "like any good Dartmouth-educated student would."

"I drank a 40 of Jagermeister, then called my dad to see if he could get me out of it. He's here today, he could not get me out of it. So I tried to hire a college freshman to write it for me in exchange for a $200 gift card to Newbury Comics. That didn't work out. Finally, seeing as I absolutely had to do this, I rolled up my sleeves, sat down at my computer and tried to buy a commencement address off movingcommencementspeeches.com. My credit card was declined and so I wrote this thing myself and here we are today."

In her so-called backup plan speech, Kaling teased the graduates:

"With this diploma in hand, most of you will go on to the noblest of pursuits, like helping a cable company acquire a telecom company. You will defend BP from birds. You will spend hours arguing that the well water was contaminated well before the fracking occurred. One of you will sort out the details of my prenup, a dozen of you will help me with my acrimonious divorce."

Though she jokingly deplored their future careers, she said the law school is the best program at the university. "Let's be honest - Harvard Law is the best of all the Harvard graduate programs.

"The business school is full of crooks, the divinity school is a bunch of weird virgins, the school of design is for European burnouts and don't get me started on the Kennedy School. What kind of degree do you get there? Public policy? Right. You mean a master's in boring me to death at a dinner party. And the med school is just a bunch of nerdy Indians."