The problem with both is that people who can follow them for effect already are following them. So in practice, diet and exercise is what I call "fuck off advice": the person you give it to, should they believe it, will try and try and not see much effect, and eventually fail - but the process will take 3-6 months or more, during which they won't bother you with their problems, and at the end of it, they'll blame themselves for not being good enough, and perhaps even see you as a good person who tried to help.
It's obvious in general - e.g. clearly poisonous things are clearly poisonous. Less so in specifics, as the body is good at extracting what it needs from ingested food, and discarding the rest; it works out as long as you provide the full range of the things the body needs. However, that wasn't my point.
My point is, recommending change in diet and exercise regime as a solution to problems is about as effective as telling one the solution to money problems is to study nuclear physics and then join a bank as a quant. Yes, technically it works, but people who could do this are already doing this; for everyone else, it's a near-impossible task, given the constraints of their current adult life. Getting on what's currently considered healthy diet and good exercise regime, means trying to endure self-inflicted psychological torture and having non-productive but tiring activities cut into the amount of time you have in a day/week - for indefinite time period, but at least couple months, and uncertain gains. Not many adults can pull that off. Which is why they don't, which is why "diet and exercise" is what I call "fuck-off advice". For most who try, it's bound to fail, mostly for structural reasons, and will bring plenty of pain and guilt in the process.
An untrained individual(not morbidly obese) who incorporates the following 3 minute workout in their morning routine will feel the changes already on day 2:
Hold a plank, for as long as you can manage
30 second break
Push ups, as many as you can do
30 second break
Again do push ups, as many as you can do
The extremely short body weight workout I described will still create a noticeable improvement and can be improved upon on when the individual feels ready. What I described will be a good first step and is hardly akin to studying nuclear physics. You don’t have to be an Olympic level athlete to reap the rewards of daily exercise.
In general, an improvement in diet and physical activity, even small changes, has an almost immediate positive effect. Clarity of mind, improved self confidence, better sleep…
As for dieting, I had a limited success with it - managed to visibly drop weight in few months, though I regained it over the year after I dropped the diet regime. Problem is, the diet was moderately distracting on a daily basis. The bigger problem, however, is that the vastly reduced variety of meals I consumed made me dislike some of them, and make others feel bland - so at this point, I can't see myself going back on the same diet, simply because I'm repulsed by the idea of eating those same foods again.
And back to the big point - as far as I checked, neither my weight, nor diet, nor physical activity seem to have had any noticeable correlation with my sleep patterns, mood, energy levels or ability to focus. I've never felt any positive effect within days or weeks of improvement in physical activity or dieting - nothing above noise floor, and especially nothing I could clearly attribute to lifestyle change.
As a developer, the problem is obvious. The solution statement is too general and non-specific to be able to act on. You might start with, choose a language based on some goals, get an environment set up, write hello world, etc etc.
The same divide and conquer approach applies to diet and exercise. There’s a bajillion diet and exercise programs that exist out there, but likely it’s too overwhelming to choose from the thousands out there and we don’t know what we don’t know.
My recommendation is divide and conquer to start small. Many choices for activity exist.
The main thing is to not be overwhelmed and just start with one thing and start small. Showing up is 50% of the work.
Here’s some seeds for the exercise portion. Put any of those terms into YouTube and there will be many folks out there with lots of great and bunk information, but holding it’ll be a start to parse.
Walking, running, calisthenics (body weight pushups, squats, jumping jacks, etc), weightlifting (dumbbells, barbells).
For nutrition, I’ll seed you with the basics.
Cut out foods that make you feel bad. This starts by taking a moment to assess how you feel before consuming food and after consuming food and determining whether you feel better or worse. Generally stay away from the worse feeling foods.
And for what to consume, increase the number of servings of color you consume to 4-5 colors a day. Reds (peppers, tomatoes), blues (blueberries, purple cabbage), greens (kale, lettuce, spinach), yellow (squash, pumpkins, lemons), etc.
Just about every diet and exercise program out there will follow some form of this skeleton with concrete plans and meal prep plans and such.
Hopefully this is enough of a seed to help you over the research activation hump!
Or feel free to email the profile if you’d prefer more in depth discussion. I’m happy to share the years of my knowledge attained for my own specific goals as an enthusiast of the diet and exercise lifestyle.