Journey to solve JavaScript fatigue
Until a few months ago, I couldn't even read JavaScript without anxiety.
In the so-called JavaScript fatigue, I am 100% in a dilemma and I cannot get rid of it.
This lasted for several years.
Today, I like JavaScript and its ecosystem.
How did this happen?
I have been using JavaScript in some form since the 90s, and there are some books on my shelf that look interesting today, everywheredocument.write
statement.
Probably from 2012 to 2013, the huge changes brought to us by ES6 are everywhere.
At first, I couldn't clean up everything that was happening. I cannot accept so many changes at once. JavaScript has changed, but I endured it. It took me a lot of time to learn it correctly, but it changed under my feet.
I found a realFindComment in a blog post"If you haven’t been there since the beginning, learning modern JavaScript will be difficult":
I’ll argue that it was there from the beginning (yes, I’mthatOld) Make the operation more difficult-Tim Tate
I studied JavaScript and Node.js seriously in 2012, but I have never experienced a huge language change like ES6. The previous major change occurred in ES5 in 2009. ES6 really changed everything. This is a huge improvement over JavaScript, so much so that every day there are many things that can be incorporated into the specification, but you don’t actually know whether they are successful, and you have to catch up with everyone on Twitter talking about those things, maybe the next A big event.
var
Be left in the dust.
function
No longer exists.
Prototype-based inheritance took a long time to learn correctly, but it disappeared, hidden under the carpet in the classroom.
This is just the surface. Over the past few years, the entire JavaScript ecosystem has undergone tremendous changes.
Build everything
The big change isbuilding.
We started with a very simple thing, including the use of JavaScript with script tags, to the establishment of the steps to compile our language into some large files that are difficult to understand. At first, I fought hard to resist, I stood full of cannons and fought against Jianjun.
But when the Tower of Babel came, I worked harder at first, but in the end I raised the white flag,Added enemies.
I realize that Babel is not a fancy library that introduces future, edge functions. When these functions appear in the browser, we will forget Babel. No, Babel will stay here for the foreseeable future.
When ES2017 fully enters the browser, Babel will allow ES2018, ES2019, etc. to be used. There is no escape. Embrace the future, Babel is your friend.
The easiest option to use
This tool is one of the most difficult parts of JavaScript today. Yes, you can learn all about Webpack, but when you start, ignore everything and use ready-made solutions, such asCreate reaction app, React Boilerplate will hide the tiny details for you and let you focus on the code.
Don’t start by setting up the environment, but learn to useglitch. There is no easy way to get started with modern JavaScript.
No more releases
ES6 is so big that the ECMAScript committee decided to release a smaller version next time. This is why ES6 is also called ES2015 and is the first version of the year-from now on we will release it once a year. It's easier to catch up with it, because the time to add them is limited, so the changes are less and predictable (although keep in mind that there will be changes).
Ignore the hum
If you are like me, you might follow a lot of people who are always on the edge on Twitter. Maybe some thought leader decides the next big thing. They say use X, and everyone else uses X.
Maybe they like to use the latest APIs to display fragments, these APIs are not even close to the standard, but can be used with the logo in the browser.
They may have good reasons. you do not. Don't fall into the trap of shiny new toys and focus on your work.
No new frames every week
There is a joke saying "what is the JavaScript framework this month" or "there is a new library every week". Yes, there are countless people studying JavaScript, which is great, it brings innovation and development, this is the kind of JavaScript experienced in recent years, which is huge for the language ecosystem.
But it should be noted that big things will not change often.
React is 6 years old.
Vue is 5 years old.
Five years is a long time for the technology industry. These are stable technologies. Learn now, and they will stay here for a long time-they will not disappear.
You have enough time to become an expert in any of these frameworks, and they will not disappear anytime soon.
Accept things come and go
In other words, everything has a life cycle.
A few years ago, jQuery was everywhere, but now few new projects start to use it.
In 2013, Backbone.js was huge. Now it has disappeared from the map. CoffeeScript, removed from the surface of the earth.
Ember.js, Angular.js and Meteor are wobbly and have remained popular for several years. Now the most talked about it seems to be React, Vue and Angular (unlike Angular.js).
Each cycle of these main frames usually lasts several years. I still have many Ember.js applications that work well, and I don’t need to update them if they can get the job done, and I don’t plan to touch them.
Technology continues to evolve and mature, and then is used instead of talked about.
You are not stupid about using jQuery
Some people have very thick skin. However, if you read enough content, you will find information that despises the technology that everyone has used, and tells you that you are wrong. 😆
I've been using PHP for a long time, and I'm used to it. It's normal for people to criticize popular things. Even Go, its simplicity is amazing, but it is sometimes criticized for it. You will always find someone arguing about something.
For example, I have to cite Pieter Levels' tweets, who used a PHP file to build a huge independent business.
However, as a beginner, you may find that some people say that you have chosen an old technology, and no one uses it anymore, and should use React instead. Ignore them and move them out of your mind.
remember:
If it works for you, then it is the right stack.
In most cases, the technology is built by a giant company whose needs are completely different from those of you or your small team. Do whatever you want, even without using cutting-edge technology.
Now, you may not need jQuery. But not a substitute for frameworks-plain JavaScript is very good.
The other part is over-engineering. Don't use technology just to feel smart. Know it better. And know when to use a framework or library that helps you.
You are not obliged to know everything. Find your balance.
Reading your Twitter feed might sound like this,No one knows everything. Someone can't learn everything that happens in front-end development. This is a lifelong school. There is absolutely no way to graduate.
Select technology through user-friendly documentation
It is not accidental that React and Vue have excellent documentation. This is a key part of their success.
JavaScript will evolve again
Last year, the ECMAScript language introduced await/async, and now the features of the language are widely used. Promise-based code looks terrible, and you have the urge to rewrite everything.
Don't do this, but use new features for the new code you write. The same will happen in ES2018 this year. Everyone will talk about them for a while, and then we will resume work and start talking about ES2019 features.
Embrace change. This is much better than betting on technology that stagnates and disappears in a few years of insignificance:JavaScript will continue to exist!
Learn the basic principles and choose your own journey
Development on the Web platform requires a commitment to constantly learn new knowledge, or even just find out what is possible.
Sometimes, 80% of what is needed to learn 20% of the time is enough, without having to spend too much time in edge situations.
The journey has just begun
Compared with other languages, JavaScript is still very young, it is very popular, and has undergone tremendous changes in the past few years. It attracts many talented new developers every day, and it is fascinating that we will write JavaScript in 10 or 20 years.
More experimental tutorials:
- The stack I use to run this blog
- 8 good reasons to become a software developer
- SEO for blogging developers
- Recalling "4-Hour Work Week"
- Build a lifestyle business
- Build your own platform
- As an independent manufacturer, which product should you manufacture?
- Create your own job security
- Developers, learning marketing
- Product business freedom
- Generate value
- For your business
- The idea is nothing
- Niche Market
- Remote work for software developers
- Product/market fit
- The best podcasts for front-end developers
- Why create an email list?
- Break the link between time and money
- The scarcity principle applies to software products
- Social proof principle
- How do I add dark mode to my website
- My notes on Deep Work
- Advantages of using a boring stack
- How to estimate programming time
- Become an independent developer
- How to learn how to learn
- Why are interview questions for programming jobs so difficult?
- Do I need a degree to become a programmer?
- Everyone can learn programming
- How to increase productivity
- How to get the actual pageviews of static websites
- Have you filled the developer’s bucket today?
- How do i record my video
- All the software projects I have done in the past
- Tutorial Purgatory from the Perspective of Tutorial Makers
- Every developer should have a blog. This is why and how to stick to it
- Have the business mindset of a developer
- How to write unmaintainable code
- What is imposter syndrome
- How to work from home without going crazy
- How can I stop worrying and learn to love the JavaScript ecosystem
- How do I make a web prototype
- You should be the worst developer on the team
- How to start a blog with Hugo
- Write things you don't know
- How to use uBlock Origin to stop interference
- Coding is an art
- I wrote a blog post every day for two consecutive years. Here are 5 things I learned from SEO
- Put out the fire
- About becoming a generalist
- The developer's dilemma
- My plan for being hired as a Go developer. In 2017
- Use Mac and iOS devices to improve work efficiency
- How to move from the tutorial to your own project
- This is my little digital garden
- How to start freelancing as a developer
- Share the journey of building a software product business
- Subfolders and subdomains
- How can I use text extensions to save time
- Software is superpower
- I like books
- How do I decide to create a new project management application