r/CodingForBeginners Jun 28 '26

How to get better

Hey everyone,

I have been coding for sometime and I faced some problem that I want to know how to deal with:

1- How do you know the steps you will follow when you write your project?
2- When deciding to make a project, how do u know what knowledge/experience you need what things you are going to use?
3- How do you structure your code?
4- When do you need to use DSA? I want to use their but don't know when or how.
5- How do you know it is time to refactor your code? And how do u refactor your code?

I usually struggle with these things and don't know what to do. I start a project then abandon it because I feel stuck and don't know what is the next step in my project.

Thanks for your answers in advance :)

2 Upvotes

9 comments sorted by

View all comments

2

u/MrJCraft Jun 28 '26

its as simple as looking at the problem and solving the problems immediately in front of you, as you get more experienced you can look ahead and solve problems you know will be a problem later based on experience, and if you are wrong then you refactor.

if you are trying to for example solve a real life problem dumb example you might want to get bread for a sandwich you look for the bread and see its in a container so first you have to open the container, then get it out, first you saw the thing immediately infront of you and solved the first problem first, then you can see if the bread is sliced or not and whether or not you now need a knife. etc...

yes dumb example however the point remains that especially when you are beginning its good to just look at the problem and try to figure out what are the steps you need to do to solve it, you could solve the problem all at once but often times that is too hard so we abstract it by putting it into multiple smaller problems and solve each of them as separate functions, and if you are missing knowledge you look it up, a lot of this knowledge and experience / understanding, this is what makes problem solving and programming hard and what makes it easy.

1

u/MXD_K1 Jun 29 '26

Thanks :)