Ruth Bader Ginsburg won’t listen to nasty comments.

The 83-year-old Supreme Court justice said her mother-in-law gave her some sound advice on her wedding day. “In every good marriage, it helps sometimes to be a little deaf,” Ginsburg wrote of the guidance in a Saturday essay in The New York Times that was adapted from a forthcoming book.

“I have followed that advice assiduously, and not only at home through 56 years of a marital partnership nonpareil. I have employed it as well in every workplace, including the Supreme Court,” she continued. “When a thoughtless or unkind word is spoken, best tune out. Reacting in anger or annoyance will not advance one’s ability to persuade.”

It’s advice that Donald Trump, the Republican presidential nominee, seems incapable of following, as he has relentlessly criticized anyone who has spoken out against him— including a Gold Star family and, most recently, former Miss Universe Alicia Machado.

Ginsburg also described how she balanced her studies and being a new parent while in law school, writing that she would have been unable to do it without a nanny. Having to divide her time between her coursework and daughter, made her a better student, Ginsburg wrote.

“My success in law school, I have no doubt, was in large measure because of baby Jane. I attended classes and studied diligently until 4 in the afternoon; the next hours were Jane’s time, spent at the park, playing silly games or singing funny songs, reading picture books and A. A. Milne poems, and bathing and feeding her,” she wrote. “After Jane’s bedtime, I returned to the law books with renewed will. Each part of my life provided respite from the other and gave me a sense of proportion that classmates trained only on law studies lacked.”

Ginsburg graduated from Columbia Law School at the top of her class, but was passed over for a clerkship on the Supreme Court because she was a woman. She went on to found the American Civil Liberties Union’s Women’s Rights Project. As a lawyer, Ginsburg pushed the Supreme Court to strike down laws that discriminated on the basis of sex.

She noted in her essay in the Times how much things had improved for women in the legal profession and in the business world, but said there was still a long way to go.

“One must acknowledge the still bleak part of the picture,” Ginsburg wrote. “Most people in poverty in the United States and the world over are women and children, women’s earnings here and abroad trail the earnings of men with comparable education and experience, our workplaces do not adequately accommodate the demands of childbearing and child rearing, and we have yet to devise effective ways to ward off sexual harassment at work and domestic violence in our homes,” she continued. “I am optimistic, however, that movement toward enlistment of the talent of all who compose ‘We, the people,’ will continue.”