What kind of gaming? What detail level?
almost all games these days can be scaled down to run on lower end computers with discreet graphics. They have to, if they made games that would only run on high end hardware on low then they wouldn’t have much of a market because few people can afford to change GPU every 6 months (when they cost over 30,000nt each).
So anything with a GTX 1050ti or above can handle light gaming, CPU matters but i3 8100 has proved to be a good CPU. Don’t let the i3 name fool you, it’s equivalent to a i5 7xxx series. And it’s a fairly cheap CPU too.
Just about any computer can handle coding, unless you want to compile a big program in seconds which having a good CPU would reduce the time it takes to compile something… but people use low end MacBook Pro to code with all the time. You can always compile with another PC with high end hardware.