How I got over this was actually through learning applied math. I thought I sucked at it, too, but really I just never tried hard before.
What I liked about programming was formulating and solving problems. Not normally the act of writing code in and of itself (though that can be fun, too, every now and then). Learning more math lets you tackle more interesting problems, and there are more applications of fancy math than ML!
How I got over this was actually through learning applied math. I thought I sucked at it, too, but really I just never tried hard before.
What I liked about programming was formulating and solving problems. Not normally the act of writing code in and of itself (though that can be fun, too, every now and then). Learning more math lets you tackle more interesting problems, and there are more applications of fancy math than ML!