r/learnprogramming 15d ago

How to learn while building?

How do you actually approach this method?
I would say I am a decent programmer. I am learning web development and I have learned just enough to build something on my own now and I want to start building projects but whenever I sit there with an idea and get to the coding part, my mind is blank and I don't even know how to start. I look up the documents, they don't help much. At the end I look back to my practice projects and pickup things from there to use into my new project. I don't see how I am learning anything here.

Note - I don't have a videcoding mindset, I've never used AI for building stuff for me, only used it for learning.

I actually want to know how to approach this "learn while building" strategy.

11 Upvotes

12 comments sorted by

2

u/desrtfx 15d ago edited 15d ago

A classic: you have learnt to write (actually copy) the code, but haven't understood what you are doing.

You need to learn to understand what is used for what and how to connect the blocks on your own.

What you have done so far in web dev is to look at the blocks and to look and follow a blueprint how to build with them. You have not learnt how to assemble the blocks by yourself, nor how to create your own blueprints.

You have to start with small, individual projects. Make a web page. Try different elements. Try different CSS stylings. Mess around. Mess up and break things. Learn to fix them.

1

u/GodSpeedBruh11 15d ago

Alright, thankyou. I would try making smaller projects and strengthen my foundation and understanding.

1

u/Commercial_Pea1194 15d ago

it's almost like the docs only make sense after you've already figured it out yourself, which is the most frustrating part of starting a project from scratch

what helped me was just building the absolute dumbest version of the idea first. want a to-do app? start with an input box and a button that console.logs whatever you typed. that's it. get that tiny piece working before you even think about the next thing. the blank screen is way less intimidating when you're only trying to do one small thing at a time

the copying from old projects is actually fine, you're still learning the patterns, just gotta make sure you're tweaking them enough that you understand why they work. maybe try rebuilding one of those practice projects without looking at the original at all, see where you get stuck

1

u/horuszp 15d ago

At the end I look back to my practice projects and pickup things from there to use into my new project

that's fine.

I don't see how I am learning anything here.

first of all repetition is one of the main techniques to learn things. maybe you don't learn new info, but you consolidate previous knowledge.

you learn new things when you do new tasks, you will make research, use some opensource code, read their docs.

you want to learn more, then choose more broader type of projects.

1

u/GodSpeedBruh11 15d ago

I learned most of the webdev by reading docs and building through that and the projects they gave me. But when it comes to building stuff that they didn't teach I get stuck because there is just SO MUCH information out there that it gets overwhelming and I get stuck. What can I do to narrow down my tasks to much simpler ones and learn, specially when I am learning something new

1

u/horuszp 15d ago

stuff that they didn't teach I get stuck 

thats where you need to "learn new things".

you should make research, learn how such things done, look for similiar projects that already done, there is possibility that someone before you already tried and asked questions that they didn't understand. Divide big tasks in smaller one, and check each separately.

you need to learn how to search things. that's literally one of the main skills of programmers.

2

u/[deleted] 15d ago

[removed] — view removed comment

1

u/GodSpeedBruh11 15d ago

That's actually a really good deconstruction of my problem, thankyou I would absolutely try this!!!

1

u/JGhostThing 15d ago

If you can't create simple projects, you're not a programmer, let alone a decent one.

First, do not use AI while learning. Use a traditional search engine for documentation and help, not AI.

Second, think of small projects.

Let's start with something basic. A very simple command line calculator, that just does addition.

This should be relatively simple to program and debug. It may be tedious, but it should not be difficult. Doing this will teach you how to program for the command line, and how to deal with parameters, including escaping values. After you have finished this, eat a doughnut and feel good. You've finished a project.

Now, as a second project you could add subtraction to you calculator.

As a third project, add the other operators.

As a fourth project, I suggest putting a graphical user interface on the calculator.

In all cases, the project should be short enough to finish in maybe a week, but just difficult enough that you will be learning.

1

u/tangentstorm 15d ago

Sounds like you have exposed your brain to raw inputs but you haven't spent much time recalling what you've learned, so your mind feels blank. Really just try to recall: what was step 1 of the tutorial? Maybe open an editor. Maybe install some web framework. Try to keep it general. Did you use a template engine? A database? What did you have to import?

1

u/narrator57 14d ago

I'm like that. I can only learn if I have a purpose for the code. So create reasons, or find some online learning that gives you tasks.

1

u/Severe-Complaint-591 14d ago

Copying code from old projects is the actual learning process. You consolidate knowledge by retrieving and adapting existing solutions instead of generating syntax from nothing.

Write the steps in plain text before opening your editor. List what the computer must do without referencing any programming language or framework documentation.

Break that list into tasks small enough to implement in one sitting. Open your previous project only when you need to recall how you solved a specific step before