r/learnprogramming • u/freakkdrama • 10d ago
WHAT DO I DO????????
So basically the thing ive been trying to learn javascript by myself but i just cant seem to do it. i know that it is not the most difficult thing to learn but atp ive been getting dreams of async/await.Iam watching youtube videos and i understand the concept but when i try to code by myself i cant do sh#t. How can i continue this?
9
Upvotes
11
u/KingOfTheHoard 10d ago
So a problem a lot of learners have is they start with this big goal like “learn JavaScript” or even “learn async” but they don’t narrow that down to anything.
You can’t learn JavaScript as a single discrete course of action into itself because it’s a body of knowledge, and it’s a skill that you learn to apply to other problems.
The same applies to async, what it does in theory is a much less applicable thing to try and learn than understanding what it does in an application, when you need it.
The way you start learning to generate your own code is you think of something you want to make, and you start writing it. And for learning purposes you can be as ambitious or as basic as you like, because you don’t actually need to finish the entire thing, you just pick a piece of it and starting writing code until you either get stuck, or you realise the code you’re writing must be a bad way to achieve your goal, and then you look up a way to do the specific little piece you’re stuck on.
And you just trying and understand it, piece by piece, like that, until you can code, even if it’s sloppy.
Then you add best practices and theory and everything else.
1
u/Cidraque 10d ago
Have you tried w3schools? They explain very straightforward but very clearly, maybe worth checking it.
1
u/Visual-Victory1787 10d ago
I’ve been told by many of my friends that are programmers is: you learn the basics for example W3schools and then try and code a little app and learn that way. Use google YouTube GitHub and AI to help explain to you what’s going wrong and guide you but not tell you the answer kinda thing
2
u/Zerocchi 10d ago
It's like learning language. People can explain to you how to use certain vocabs and grammars, but you have to keep using the language and fail a lot if you want it to be second nature.
2
u/Professional_Bug932 10d ago
Rebuild something tiny from scratch, like a fetch call
2
u/Dapper-Teaching-8074 10d ago
learn the way i learned 10 languages atp, have things you'd like to code, can be a specific small web app, or a big project, it doesnt actually matter, what matters is that you are passionate, then start, when you get stuck just google, but dont copy, understand that piece of code, apply it once you grasp it, then continue, as you go, you will stop needing google and you will realise that you know a considerable amount of said language, then everything gets easier from there
2
u/Few-Corgi2648 6d ago
you dream async await... hehe
i was in your place 5 years ago. then i quit js and learnt php backend. after than i became master of js even prototypes.
1
u/J_Galang 10d ago
dont just follow along. common pitfall for tutorials is we kind of code along, and in our head it makes sense so you feel like you're going somewhere. but the moment you're handed the reigns w/o the training wheels you blank. you forget syntax or you arent sure how a method works in practice.
after a concept is taught, try to explore it yourself. make a small script that does something with the concept. doesnt have to be anything concrete. it just has to be different from the exercise in the tutorials. this way you can test your own understanding of what was covered and you get comfortable coding independently.
1
u/binarycow 10d ago
Make something extremely small.
Then make it a little bigger.
Keep going.
1
u/supercoach 10d ago
I think everyone goes through something similar. At some stage it all starts to make sense without needing to put extra thought in. Just give it time.
1
u/ConnectAffect2346 10d ago
To be completely honest i went through the same thing and for weeks i was stuck at the stage of async programming inside javascript, it made sense in theory but in practice it was way harder to understand so i would advise you try to understand arrow functions and how to form functions more elegantly using arrow functions since then everything will be easier to understand considering that async and await functions are just as the name suggests functions that take some information from a file or site you gave the link to and then it fetches the information and makes use of it, after you understand arrow functions in detail you should try to make a few small projects that combine eversthing eith async functions, like a simple website for showcasing oil price, or movement of dollar/euro/great britain pound (anything you want basically) and after few experiments it will all come in place and be very easy for you to implement,, of course it will take a week or two probably, hope this was helpful🙂
1
u/SensoredHacker 10d ago
I cant learn from vids.
I learn by making stuff. like I for real have to type out shit.
I build the closest thing I can, to what I want, then add features.
then when Im reasonably happy with features, I back track and fix bugs.
vids are fine for inspiration, but thats not education.
1
u/GuruPentameter 10d ago
sounds like you're missing a conversation (and flow chart) in your head. your hurdle isn't the language. it's your problem solving. i would go reductionist in this case, after identifying a problem you think is worth solving:
reduce a problem the smallest parts.
go so small that you start flowcharting things like, "next, the user types the letter Y". that is an event. if you can't get this small, and envision how to handle one specific keystroke, then you need to back up even further.
let us know how it goes.
1
u/GuruPentameter 9d ago
i see quite a few of these posts. eg., "when i try to code, i can't write anything."
if you were tasked with writing some javascript that opened a file and displayed its contents on the screen, are you saying it would NOT occur to you to lookup how to open a file?
1
u/digihmong 5d ago
Learn by building. Have the AI write some code for you that uses it, then explain it to you and walk you through it as you debug. Even better if you can write it out first and ask for help debugging and setting break points in the console. Writing out the code will reinforce learning. Jumping right into abstract theory and just watching videos might be difficult so seeing it in action will help you build foundational knowledge. Have fun learning!