解決Javascript疲勞的方法-以及其他所有疲勞

Learn your fundamentals, and never worry again.

了解您的基礎知識,再也不用擔心。

新工具讓我擔心 (New Tools Worry Me)

When JavaScript's shiny tool of the day comes out, I sometimes overreact.

當JavaScript一天一度的閃亮工具問世時,我有時React過度。

learn-or-lose-job-1

And after 15 minutes of my imagination running wild, the urge to explore it becomes unbearable.

經過15分鐘的想象力狂奔之后,去探索它的渴望變得難以忍受。

Doesn't matter what tool, it's all the same story.

不管使用哪種工具,都是一樣的故事。

  • I must learn this technology!

    我必須學習這項技術!
  • I need every advantage in this competitive job market!

    在這個競爭激烈的就業市場中,我需要一切優勢!
  • I have to stay relevant, right?!

    我必須保持相關性,對吧?

i-must-learn-it

Well yes, but no.

是的,但是沒有。

我的前輩從不擔心 (My Seniors Never Worry)

Sometimes I'll share this sentiment with senior developers in the office, and get a standard reaction from them.

有時,我會與辦公室的高級開發人員分享這種想法,并從他們那里得到標準的回應。

another-tool-so-what-lol

After enough encounters like this, I began thinking...

經過如此多次的相遇之后,我開始思考...

為什么會有所不同? (Why the Difference?)

Why do I anxiously pounce on today's top tool, seemingly doomed to repeat this forever...

為什么我急切地挑戰今天的頂級工具,似乎注定要永遠重復下去……

maybe-i-can-learn-it-before-the-next-one

While my seniors calmly let the JavaScript storms pass, picking tools up as needed?

當我的前輩冷靜地讓JavaScript風暴過去時,可以根據需要選擇工具嗎?

seniors-are-quick-learners

It's because they see common threads among these tools. To them, even after all these years, the landscape isn't so different.

這是因為他們看到了這些工具之間的共同點。 對于他們來說,即使經過了這些年,情況也沒有太大不同。

Where do these common threads come from? The fundamentals.

這些通用線程從何而來? 基本面。

一切都在基礎 (It's All in the Fundamentals)

The best developers I've met aren't phased by JavaScript's light-speed evolution. They aren't exhausted from JavaScript fatigue because they dropped out of that race.

我遇到的最好的開發人員并沒有被JavaScript的光速演進所分階段。 他們并沒有因為JavaScript疲勞而筋疲力盡,因為他們退出了比賽。

cant-get-fatigued-if

Instead of learning frameworks to boost their careers, they focused on the fundamentals and skyrocketed their careers.

他們沒有學習促進職業發展的框架,而是專注于基礎知識并推動了職業的飛速發展。

Your favorite framework can plummet one day, and you'll eventually have to pick up another one.

您最喜歡的框架可能會在一天內暴跌,最終您將不得不選擇另一框架。

But the fundamentals are evergreen. They date back to computer science resources from decades ago. No matter the age, these principles still make up the foundation of computing.

但是基本面是常綠的。 它們可以追溯到幾十年前的計算機科學資源。 無論年齡多大,這些原則仍然構成了計算的基礎。

This tweet I stumbled across sums it up perfectly.

我偶然發現的這個推文完美地總結了它。

Reading computing papers from the 50s, 60s, and 70s is like digging in an archeological site and finding a sonic screwdriver.

— -=fogus=- (@fogus)

從50年代,60年代和70年代閱讀計算機論文,就像在考古現場中挖掘并找到聲音螺絲刀一樣。

--= fogus =-(@fogus)

June 4, 2019

2019年6月4日

We're all just building on the groundwork established a long, long time ago.

我們都只是建立在很久以前建立的基礎上。

什么是基本原理? (What Are the Fundamentals?)

yoda-fundamentals

This isn't a comprehensive list, but whoever tackles it will become an amazing programmer. It'll keep you busy for years to come.

這不是一個完整的列表,但是解決它的人將成為一個了不起的程序員。 它將使您在接下來的幾年中保持忙碌狀態。

  • Learning multiple programming languages

    學習多種編程語言
  • Algorithms and data structures

    算法和數據結構
  • Design patterns

    設計模式
  • Anti-patterns

    反模式
  • Application architecture

    應用架構

學習多種編程語言 (Learning multiple programming languages)

Languages solve problems in different ways. None of them are perfect, that's why we have so many.

語言以不同的方式解決問題。 他們都不是完美的,這就是為什么我們有那么多。

If you're doing JavaScript, get uncomfortable by learning C#. If you really want to push yourself, try Haskell.

如果您使用的是JavaScript,請通過學習C#感到不舒服。 如果您真的想推動自己,請嘗試Haskell。

Compare the solutions each language offers. The more you tackle, the faster you'll learn new things because they all draw from each other.

比較每種語言提供的解決方案。 您處理的越多,學習新事物的速度就越快,因為它們相互借鑒。

算法和數據結構 (Algorithms and data structures)

lets-skip-algorithms

People love hating on this topic.

人們喜歡這個話題。

  • "When will I need this?"

    “我什么時候需要這個?”
  • "This is useless."

    “這沒用。”
  • "CS degrees are a waste of money."

    “ CS學位是浪費金錢。”

You may never need them, but that doesn't make learning algorithms and data structures a bad investment.

您可能永遠都不需要它們,但這不會使學習算法和數據結構成為不良的投資。

As an IT major, part of me wishes I could go back and take some CS courses, especially algorithms and data structures. The power I felt after learning them was amazing. It's like putting on glasses you never knew you had!

作為IT專業的學生,??我希望我能回去上一些CS課程,尤其是算法和數據結構。 學習它們后,我感到的力量是驚人的。 就像戴上你不知道的眼鏡一樣!

i-know-binary-trees

The biggest benefit, in my opinion, is improved problem-solving skills.

我認為最大的好處是提高了解決問題的能力。

The ability to calm down, walk to a notebook/whiteboard, and work towards a solution is an asset that'll save you countless hours of frustrated hacking.

冷靜下來,走到筆記本/白板上并努力尋求解決方案的能力是一項資產,可為您節省無數小時的沮喪黑客攻擊。

Before that I'd gallop into the editor like a classic coding cowboy, code myself into a corner, and then try to figure out a good solution.

在那之前,我像經典的編碼牛仔一樣奔向編輯器,將自己編碼到一個角落, 然后嘗試找出一個好的解決方案。

設計模式 (Design patterns)

From Addy Osmani's brilliant book- Learning JavaScript Design Patterns

摘自Addy Osmani的精彩著作-學習JavaScript設計模式

A pattern is a reusable solution that can be applied to commonly occurring problems in software design...

模式是一種可重用的解決方案,可以應用于軟件設計中常見的問題。

These battle-tested solutions have stood the test of time. Learning them helps you write code that is more familiar and maintainable to other developers.

這些經過考驗的解決方案經受了時間的考驗。 學習它們可以幫助您編寫對其他開發人員更熟悉和可維護的代碼。

You may not have realized it, but modern JavaScript stacks leverage popular design patterns.

您可能沒有意識到,但是現代JavaScript堆棧利用了流行的設計模式。

  • Bundlers like Webpack and Parcel let you use the Module pattern to separate JavaScript into organized files.

    諸如Webpack和Parcel之類的捆綁軟件可讓您使用“ 模塊”模式將JavaScript分成組織好的文件。

  • Libraries like RxJS and Redux use the Observer pattern to send and receive "notifications".

    RxJS和Redux之類的庫使用Observer模式發送和接收“通知”。

  • Libraries like React-Redux and Recompose let you enhance your components, otherwise known as the Decorator pattern.

    像React-Redux和Recompose這樣的庫使您可以增強組件,也稱為Decorator模式

反模式 (Anti-patterns)

If design patterns are so good that we should share them, anti-patterns are so bad that we should warn against them.

如果設計模式是如此之以至于我們應該共享它們,那么反模式就如此之以至于我們應該警告它們。

anti-vs-design-patterns

Pulling from Addy Osmani's book again, here are some common JavaScript anti-patterns.

再次從Addy Osmani的書中摘錄,這里是一些常見JavaScript反模式。

  • Defining many global variables

    定義許多全局變量
  • Modifying the Object class prototype

    修改Object類原型

  • Using document.write

    使用document.write

  • Using inline JavaScript. For example...

    使用內聯JavaScript。 例如...
<!-- Inline JavaScript anti-pattern -->
<a href="#" onclick="alert('Hi')">Click Me</a>

應用架構 (Application architecture)

Here's where the acronyms go crazy

這是縮寫詞發瘋的地方

  • MVC (Model-View-Controller)

    MVC(模型-視圖-控制器)
  • MVP (Model-View-Presenter)

    MVP(模型視圖呈現器)
  • MVVM (Model-View-ViewModel)

    MVVM(模型-視圖-視圖模型)
  • MVU (Model-View-Update)

    MVU(模型-視圖-更新)
  • MVI (Model-View-Intent)

    MVI(模型-視圖-意圖)

Here's an example of MVC.

這是MVC的示例。

mvc-diagram

Their common core is separate your concerns. Most applications have a model (data) and view (UI), and it's important they not speak to each other. That's where the controller sits and it mediates their back and forth communication.

他們共同的核心是分開您的關注點 。 大多數應用程序都具有模型(數據)和視圖(UI),并且重要的是它們彼此之間不要講話。 那是控制器所在的位置,它可以調解其來回通信。

摘要-工具很棒?? (Summary - Tools Are Amazing ??)

A true marvel of software engineering. Increase your productivity by learning and enjoying them!

軟件工程的真正奇跡。 通過學習和享受它們來提高生產力!

But don't forget your fundamentals.

但不要忘記您的基本知識。

  • Learning multiple programming languages

    學習多種編程語言
  • Algorithms and data structures

    算法和數據結構
  • Design patterns

    設計模式
  • Anti-patterns

    反模式
  • Application architecture

    應用架構

I leave you with one last tweet.

我最后一條推文給你。

Frameworks are the leaves of an enormous tree called Computer Science.Study the 🌲, not just the 🍃, to deeply root your foundation as a software developer.Soon enough, you’ll connect so many dots that “new” tech won’t scare you anymore.

— Yazeed Bzadough (@yazeedBee)

框架是一棵巨大的樹的葉子,這棵樹叫做“計算機科學”。研究🌲不僅要研究to,還要深深扎根您作為軟件開發人員的基礎。很快,您將連接很多點,以至于“新”技術不會嚇到您。你了。

-Yazeed Bzadough(@yazeedBee)

August 14, 2019

2019年8月14日

謝謝閱讀 (Thanks for reading)

For more content like this, check out https://yazeedb.com. And please let me know what else you'd like to see! My DMs are open on Twitter.

有關此類的更多內容,請訪問https://yazeedb.com 。 并且,請讓我知道您還想看到什么! 我的DM在Twitter上打開。

Until next time!

直到下一次!

翻譯自: https://www.freecodecamp.org/news/the-cure-to-js-fatigue/

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391112.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391112.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391112.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Java 8 的List<V> 轉成 Map<K, V>

問題&#xff1a; Java 8 的List 轉成 Map<K, V> 我想要使用Java 8的streams和lambdas轉換一個 List 對象為 Map 下面是我在Java 7里面的寫法 private Map<String, Choice> nameMap(List<Choice> choices) {final Map<String, Choice> hashMap new…

已知兩點坐標拾取怎么操作_已知的操作員學習-第4部分

已知兩點坐標拾取怎么操作有關深層學習的FAU講義 (FAU LECTURE NOTES ON DEEP LEARNING) These are the lecture notes for FAU’s YouTube Lecture “Deep Learning”. This is a full transcript of the lecture video & matching slides. We hope, you enjoy this as mu…

北京供銷大數據集團發布SinoBBD Cloud 一體化推動產業云發展

9月5日&#xff0c;第五屆全球云計算大會在上海世博展覽館盛大開幕&#xff0c;國內外頂尖企業匯聚一堂&#xff0c;新一代云計算技術產品紛紛亮相。作為國內領先的互聯網基礎服務提供商&#xff0c;北京供銷大數據集團(以下簡稱“SinoBBD”)受邀參加此次大會&#xff0c;并正式…

windows下有趣的小玩意

1.顯示文件和隱藏文件。在當前目錄下shift右鍵 選擇cmd命令 運行顯示文件: attrib -s -h 文件名 隱藏文件: attrib -s h 文件名 2.查看電腦支持的最大內存 在cmd下運行wmic memphysical get maxcapacity所得結果單位mb 所得/1024/1024 得到單位G 3.windowsR 輸入…

rxjs angular_Angular RxJS深度

rxjs angularIn this tutorial, well learn to use the RxJS 6 library with Angular 6 or Angular 7. Well learn about:在本教程中&#xff0c;我們將學習將RxJS 6庫與Angular 6或Angular 7結合使用。我們將了解&#xff1a; How to import the Observable class and the ot…

HashMap, LinkedHashMap 和 TreeMap的區別

HashMap, LinkedHashMap 和 TreeMap的區別 Java里面的HashMap, LinkedHashMap 和 TreeMap 有什么區別?我看不出以下3個key和value有什么不同的。Hashtables里面又是怎么樣的呢&#xff1f; Map m1 new HashMap(); m1.put("map", "HashMap"); m1.put(&q…

“陪護機器人”研報:距離真正“陪護”還差那么一點

一款有“缺陷”的機器人&#xff0c;怎能做到真正的“陪護”&#xff1f; 近日&#xff0c;鼎盛智能發布了一款名為Ibotn的&#xff08;愛蹦&#xff09;幼兒陪伴機器人&#xff0c;核心看點就是通過人臉識別、場景識別等計算機視覺技術來實現機器人對兒童的陪護。不過&#xf…

neo-6m uno_Uno-統治所有人的平臺

neo-6m unoFirst, we should start off with what Uno is and why you should care. 首先&#xff0c;我們應該從Uno是什么以及為什么要關心開始。 As stated on their website, Uno is "The only platform for building native mobile, desktop and WebAssembly apps wi…

【轉】消息隊列應用場景

一、消息隊列概述 消息隊列中間件是分布式系統中重要的組件&#xff0c;主要解決應用耦合&#xff0c;異步消息&#xff0c;流量削鋒等問題。實現高性能&#xff0c;高可用&#xff0c;可伸縮和最終一致性架構。是大型分布式系統不可缺少的中間件。 目前在生產環境&#xff0c;…

JDK和JRE區別是什么

問題&#xff1a;JDK和JRE區別是什么 他們的角色分別是什么&#xff1f;我們應該什么時候使用他們&#xff1f; 回答一 JRE是Java Runtime Environment&#xff08;Java運行時環境&#xff09;。它是一個包&#xff0c;集合了運行一個編譯好的Java程序的一切必須的東西&…

樹莓派新手入門教程

http://www.ruanyifeng.com/blog/2017/06/raspberry-pi-tutorial.html

lime 模型_使用LIME的糖尿病預測模型解釋— OneZeroBlog

lime 模型Article outline文章大綱 Introduction 介紹 Data Background 資料背景 Aim of the article 本文的目的 Exploratory analysis 探索性分析 Training a Random Forest Model 訓練隨機森林模型 Global Importance 全球重要性 Local Importance 當地重要性 介紹 (Introd…

react 生命掛鉤_如何在GraphQL API中使用React掛鉤來管理狀態

react 生命掛鉤In this blog post, we are going to learn -在這篇博客中&#xff0c;我們將學習- What React hooks are 什么是React鉤子 How to use hooks for state management 如何使用掛鉤進行狀態管理 Before we start working with hooks, let us take a brief moment …

Linux第三周作業

1.三個法寶 ①存儲程序計算機工作模型&#xff0c;計算機系統最最基礎性的邏輯結構&#xff1b; ②函數調用堆棧&#xff0c;堆棧完成了計算機的基本功能&#xff1a;函數的參數傳遞機制和局部變量存取 &#xff1b; ③中斷&#xff0c;多道程序操作系統的基點&#xff0c;沒有…

什么時候使用靜態方法

問題&#xff1a;什么時候使用靜態方法 I am wondering when to use static methods? Say if I have a class with a few getters and setters, a method or two, and I want those methods only to be invokable on an instance object of the class. Does this mean I shou…

RESTful API淺談

2019獨角獸企業重金招聘Python工程師標準>>> 上半年時候&#xff0c;部門有組織的討論了一下實踐微服務的技術話題&#xff0c;主要內容是SOA服務和微服務各自的優勢和難點&#xff0c;其中有提到關于RESTful API設計方法。 正好最近在深入的學習HTTP協議&#xff0…

spring自動注入--------

<?xml version"1.0" encoding"UTF-8"?> <beans xmlns"http://www.springframework.org/schema/beans"xmlns:p"http://www.springframework.org/schema/p"xmlns:c"http://www.springframework.org/schema/c"xmlns…

變量的作用域和生存期:_生存分析簡介:

變量的作用域和生存期:In the previous article, I have described the Kaplan-Meier estimator. To give a quick recap, it is a non-parametric method to approximating the true survival function. This time, I will focus on another approach to visualizing a surviv…

數字孿生營銷_如何通過數字營銷增加您的自由職業收入

數字孿生營銷There are a lot of ways we could go with this topic as it’s a huge one, but I just want to cover the nuggets here and make it simple as well as practical to understand and implement.我們可以采用很多方法來處理這個主題&#xff0c;因為它是一個很大…

您的網卡配置暫不支持1000M寬帶說明

國內寬帶網速越來越快&#xff0c;運營商更是在今年初紛紛推進千兆寬帶業務。為了讓用戶更好地了解網絡狀況&#xff0c;360寬帶測速器發布新版&#xff0c;優化了寬帶測速范圍&#xff0c;可有效支持最高1000&#xff2d;的帶寬測量。此外&#xff0c;寬帶測速器能檢測用戶網卡…