r/learnprogramming • • Nov 01 '26

feeling discouraged - coding is 'too hard'

im trying to get into learning C++. I've taken courses and have some experience with data structures and algorithms. but I can't code from scratch and when I go learn tutorials, I often feel like I can't do anything on my own. I know people say to sit with your code and debug in order to learn, but how do you even get to that point? I guess my question is: how do you actually learn to program from scratch?

edit: it looks like I've found a number of people looking to work on projects, so I made a discord for group projects! You can join here: https://discord.gg/ysbgcD8Baf

89 Upvotes

102 comments sorted by

View all comments

Show parent comment

1

u/slightlypug Nov 01 '26

haha! i see what you mean. n o i cannot. my instincts jump to SQL. in that case, may i ask where do you think is an interesting starting point? i’m not really sure what would be interesting, i know i just want to build a consistent learning routine and build something fun

3

u/MrCodeGameandAnime Nov 01 '26

Perfect, let's start with walking before running else you're gonna be trying to solve quantum physics with php next. Interesting may not be the best place to start. Foundational is far more accurate.

Make a Python script that accepts a name and age, stores them in SQLite, and lets me retrieve a person by name. Just Python, sqlite3, and whatever documentation you need.

Once you're done push it to GitHub and send a link. I'll look it over and let you know the next steps. This will push you to learn more AND I already gave you hint in my previous answers.

Make sure to show your work. Where did you find your answers. That will tell me how you solved it. Any reference is ok. If you do this properly I'll tell you the exact book you want because I have it myself 😂😂😂

2

u/slightlypug Nov 01 '26

Ok awesome! I’ll get to this asap and get back to you when I’m done. thanks man this is wonderful

2

u/MrCodeGameandAnime Nov 01 '26

Take your time and learn these concepts properly. I'm not banning or telling you not to use AI, but please learn them correctly. Be able to explain it to me. That's the point of this exercise. No rush.

2

u/slightlypug Nov 01 '26

Ok I have a rough draft up on GitHub! Let me know what you think: https://github.com/sammyt07/store-retrieve-users

2

u/MrCodeGameandAnime Nov 01 '26

Good start. Before we move on, there are two things I want you to fix. I asked you to document where you found the information you used to solve this, and I don't see any sources. Add those. Second, clone your repository somewhere clean and follow the README exactly as though you've never seen the project before. Fix anything you find. Let me know when that's done.

2

u/slightlypug Nov 01 '26

Ok got it! Gosh duh, I see that error with cloning the repository. I can't believe I wrote that for C++ lol

3

u/MrCodeGameandAnime Nov 01 '26

Lol, that's a common mistake when you're used to working with other technology.

Now for the next step:

A stored user must be editable and removable. Update the program accordingly. Document your references and make sure the README remains accurate.

2

u/slightlypug Nov 01 '26

Hey! Good morning, so I made the user editable and removable. It's still a first draft at the time of writing, but I'm thinking I could optimize what I'm doing. this is fun!

1

u/MrCodeGameandAnime Nov 01 '26

Good morning! I'm happy you're having fun! Don't worry about optimizing at the moment. We're building. Refactors are useful once enough is established to understand what can, should, or why improve. Now for the next task:

Create Alice, Bob, and Charlie. Edit only Bob. Then retrieve all three users and tell me what happened.