How can I avoid getting stuck on every project?

Hi! My name is Clara, while learning i notice that i alredy win some knowledge to resolve problems and make awesome things with react, but my problem is that it’s still difficult for me separete a long project into small pieces, and at the end, every project turns into a hell. I know it´s possible, but i tried lots of thing and i get to the same point. Do you guys have any advice on how can i think or disign a road code before i actually start codeing? Everything is welcome. I really appreciate any opinion!

(and i´m also still learning how to write english properly, so if you noticed any mistakes in my redaction PLEASE let me know :´) )

1 Like

Your English is fine, don’t worry about it.

As you getting stuck, yeah, what you are feeling is very normal. It takes time to learn to break things into pieces. I think it is just a matter of practice. Maybe try doing some very, very simple apps and work your way up. I might also suggest watching youtube videos of people building small apps - you get a chance to see how they think.

But really, I think it is just practice.

1 Like

This is a well know problem with any complex system, its called technical debt.

As a problems complexity grows, your “solution” (your codebase) will change, and inevitably get more and more complex to tackle the newer challenges you face.

Large amounts of thought have been put into thinking of ideas and ways to solve these sorts of “meta-problems”. Lots of solutions are available, but like anything you could easily try to prevent technical debt and still end up in a mess.

There’s usually 2 general things you can focus on.

  1. Identifying what problems you’re currently solving with a given project.
  2. Identify what solutions you can share within the project to promote re-use and help with stability.

Both have the goal of helping you try to cut down on technical debt by taking what you currently know and have built, and trying to find ways to simply it. This task will help “pay down” that debt.

You’ll probably find patterns that you could then implement and re-use places. You also might find places where your creating features that aren’t used, or overly complex. You also might find older parts of the code that could be updated with what you learned to help improve things overall.

No amount of planning survives first contact with the enemy. So yes having a better idea/plan upfront can help, but over time you will need to re-evaluate. The more often you do this, the faster you usually can identify possible problems up ahead, and thus adjust your course.

I’d compare it to trying to plan a long road trip. You could try to plan everything upfront and strictly follow that plan. Or you plan broad strokes and examine your route as you go along. This leaves you more lee-way into alternate side-routes, along with leaving you room to except to get lost, either by chance (a bug), or by design (an experiment).

1 Like

Thank you so much for your suggestions! I didn’t consider gain practice in this topic by making some small apps. I’ll definitevly get on track and follow your advice !

Wow! Thank you for all your explanation, it really helps me to understand why this things happens.
I´ll focus on your suggestions, and keep doing projects to gain experience in it.
I appriciate your time!

It sounds like you need to make your work smaller. Its still so large that its intimidating you. Sit down with paper and try to break down a problem into as many parts as you possibly can imagine. Every day you need to attempt a tiny portion of what you are trying to do. And i mean very small. Solve a single problem, not an entire suite of problems. Here is an example:

Building a react application is too big of a problem, it can takes months to years. So instead, you decide to build a single page, but even that is too big. Each page can be broken down into even smaller problems. These can all be their own days of work.
For example you might have a page that has a header, footer, and a form. Building the entire header, depending on its complexity, could take days to weeks. That is the same for every other part of this page. So for example if you want to have a form in that page you need to break it into its different pieces:

  1. What form library are you going to use? Spend a day researching which one is best and why
  2. How will you design the form? Plan out the component composition of your inputs, buttons, check boxes, etc. Each one of those components could take you a while to build. And you havent even started the form yet.
  3. Using the form library — could take days to get used to syntax in the documentation
  4. Setting up validation of your inputs could take days to get right.

Keep in mind that every one of these im saying can take hours to days. And that means that they can still be broken down into smaller pieces. For example only using #3:
“Using your custom build input component with the form library”

  1. Confirm that your component renders within in the form, no functionality
  2. Confirm that data can be passed to the form from the component
  3. Add custom behaviors, like considering preventing the form from rerendering on user input
  4. Confirming styling is working ok

And every one of those can be broken down even smaller. As you read the documentation on your form, you may realize there are multiple steps you need to take just to get it to stop rerendering for example.

Hope this helps. Good luck, and be patient with yourself. This isnt an easy skill to learn.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.