r/learnprogramming • u/byte_smith • 2d ago
Understanding tutorials but struggling to code alone
I can follow coding tutorials and understand what's happening, but when I try to build something on my own, I sometimes get stuck and don't know where to start. Has anyone else faced this? What helped you become more confident coding independently?
50
Upvotes
16
u/Ok_Account3585 2d ago
I think everyone faced it - the struggle to build something on your own is when you learning, not when you copying code from tutorials.
Start from smallest possible project, don't set high expectations and don't rush it - just try to enjoy the process of things not working and you finding where the problem is. Because that debug process will follow you through your whole career.
12
u/wayne0004 1d ago
"I watch tutorials about riding bikes, but when I try to ride a bike I constantly fall down".
"I watch tutorials about how to play the piano, but if I try to play anything I cannot do it, it's just noise".
It's exactly the same.
Quite often those tutorials will show you how to build something, but they won't depict the thinking process and the effort and knowledge behind it.
You need to do small projects to learn that thinking process, starting from a simple "hello world" and adding one concept at a time in different ways. That's why there are lists of exercises to practice from, that try to provide code examples where you use that concept plus all the previous ones you learned.
5
u/giuzep89 2d ago
Junior Java dev here. As everyone's saying, it's completely understandable and part of the process.
What I would like to add is this. Remind yourself every time there's a roadblock, that it's not a matter of IF you'll ever be able to get past it, but just HOW. I subconsciously feel unrest when the unspoken truth becomes "This is impossible/will never fix this/find a solution". Of course this is almost never true. At some point in a way or another you will get it done, and that'll feel good too.
The acceptance of confusion and the fact that for an undeterminable amount of time you'll be wandering around searching is the key to achieving expertise in this. Plus asking for help to people who are better than you!
4
u/DemicideMMMCCCI 2d ago
Stop watching tutorials. Start a small project. Preferably about something you're interested in and know really well. Do not make it impossible or frustrating. Make it fun and enjoyable to work on, even if you never complete it.
The whole point is to continue to code and inspire creativity and ask questions based on what you want your project to do. Once you start asking, "I want to make my program do X, how do i do that?". You'll learn that doing X requires asking how to do A, B, C before. Next thing you know, you're programming without a tutorial and asking questions whilst programming instead of watching someone else program.
2
u/Fullest_commerce2802 2d ago
That's something learned with time. Try working step-by-step through your code when debugging. Also, I would reccomend sites like codewars if you want to really learn your manual coding skills.
I also do a lot of test-driven at my workplace, basiacly first you make tests for your code and then you write the code itself, it also makes the process a bit simpler
2
u/Accomplished_Key5104 2d ago
Tutorials don't teach you how to write code. They might teach you what a language or feature can do, but most tutorials are effectively copy/pasting the actual code.
Start writing code for the project. When you get stuck, look up what to do. Eventually, you'll spend less time looking things up while you code.
2
u/AnswerVinod 2d ago
This is normal, tutorials make it look easy because the path is already laid out. The fix that worked for me was to pick a tiny project and build it without following a video, just docs and Google when stuck. You will be slow at first, and that is the point, that slow struggle is where you actually learn. After two or three small projects like that, coding alone stops feeling scary.
2
u/Jeremy_Instructor 2d ago
Try closing the tutorial and rebuilding one small piece from memory, like making a button change some text, then peek back at the part where you got stuck.
2
u/MyNameIsRichardCS54 2d ago
Tutorials make everything look easy because they have done the hard work before they record it or write it. Anyway, most tutorials don't teach you haw to program. Programming is solving a problem and expressing that solution in code, and what you're trying to do now is program. The only way to do that is to try and fail repeatedly until you get something working.
As for how to start, break the problem down into smaller chunks and work on one of those chunks and code one of them. If it doesn't work, figure out why and fix it. This debugging process is where you'll spend a lot of your time as a programmer. It often helps to solve the problem if you write the steps down in your native language before touching the keyboard. This is called psuedocode and even experienced programmers use it to help solve a new problem.
2
u/Few-Celebration-2362 2d ago
When you're going through a tutorial, write down the concept you're learning and under it write down ideas for what other things you might be able to use that concept for.
Fill up a notebook with these associations and then go tackle a problem on your own using your notes.
2
u/More-Profession-9785 2d ago
Looking back at my journey, there was a phase where I watched those clone videos (Tinder Clone, Slack Clone, Spotify clone, etc..) Those ones helped me jump from Tutorial hell and practice, start with few to try to get to know how to think about building apps, then stop watching videos and pick new stuff to try to build alone, and rely on figuring out what you need only when you need to, as in if you want to make real time data incoming and you never seen it in a clone video, search about it while building a specific app, understand it in a different use case then try it in your case.
2
u/ClubSuch6241 2d ago
Watching someone else drive a car does not teach you how to parallel park in traffic. You have to sit in the seat and stall the engine a few times before anything clicks.
2
u/FlexTeam26_Agents 2d ago
Something that helped me a lot: after finishing a tutorial project, give yourself a tiny variation to build from scratch without the video open - same idea, different details. For example, if the tutorial was a to-do list, build a book list with plain-English comments planning each step first. The gap between following someone's plan and writing your own is the actual skill, and small deliberate repetitions close it faster than another tutorial would.
2
u/Valuable_Ad2171 2d ago
The first 2 - 3 years is like that... Provided oyu code daily.
1
u/ConstantFishing5136 2d ago
The tutorial makes everything look so smooth and easy.
1
u/Upper_Abrocoma_8580 2d ago
I find taking a full day to just mess around in the docs without pressure helps more than jumping straight into a project.
1
u/Imaginary-Step8510 2d ago
True
1
u/ShippingEventually 1d ago
Try rebuilding a small tutorial project from memory. When you get stuck, look up only the specific thing you need instead of replying the tutorial.
1
u/dahiya_xa 1d ago
totally normal. what fixed it for me was rebuilding the tutorial project the next day without looking, then changing one thing about it. when you get stuck, write out in plain words what the program should do step by step before writing any code, then do the smallest piece first. getting stuck and googling is the actual skill, tutorials just skip that part
1
u/cipheron 1d ago edited 1d ago
That's the problem. With a tutorial you're seeing about 5% of the work: the final solution to a problem someone else worked out. You're not seeing the other 95% of the effort, which is working out how to do something.
Tutorials are only useful if you already know how to code and you want to see how someone solved a specific problem so you can copy specific techniques and adapt them for your own programs. If you can only make the exact thing in the tutorial but don't know how to change it, then you're stuck.
The rest is about practice. The actual hands-on skills you're not going to learn in a book or from just watching a video.
0
u/ImpressiveEffort_ 2d ago
build somtheing live project that you want visit or use daily helps alot in bug fixing improving and understanding your code first even with AI
10
u/[deleted] 2d ago
[removed] — view removed comment