I'm a math major but since middle school I've planned on going into the cs field. I've always just felt slow when it comes to programming and cs. Everyone else seems to just get it or if they don't get it they figure it out after a couple min. It takes me days or even the entire week to figure out the same thing. I'm in a cs class now in my 2nd semester of college and they hand out projects every week. Most other people figure it out within a couple days, even just hours and It takes me an entire week of constant stress and anxiety over the project to figure it out. I always finally figure it out at the last second before the deadline and I just feel stupid. I always feel like I'm not smart enough for cs or I don't have the brain for it. I feel like this mentality just makes me even worse at programming as I just constantly overthink things. Even the most simple problems cause me so much stress.
I really want to be a cs major. Despite dreading every assignment and the constant stress and anxiety I go through because of them, I do enjoy doing them and figuring them out. I just get so mad at myself for taking so long to figure out such seemingly simple problems that other people just work through so fast. Even my friend who was at the same level as me in our AP csa course in high school, can figure out what takes me the whole week to figure out in a few hours and had only taken one extra cs course than me last semester. Now we're in the same course.
I wish he'd help with all the projects but he refuses to tell me anything more than the most vague of hints. Ik he wants me to figure it out on my own so I'll become a better programmer but sometimes the projects are so confusing and hard that I just get so demoralized after working on them for any longer than an hour. I just feel like I can't do them like I'm too stupid to find the answer in a reasonable time.
I struggle a lot with low self esteem and anxiety and feel like that makes it way worse and makes me overthink things. I tell myself that I'm not stupid that I'm just making things harder by overthinking them but even so it still confuses me just as much and still makes me feel stupid.
I guess I'm just making this post to vent but I also would really like some help. All of this just makes me so depressed and makes me feel worthless. Ik this isn't the right sub to post mental health issues/problems but I feel like those are factors of my problems with programming.
If you read all this, thank you at least for hearing how I feel.
edit: Got a lot more help from this than I thought I would. I genuinely feel a lot more confident with cs now because of all your comments. I'm not dreading doing any project now and feel like I can do anything no matter how difficult if I just keep trying. Thanks a lot guys, appreciate it.