Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Until a few months ago I could not even look at JavaScript without having a feeling of anxiety. I was 100% under the so-called JavaScript Fatigue and I could not get out of it. This lasted years.
Today, I love JavaScript and its ecosystem.
How did this happen?
Iâve been using JavaScript in some form or another since the nineties, and I have some books on my shelter that looks very funny today, full of document.write statements.
JavaScript has hugely changed in the last few years. At first, I could not pick up all the things that were going on. I could not accept so many changes all at once. JavaScript was changing but I was resistant. I took so much to learn it properly, and now itâs changing under my feet.
I found really spot on a comment made on the popular Modern JavaScript Explained For Dinosaurs post, when it argued that âlearning modern JavaScript was tough if you havenât been there since the beginningâ:
I would argue being there since the beginning (yes, Iâm *that* old) makes it even tougherâââTim Tate
I dived into JavaScript and Node.js seriously in 2012, and I had never experienced a language change so incredibly huge as ES6. The previous big change happened in 2009 with ES5. ES6 literally changed everything. It was such a huge revamp of JavaScript that every day you had so many things that could get into that spec but you didnât really know if they made it, and you had to catch up as everyone on Twitter was talking about those things that maybe were the next big thing.
var was left in the dust.
function never exist any more.
Prototype-based inheritance, which took a long time to learn properly, is gone, hidden under the đ carpet of classes.
This was just the surface.
Build all the things
One big shift that was happening was building.
We went from a very simple thing, including our JavaScript with script tags, to having build steps that compile our language to some incomprehensible huge file. At first I resisted strenuously, I got up in my tower fully armed with cannons to fight the build army.
But when the Babel forces came along, I initially fighted even harder but in the end I raised the white flag, and I joined the enemy.
I realized Babel is not some fancy library that introduces future, edge features, and when those land in the browser weâll forget Babel. No, Babel is here to stay, for the foreseeable future.
When ES2017 will fully land in the browser, Babel will allow for ES2018, ES2019 and so on. Thereâs no escape. Embrace the future, Babel is your friend.
Use the simplest alternatives
The tooling is one of the hardest part of JavaScript nowadays. Yes, you can learn all about Webpack but when you start out, ignore everything and use ready-made solutions like create-react-app , the React Boilerplate that hide the tiny details for you and let you focus on the code.
Donât start by setting up an environment, learn by using Glitch: thereâs no simplest thing to start diving into modern JavaScript.
No more huge releases
ES6 was so big that the ECMAScript committee decided to do smaller releases next time. This is why ES6 is also called ES2015, and was the first release with the yearâ weâll have a yearly release from now on. Itâs easier to catch up, will have less changes as the time to add them is limited, and itâs predictable (surrend, there will be change).
Ignore the buzz
If youâre like me, you might follow a lot of people on Twitter that are always on the edge. Maybe some thought leaders that dictate whatâs the next big thing. They say to use X, everyone else uses X.
Maybe they like to show their snippets using the latest APIs which are not even close to be standard, but can be used with a flag in the browser.
They might have a good reason. You do not. Donât fall in the trap of the new shiny toys, focus on your work.
There is not a new framework every week
There is a joke floating around that says âwhatever JavaScript framework flavor of the monthâ or âthereâs a new library every weekâ. Thatâs true, there is a gazillion people working on JavaScript and this is great, it brings innovation and evolution, the kind JavaScript experienced in the last few years, which were huge for the language ecosystem.
But the thing to note is that the big things do not change much frequently.
React is 5 years old.
Vue is 4 years old
4 years is a very long time in tech. Those are stable technologies. Learn it now, they are here to stay for long, tooââânot going away.
You have plenty of time to become an expert in any of those frameworks, they are not going to go away any time soon.Accept that things come and go
That said, anything has a lifecycle.
A few years ago jQuery was used everywhere, now rarely new projects start with it.
In 2013 Backbone.js was huge. Now it disappeared from the map.
CoffeeScript, removed from the face of earth.
Ember.js, Angular.js and Meteor rocked and stay at the top of their popularity for a few years, now the most talked ones seem to be React, Vue and Angular (which is different from Angular.js).
Each cycle for those major frameworks usually lasts quite a few years. I still have lots of Ember.js applications running just fine, there is no need to update them if they do their job, and I donât plan to touch them.
Tech evolves and matures, then it gets used rather than talked about.You are not stupid for using jQuery
Some people have a thick skin, but if you read around enough, you fill find out those that despise technology that once everyone usedâââsince they know better, they want to inform you that you are wrong đ
Having used PHP for a long time, I got used to this, itâs normal to have people criticizing something popular. Even Go, which is amazing for its simplicity and sometimes criticized for that. You will always find someone that throws shit at something.
As an example, I have to cite this tweet by Pieter Levels, which built a huge independent business with a single PHP file. And see the comments đ
body[data-twttr-rendered="true"] {background-color: transparent;}.twitter-tweet {margin: auto !important;}
https://t.co/rORz8xdCQp is a single PHP file called "index.php" generating $2,342.04 in a day. No frameworks. No libraries. đ
âââ@levelsio
function notifyResize(height) {height = height ? height : document.documentElement.offsetHeight; var resized = false; if (window.donkey && donkey.resize) {donkey.resize(height); resized = true;}if (parent && parent._resizeIframe) {var obj = {iframe: window.frameElement, height: height}; parent._resizeIframe(obj); resized = true;}if (window.location && window.location.hash === "#amp=1" && window.parent && window.parent.postMessage) {window.parent.postMessage({sentinel: "amp", type: "embed-size", height: height}, "*");}if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.resize) {window.webkit.messageHandlers.resize.postMessage(height); resized = true;}return resized;}twttr.events.bind('rendered', function (event) {notifyResize();}); twttr.events.bind('resize', function (event) {notifyResize();});if (parent && parent._resizeIframe) {var maxWidth = parseInt(window.frameElement.getAttribute("width")); if ( 500 < maxWidth) {window.frameElement.setAttribute("width", "500");}}
But as a beginner you might find out someone that says youâve chosen an old tech, that no one uses it any more, that you should use React instead.
Ignore them, move them out of your mind.
Remember: if it works for you, itâs the right stack.
If it works for you, itâs the right stack.
Most of the times tech is built from giant companies with needs completely, radically different than yours, or the ones of your small team. Go with what you know and make a difference even without using leading edge technology.
Now, probably you donât need jQuery. But not in place of a frameworkâââplain JavaScript is super fine.
The other part of the spectrum is over-engineering. Donât use a tech just to feel smarter. Know it better. And learn when to use a framework or library helps you.
You donât have any obligation to know everything. Find your balance.
While it might sound from reading your Twitter feed, no one knows everything. Thereâs no way one can learn all the stuff thatâs going on in frontend development. This is a lifetime school. Thereâs absolutely now way to graduate.
Pick tech with user-friendly documentation
Itâs not by chance that React and Vue have an amazing documentation.
Itâs a key part of their success.
JavaScript will evolve again
Last year the ECMAScript language introduced await/async and now that feature of the language is used a lot. Promise-based code looks simply bad, you feel the urge to rewrite everything.
Donât do it, and instead use new features for new code you write.
The same will happen this year, with ES2018. Everyone will talk about them for a while, then weâll get back to work and weâll start talking about the ES2019 features.
Embrace the change. Itâs much better than betting on a tech that then stalls and fades into being irrelevant in a few years: JavaScript is here to stay!
Learn the basic fundamentals, and pick your own journey
Developing on the Web Platform requires a commitment to learn something new often, even just to find out whatâs possible.
Sometimes learning in 20% of the time the 80% of the things you will need is enough, without diving too much into the edge cases.
The journey has just begun
JavaScript is still very young compared to other languages, itâs hugely popular and it was able to dramatically change in the last few years. It attracts lots of new talented developers every day, and itâs fascinating thinking about the JavaScript weâll write in 10 or 20 years from now.
I found my mission in helping developers learn the Web Platform, by releasing every day tutorials for developer on my blog flaviocopes.com, explaining all I learn about a specific topic. If you are into JavaScript or you want to learn all it can do, add it to your feed reader!
How I stopped worrying and learned to love the JavaScript ecosystem was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.