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过度。

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?!我必须保持相关性,对吧?

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.

有时,我会与办公室的高级开发人员分享这种想法,并从他们那里得到标准的回应。

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...

为什么我急切地挑战今天的顶级工具,似乎注定要永远重复下去……

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

当我的前辈冷静地让JavaScript风暴过去时,可以根据需要选择工具吗?

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疲劳而筋疲力尽,因为他们退出了比赛。

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?)

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)

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课程,尤其是算法和数据结构。 学习它们后,我感到的力量是惊人的。 就像戴上你不知道的眼镜一样!

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.

如果设计模式是如此之以至于我们应该共享它们,那么反模式就如此之以至于我们应该警告它们。

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的示例。

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

解决Javascript疲劳的方法-以及其他所有疲劳相关推荐

  1. 解决 Javascript 中 atob 方法解码中文字符乱码问题

    转载地址:http://blog.sqrtthree.com/2015/08/29/utf8-to-b64/ 首先, 为什么要编码? 由于一些网络通讯协议的限制, 又或者是出于信息加密的目的, 我们就 ...

  2. Javascript 中 atob 方法解码中文字符乱码问题

    解决 Javascript 中 atob 方法解码中文字符乱码问题 由于一些网络通讯协议的限制,你必须使用 window.btoa() 方法对原数据进行编码后,才能进行发送.接收方使用相当于 wind ...

  3. Android中WebView加载本地Html,与JavaScript与Android方法相互传值(续)...

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u010046908/article/details/51809558 接着上篇Android中Web ...

  4. linux mysql 乱码怎么解决_MySQL_linux中解决mysql中文乱码方法,改默认编码:/etc/init.d/my - phpStudy...

    linux中解决mysql中文乱码方法 改默认编码: /etc/init.d/mysql start (stop) 为启动和停止服务器 /etc/mysql/ 主要配置文件所在位置 my.cnf /v ...

  5. php 什么cms能让会员自已建个独立站并绑上二级域名?,CMS_帝国CMS使用二级域名并解决顶一下的方法,1、将2级域名解析指向到所在 - phpStudy...

    帝国CMS使用二级域名并解决顶一下的方法 1.将2级域名解析指向到所在的空间,(可以用泛解析,如*.phpstudy.net A IP ,也就是A记录) 2.需要空间支持绑定到栏目所在的文件夹(如果是 ...

  6. javascript中toFixed()方法详解

    最近做的项目涉及到金额的计算,有一种方式就是进行四舍五入的规则进行小数点后面的尾数处理,以前一直以为toFixed方法就是四舍五入的,知道一个用户反馈了金额计算的bug我才如梦初醒(亏了一毛钱),才仔 ...

  7. JavaScript 继承父类方法的正确姿势

    JavaScript 继承父类方法的正确姿势 不想看前期的介绍可以直接划到最下面看总结和正确姿势,跳过原因的讲解. 初学 js ,总是喜欢把方法直接定义在对象内部,类似于 Java 那样. 下面定义一 ...

  8. 4种JavaScript深拷贝的方法

    浅拷贝与深拷贝 浅拷贝是创建一个新对象,这个对象有着原始对象属性值的拷贝.如果属性是基本类型,拷贝的就是基本类型的值,如果属性是引用类型,拷贝的是内存地址 . 如果不进行深拷贝,其中一个对象改变了对象 ...

  9. 这是如何更好地利用JavaScript数组的方法

    by pacdiv 由pacdiv 这是如何更好地利用JavaScript数组的方法 (Here's how you can make better use of JavaScript arrays) ...

最新文章

  1. python中的可变数据类型有列表和元组,为什么我们需要Python(或任何不可变数据类型)中的元组?...
  2. MongoDB索引原理和具体使用
  3. win7 64位下如何安装配置mysql-5.7.4-m14-winx64(安装记录)
  4. python openpyxl模块追加数据_python openpyxl模块实现excel的读取,新表创建及原数据表追加新数据...
  5. java字符串与数组比较大小_java-如何将存储在数组中的字符串与简单字符串进行比较?...
  6. Vue3---安装Element-Plus组件库
  7. 史上最详细的值传递和引用传递之间区别
  8. 4a怎么打开sqlserver_百元级别荣耀路由X3和小米路由4A,哪款真的香?
  9. What?一周内咸鱼疯转2.4W次,最终被所有大厂封杀!
  10. 如何用循环语句输出一个三角形
  11. tensorflow不能安装问题之(wrapt)
  12. USB Server远程连接USB实现方式
  13. ITIL 4Foundation题目-2
  14. 点云可视化——实时显示点云流
  15. 【强烈推荐】ProxyPool-快速构建免费代理池
  16. 产品经理需要掌握的十大知识模块
  17. 雷电3菊链功能_别选错!笔记本的Type-C和雷电3接口区别可大了
  18. python富翁与穷人_穷人和富人最根本的区别
  19. STM32自学笔记15-步进电机驱动项目-磁编码器MT6816驱动
  20. 你的计算机由组织管理,某些设置由你的组织来管理

热门文章

  1. LeetCode3:Longest Substring Without Repeating Characters
  2. 讲的真透彻!还有人不知道什么是AndroidX的吗?已拿offer入职
  3. 17.前端路由router-07keep-alive
  4. org.dom4j.DocumentException: null Nested exception: null解决方法
  5. 快速排序和快速选择(quickSort and quickSelect)算法
  6. Python3.1-标准库之Numpy
  7. 如果你的电脑是通过代理上网的.就要用端口映射
  8. 深入学习Redis(4):哨兵
  9. repcached配置与简单測试
  10. jq挑战30天——打字机效果+小程序