My surgeon wanted me to lose 20 pounds before surgery. I hadn't really dieted in years, because my previous experiences with dieting were that I would lose a small amount of weight and then gain it all back and more. I eventually quit dieting because I figured I was better off staying at the weight I was than losing, regaining, and gaining more again. I was reluctant to diet before surgery because of my past failures (which was also why I was resorting to surgery in the first place), but I had to lose 20 pounds just to get the surgery, so I had to try something.
I decided to try intermittent fasting because I know people who swear by it and it was something I hadn't tried before. Initially, I just fasted for 16 hours per day and ate as much as I wanted the other 8 hours, and it didn't work very well. One of my surgeon's pre-op requirements was to track my food for a week, either on paper or with MyFitnessPal, and I hate doing anything on paper, so I went with the app. I've counted calories before and also used point systems where I had to track my food, but this was in the days before iPhones and I had to track everything manually, look up the numbers either on the labels or in some kind of book, and it was such a hassle that I never stuck with it for long. I was surprised by how easy it was with the app, and I kept using it. It gave me a limit of 2190 calories per day, and at first, it was hard to stay under that, but I gradually decreased my intake until I was averaging 1500-1600 before surgery.
I set out to lose 20 pounds before surgery, and I ended up losing 70 in 5 months! I actually started to wonder if I should have the surgery because the combination of intermittent fasting and MyFitnessPal was working so well. I've never lost that much weight before. But I started out with an extremely high BMI (over 60), so even after losing 70 pounds, my BMI was almost 50, and I realized that it was highly unlikely I would be able to lose enough weight without surgery, and also that there was a pretty good chance that I would gain it all back without surgery, so I went ahead with it.
I'm glad I put all that effort into losing weight before surgery because it sort of gave me a head start. I've only lost 60 pounds in the 4 months since surgery, but add the 70 pounds before surgery and I'm down 130 pounds total. Plus, it helped me develop some better habits that I think have made the post-surgery lifestyle easier, like cutting out snacks and tracking everything I eat.