I can follow coding tutorials, but when I open a blank editor I often don't know where to start. How can I get better at building things on my own?
How do I start building projects without following a tutorial?
Answers
Pick something small that interests you and give it one job. A program that asks for a value and prints a result is enough for a start. You can add features later if you feel like it.
Try building it without a step by step video. Look up specific things when you get stuck, then come back and try to use what you found. Debugging and figuring out why something doesn't work are part of the practice, not signs that you've failed.
Reply to this answer
Before writing code, describe what the program needs to do in plain English. For example: get input, check whether it's valid, calculate a result, display it. Turn each step into a small piece of code and test it before moving on.
If a step still feels too big, break it down again. That gives you a much more specific question to look up than how to build the whole project.
Reply to this answer
You don't have to jump straight from a tutorial to a completely new project. Close it and try rebuilding one small feature from memory, such as a button that changes some text. If you get stuck, check the relevant part and try again without looking.
Reply to this answer
Try writing a small test before implementing a function. Decide what input you'll give it and what output you expect, then write enough code to make the test pass. When something fails, step through the code and check where the actual behavior starts to differ from what you expected.
Reply to this answer
Projects aren't the only way to practice. Small coding exercises can help you get used to writing solutions without a walkthrough. You can also spend some time exploring documentation and trying out a feature, with no pressure to turn it into a finished app.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_r58!plivexa.4:
Comments in the file can work for this too. You can replace them with code one piece at a time.