Whoever said that is either full of crap or pulling your leg, or you're mistaken. The only proper way to put in a two weeks notice is to talk to management/your department head at least. Just don't be a douche and walk out like some people. It does no favors and just screws things up for everyone.