Serdar Tuncali was a “skinny kid” until he moved from Turkey to the United States in 2009. By the time he was married with a full-time job as a cancer researcher, he had begun to pack on the pounds, he says.

“We started going out to restaurants and we stopped working out, and I gained some weight,” Tuncali tells NBC News BETTER.

Tuncali, 33, tried different weight-loss techniques. He read best-selling diet books. He juggled diets like the Paleo Diet, the South Beach Diet and the Atkins Diet, but none worked.

In September 2017, during a doctor’s visit, he was shocked to see he weighed 230 pounds.

“Seeing 230 was a big surprise, especially putting myself in the obese category,” he says, “because I never identified myself that way.”

That’s when the Phoenix, Arizona resident says he stopped relying on dieting gimmicks.

“I went in PubMed and looked at research, and just started to approach it scientifically,” he says. “And then I realized that, study after study, it all comes down to calorie balance.”

Stop obsessing over perfection

Tuncali switched his focus from eating only healthy foods to eating mostly healthy foods. He adopted the 80/20 rule, which requires you to consume 80 percent of your food from healthy calories and the other 20 percent from less healthy foods. This rule helped him adopt a healthier lifestyle while still allowing him to eat some foods he enjoyed.

“80 percent of your calories come from whole foods — foods considered healthy — fruits and vegetables, lean meats, healthy fats,” he says. “If 80 percent of your calories come from that, the other 20 percent is not going to affect your diet.”

It’s important to have a plan around when you will eat each meal and stick with it, Tuncali says. But he says it’s equally important to change your habits around food.

Use distraction to manage hunger

Many people form habits around eating that can make weight loss difficult, Tuncali says.

“Like, if you are watching a movie and you are eating popcorn every time you’re watching a movie, as soon as you start watching a movie, you feel like popcorn,” he says.

He says a big part of losing weight involved changing these kinds of habits.

“I realized this as I was getting my master’s degree — on the days I’m working on my homework assignment, I would sit down for hours and not even think about food,” he says. “But if I’m not doing anything — like if I’m watching something — I couldn’t go for more than two hours without eating something.”

To help change his eating habits, Tuncali started a weight loss blog "Nerd Getting Fit." Spending more of his time writing and less time watching TV distracted him from cravings, he says.

“I spent hours on researching and writing, and before you know it, it’s like dinner time already and I’m not even feeling hungry,” he says.

The blogger adds: “If you’re active, like writing, or you’re working on your backyard and you’re doing something like a hobby — like woodwork — using your mind and body at the same time, you can go for hours without thinking about food.”

Adopt strength training into your exercise routines

Tuncali also changed his exercise habits by adopting strength training into his workouts. The increased muscle mass boosted his metabolism, he explains, which helps him maintain a healthy weight.

“If [people] focus on preserving lean body mass by eating high protein and by working out and lifting weights or some kind of strength training, they will focus on losing fat only and preserving lean body mass, so when the diet is over they can go back to normal [eating] and maintain [their weight],” he explains.

After 7 months, Tuncali lost 47 pounds.

He says he feels “awesome.”

“Like physically, I felt younger,” Tuncali says.

How to change your eating habits:

Eat healthy 80 percent of the time: While it’s important to change eating habits, you don’t need to eat only healthy foods to lose weight. Adopting rules like the 80/20 rule will help you focus on eating mostly healthy while still having some foods you enjoy.

Use distraction to manage hunger: Focus on changing habits you associate with food. For example, if you tend to snack while you watch TV, then you learn to associate TV with snacking. But if you adopt new habits that force your mind to be active, like blogging or knitting, for example, you’re less likely to have those cravings.

Focus on changing habits you associate with food. For example, if you tend to snack while you watch TV, then you learn to associate TV with snacking. But if you adopt new habits that force your mind to be active, like blogging or knitting, for example, you’re less likely to have those cravings. Adopt strength training into your exercise routine: Whereas cardio only tends to burn calories, strength training increases muscle mass, which boosts metabolism. With more muscle, you’ll be able to eat more while staying lean (as long as you stick to eating mostly healthy foods).

MORE WEIGHT-LOSS SUCCESS STORIES (AND TIPS TO BORROW)

Want more tips like these? NBC News BETTER is obsessed with finding easier, healthier and smarter ways to live. Sign up for our newsletter and follow us on Facebook, Twitter and Instagram.