This question is one that I know many of beginner programmers go through. Just to give some personal information about myself to give you the scope of where I am coming from. I'm in my 30's and I am trying to get into a new career in either software development and/or vr programming. My adult work history is coming from working in restaurants so it's a big jump for me.
Im currently into my associates and getting ready to take advanced c++, java and unix. I have did a semester of c and c++, so I know the syntax decently (as long as i have my book near me). But no one ever teaches you how to break down a programming problem, nor how to work out a idea that you have for a program. We go over syntax, what you can and can't do based off that and if given a sample code can we figure out the output. I have been told to try and hop onto some open source stuff, but I don't know what I could offer, if any.
My next teacher for advanced and java is very hard and particular, he makes you ready for the work field. I chose his class, with the hope that if I can pass his class that I truly can be a programmer. The problem is that he always says "not everyone can program, you either can or can't" (I know he's like my yoda).
So please any advice would be greatly appreciated and welcomed on how to understand logic and learning to break down problems. If there are any resources that you know of that could help as well. I have a few books, watch youtube videos as well.
Here are some thoughts. Note that these work for me, but not work for you.
When looking at a problem, I often start with the data. What data will I need? What operations need to be performed on the data. Start writing this down.
You've probably heard of "top down" and "bottom up" programming. What works best for me more of an "outside in" method. Start with the inputs you get and the outputs that you must produce. Figure out how you'll read the inputs and store them. Figure out what you'll have to output and the data that you'll need to produce the output. Keep working your way from the outside in until you have a path from the inputs to the outputs.
Sketch out the interfaces for your classes and methods. By "sketch" I mean write up a draft of what they are. You might know that you have to pass something but don't know what its type will be at this point. That's okay. Write them down, including the name, parameters return values and description of what they do. Now look them over and see if they will work to get the problem done (they probably won't). Modify them accordingly and try again. Repeat the process until you've convinced yourself that the code and data you've described will solve the problem.
Convert your notes into appropriate header files. Don't forget the comments!
Voila! You've broken down the problem into a bunch of more manageable steps. Start writing the code.. Be sure to test what you've written often.
Ok so i'm going back 30, maybe 40 years and there is no way I can remember what they taught me, but this is what I took away from it and use today.
Think about a time before computers, how did they solve problems?
Paper maybe, charts, diagrams, flowcharts... sticks ? what ever works....
Now think of a specific problem, how would you break it down to solve the answer.
A program is a simple tool to solve a problem, what kinds of problems do they have in the restaurant world that you could make better with a simple program? Maybe just recreate something for the sake of learning. code that... experiment, practice, test, learn, play, have fun....
If you can do that, then you can program. Writing the code is for college kids, any monkey can learn to do it. Using your brain to know what to code and your mouth to ask the right questions is what makes up a good programmer.
Personally I think the best programmers write the best comments in the code. As you can tell I spend most of my time reading code other people wrote. So it depends on your point of view but gives you another perspective too.
As you get more invested, you'll want to learn about usability, speed, hardware requirements and so on...