Using FitnessPal as my primary tool, I lost about 45 lbs well over 18 months ago now. Maintaining weight has always been a challenge in the past, but feel pretty confident that I now know how to accomplish that.
The main difference this time was during the weight loss phase, spending a solid 1 1/2 years tracking every single calorie that I consumed every day, for every meal and for every snack. By doing this for a long time, you eventually know instinctively how many calories you are consuming in any given intake - you no longer need to maintain a diary because you are doing it automatically. Plus, over the course of a year, you have retrained your body to adapt to a normal caloric intake.
For weight loss, I needed 1700 calorie per day was need to lose 1/2 to 1 lb per week. For maintenance, I increased to around 2000 calories a day. Took a long time to determine these setpoints with accuracy.
Lessons learned over these 2+ years of weight loss and maintenance?
It's pretty simple for me. Right-sizing portions and meals and avoiding calorically dense foods, which generally means little/no fast food or restaurants, and minimizing but not eliminating snack foods and rich desserts. Essentially realize that you aren't eating for entertainment or pleasure, you are eating to fuel your body in a sustainable healthy way.