Develop Yourself

#265 - Why JavaScript Feels So Hard To Learn: You're Making One of These Mistakes

Brian Jenney

When I first tried to learn JavaScript, I hated it so much I told myself I’d just be an HTML and CSS developer and never touch it again. 

Of course, my first job threw me straight into Angular, C#, SQL, and a mountain of JavaScript I wasn’t ready for.

In this episode, I share what made JavaScript so brutal for me (and for almost every student I’ve worked with), the mistakes that keep people stuck, and the science-backed strategies that actually helped me go from totally lost to confident. 

If you’ve been banging your head against for loops, callbacks, or just “getting it,” this one’s for you.

Send us a text

Shameless Plugs

🧑‍💻 Join Parsity - For career changers who want to pivot into software.

✉️ Got a question you want answered on the pod? Drop it here

Zubin's LinkedIn (ex-lawyer, former Googler, Brian-look-a-like)

Speaker 1:

Welcome to the Develop Yourself podcast, where we teach you everything you need to land your first job as a software developer by learning to develop yourself, your skills, your network and more. I'm Brian, your host. No, it's not just you. Learning JavaScript is really, really difficult, but here's why you're likely struggling to learn JavaScript. I wanna go into a few reasons, a few case studies of people that I've met over the years. As a software developer, also running a program called Parsity, where we've helped hundreds of career changers make the transition into tech, and also working at other boot camps throughout the San Francisco Bay Area, I feel like I've seen a lot of these problems that you're likely having, including me.

Speaker 1:

I struggled a ton with JavaScript when I first started learning it. In fact, I hated it so much that I thought I could be an HTML and CSS developer and never have to touch JavaScript ever again. And then my first job was, of course, using AngularJS, javascript, c, sharp, sql, ibm, db2, and NET. So I got thrown in the deep end and 11 years later, I've learned to love JavaScript. In fact, I even wrote a small book about learning JavaScript that I can send you for free if you want. But anyway, in the summer of 2013,. I decided I was going to be a professional coder. I thought, man, if I can get paid to do this, I'm all in. I already knew some HTML and CSS, which I learned on Codecademy, so I bought this gigantic JavaScript for dummies type book. It was one of those big old phone book size books that you get at like Barnes and Noble or something like that. Remember, this is 2013, before you could learn everything online or go to chat GPT and make yourself think that you're learning everything that you thought you needed to know. Anyway, I was reading that thing, cover to cover, all summer long, like literally. I took it on road trips. It was always with me. I was studying it, underlining stuff, writing little notes in a book.

Speaker 1:

I'm not the brightest bulb on the Christmas tree, right. I've never claimed to be some super duper smart dude at all. I feel like I'm somewhere, maybe a little north of average intelligence. But back then I was freshly sober, barely getting my life together, and I was just doing this the worst way possible. I genuinely thought that if I just read this book, learned the syntax, I could then sit down at the end of it and write code. So at the end of the summer, like, literally, I go to my computer and I turn it on on and I'm like, okay, I want to write some JavaScript code, open Notepad, and I had no freaking clue what to do. I don't know how I was this dumb, and I know that you're not this dumb, but you're probably learning JavaScript in a way that's just as dumb.

Speaker 1:

So fast forward 11 years later, I'm an engineering manager, senior developer, run my own program, parsity, where we teach people who are much smarter than me how to change careers and learn to code Universally. People get stuck at JavaScript and I think about all the people I've seen, including me over the years and they make one of these few mistakes that I'm going to go through. So when I used to help out at a coding boot camp on the weekends, there was this dude who would come in and he'd spend like six hours, sometimes more, every single Sunday that I was there. Every time we met, though, he was like basically trying to remember for loops, and that was like really weird to me. I'm like, are you serious a for loop? Like not to be mean, but I'm like, dude, it's been like weeks, like three weeks in a row, and you don't know how to write a for loop from memory. It was like his brain was hitting a reset button every week and I genuinely started to wonder if he had some sort of like condition. I'm like, okay, I don't want to be like super judgmental here, but like something's up right. And so, curiously, I asked him. I said hey, dude, like why do you think you have so much trouble remembering this stuff? Asked him.

Speaker 1:

I said, hey, dude, like why do you think you have so much trouble remembering this stuff? Like how often are you studying? He's like dude, I don't know, I'm studying like all the time. I'm like spending 12 hours a week. I'm like, what, how's that possible? I said what did you do during this week? He's like oh, I didn't do anything during the week. I have a job. I don't have like cramming all this information one day a week, or maybe like a night and a day. He's like, yeah, and then you don't do anything until the next weekend. Now he had a pretty rough schedule where he was like working two jobs and he was dealing with some immigration status stuff. He had a lot going on, right. I'm like no wonder your brain's not broken, your schedule's broken. So this dude's story is a perfect example of how learning to code like it's a test for school just does not work. I had the same issue where I was treating it like school and reading this book big old textbook and thinking that would magically make me a software developer.

Speaker 1:

You can't just do six hours of JavaScript in a day and let your brain sit for a week. Right, here's some science behind that. We also teach this in Parsley. We go really deep into the science of learning because we realize this is actually where people fail. Most people think they're failing because the curriculum is too hard or I'm not learning the right way. I need a better instructor, I need better material. Certainly could be the case. What's more likely, the case is that you're not learning the way you should be. Your brain stores skills better through spaced repetition. Short, frequent sessions beat marathon sessions, because your brain needs that downtime to consolidate the information into long-term memory. So 30 to 60 minutes a day will be three hours once a week.

Speaker 1:

So stop getting over this thing like oh, I need to find a three-hour block to code, find 30 minutes, find 15 minutes, find however much time you can fit in a day to do it and do it every single day. So decide on a daily minimum. I would make it 30 minutes to an hour. I think everybody can find 30 minutes to an hour a day, and I would likely it 30 minutes to an hour. I think everybody can find 30 minutes to an hour a day, and I would likely do this in the morning when I had a really busy schedule two kids, two jobs, long commute that is how I did it. I would be on the train and I would be reading Medium articles, or I'd be in my home with my computer opened up in the morning around 6 am and I would already know what I'm going to do and I would knock out the first 30 minutes doing something that was going to teach me something that I didn't know or didn't understand from the day before.

Speaker 1:

This next issue is really specific to newer developers. Ai is awesome right, I love AI but if your first instinct is to paste a question into ChatGPT instead of struggling with it, you're robbing yourself of the exact cognitive process that helps you build problem-solving skills. What the science says for you nerds out there is that there's a thing called desirable difficulty. This is an effect that shows effortful recall, and problem-solving strengthen those neural pathways. So, basically, the more you struggle, the deeper those grooves in your brain will be that will maintain and keep that information. It's kind of crazy but it makes sense, right?

Speaker 1:

Think about cavemen or cavewomen or cave circles or whatever, right Out there hunting and gathering and all these things. What do you think they remembered and committed to memory? Things that were going to hurt them, to kill them, to make them no longer able to survive? Right, because that is the mission critical part of your brain. It's a survival mechanism. So your brain is going to take things that it sees as difficult, hard or even potentially a little traumatic. Not saying JavaScript is traumatic, but we tend to remember bad things, right? So you need to have a little bit of difficulty, a little bit of struggle as you're learning, because you're gonna create those deeper neural connections. Struggle equals growth. Give yourself like a struggle window maybe 20 minutes, 30, 60 minutes before you go to AI, before you ask somebody, before you just copy and paste an answer, and when you do use AI or Stack Overflow or whatever, make sure you actually can explain the solution back in your own words or rewrite it from scratch. This is something I still do if I copy and paste something out of AI or Stack Overflow, I'll write myself a comment explaining that piece of code. I may erase that comment before I commit it or show it to other people, but I wanna make sure that I actually know what the hell I'm writing.

Speaker 1:

I did this a lot earlier in my career when I was really really learning and I realized that, oh man, if really really learning. And I realized that, oh man, if I just keep copying and pasting stuff. Well, that's not a career, is it? That's just makes me a copy paster or a power Googler. That's not where I want to be. And I knew that was not a career path because I saw the developers around me. They weren't doing that. They could explain what they'd written. And I got caught up a few times when I couldn't explain what I wrote, got called out for it, really, really embarrassed. Got called out for it Really, really embarrassed. That dramatic memory, actually, of sitting there with the engineering manager is so stuck in my brain that now I've basically scared myself out of just copying and pasting anything without knowing what it means. Ever again I'll never do that. This next issue is what I often see when I'm reading Reddit or just reading comments online.

Speaker 1:

People that are learning JavaScript treat it kind of like a math problem where there's only one formula, but programming is a lot more like creative writing. There's tons of ways to express the same idea. So if you're obsessing over syntax or the perfect way to do something, you're really missing out on the bigger picture, which is just designing a solution that works Literally. Just try to make the thing, do what you want and stop obsessing over the syntax like who cares. You can learn that later and will naturally come. You have to have a little bit of faith that, yes, if you solve enough problems or you get stuck enough times, you'll begin to see patterns. There's really not that many ways to do things. There are a few ways to do everything and there's many ways to compose code, but after a you'll start to see the same players come up over and over and over. So when you solve a problem, solve it again. Try it differently this time. Instead of using a for loop, try to use dot map. Try to use recursion if you really wanna go deep into the rabbit hole.

Speaker 1:

Think like a problem solver instead of a person that's trying to learn a language. And I get it because you're learning a programming language and you do need to be familiar with the syntax a bit, but you can't overemphasize like oh, how exactly do you iterate over an array? Well, there's at least four ways I can think of. Which way makes the most sense? Pick one, just pick one, and move on and don't think so much about it and eventually come back and realize, huh, maybe there's a reason I should use this one over this one. Oftentimes it's purely a stylistic choice. Sometimes there can be some benefits from one over the other.

Speaker 1:

It's just like writing in English or writing in some other language. You're expressing an idea, you're trying to solve a problem and there's many ways to get that. And this kind of leads me to one of the ways that I started improving the most is because I started building really janky little projects with HTML, css and some JavaScript just slapped on it to make things pop up or change colors or react to whatever I was doing on the page. I gave myself small little challenges like make a button do something ridiculous, like I'd click a cat picture and then the cat picture would disappear, or I'd click a box and the box would move across the screen or whatever. And then syntax started coming naturally to me, because after you've written your hundredth for loop, you just don't need to look it up anymore, or you shouldn't, right? You can hate me all you want, by the way, for saying this, but here's a really harsh pill for you to swallow.

Speaker 1:

If you don't have curiosity, or if building things isn't intrinsically fun for you, this industry will not be a good fit. I'm sure there are cases out there of people that are like well, that's not the case for me. For the majority of people, especially the good people that I've worked with and I've worked with a lot of really smart people over the years they like coding, they like solving problems, they like building stuff. If you don't find some joy in doing that, this is not going to be a fun ride for you. The learning process will take forever and if you do somehow find yourself in a job, getting a role, it's going to be hard to stay in that role and for the next one it's going to be even harder. It's going to be really hard to progress in your career.

Speaker 1:

This is an interesting profession where people not only write code for a living. They do it for a hobby. So if you're not doing it a bit for a hobby and you don't find any passion at all for it kind of hate that overused word. But if you don't find it kind of fun, you're just not gonna make it. So if you're like, well, what should I build exactly? That's kind of where your curiosity has to come in. Stop doing overpolished stuff. Stop thinking about your portfolio. Just think I wanna learn some stuff. I'm gonna make a button or a form or a box or a picture or whatever and I'm just gonna see how to make it do something. You need to figure out what that something is.

Speaker 1:

If the struggle feels miserable and not worth it, it's okay to choose a different path. You can learn to code a little bit, by the way, and do other things. We have people in Parsity that have gone on to become product managers, data analysts, even just taking it and use it as an entrepreneurial skill. So there's no rule that you have to learn how to code and use it for like being a software engineer as a professional and use it for like being a software engineer as a professional. You can use it to do all sorts of other things. In fact, using it to build your product could be a really, really smart move if you have an entrepreneurial spirit and already know a little bit about sales and marketing, could be a really really powerful skill to add. Anyway, one of the things I did, and what I would suggest to anybody who's struggling with JavaScript, is to manipulate things using HTML CSS and JavaScript, butt things using HTML CSS and JavaScript. Buttons, forms, modals are really good areas to begin with. Build something visual so you can see the cause and effect.

Speaker 1:

Aim to get stuck, like look for areas to get stuck. Think about huh, what could I add here that's going to make this cooler or make this more fun to use? How can I add data? How can I get external data? How can I add that into the app? Wouldn't it be cool if I could, like look up all the books in the libraries across the country? Well, how do you do that? Somebody's doing that. How do I do that? Aim to get stuck, and you're going to naturally learn a lot along the way and you're gonna get yourself into all sorts of fun rabbit holes that will have you beating your head against the wall until you finally figure them out. Or you go to a program like Parsity, where we'll teach you this all in a much more streamlined way, so you don't spend hours, days, months, years going in a roundabout way of doing it. But it certainly is a lot of fun. And lastly, don't skip HTML and CSS. Can you believe? This dude on TikTok made a reaction video about me. He said my advice was quote, unquote, dangerous. My advice was get this learn HTML and CSS before JavaScript.

Speaker 1:

The internet, I'm telling you it's a wild place. I've been told I'm not an engineering manager. I've been told I've obviously never written anything in JavaScript. I've been told I can't have worked at a team or anything, or my Git flow is the most stupid Git flow people have ever seen in their lives. I've been caught all sorts of crazy things from people on the internet and what's even more strange is when I look into their profiles, these people often don't even have careers as software developers. This is an epidemic that is a little bit terrifying and really, really concerning how many geniuses and experts we have out there that have never written a line of code for money in their lives. Internet full of geniuses, full of geniuses.

Speaker 1:

Anyway, jumping straight into JavaScript without understanding HTML and CSS, it's kind of like trying to play jazz before you can keep a beat, or it's kind of like trying to jump into the deep end of a pool before you learn how to doggy paddle right. You'll just be confused or drowning the whole time. So HTML and CSS are like your canvas. They're like the paint they make stuff look pretty. Javascript is the brush. Without the first two, your code doesn't really have any interactivity, doesn't paint the full picture. So learn HTML and CSS. Yes, that's my dangerous advice for you learn some html and css before you learn javascript. Geez, I never would have thought somebody would make a video saying that was dangerous. Terrible advice, wild world.

Speaker 1:

Anyway. Spend a week or two or more or a month making static sites and styling them. Find a really, really simple website, maybe like craigslist or even the nav bar to a certain website, and try to replicate that using HTML and CSS. This is a long lost art that I feel like a lot of software developers just aren't using anymore. They're like I don't really know any CSS or HTML. You need to know some CSS and HTML.

Speaker 1:

Yes, I understand Tailwind as a thing. Yes, I understand React as a thing. I've been using React for seven years now. I really rarely write HTML. Do you need to know it A hundred percent? Because that's what your browser ultimately renders. It doesn't render React. It renders HTML, css and JavaScript. You need to understand how those three work together to have a deeper fundamental understanding of how the web works. And just to end off, yes, learning JavaScript is hard. If it was easy, then everybody would learn it. We wouldn't have astronomical salaries for making websites honestly. And it's even harder when you're learning it wrong.

Speaker 1:

And this whole thing about anyone can learn to code. I don't believe that it's true, in the same way that anyone can get a six pack. Is it possible, perhaps? Is it likely? Absolutely not. Where you're starting from is different from where somebody else is starting from.

Speaker 1:

I believe the most important predictor of your success is curiosity. If I had to boil down and think about what separated people that did well in programs like Parsity or that I've met over the years, it wasn't necessarily that they had a CS degree or that they were particularly charismatic or particularly smart. Even it was who was really curious and also consistent. You can't just be curious and suck at coding and never work or do anything. But if you're curious and you really want to understand how things work and you have a genuine curiosity, you're going to make this work. That is the biggest indicator of your success, in my opinion, besides consistency, which is either first or second on that list. Curiosity, consistency those two Cs are going to get you far. Small consistent practice will beat any late-nighter you can try to pull off.

Speaker 1:

Try to delay AI as a crutch. Think in solutions and not syntax. Build tangible visual stuff. Learn HTML and CSS. You can read 100 books. You can read a big old phone book like I did that one summer. You can watch a thousand tutorials. You can spend hours scrolling dev Twitter or finding memes or hanging out in some Discord full of dudes with neck beards, but until you get your hands dirty every day building real software and struggling a little bit, you're just going to keep on learning forever and be stuck. I don't want that for you.

Speaker 1:

By the way, your best option, honestly, is to go to a place like Parsity, where we treat you as an individual.

Speaker 1:

We've helped everybody, from bootcamp grads who just can't seem to get hired or forgot everything they know, to people that finished the Odin project and are wondering well, now what do I do?

Speaker 1:

To people that don't even know anything about JavaScript or HTML or CSS, we treat everybody individually and give you a custom plan, as well as work with you on the science and how you will best learn the material that we lay out for you, as well as a market development plan and a way for you to find leads in your target market and what you need to be doing to give yourself the best possible shot at not just learning how to code, but actually getting hired and paid as a professional developer. We have a few spots open for the rest of the year. Prices are going up because we just got accredited, which I'm really excited about. I'll have more information on that later, but I'm telling you this is a great time to join and you should do it before prices go up. I hope you found this helpful, whether you join Parsity or not, and I'll see you around. That'll do it for today's episode of the Develop Yourself podcast. If you're serious about switching careers and becoming a software developer and building complex software.

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.