The first thing I learned in prison was that I was nobody. Any day could be my last. I needed to be small, but strong. I needed to be humble, but brave.

I also needed to read a lot, work out and get a job in the law library. I needed a squad of two or three select comrades to eat, play cards and walk around the yard with. I needed to avoid drugs, gambling and sex — all sources of potential conflict. I needed to be smart, think ahead and plan. If backed in a corner, I needed to stand tall. Overall, I needed to love my mutilated life, to be hopeful and not fear death.

I learned these and other lessons during almost 13 years in prison for manslaughter, before being paroled in 2003. Anthony Weiner, the disgraced former Congressman and mayoral candidate who has been sentenced to prison himself for sexting a 15 year-old girl, would be wise to keep this advice in mind as he contemplates how to survive and become a better human being — or at least not a worse one.

It isn’t easy, but it can be done.

Jeffrey Deskovic, 43, spent 16 years in prison for a murder he didn’t commit. Today, Deskovic runs a foundation in his name that seeks to exonerate wrongly convicted prisoners. To date, the foundation has freed six wrongfully convicted men.

“If I was to give advice to Anthony Weiner, I would tell him to talk to the other prisoners who come from different social-economic backgrounds,” Deskovic says. “As he hears their stories, while simultaneously experiencing prison for himself, maybe that will open his eyes and he can try to change some things when he gets out.”

When I was released, I enrolled in NYU. In 2006, after graduating with a bachelor’s degree, I found steady work as a news photographer. The gig gave me a front-row seat to Weiner’s slow-motion self-destruction, beginning with the 2008 Democratic National Convention, when I photographed him for the first time.

He and I were standing backstage as Hillary Clinton addressed the delegates, conceding her loss to Barack Obama. Weiner, I figured, was waiting for Huma Abedin — Hillary’s long-time, loyal assistant — because that spring they started dating.

When Clinton finished speaking, two young campaign staffers came running out, in tears. Huma followed, but her face was placid as she scanned the crowd for Weiner. I had my camera in my hands, ready to capture what I envisioned would be a touching, tender moment. I expected Weiner to hug her, and whisper some comforting or comical words in her ear.

Instead, Weiner turned his back and walked away.

I was at a press conference in 2011 when Weiner cried and confessed to sexting a college student but refused to resign from Congress. Ten days later, he did just that.

I was there in 2013, when he promised to have put his compulsive sexting habit behind him, and announced his candidacy for mayor of New York City, and I took his picture a few months later as he announced he was exiting the campaign because he had been caught sexting yet another woman.

This past May, Weiner pleaded guilty to federal obscenity charges. He admitted to engaging in “obscene communications” with a 15 year-old girl, knowing she was 15. According to federal prosecutors, he “used graphic and obscene language to ask the Minor Victim to display her naked body and touch herself, which she did.”

Anthony Weiner sobbed during his sentencing (Courtroom sketch by Jane Rosenberg)

While most non-violent federal offenders who received light sentences such as Weiner’s go to so-called minimum security "Club Fed" Federal prison camps, Weiner's crime could be classified as a sex crime, according to Larry Levine, a former federal prisoner who operates Wall Street Prison Consultants, a service that advises people headed to federal prison on how best to survive.

“He will never see a minimum security camp," Levine says. “He’s going to an FCI,” or Federal Correctional Institute. “It’s gonna be like culture shock to him.”

FCIs, Levine says, are significantly more dangerous than a minimum security camp. “You got people serving a lot of time, things get rough, things get violent. Every FCI I was at, people were getting their asses kicked. People get stabbed with broom handles. People get brutally beat with folding chairs.”

Weiner’s lawyers, in fact, anticipated their client being sent to an FCI instead of a camp. They asked the judge who sentenced Weiner to send him to FCI Schuylkill, in Pennsylvania, but the decision will ultimately be up to the Bureau of Prisons.

Levine is not optimistic about Weiner’s chances: “He cried in the courtroom. Inmates get this information. The inmate population will view him as a whiney, cry-baby bitch. He showed a sign of weakness and that’s gonna hurt him. He’s gonna have hard time."

“If I was to give him advice,” Levine says, “I’d tell him to show a lot of respect and keep his fucking mouth shut. Do not be a know-it-all. Don’t get involved in drama and especially don’t get involved in politics. Maybe, he’ll get out in one piece."

When I was away, or “Up North” as we called it in New York, we called sex-offenders “tree jumpers” or “rape-o’s.” Pedophiles were “baby rapers.” There were also “booty bandits” — men who preyed on weaker men for sex, usually by promising to protect them from other prisoners.

But the lowest form of prison life are snitches. A sex-offender might be able to convincingly explain what happened, but there was no accepted excuse for snitching.

In June the Wall Street Journal reported that roughly 700 government witnesses and informants had been threatened or wounded in prisons over the last three years, with 61 of them being murdered.

When I was a prisoner, some inmates shared sensitive legal documents, including pre-sentencing reports and police reports to prove they did not snitch, or that they were or weren't part of a specific gang, or that they did not commit a particular crime. It's a practice that the Wall Street Journal report says is still common.

Weiner should make copies of his paperwork and hand it out, especially given that federal prosecutors noted that the 15-year-old victim in his case approached Weiner to “somehow to influence the U.S. presidential election, in addition to securing personal profit.” The victim sold her story to the Daily Mail for $30,000, and to Inside Edition for $10,000, and is currently shopping it to publishers, according to the federal government.

After reading the documents, many prisoners, at least those who lived lives on the street, may take a more nuanced view of Weiner’s case.

“To maximize his safety,” Deskovic added, “Weiner should not carry himself as if he’s entitled or better than anybody else.”

Leyla Martinez, 42, believes that “this might be a good opportunity for Weiner to learn about the struggles and adversities of others less fortunate than himself.”

Martinez served two years in prison. She is currently attending Columbia University, where she launched a petition to “Ban the Box” asking college applicants about criminal records.

Martinez adds that “rich white men” like Anthony Weiner “are the ones who make laws that impact people of color who live in underserved communities.”

“They never take the time to learn from us,” she says. “This will be his chance to do so and maybe share his knowledge with his friends and relatives when he is released.”

Chandra Bozelko, 45 was the first incarcerated American to have a regular newspaper column, in the New Haven Independent. She served more than six years in Connecticut’s prisons. Today, she is a freelance editorialist and reporter focused on incarceration and other criminal justice issues.

“When upper-middle class, educated, white people head to prison, they’re usually too focused on what other people will think about their downfall to notice what’s really happening around them,” Bozelko says. “If you don’t emerge from prison more grateful for the experience and the knowledge, then you weren’t paying attention.”