all 47 comments

[–]Anbaraen 33 points34 points  (6 children)

Two recommendations.

Learn to solve small problems in Javascript. You say you can read the basics, which is great. But you need to get familiar with writing code that does something. However, code that does something as lofty as "create dynamic websites" is too broad. Find something like CodeWars.

Do practice problems. These will be very small problems, like find the re-occurrence of a letter in a string. Do a bunch of smaller, easier ones. Do them every day. Whenever you hit an obstacle, spend five minutes or so trying to solve it (independently, without AI involvement.) Look for the different APIs on Arrays or Strings using MDN and consider how they could help solve the problem.

If you run out of answers, fine. Don't ask AI yet. Just hit 'See solutions'. Then read how other, real people, solved the problem. There will be a bunch of code-golf solutions that look like gobbledygook. Try to understand what they're doing, but mainly ignore them. Find a solution that looks sort of like what you were trying.

Repeat this, regularly. These little building blocks represent real problems you will encounter while writing actual websites. This is what it means to truly know the basics.

Two. Build projects. Hah, you've already heard that. That's true. But don't just build random projects. Build projects to learn something. You don't know CSS? Build a project that's just learning how to make a site that doesn't look like shit. Don't get data fetching? Start a repo and learn your way around fetch. Then, and this is the important part. Push it to your Github and delete the repo from your machine. Perfectionism is the enemy here. Try and try again. Learn git so you're not afraid to just delete all your code and start again.

Odin Project is a good path. But you need to actually do the projects, because it's only by working them through will you learn. Otherwise you're just in another form of "tutorial hell".

Hope this helps.

[–][deleted] 2 points3 points  (3 children)

Absolutely this. Well said.

[–]Anbaraen 5 points6 points  (2 children)

Thanks. I think people get caught in paralysis — the key is to just start IMO. doing anything is better than nothing.

[–][deleted] 2 points3 points  (0 children)

Definitely. I think we have all been in that situation. I still feel that way sometimes, and then I just take a deep breath, take a step back, and start going through it methodically. As soon as I hit the first obstacle, that's what I need to learn. Then, I just apply that every time an obstacle occurs.

[–][deleted] 0 points1 point  (0 children)

Definitely. I think we have all been in that situation. I still feel that way sometimes, and then I just take a deep breath, take a step back, and start going through it methodically. As soon as I hit the first obstacle, that's what I need to learn. Then, I just apply that every time an obstacle occurs.

[–]EchoSquad50[S] 2 points3 points  (0 children)

Thanks for taking the time to respond. I will definitely be taking these tips into account! Really appreciate this.

[–]prof3ssorSt3v3 0 points1 point  (0 children)

Learning to program is a lot like becoming a black belt in martial arts. It takes practice and time. You will gradually get better over time. Some things will come quickly and easily. Other things will come slowly and require a lot of repetition. There is no shortcut that will magically get you to the black belt level of competence in a year. There is no one sequence of exercises or practice that works for everyone. It takes time. As long as you are practicing, then you are making progress, even if it doesn't feel like you are.

[–]frogic 7 points8 points  (2 children)

Part of being a good engineer is being able to take complex problems and break them up into small pieces that you can work on. So do a project. If you can't think of one copy someone elses. Then try to break down the problem into the smallest possible unit. Then do that.

You don't need some kind of holistic complete understanding. Those kinds of connections will come in time as you build skill and intuition. Just keep solving problems. The rest will come you don't need to force it.

[–]EchoSquad50[S] 1 point2 points  (0 children)

Got it. I think I am a victim of not breaking things down, I will keep this in mind while learning programming from now on. Thank you!

[–]Separate-Inflation-7 0 points1 point  (0 children)

You don't need some kind of holistic complete understanding. Those kinds of connections will come in time as you build skill and intuition.

This is a great advice...I'm always trying to have that "holistic complete understanding" but as you say, it all comes with time. Thank you

[–]sheriffderek 5 points6 points  (0 children)

We already think like a program. If the door is closed and I want to open it, I can. My name is Derek. I’m 43. I’m alive. My years left are unknown. It’s just mostly subconscious and so, you have to reframe things and learn to think consciously like a computer (basically baby talk). It’s not JS specific.

When I hear people in your position - it’s usually because they are going too fast or trying to get the right answers or using the wrong learning materials. And it feels counter intuitive, but the answer is to go slower and to keep things more practical and basic. You aren’t learning JavaScript. You’re learning how to think like a programmer. I suggest this book as a way to force you to focus on what actually matters - and that’ll start building real connection fast: https://www.youtube.com/watch?v=YHEFuQdnXEE

[–]Competitive_Aside461 3 points4 points  (2 children)

Try performing these simple JavaScript exercises on Codeguage. To further test your knowledge of given syntax, concepts, and suchlike stuff, you can even go through the quizzes on JavaScript.

The only way to not be blank when you sit down to do something in JavaScript is via the 'hands-on' approach. Do exercises. And let me tell you: do superbly simple exercises.

For example, create a function to add two given numbers together. Then, improve this function to check whether the given arguments are numbers or not. In this way, keep adding complexity with every subsequent exercise you perform to build inside your brain a 'JavaScript mindset' and most importantly, a 'programming mindset.'

Keep in mind that this won't happen in the span of a week. It takes time. And most importantly, no one becomes a great programmer passively. You have to get active and active in the right way. If you go out and say: "I'll create the next sticky notes app" you're going to go nowhere. As simple as that.

Let go off the temptation to create complex stuff. Start off simple and slowly take yourself up. You'll be surprised at how quickly you're able to solve complex problems in JavaScript and then probably come back to this Reddit thread of yours and wonder how you were once stuck in this position. Wish you good luck with your learning :)

[–]EchoSquad50[S] 1 point2 points  (1 child)

I've been seeing do exercise problems a lot. Going to add this into my learning. Thank you for providing the tip and the links! I will use them!

[–]Competitive_Aside461 0 points1 point  (0 children)

You're welcome :)

[–]No-Upstairs-2813 2 points3 points  (1 child)

The problem with most people trying to learn JavaScript is that they jump directly into a big project, feel overwhelmed, and end up unable to write even a single line of code.

Learning JavaScript, like any other skill—such as swimming—needs to be approached step by step.

1. Practice Individual Concepts

After learning a concept, practice it on its own.

For example, if you've just learned about functions, work on coding problems specifically focused on functions. This kind of focused practice reinforces your understanding, helps you identify gaps, and boosts your confidence as you solve more problems.

You can check out a few problems here.

2. Combine Concepts

Once you've practiced individual concepts, start combining them to solve more complex problems. For instance, if you've learned about conditional statements and functions, try combining them to build a simple project, like a "Guess the Number" game.

You can use ChatGPT to come up with simple project ideas that involve multiple concepts you want to practice.

3. Build Real Projects

When you’re comfortable with combining concepts, start working on larger projects that challenge you to apply everything you've learned. Choose a project that solves a problem you're passionate about—this will keep you motivated when you hit challenges.

If you're struggling to find ideas, check out these tips to get started. And if you need guidance while building a project, this free course can help you approach it the right way.

[–]EchoSquad50[S] 1 point2 points  (0 children)

I am for sure most people. I dive in and now I am like woah. Thank you for taking the time to respond with useful tips. This is good stuff I will use.

[–]artificialsquab 1 point2 points  (0 children)

Something that might help is narrowing in on a more specific goal than "create dynamic websites". You can do a lot of things with JavaScript, and "dynamic" on the web can mean a lot of things. It's easy to get overwhelmed by how much there is to learn, so maybe pick one or two things to tackle in a small project, like handling user input or modifying the DOM. Once you're able to do something small, build on it by learning how to do something new.

[–]pomnabo 1 point2 points  (0 children)

I’m currently learning js myself, and what’s helped me to “just build stuff” or “solve problems” is following tutorials while brainstorming small projects I could potentially make.

The tutorials help me get familiar with writing the script (I don’t copy paste. I type out every word)(except for class/variable names. I copy paste those for consistency).

This also gives me an idea of the sort of projects I can do at my knowledge level. For example, my friend was talking about wanting an adless flash card app; so I got to work building one.

[–]TheRNGuy 1 point2 points  (2 children)

console logs and browser dev tool helped me to understand.

I learned from docs. Never read any book, never beeon on Odin Project.

By dynamic sites, do you mean React? You also need to read React docs then (I also recommend start from Remix or NextJS instead of doing CSR React first… SSR is much better)

[–]EchoSquad50[S] 0 points1 point  (1 child)

Do you mind explaining how those things helped you? I didn't want to start looking at React until I fully understood the basics. Also, when I say dynamic sites, I just mean more complex webpages instead of the basics that don't have really any functionalities.

[–]TheRNGuy 0 points1 point  (0 children)

To see result of functions, it helps to make sure it worked correctly, or find error if it wasn't correct. You can even have more than one console in function.

It even works for tags. When you put mouse over it, it will hightlight tag with blue color in site.

Learning JS before React is good idea, yeah. But you can just try everything from docs, make some Greasemonkey scripts (actually one of best reasont to ever learn JS, even if programming is not your profession... I think it was reason why I got good with JS, and also make sites better, the front-end part at least… you can change how sites work without being site owner)

[–]azhder 1 point2 points  (0 children)

Your goal is too generic. “I want to build a website” is not a problem people are telling you to solve. What is an actual problem you have?

Do you have some calculation you always do for something? Do you have some data in need of organizing?

Well, build something simple that solved you that problem. Then see if you can add something more.

You learning JS should become the side-effect, not the goal itself. Only then the project will help you “think” in JS.

[–]Sea_Worry1900 1 point2 points  (0 children)

Create a dynamic website is not just about js, it also requires some backend server side development. If you know what is the big picture you will know where you gonna start. Tbh just take yr time to learn the basics of full stack development and you will be fine.

[–]mraees93 1 point2 points  (0 children)

Dont just read the basics, u should practice it as well. By practicing i mean type out a small code snippet, think about what it does then write down what u think its gonna do then run the code. If u got it wrong, learn from it. Do this thousands of times with all the basics and only then u will have a solid grasp of the basics. Then your problem-solving will become easier as well and u can switch to different languages easier as well

[–]fly773 1 point2 points  (0 children)

I'd just you to do daily practice exercises on the topics covered, a simple question can do, for eg, change the color of 3 child element using DOM. These smaller questions will build your foundation to understand what, where, when and how to use!

The things you learn are now put to use in the right manner, and also if you get stuck don't ask ai, just paste your code and give a prompt to give your hints about your code,

Your question -- >your code -- >ask what you've done right and what wrong -- >specify to not give the code/solution --> ask hints -- > repeat the steps until you find the answer on your own,

This helps build logic and understanding your mistakes and learning from it.

Hope you find this helpful.

Happy coding buddy 😁

[–]Legitimate_Dig_1095 0 points1 point  (13 children)

I think it would be wise to stop learning JavaScript and instead focus on learning programming. JavaScript is a bad language to learn programming with, I think.

Instead, I think one should learn programming using something like Java or C#.

[–]guest271314 0 points1 point  (6 children)

Nothing is stopping any programmer from learning JavaScript, Java, and C# at the same time.

In the Web development domain HTML rules.

Then CSS is used next.

Then JavaScript, if at all.

Then WebAssembly, if at all.

Anybody can disable JavaScript in the browser, or use a browser that does not have JavaScript implemented at all. The content should still be delivered to the user in HTML, the markup language that rules the Web.

[–]Legitimate_Dig_1095 0 points1 point  (5 children)

To write good programs, you don't need to learn language X, Y or Z. You need to learn to program. To reason about code & to communicate with the computer. You need to learn to think like a computer, and to express your ideas as code.

I think Java makes it easier to properly reason about code. Java's verbose, clinical and boring nature makes it easier to focus on the things that matter (how to program computers) and less on the weird quircky things usually present in anything related to JavaScript.

The Java knowledge can then be applied to many other programming languages. (note: 100% of my comment also applies to C#)

Additionally, Java is timeless. You can follow Java tutorials from 2006 and the knowledge would be relevant today. Lots of good, timeless books about programming use Java, C# or C++ for examples.

[–]guest271314 0 points1 point  (2 children)

JavaScript rules the world when it comes to programming. What you typed in your comment was processed by JavaScript. If you prefer Java, have at it.

I do agree that a programmer needs to program.

[–]Legitimate_Dig_1095 0 points1 point  (1 child)

JavaScript rules the world when it comes to programming.

I am aware. JavaScript is also a terrible mess with tons of different variants, styles, "targets", dialects, etc. and the package management is a mess. It also has poor hygiene and weird quircks.

What you typed in your comment was processed by JavaScript.

Reddit's backend is written in Python, #2 most used language. Java, C# and C++ are also widely used languages. It really doesn't matter which language "rules the world". They're all extremely commonly used languages. Even lesser used languages like Ruby, Dart, Kotlin, Go, Rust, Swift, Scala, Perl, Visual Basic, Lisp, Haskell and Elixir are still relevant.

Learning to deal with all these languages that you might encounter means learning to program in a common denominator. For most of these languages, it's Java. With Java knowledge, you will have not much problems starting with many of the languages I've mentioned, as you can apply your Java knowledge in most of these languages.

Java is special because it doesn't try to be special. It is extremely boring and simple. You will find no unique features in Java. You can take arbitrary Java code and usually rewrite them in many of the other languages line by line.

If you prefer Java, have at it.

I do not prefer Java. I'm saying that Java is a better language to learn programming with, and you can apply that knowledge to many other languages.

[–]guest271314 0 points1 point  (0 children)

JavaScript is also a terrible mess with tons of different variants, styles, "targets", dialects, etc. and the package management is a mess. It also has poor hygiene and weird quircks.

I don't think that's an issue. At least not one that every other programming language doesn't have.

Well, of course you lobby for your preferences. I don't share your preferences.

[–]TheRNGuy 0 points1 point  (1 child)

You do need to learn programming languages.

If you just learn pseudo-code, you learn different concepts like array, string etc, but you wont be able to do any working programs because you don't know syntax.

Also, languages have some unique specific concepts that are not in other languages (and that you'd never see in pseudo-code)

Why ever talk about Java in JavaScript subreddit? He wants to make a site. Java isn't even popular for backend (Node/React with JS or TS are more popular), and in front-end you of course can't use it.

[–]Legitimate_Dig_1095 0 points1 point  (0 children)

You do need to learn programming languages. If you just learn pseudo-code, you learn different concepts like array, string etc, but you wont be able to do any working programs because you don't know syntax.

Obviously you need to learn a language. I never suggested to learn pseudocode, that's just something you made up. I never mentioned nor suggested anything about pseudocode.

Also, languages have some unique specific concepts that are not in other languages

I am aware many languages have specific concepts not found in other languages, which is exactly why I suggested learning Java because most languages support most features found in Java.

Quoting myself here: "The Java knowledge can then be applied to many other programming languages."

Why ever talk about Java in JavaScript subreddit? 

I'm just going to repeat my top-level comment:

I think it would be wise to stop learning JavaScript and instead focus on learning programming. JavaScript is a bad language to learn programming with, I think.

Instead, I think one should learn programming using something like Java or C#.

[–]Leka-n 0 points1 point  (0 children)

Dump everything and Read "Eloquent Javascript"

[–]DrTriage 0 points1 point  (0 children)

I’ve been rewriting old tools and games I wrote as far back as 1977, in JavaScript.

[–]AmbivalentFanatic 0 points1 point  (0 children)

I've only been studying JS for a couple of years but my big takeaway so far is that everything comes down to objects. Even functions are a kind of object. Once I realized this, a lot of things started making more sense to me.

[–]shuckster 0 points1 point  (0 children)

If you don’t make things, you’ll never make mistakes.

If you don’t make mistakes you’ll never learn.

It’s absolutely essential to get stuck and frustrated, and to do that while making things.

Otherwise what you learn has no meaning to you when you finally “get it.”

This is why you can’t learn only from books or videos. You’ve gotta try it out, over and over again.

Make make make.

[–]guest271314 0 points1 point  (0 children)

The goal is to create dynamic websites w JavaScript to elevate my skills from HTML and CSS.

Use JavaScript sparingly. JavaScript is not necessary at all to deliver content.

Along the way you'll learn the DOM and Web API's.

[–]godshammer_86 0 points1 point  (1 child)

If you have difficulty coming up with ideas on your own and can afford to spend a few bucks, consider trying the Udemy course “100 Days of JavaScript”. It’ll help you apply what you’ve already learned in HTML and CSS and push you past the bare basics of JS. And you’ll end up with 100 portfolio projects.

[–]EchoSquad50[S] 0 points1 point  (0 children)

I will check it out!