Different ratios work for different people. What I tell people is figure out a menu for each ratio type (carb-protein-fat 40-40-20, 50-30-20, 20-30-50, or whatever else you might want to try), then take 2 weeks for each ratio to see how your body responds. Pay attention to things like bloat, GI regularity, sleep quality, productivity, and mood in addition to scale weight. You'll know when you've got a winner.
In general, on workout days you'll want to get more protein and eat the bulk of your carbs after you've done your workout. This will make sure that your body uses these resources to recover from the workout rather than to just burn at your base rate and store the rest.
1) eat real food - more vegetables, moderate meat, moderate fruits, less grains, less sugar, less vegetable oils.
2) exercise - moderate intensity cardio, sprinting, heavy lifting, dedicated stretching and mobility.
3) live - relax, de-stress, meditate.
Disclaimer: I'm not professionally qualified to make any formal recommendations. I've just done my homework and I'm my own guinea pig. All of my data, unless otherwise cited, comes from a sample size of n=1 (me).