DEV Community

Discussion on: What are your biggest struggles in learning JavaScript?

Collapse
 
perrydbucs profile image
Perry Donham

Tutorials and stackOverflow. For some reason Javascript tutorials often start with "In this tutorial we will write a simple ..." and, 12,000 lines later you can't remember what it was you were trying to learn.

And stackOverflow...OMG! Ask a simple question on SO like "Hey, these four lines of code are in an IIFE, where is variable foo visible?" and you'll get

  • 9 comments asking why you are using an IIFE
  • an argument regarding the use of the keyword var
  • 14 reasons you should be using Python instead of Javascript
  • a correction for a typo in one of your four lines
  • a correction to the correction that insists the typo is intentional and within spec (with a link to a Fiddle to prove it)
  • a complete refactoring of your four lines into ES8 to show how much simpler it will be
  • the history of foo, bar, and baz

New JS programmers spend a lot of time in the magical incantation stage, copying and pasting random code from the web that they hope will run correctly but that they can't explain how it works. Some never escape it!

Collapse
 
yaphi1 profile image
Yaphi Berhanu

This is hilarious and true. Very well put.

Collapse
 
ben profile image
Ben Halpern

Beautiful description πŸ˜‚

Collapse
 
albertdugba profile image
Albert

You're damn right

Collapse
 
zzzzbov profile image
Timothy

As a 100k user I'm certainly biased, but I don't agree with this at all. What it sounds like is confusion over what Stack Overflow actually is.

It isn't a place to learn new languages like JavaScript. It's not meant to train people on languages or provide tutorials. It's meant to find specific answers to specific questions.

And with that, if someone asks another "I don't know how IIFEs work" question, I generally dupehammer them to "How do JavaScript closures work?", and scold them for not having done enough research.

Collapse
 
zeropaper profile image
Valentin Vago

Yepa.

You just described the separation of concerns concept fairly well.

Thumbs up!

Collapse
 
perrydbucs profile image
Perry Donham

I think that you just made my point πŸ˜‰