Though diet book authors claim they have a once-size-fits-all solution for weight gain, be it giving up sugar or salt or wheat, the fact is that we have the luxury of being able to eat in excess for a very low cost.
But 'do everything in moderation' is also ineffective for losing or maintaining weight, because the more people like a food, the more forgiving their definitions of moderation are,
A paper in Appetite describes the relative meanings attached to moderation based on perceptions, based on surveys.