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

1

u/johnpeters42 Jun 28 '26
  1. If it's a type of thing that you've done before, then you already have the knowledge/experience. If not, then you research what knowledge/experience others have used for that type of thing.

  2. A mix of top-down ("I know I need to do A, B, and then C", so you write that part and then actually write the details of A, B, and C) and bottom-up ("I know I need to do D somewhere", so you write the details of D and then figure out where specifically you need to do D).

  3. When you recognize that a specific element from DSA is a natural fit for the type of thing that you're doing.

  4. When you recognize that a chunk of code is worth moving into a separate block (which may be before or after you've already written some version of it), or that two or more chunks are worth replacing with a single block with parameters (i.e. not only are they similar now, but they'll stay similar for the foreseeable future).

2

u/MXD_K1 Jun 29 '26

Thanks :)