javascript 框架
by Tero Parviainen
通過Tero Parviainen
克服JavaScript框架疲勞 (Overcoming JavaScript Framework Fatigue)
The JavaScript community is suffering from a wave of framework fatigue. It’s caused by the massive outpouring of new frameworks, techniques, and ideas that has been going on for some time now. Even though it’s all very exciting, it’s just impossible to keep up with it all.
JavaScript社區正遭受框架疲勞的浪潮。 這是由于持續了一段時間的大量新框架,新技術和新想法而引起的。 即使這一切都非常令人興奮,也無法跟上這一切。
Since you can’t keep up with it, you have to choose what to focus on. And having to make that choice is a cause of anxiety in itself. Are you focusing on the right things? Is the framework you’re learning the best one for you or is there something even better out there? Will something happen next month that’ll make your choices seem obsolete?
由于您無法跟上它,因此您必須選擇要重點關注的內容。 而做出這樣的選擇本身就是引起焦慮的原因。 您是否專注于正確的事情 ? 您正在學習的框架是最適合您的框架,還是有更好的框架? 下個月會發生什么事情 ,使您的選擇顯得過時嗎?
There are ways to resist these feelings of fatigue and anxiety. Here’s what works for me.
有一些方法可以抵抗這些疲勞和焦慮感。 這是對我有用的東西。
學習欣賞未知的事物 (Learn To Appreciate Your Known Unknowns)
The fact that you even have this problem means you know a lot about what’s going on in JavaScript. All the things that you feel you should be learning are things that you know about. They are your known unknowns.
您甚至有這個問題,這意味著您對JavaScript發生了很多了解。 所有你覺得你應該學習的東西是東西,你知道的 。 他們是你所知道的未知數 。
The key is to understand that this set of known unknowns is only ever going to expand. You’re never going to feel like you know enough. In fact, it’s quite the opposite: Not only is new stuff coming out all the time, but also every time you learn something, you’ll learn about related things — things that you don’t know yet.
關鍵是要了解,這組已知的未知數只會不斷擴大。 您永遠不會覺得自己足夠了解。 實際上,情況恰恰相反:不僅新事物總是在不斷涌現,而且每次您學到一些東西時,您都將學到相關的東西-尚不了解的東西。
For example, when I read about Cycle.js, I understand just how little I know about reactive programming in general. Learning about React opens up avenues to React Native (and on to iOS and Cocoa), and GraphQL, and redux, and so ad infinitum. One thing always leads to the next.
例如,當我閱讀關于Cycle.js的內容時 ,我通常對React式編程一無所知。 了解React可以為React Native (以及iOS和Cocoa), GraphQL和redux等無限打開途徑。 一件事總會導致下一件事。
Instead of letting this ever expanding set of known unknowns drag you down, it’s better to learn to appreciate it.
與其讓這組不斷擴大的已知未知數拖累您,不如讓您學會欣賞它。
When you know that you don’t know something, you have an option to learn it later. You know that it exists and roughly what it’s for. That means you can decide when, if ever, it becomes worth your time to learn it.
當您知道自己一無所知時,可以選擇稍后學習。 您知道它的存在以及它的用途。 這意味著您可以決定何時值得(如果有的話)學習它。
We do this kind of weighing of options all the time. It’s just that we tend to not appreciate these kinds of options, but instead get a vague feeling of guilt for not having learned everything yet. It doesn’t make any sense. It’s so much better to have those options than to be ignorant of all the things you could learn.
我們一直在進行這種選擇權衡。 只是我們傾向于不喜歡這些選項,而是因為還沒有學到所有東西而感到內。 這沒有任何意義。 有這些選擇總比不了解您可以學到的所有東西要好得多。
This kind of unknowledge — knowledge of things you don’t know — is no substitute for actual knowledge and skills, but it is by no means useless either.
這種無知-對您不了解的事物的知識 -不能替代實際的知識和技能,但也絕非毫無用處。
接受事情會不斷變化 (Accept That Things Will Keep Changing)
If there’s one thing you can be sure about when it comes to web development, it’s that it’s going to keep changing. Things change as we collectively figure out better ways of doing things, but also as device capabilities and form factors evolve.
如果可以確定Web開發的一件事,那就是它會不斷變化。 隨著我們共同找出更好的做事方式,而且隨著設備功能和外形的發展,事情也會發生變化。
Whatever is the cutting edge of JavaScript right now, you can bet that it won’t be cutting edge three years from now. Most of it will be long forgotten. Some of it will be around, but the innovation will likely be happening around something we can’t even imagine yet.
不管現在JavaScript的最前沿是什么,您都可以打賭三年后它將不再前沿。 大多數將被長期遺忘。 其中一些會出現,但創新可能會圍繞我們甚至無法想象的事情發生。
For example, Angular 1.x is still going strong and will be around for years to come. But it’s not where the innovation is. The same will eventually happen to React and everything else that’s new today.
例如,Angular 1.x仍然很強大,并將持續數年。 但這不是創新所在。 最終,React和今天所有其他新事物都將發生同樣的情況。
This state of affairs may not be desireable, but it is the reality. Your options are to either accept that things are going to keep changing, or to stay a couple of generations behind the cutting edge, below the turbulence. Either option is perfectly valid, though both come at a cost. In any case, change will be constant, and trying to fight it doesn’t make much sense.
這種狀況可能并不理想,但這是現實。 您的選擇是要么接受事情會不斷變化,要么在動蕩之下保持領先幾代人。 這兩種選擇都是完全有效的,盡管兩者都是有代價的。 無論如何,變化將是永恒的,而與之抗爭并沒有多大意義。
了解一切都有價值 (Understand that Everything Has Value)
Whatever framework or technology it is that you choose to spend your time on, it’ll end up helping you somehow. This is true even if it isn’t the Right One?.
無論您選擇花時間在什么框架或技術上,它最終都會以某種方式幫助您。 即使它不是Right One?,也是如此。
Everything you learn contributes to the network of neurons you carry around in your head. You’ll make connections that will make it easier for you to pick up other things later. Knowing one thing enables you to compare and contrast it to other things. In this sense, learning is always useful, whatever the subject.
您學到的一切都有助于大腦中攜帶的神經元網絡。 您將建立連接,這將使您以后可以輕松接起其他東西。 知道一件事使您能夠將其與其他事物進行比較和對比。 從這個意義上說,無論學習什么學科,學習總是有用的。
This means that getting anxious about finding the one right framework or technology to learn is not as crucial as it sometimes feels. Not only are those things very hard to find, but in many cases they may not exist in the first place. What’s much easier to find are things that are useful. They’re everywhere. You might as well learn something that looks interesting or fun, even if it may not be the absolute correct thing.
這意味著,急于尋找一種合適的框架或技術來學習并不像有時候那樣緊迫。 不僅很難找到這些東西,而且在許多情況下它們可能根本就不存在。 有用的東西更容易找到。 他們無處不在。 您可能還學到了看起來有趣或有趣的東西,即使它可能不是絕對正確的東西。
For example, I spent years learning various Ruby technologies as I was building apps in Ruby and Rails. I use exactly none of them today, and I’m not sure if I ever will. Was spending all that time for nothing? I don’t think so. Not only were those skills useful at the time, but I’m also positive that everything I learned during that time has shaped the way I do programming today. I fully expect the same to eventually happen to all the tools I’m using right now.
例如,當我在Ruby和Rails中構建應用程序時,我花了很多年學習各種Ruby技術。 我今天完全不使用它們,也不確定是否會使用。 那所有的時間都花光了嗎? 我不這么認為。 那時這些技能不僅有用,而且我很肯定那段時間我學到的一切都影響了我今天的編程方式。 我完全希望我現在正在使用的所有工具最終都會發生同樣的情況。
One trick for getting around the anxiety of finding the Right Framework is to go out of your way to find things that won’t be that useful directly. Find an interesting computer science paper and explore the concepts in it. Or spend time with technology that doesn’t directly apply to what you’re doing. The benefits of what you learn from such adventures are not that obvious, but they’re very real, and often surface in unexpected ways. It can also be very refreshing to just get out of the framework rat race for a moment.
避免找到合適的框架的焦慮的一種技巧是,走出自己的路,找到那些不會直接有用的東西。 查找有趣的計算機科學論文并探索其中的概念。 或花一些時間使用與您的工作不直接相關的技術 。 從這種冒險中學到的好處并不是很明顯,但是它們是非常真實的,并且常常以意想不到的方式浮出水面。 暫時退出框架競賽也可能非常令人耳目一新。
學會學習 (Learn to Learn)
Another very useful technique is to go meta, and just spend time learning to learn. Why not practice the process of problem solving itself, or read up on techniques like deliberate practice. Things like that will be useful to know wherever your career takes you.
另一個非常有用的技術是去元,只是花時間學習學習 。 為什么不練習自己解決問題的過程 ,或者繼續學習故意練習之類的技術。 這樣的事情對于了解您的職業將帶給您有用。
Here’s how Rich Hickey puts it:
這是Rich Hickey所說的 :
“You need to be careful to recognize the actual game involved. Programming mastery has little to do with languages, paradigms, platforms, building blocks, open source, conferences etc. These things change all the time and are not fundamental. Knowledge acquisition skills allow you to grok them as needed. I’d take a developer (or even non-developer!) with deep knowledge acquisition and problem solving skills over a programmer with a smorgasbord of shallow experiences any day.”
“您需要小心識別所涉及的實際游戲。 精通編程與語言,范例,平臺,構件,開放源代碼,會議等關系不大。這些事情一直在變化,并不是根本。 知識獲取技能使您可以根據需要熟練掌握它們。 我會選擇一個擁有深厚知識積累和解決問題能力的開發人員(甚至是非開發人員!),而不是每天都有大量淺薄經驗的程序員。”
As much as learning new frameworks (and learning about new frameworks) can have value, this is where the bigger returns are more likely to be. Become good at learning and solving problems, and you’ll have much fewer issues picking up whatever new technology skills you may need next.
盡可能學習新框架(和學習新的框架)可以具有價值,這是更大的回報更可能是在那里。 善于學習和解決問題,那么接下您可能需要的新技術技能的問題就會少得多。
Originally published on Tero’s blog.
最初發布在Tero的博客上 。
翻譯自: https://www.freecodecamp.org/news/overcoming-javascript-framework-fatigue-741dac9370ee/
javascript 框架