r/learnprogramming • • Sep 24 '26

Typescript Nodejs

0 Upvotes

I don’t have prior experience in programming and struggling to work for a client using Typescript Nodejs for backend programming. I have started with learning JavaScript first and then move to Typescript but it’s kinda overwhelming. Any suggestions on the roadmap and which course to follow? Thanks


r/learnprogramming • • Sep 24 '26

Discussion I love making things, but programming just isn’t fun for me anymore. Am I just not meant for it?

1 Upvotes

First of all, thanks to everyone who replied to my post yesterday. I read all the comments and they gave me a lot to think about.

There’s something else I’ve been thinking about though.

I really like making things.

I enjoy video editing, and I especially love messing around with gadgets and computers. I like trying new devices, changing settings, figuring out how things work, and creating stuff.

So I feel like programming should be something I enjoy too, because it lets you build almost anything.

And I used to enjoy it more.

But recently, I just don’t find programming that fun anymore.

I’ll start coding, work for a little while, and then I’ll end up lying on the couch watching Netflix instead.

I also get frustrated really easily when I don’t understand something.

This happens especially when I use AI to build something and the project becomes way more complicated than what I actually understand.

Suddenly there are tons of database schemas, files, abstractions, types, and complicated code that I didn’t really write or design myself.

The project might work, but I look at it and think, “I have no idea what half of this is doing.”

Then I get annoyed and don’t even want to continue.

Sometimes I wonder if I actually like programming, or if I only like the idea of being able to make software.

Maybe I like making things, but not programming itself.

Or maybe using AI from such an early stage made me skip the part where programming actually becomes satisfying, because I never properly learned how to solve problems by myself.

I’m still in high school, so I know I have plenty of time to learn. But lately I’ve started wondering:

Is this a normal phase when learning programming?

Have any of you gone through a period where coding just stopped being fun?

How can I tell the difference between “this is difficult and I need to push through it” and “maybe programming just isn’t for me”?

I don’t want to force myself to become a programmer just because I’ve already spent years doing it.

But at the same time, I don’t want to give up on something I might actually enjoy if I learned it differently.


r/learnprogramming • • Sep 24 '26

Solved How do I indicate whether a string is a digit or not in c++?

9 Upvotes

I have a user input and I want to determine whether the user input is a digit or character.

I was thinking of using regex but do not know regular expression in C++ can some please help me with this

Here is a snippet of my code

string userinput;

cout << "Input 1, 2, 3, or 4: "; 

while (!(cin >> userinput)) {
  cout << "Invalid input. Try again: ";
  cin.clear(); // Reset input errors
  cin.ignore(10000, '\n'); // Remove bad input
}

 
for (auto i : playlist){
  if (stoi(userinput) > 4){
    print("Song Not Avaiable")
    break;  
}

SOLUTION

#include <cctype>

/*while (!(cin >> userinput)) {
  cout << "Invalid input. Try again: ";
  cin.clear(); // Reset input errors
  cin.ignore(10000, '\n'); // Remove bad input
}*/

for (int i = 0; i < userinput.size(); i++) {
    if (!isdigit(userinput[i])) {
        print("Song Not Avaiable");
        break;
    }

    else if (stoi(userinput) > 4) {
        print("Song Not Avaiable");
        break;
    }
}

r/learnprogramming • • Sep 14 '26

Is it normal to understand code but struggle to write it yourself?

212 Upvotes

Hi everyone

I’m currently learning Python and I’m starting to feel pretty frustrated with myself.
When I’m watching a Python course, I can usually understand what the instructor is doing. If they write some code, I can follow along and understand what each part does. It’s not like the concepts completely go over my head.
But then when I’m given a problem and told “Okay, now write the code yourself”, my mind just goes blank.
I might understand the solution when I see it, but I struggle to come up with the solution and translate it into code on my own.
It makes me feel like I don’t actually know Python, even though I can understand a lot of the code when someone explains it.
Is this normal in the early stages of learning programming?
If you’ve experienced this, what helped you get from “I understand the code when I see it” to “I can actually write the code myself”?
Should I be doing more exercises, building small projects, rewriting code without looking at the solution, or something else?
I’d really appreciate hearing how other people got through this stage.