DEV Community

Cover image for Why Learning JavaScript Is Fun
Nijeesh Joshy
Nijeesh Joshy

Posted on • Edited on

Why Learning JavaScript Is Fun

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 middle of a project which is my first try to web development. So with out JavaScript doing functions in the Client-Side is not possible so i had to lean it.
I was like why i have to go through all these documentation it just like any other programming languages some for ,while , ans for each loops and if ,else if controls. At that point i was really getting bored and decided not to read any guides to lean JavaScript just dig in and start codding like a mad Hacker (Like in the movies not the real world).
Then i started codding like i always do with having only a basic idea of the syntax and not sure how to do anything. As long as we have stack Overflow All the programming related questions wont go unanswered. So i stated coding it was pretty much python lots of functions for you to use (I love C/C++ for their "if you want some thing to be done do it your self" attitude ). If I don't know Something went to W3schools or Stack-overflow for answers and i was like this is just a piece of cake. i was like give me a year i will build Facebook for you.All of that was about to change....!
That was when i had to use Async Programming . I was never into the Async Programming before i was never even used multi threading or no parallel processing methods and i was feeling like why my code is behaving really funny.So i tool my code to Stack Overflow and explained then what am i trying to do and what is the error. Then One guy commented "it is because of JavaScript's Async Programming you have to do that as a call back."
I was like what Async and callbacks ? what the hell are those ?. So i dig in to the internet for answers. After a lots of conversations and reading i decided i have leaned everything about Async and callback now its time for me to code.
So i started codding again and i get stuck every now and then and i tries to experiment by moving the lines of code here and there until it works. After wasting lots of coffee and time i decide to lean more about it.
So as a lazy person i thought why i should read when someone else will read and explain for us. that way i wont have to make sense of the all documentations. So i went to YouTube and searched for "Explain JavaScript Async" like i am commanding YouTube to teach me. I viewed a couple of videos and then one video hit my eye it was a video a young developer talking at a conference so i decided to give it a try and that was really good. I realized that i was seeing JS like other languages that was my mistake JS is a entirely different language. Like none other languages i have learned and worked with JS was different it does not always has to wait for each line to execute and finish. i will come back to the part when the execution of that is completed.

It was more of an event driven language that a line by line executing language. After learning JS for a few months and experimenting with it on a couple of side projects my alliance has changed from python to JS.
Learning JS can be really challenging if you are new to Async Programming but that is the beauty of it throws you challenges which most of the times you have to
solve on your own. Not like all other languages each and every line you code will make you fell in love the language deeper and deeper.

So happy coding.

Top comments (12)

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