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

90 Upvotes

102 comments sorted by

View all comments

69

u/MrCodeGameandAnime Nov 01 '26

The real issue with most of these comments is people are saying "solve something" which is incredibly abstract. Yes brother, go solve the world with code. You will know what you're doing. You are now deemed capable ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

First and foremost, c++ is objectively one of the worst languages to start with. I'd put it right up there with OC, C, and C#. You'd have been better off with either python, java, php, kotlin, or swift. I don't even like js, but still. Some node, js, html, css, and you're off to the races for web development. Slap postgres + crud and you you're full stack.

The primary issue with learning c++ as your first language is the use cases for an early developer aren't concrete, so you get "solve something" as an answer. The secondary issue is you have no frame of reference on HOW to solve things. You are not going to just sit down and type out a program that solves an arbitrary problem if you have no clue what it should look like. Third, you know about data structures and algorithms, but that teaches you absolutely nothing about architecture.

What I'd strongly recommend is using something like courera or udemy to learn about building different kinds of applications. Even YouTube is great now. That will teach you have to "solve problems". This will give you a frame of reference. I've been programing for 7+ years now and it wasn't until a few years ago that I really turned the curve and started building things that were genuinely interesting, at scale, complex, and actually worth showing/talking about. Give yourself time. Software is a time thing.

Finally, there are two hacks:

  1. GitHub. Look at repos and how people build things. Check out the diffs.
  2. write out stuff by hand. You'll be surprised how much easier it is to conceptualize and come up with something concrete.

Last but not least, expect it to be a lonely road where basically no one ever helps you, cares, teaches you anything, little community, and you being the only one to get you from point a to point b. Stay off of stack overflow. They are are even more highbrow than Reddit ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

Best of luck and don't give up!

11

u/slightlypug Nov 01 '26

you seem really knowledgeable about this. you identified my problem immediatelyโ€”youโ€™re right, a lot of people say โ€œsolve a problemโ€ and right now, thatโ€™s way too abstract. โ€œokay, what kind of problem?โ€ is the first question that comes to mind. would you be willing to work on some python projects with me? i feel like i could learn a lot from your insight

6

u/MrCodeGameandAnime Nov 01 '26

Exactly. It's like expecting you to draw the Mona Lisa just because you picked up a paint brush, else you're trash and don't get it ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

That's why I have always stuck to myself over the years because most people don't care. It's just a giant pissing contest. I'll gladly help you out with a project. Do you currently use version control like GitHub? That's the best place to start, so someone can help and work with you. What do you have in mind?

0

u/[deleted] Nov 01 '26

[deleted] โ€” view deleted comment

1

u/AutoModerator Nov 01 '26

Your post/comment was removed since we do not approve of going private.

There is zero benefit in going private as you lose the opportunity for getting peer reviews. Also we have had plenty of people return after going private (despite being warned) complaining about how they were ghosted after some time or being tricked into buying rubbish that didn't work and even if it did they didn't need.

Our Rule #11 demands that any and all communication happens in the open, public subreddit.

This is for the benefit of more against the benefit of one.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/slightlypug Nov 01 '26

haha awesome! i do use GitHub! i was thinking maybe something with Pandas, NumPy, Scikit-learn, or even something with robotics because i like that like ROS 2 and Gazebo. But anything with those libraries, or even just Pandas and NumPy, sounds like fun! do you have any ideas?

2

u/MrCodeGameandAnime Nov 01 '26

You understood the analogy for "solve problems" to painting the Mona Lisa, and your answer is data science? ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

Oh fuck. You're a funny guy. Ironically, I've done some work with linear regression via numpy, pandas, and matplotlib, but do you actually understand what you're expecting when you don't even know where to start?

I'll do you one better.

Can you store and retrieve data from a database?

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

→ More replies

3

u/binarycow 29d ago

My go-to project is a calculator. It starts off very simple, but can grow to something that is extremely complex.

  • Start by prompting for two numbers, adding them together, displaying the result, then terminating the program
  • Next, put it in a loop, so the previous result is added to the next number
  • Next allow the user to choose an operator.
  • Next, allow the user to enter a full expression that gets evaluated. For now, don't worry about order of operations - just go left to right (e.g., 2+5*3 evaluates to 21)
  • Next, handle order of operations correctly (e.g., 2+5*3 evaluates to 45)
  • Next, allow parentheses
  • Next, allow variables (which the user defines and initializes before evaluating)
  • Next, allow for functions like abs and sqrt

At this point, you have a rudimentary parser and interpreter!

Next, decide what track you want to take it. Each of these choices builds on the foundations ๐Ÿ‘†, but takes it in a different direction.

  1. A full blown programming language compiler or interpreter
  2. A web-based calculator/converter
  3. An equation solver (e.g., "solve for x: x^5 + y^7 = 99")
  4. A "linear programming" tool
  5. Graphing calculator

Feel free to PM me if you want to chat. I don't really do python (I'm a C# developer, primarily), but I can discuss generalities, and I can probably do some review of your code.

1

u/Top-Procedure152 27d ago

Holy AI slop not post.

8

u/DenverCoderv2 Nov 01 '26

Iโ€™m sorry but saying that C# is one of the worst starting languages while saying that Java and Kotlin are one of the best makes no sense. C# is a very pleasant language, Iโ€™d definately recommend learning it at the start of ones programming journey.

Rest of advice is solid though.

2

u/NomaTyx 27d ago

i want to kiss c# sloppy on the mouth

→ More replies (6)

5

u/number_1_hater Nov 01 '26

little curious as someone that knows java and python but not C#, what about it C# makes it harder to start off with instead of java?

i only ask because from what iโ€™ve heard C# is very similar to java

2

u/MrCodeGameandAnime Nov 01 '26

Functionally, C# and Java are pretty similar languages, especially in terms of syntax and OOP.

Where they diverge massively is application development. C# is a Microsoft language, so the tooling and ecosystem around it are simultaneously very modern and very old because of decades of compatibility.

If you already know Java, learning to write C# probably won't be particularly difficult. Learning the .NET ecosystem well enough to actually build, package, and ship applications is a different story. That's where the learning curve really starts.

To that end, I would never choose C# despite having developed with it UNLESS you are building a windows desktop/mobile application. If you intend to ship it to the MS store and use msix packaging, then there is a strong use case because it is easy to update. However, the MS store still accepts exe.

The best way to understand it is windows app cert kit, required assets, manifest, signing, and makepri. They are bane of my existence. Not fun and very egregious of MS.

2

u/binarycow 29d ago

C# is a Microsoft language

And Go is a Google language. And Kotlin is a JetBrains language. So what?

The only thing that matters now is that C# is no longer windows only. You can write cross-platform GUI apps with it. You can write web apps. Everything Java can do.

The best way to understand it is windows app cert kit, required assets, manifest, signing, and makepri. They are bane of my existence. Not fun and very egregious of MS.

These are all Windows specific issues, that apply to windows apps written in any language.

Not to mention, with modern dotnet, none of that is really needed. You can write a self contained application that doesn't even need the runtime installed. No installer, nothing. A single file.

Although, windows smartscreen may flag your app, unless it's digitally signed. But again, it does this for any app, written in any language.

So - one real requirement - a digital signature.

so the tooling and ecosystem around it are simultaneously very modern and very old because of decades of compatibility.

Modern dotnet has tooling that has no ties to windows. You can use any IDE, there are cross-platform build tools, etc. Only time you need to worry about windows is when writing a windows gui app.

1

u/MrCodeGameandAnime 29d ago

I could debate this endlessly with you as well, but I already responded to most of it in a previous response to another Redditor. Please feel free to pile on and downvote ๐Ÿ˜œ

https://www.reddit.com/r/learnprogramming/s/RrXS9gb4HG

The question I have for you is, why would you choose C# if not for Windows? Maybe I'm just blind leading the deaf, but beyond aspnet as legacy websites or dotnet as legacy enterprise software, I don't really understand the tool choice. Have you always used C# first? Is your go to language? Is it how you learned to code? Epistemic provence in regards to software may glean the paradigm for a given stance.

2

u/binarycow 29d ago

The question I have for you is, why would you choose C# if not for Windows?

At the very least:

  • Elegant, capable, and performant language
  • Excellent build system
  • Excellent package manager
  • Capable and fairly well designed GUI apps (WPF first party for windows, Avalonia third party cross platform)
  • Not stuck in the past - always modernizing

Have you always used C# first? Is your go to language? Is it how you learned to code?

No. It's the language I keep coming back to though.

My language history (from what I can remember, at least), going back ~30 years:

  • QBasic
  • VB6
  • C
  • Perl
  • PHP
  • VB.NET
  • C#
  • Java
  • Back to C#
  • F#
  • Back to C#
  • Python
  • Back to C#
  • Rust
  • Back to C#
  • Dart
  • Back to C#
→ More replies (4)

0

u/[deleted] Nov 01 '26

[deleted] โ€” view deleted comment

1

u/AutoModerator Nov 01 '26

Your post/comment was removed since we do not approve of going private.

There is zero benefit in going private as you lose the opportunity for getting peer reviews. Also we have had plenty of people return after going private (despite being warned) complaining about how they were ghosted after some time or being tricked into buying rubbish that didn't work and even if it did they didn't need.

Our Rule #11 demands that any and all communication happens in the open, public subreddit.

This is for the benefit of more against the benefit of one.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.