So, this "hungry for a significant portion of the day", in the context of software development. Are you just supposed to throw in the towel on getting anything done, or write blublang with an endless stream of boilerplate, or what? Like I certainly get the experience of doing straightforward physical tasks and putting off eating, but it seems like a non-starter when you actually need to like, concentrate thoughtfully.
If anything, my concentration and energy level are more consistent while hungry.
I wake up hungry, but I'm not in a rush to get to breakfast. I start feeling hunger again within a couple of hours after a meal, but I'm still at least a couple of hours from the next one. I often fall asleep slightly hungry.
Intermittent fasting might be a good idea if this sounds alien. At least you'll only feel misery for part of the day.
I read an article years ago about how the French eat at set times and don't snack between meals, and they don't accommodate snacking behavior in children. That's not to say the French are necessarily some ideal, but certainly Americans are always snacking, on top of everything that's been said about processed foods and ease of access to food. I recall always hearing about "starvation mode" and how you were somehow going to gain weight if you ever dared to let yourself become hungry, and I foolishly believed it.
I’ve made friends with hunger, and it’s a weird head space. You begin to look forward to a good hunger the way you look forward to a good meal. Not any healthier than overeating in my estimation, and it puts you outside a lot of food oriented social interactions. Worth trying, if only to learn that mild hunger won’t kill you, but not a great lifestyle.
My concentration is consistently terrible while hungry, to the point that I might as well just consider the time gone instead of even trying to write code or really even think about much of anything. That's my experience.
So while I don't doubt your experience (and it's great that you've figured this out for yourself), it doesn't really generalize into advice about how anyone can simply change their perspective to avoid gaining weight.
Like I said, hunger pangs were far worse when I was fatter.
That said, there's a spectrum of hunger. Have you ever been hungry enough that you thought about eating your own dog? I haven't, but I've read enough stories of humans surviving terrible conditions to know that it happens.
As for concentration while hungry, that honestly sounds like either a psychological addiction or something physiological like blood sugar levels.
it doesn't really generalize into advice about how anyone can simply change their perspective to avoid gaining weight