Q: What's the correct etiquette on handing in your resignation? My friend texted his boss, but I think that's a bit informal. Should I just send him an e-mail? I've never had to do this before.
A: Unless you have a deep and justified loathing of your existing boss and the company you work for, you should go about resigning with as much thoughtfulness, gratitude and grace as you can muster. This company has given you work and paid you to do it. Your leaving is likely to cause it some expense and inconvenience. (Replacing staff costs a surprising amount of money.)
More selfishly, if you continue to work in the same sector, there could well be an occasion in the future when you'll need each other again. So give your boss as much warning as you can. Tell him personally and tell him first; don't let him pick it up on the grapevine. Rather than wait for him to suggest a farewell drink, invite him to join you in the pub one evening. Thank him for putting up with you.
And if you find all that a bit too effusive, please don't hand in your cards by e-mail. That's not just informal, that's bloody rude.