exercism / javascript

Exercism exercises in JavaScript.
https://exercism.org/tracks/javascript
MIT License
562 stars 613 forks source link

What was it like to learn JavaScript? #741

Closed ErikSchierboom closed 3 years ago

ErikSchierboom commented 4 years ago

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning JavaScript? What was helpful while learning JavaScript? What did you struggle with? How did you tackle problems?
  2. In what ways did JavaScript differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning JavaScript :)

Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences.

Want to keep your thoughts private but still help? Feel free to email me at erik@exercism.io

Thank you!

tstirrat15 commented 4 years ago

I started off being a little scared and reluctant. Seeing things like wat made it seem like JS was at best weird and at worst kinda broken?

The first project where I first really tried to have a go at it was an Angular2/Typescript project, where everything was OOP and typed. I muddled through, but the OOP patterns dictated by Angular2's design didn't make a whole lot of sense to me.

I started properly getting into it with my current job, where I work on a frontend written in ES6 and React. I really felt like I found a groove here, and a lot of it was getting more comfortable with the functional programming techniques that Javascript makes really easy.

I love how easy it is to write a curried function with arrow notation. I love how easy it is to express functions of functions.

Some problems I ran into included the concepts of equality, and how that's down to object references, and needing to keep track of what's considered an object and what's considered a primitive, and how that affects notions of equality.

I can't speak to the experience of using classes extensively - I tend to prefer a functional style, so I haven't had to deal with things that people complain about in that sphere like the weirdnesses of prototypical inheritance.

seeksort commented 4 years ago

1) I learned JavaScript a few years ago after learning a bit of Python, my first real programming language. Trying lots of different tutorials and references was helpful, because I found learning things from different approaches helped clarify concepts. I specifically remember I had a difficult time with callbacks and closures, because I didn't understand how you could call a function without adding the () or including arguments. I also had a hard time understanding Promises.

2) Coming from Python, I remember being really annoyed with some of the syntactical differences. Like for-loops, which read like plain English in Python. I also disliked when operations I was used to weren't built-in to JavaScript, e.g. capitalizing a string, which is a standard Python string operation but requires a bit of string-slicing in JavaScript without using a package.

Now I really enjoy using ES6 syntax and all the functional capabilities in JavaScript. I'm glad I learned "the long way" of doing those things, e.g. using a for-loop on an array, because now I use .map and understand what it does. Or understanding the long way of deconstruction and appreciating how simple it is to do in ES6.

lpatmo commented 3 years ago

How was your experience learning JavaScript? What was helpful while learning JavaScript? What did you struggle with? How did you tackle problems?

I wasn't a developer at the time, but I remember a coworker telling me to read JavaScript: The Good Parts when I expressed interest. On reflection, it was not the best recommendation, because it went into a lot of theory and I didn't grasp exactly how to write JavaScript after reading it cover-to-cover.

What I found helpful:

What I struggled with initially:

How I tackled problems:

In what ways did JavaScript differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

ES6 was the big thing, but after learning it JavaScript became easier to write, actually.

Nowadays I mostly write JavaScript in the context of React, which is also simpler in a way.

evelynstender commented 3 years ago

How was your experience learning JavaScript? What was helpful while learning JavaScript? What did you struggle with? How did you tackle problems?

I was a C# developer when I first got in touch with JavaScript. I had to learn as I joined a new team in my old company. I fell in love pretty quickly as it's really easy to find free/open-source resources for it. Especially packages/libraries/frameworks! The most helpful thing I did was to get involved in the community: ask questions, try to help others, and understand what you can build with JavaScript. There are tons of free resources on the web and people trying to help! I just took advantage of it! I struggled the most to understand async/await x promises. I learned how to use promises very quickly but I struggle to understand why it existed, what could I do with and how it worked internally. I was just using it without understanding it properly. I tackled the problem by reading some blog posts, the documentation, and asking more experienced developers.

In what ways did JavaScript differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

I'd say the ES6 was the most different I experienced. Once I understood how to use it, things got better. My code looked more readable somehow. Now I use it for everything!

neenjaw commented 3 years ago

I'm not sure when I started learning JavaScript as I've been doing webpages since the mid-90's. But I used it more like a swiss army knife to connect up buttons, forms, and whatnot not really in a cohesive pattern. I probably got more serious into javaScript in the last 5 years, when working on a bootstrapped app in VanillaJS. It was interesting to see how the DOM and JavaScript had evolved over time and how they could work to complement eachother.

Things that have always helped me to learn is being able to read good examples of what is possible with a programming language. How do you organize ideas, what patterns work, which patterns don't, which choices lead to future problems.

I think I struggled with the idea of JavaScript objects formed from factory functions (in ES6+, a class if that term is more descriptive) and how you use them and organize them. But I think using JavaScript from a more functional viewpoint has helped me to integrate those things when needed.

I'm not sure how it differed from other languages that I knew at the time, as I think PHP exists in a similar space but on the server side.

matari-dev commented 3 years ago

1

2

ErikSchierboom commented 3 years ago

How was your experience learning JavaScript?

I had ups and downs :) Some things were really easy to do, but for many other things you'd have to build them yourselves as JS doesn't have much of a base library (I started doing JS a long time ago).

What was helpful while learning JavaScript?

That JS is very easy to get started with. You can easily test things in a browser without having to setup a project file or anything like that.

What did you struggle with?

The dynamic nature of JS meaning I usually found out I had made mistakes only at runtime.

How did you tackle problems?

Mostly just trial and error and StackOverflow.

In what ways did JavaScript differ from other languages you knew at the time?

JavaScript being a prototype-based language was a big difference. Also, the lack of a nice, full-fledged base library was quite annoying.

What was hard to learn?

Figuring out what this represents :) It was very unintuitive to me that this could be different depending on how a function was called.

What did you have to unlearn?

That this is immutable.

What syntax did you have to remap?

Not much.

What concepts carried over nicely?

Functional concepts I knew of (map/filter/reduce) all had JS equivalents.

kntsoriano commented 3 years ago

How was your experience learning JavaScript? What was helpful while learning JavaScript? What did you struggle with? How did you tackle problems?

I didn't really have a great time with JS coming from a Ruby background. I started learning JS when it was all about callbacks and I had a hard time reading through them. It was useful to me to know that in JS, functions are treated as first-class citizens and you could pass them around as normal arguments. Though it gets harder when you forget to do function.bind(this).

I guess the real struggle for me has been dealing with everything asynchronous, specifically the concept of Promises. It felt so foreign to me and I didn't know how to read through the chained then and catch blocks. I needed to dig deep and watch some tutorials online in order to wrap my head around this. I noticed that I really learn best when I spend some time learning rather than figuring things out on my own.

In what ways did JavaScript differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

I think it didn't really differ that much from Ruby. It just had some extra concepts, such as async, which Ruby didn't have. Also, I think the struggle for me was trying to know how to write specific things in JS. I feel like Ruby does a better job at this as it's more intuitive in my experience. Ruby's functional concepts, such as map, really helped me get into JS a bit easier. I imagine without those, I would have had to learn a lot more.

In Ruby, I've been a lot more comfortable writing several classes. In JS, I don't really have any experience in writing any. I've struggled to write abstractions, such as Value Objects in JS. It probably just boils down to experience. I'm also unsure whether reaching for Value Objects as a solution in JS is the correct thing.

junedev commented 3 years ago

I am closing this issue, we will still refer back to the provided information though. Thanks everyone!