DEV Community

Cover image for Why Learning JavaScript Is Fun

Why Learning JavaScript Is Fun

Nijeesh Joshy on November 17, 2017

I started Leaning JavaScript in the fall of 2016 and at First it seems really boring but i kept leaning JS because i have to lean I was in a middl...
Collapse
 
rajaasyraf profile image
Raja Asyraf

Can't agree more with you. I have the same experience with "callback" which I never know how it works and when i found it, it was really fun! Can you share some link of the video you mentioned above? Really appreciate it!

Collapse
 
nijeesh4all profile image
Nijeesh Joshy

Here is the link
youtube.com/watch?v=8aGhZQkoFbQ

It is Not exactly about Async it is about Event loops But the way he explains it was really nice.
You will get a basic idea about JS works and al

Collapse
 
ardennl profile image
Arden de Raaij

Agreed! Learning JavaScript, especially nowadays, is lots of fun. There are so many resources available to learn JavaScript from, and there's so many good teachers out there as well. Not only can you learn from blogposts and StackOverflow, but there's also a great amount of paid and free courses available with great structure and interesting test cases. Although it might be confusing sometimes to know what you want to learn, I think learning JavaScript has never been more fun. Happy coding to you too!

Collapse
 
nijeesh4all profile image
Nijeesh Joshy

When you have to solve challenges on your own is the method to learn JavaScript.
I suggest 'nodeschool.io/' to my college juniors who comes to me asking to teach JS.Its my Way of learning through challenges and rewards.

Collapse
 
ardennl profile image
Arden de Raaij • Edited

I totally forgot about nodeschool, but that's great indeed! Some resources I also really enjoy are wesbos.com and his courses like ES6 for everyone, ihatetomatoes.net, gomakethings.com and 'The coding train' is also great! youtube.com/user/shiffman

Thread Thread
 
nijeesh4all profile image
Nijeesh Joshy

coding train is awesome.
And thank you for sharing

Collapse
 
erebos-manannan profile image
Erebos Manannán

JavaScript is fun until you realize you HAVE to work with it to build frontends, and how bad the language is.

Yea, the C/C++ style "if you want some thing to be done do it yourself" can be fun for the beginner, but after you've googled to copy & paste your 20th function randbetween(min, max) { ... } (often with small bugs because the first result is a bad solution) or spend more time setting up a working toolchain to build your project in a fun and efficient way you will get tired of it pretty quickly.

In the end JavaScript is a horrible language to work with, it does almost nothing for you to start with, and the ecosystem that the JS developers have built around it is an unstable mess.

The favorite tools for building, grunt/gulp/webpack/etc. keep changing every year, there are a ton of libraries you want/functions you have to implement yourself to give the language the basic capabilities you need to be productive, and all of these combined with the unstable dependency management systems mostly still in use mean that the code that worked a couple of years, month, or even days ago just doesn't work today.

There are some glimpses of hope here and there, e.g. yarn is fixing some long outstanding issues with JS development, but only some. Similarly some libraries like Underscore easily fix some of the more common things missing from the language, but on the other hand come with the extra baggage of some clunky syntax etc.

Add to this the batshit crazy ECMAScript committee going the PHP way with their design -> picking every wrong decision possible. Did ANYONE in the committee for example pause for one second to think "Why is it that in Python they write from module import function instead of import function from module?". If they had, they should've quite quickly realized that the syntax for import {func} from 'bar' is both disgusting in terms of looks, and the objectively wrong way around -> no IDE on the planet is able to accurately autocomplete anything you type as they are in the wrong order.

If CoffeeScript was such a great idea, why didn't it become so much more popular? Why did CoffeScript's awful shorthand function notation have to be adopted into the standard, and why does every JS programmer think it's a great thing if no-one else can read their function definitions easily?

While adding these terrible solutions for mostly non-issues, the ECMAScript committee is also avoiding fixing some of the actual terrible issues of JS, e.g. you using the wrong options -keys and the code just chugging along without any error, notice, or anything hinting at your misuse of the code. This is a simple consequence of the language missing a clear and simple named parameters, and everyone implementing their options -objects without any validation.

Now there are two ways to solve this, the best option of course being adding named parameters, the secondary option adding easy validation for objects that includes making sure no EXTRA data is there (like when you typo something, or guessed the name wrong).

So, while the language does have some nice features about it, and it is sort of getting better at the same time, it's also degrading at an unprecedented rate. The worst part about it is however the community, which is making a large number of programmers really bad at their jobs and then be proud of their non-accomplishments. No other programming community I've seen is so proud of their ability to obfuscate their code, make it unstable and unpredictable, and be unable to detect user error and just keep going on doing the wrong thing, except maybe the PHP community .. tough call this one.

Then there are tools like Flow and TypeScript, which are steps to the right direction, but introduce extra issues to the workflow - few 3rd party libraries still support TypeScript, and the compiler and other tools suffer from the typical JS issues of being poorly documented, having almost no useful logging, and having no ability to detect user error. Also not even TypeScript can remove the dependency to a bazillion 3rd party libraries and every 3rd party library including other 3rd party libraries for the simplest things. This leads you to spend a lot of extra time every now and then to get your fancy tools working again so you can write JavaScript a little more pleasantly than you do without them.

The one hope I have for JS is that something like Kotlin/Nim/Elm/Haxe, a completely separate language with it's own toolchain and community but the capability to compile into JS, will eventually become mature enough to significantly compete for the market.

If you want fun languages to work in that also allow you to be productive try Python and Go, if you're into async programming both offer plenty of chances to do that (for Python e.g. gevent, asyncio, tornado, async and await in Python 3.5+, etc.), while having much better ecosystems and a more of a "batteries included" attitude so you can quickly get to doing your work instead of fooling around with reimplementing the bare bones for the 17th time. I've heard lots of good about Rust as well, though unfortunately have no personal experience with it.

If you want to work on the frontend and do something cool, maybe try Kotlin/Elm/Nim/Haxe, hell try building something with Emscripten, maybe create a nice DOM library for use with Emscripten to make it fully feasible to build your web frontents with Swift, D, or other languages.

Collapse
 
nijeesh4all profile image
Nijeesh Joshy

Thank you for sharing your opinion
Wow thats a long comment.

Every language has its good and bad. Thats the beauty of it when you realise the the bad of the language and work around it to get to your solution will give you a lots of insights and challenges for you to work with.

Collapse
 
asynccrazy profile image
Sumant H Natkar

Javascript is a completely different beast to learn. I was a backend guy and then started working in project which had loads of Javascript in it.

It just went over my head at the start but I dug my heels and decided to learn it and haven’t looked back since.

Also with es6 it has got lot better.

Collapse
 
nijeesh4all profile image
Nijeesh Joshy

My first Back-end Language was PHP when i switched over to JS. It was really messy for me. like when PHP provide in-build session handling and you have t install modules to handle sessions it was real hard for me.
But since i worked on it a lot, I kind of fell in love with it.

Collapse
 
jeevanc profile image
Jeevan Chapagain

yeah javascript is really good.I started learning it like 3 month ago and am really enjoying it. I like its features like callback, promises, multiple promises chaining etc.

Collapse
 
nijeesh4all profile image
Nijeesh Joshy

"Javascript is the duct tape of the internet"
- Charlie Campbell