Author: yu fruit | tencent social user experience design UI senior engineers, front, head of the team, UI development channels of the judges, tencent cloud invited the preacher, “Web stack all the engineer’s self-improvement” author.

Has been authorized by the author tencent cloud + community release, the original link: https://cloud.tencent.com/developer/article/1004490?fromSource=waitui

This article is my speech on “Chongqing front-end Exchange conference (Chongqing FE)”, sorted out and shared, hoping to be helpful to more people and stimulate a wider range of discussion. This paper is not a speech prepared in advance, but a follow-up copy based on PPT pictures, so the content may be slightly different from the on-site expression. Thanks to the organizers for their arrangement and organization, and thanks to the enthusiastic audience. The text is as follows:

Hello everyone, thank you for the organizing committee of FE Chongqing, thank you for paying to come to the site, today I will share with you my topic in future-oriented full stack development.

The topic of “Future crossover development technologies” is a very large one, and in order to be a little more specific, I want to break it down into two parts.

The first is “future-oriented”. What is future-oriented, and how is it opposite?

Paul Graham is a programmer, product manager, author, and investor I greatly admire.

In Hackers and Painters, he said, “Programming languages 100 years from now… Having the smallest and most compact core “, I think this is not so much a “prophecy” as an “ideal” of his.

Another industry Titan, Yuhiro Matsumoto (the father of Ruby), had a different take when he read Programming Languages 100 Years Later.

In “Yuhiro Matsumoto’s World of Software,” he argues that the programming languages of 100 years from now have an infinite number of possibilities that are technically impossible to predict (maybe voice conversations or brainwave input?).

Trying to predict what programming languages will be 20 years from now is a good idea. Matsumoto believes that a reasonable prediction is to look at the evolution of programming languages over the past 20 years, and then stretch out the ups and downs of each language, and it should be programming languages in the next 20 years.

Along that line, Matsumoto’s prediction was that programming languages would change from “how” to “what,” in which the instructions needed to accomplish a task would be simpler.

I prefer Matsumoto’s view. I found the graph below from PYPL, which shows the change in the “fame” of some programming languages over the decades.

There are some enduring programming languages such as Java and C++; There are also some programming languages that have come out of nowhere in recent years, such as Python, Ruby, Objective-C, Swift, etc.

After a little analysis, I find that there are two main reasons for the rise of new languages:

  1. Industry trends are moving from desktop to mobile, and Swift and Objective-C are one of them.
  2. The shift in technology trends from how to What is simply easier to fulfill a requirement. This trend is determined not only by the language itself, but also by the framework of the language.

Ruby’s RoR framework, for example, has greatly improved Ruby’s competitiveness among Web developers because Rails has built in some best practices and even usable project architectures to make Web development easier.

The growth of JavaScript on the Node side is also due to Express’s ease of use. Of course, in the future, there will be more Developers for Node, more competitors will join in, and the original framework may be replaced by more user-friendly frameworks.

So I started investigating the usage trends of some frameworks to test this judgment.

First, I would like to introduce a method for my personal research trend, which is to enter the technical keywords to be investigated in Google Trends + tutorial. This approach reflects the enthusiasm of developers in the English-speaking world for learning a particular technology, which in turn is a relatively objective reflection of future trends.

In the case of JavaScript, we can see the inevitable decline of jQuery as direct DOM manipulation has been replaced since 2014 by more accessible bidirectional binding and template libraries (Angular, React, Vue). That is, from “how to change the behavior and style of the page” to “change the data so that the behavior and style of the page automatically change.”

In addition to the use of frameworks, I specifically investigated trends in front-end build tools.

Front-end construction has become an essential part of modern Web development. Because HTTP2 is not yet fully available (for server and browser reasons), we need to obfuscate, package, and MD5 modular JavaScript and CSS modules to reduce the number of HTTP requests and control caching. Since users have different browser versions, we need to translate new functions such as ES2015, ES2016, and ES2017 into the minimum subset supported by most browsers. All of this work needs to be done with front-end build tools.

Grunt is a pioneer in front end build tool trends, but it is slowly being eclipsed by Gulp because file-based IO processes are much slower than stream-based processes. Second, grunt’s configuration-based approach is more rigid and stylistically unappealing than gulp’s “normal JavaScript code” approach.

The rise of Webpack is due to the trend towards modular programming in JavaScript. Webpack and Browserify do much the same thing, which is to package one JavaScript module after another into a file (a process called a bundle) and use it in the browser environment. JavaScript modules can be packaged on the server side, but not necessarily. JavaScript does not support modules natively, so there is a third party specification (CommonJS etc.), but ES6 has added Module functionality (ES6 Module), so working together is a problem to be solved. Webpack and Browserify solve this problem.

I think it’s safe to conclude that both the programming language and the accompanying framework and scaffolding have been in constant change. There are frameworks and scaffolds that adapt to trends and styles that may be on top for a while, but can easily be overtaken by upstarts (Vue, Webpack), and this iteration will continue in the future.

Therefore, the only future-oriented knowledge is the ability to learn quickly and well.

Speaking of learning, I got an email from a reader. After graduating with a master’s degree, this reader found a job in C++, but didn’t like the product and wanted to switch to Python Web development.

I think there are two main reasons for this reader’s anxiety:

  1. The transition time from C++ to python is actually quite short, far less than 10,000 hours. Skills are not very skilled, then see some recruitment requirements appear a large number of words do not understand, I feel that the ideal and reality of the difference is too big.
  2. The learning process is relatively independent and does not learn by doing.

Let me explain my understanding of programming, which can be broken down into three components: intelligence, knowledge, and experience.

Details are as follows:

When it comes to programming, none of these can be improved alone. That is to say, it is impossible to improve experience without learning; It is also impossible to just learn without improving the experience.

A good learning method is to learn some new knowledge in a circular way, and then learn by doing. In this process, some thinking is added to improve intelligence.

For developers with some experience, who are already in this cycle and have hit a few bottlenecks, look at the picture above to see where they are stuck.

For starters, or for experienced people who are starting from scratch with a technology stack, there needs to be a learning path. That is, the map, and where I am. Here is an example blueprint for learning React-Native:

Once the loop is started, the following pattern is used to loop.

When I read Outliers in 2010, I learned a concept that will last a lifetime: the 10,000 hour rule.

Everyone has heard of this law, it seems very simple, a sentence can sum up a book.

No, there’s a lot to think about in this book. For example, Bill Gates and Steve Jobs were both born in the same age, and the environment around them and their own interests gave them the opportunity to practice for 10,000 hours before they had the chance to become the founders of Microsoft and Apple.

10,000 hours is not repetition, but continuous practice in the learning zone. Not the boring repetition of what you already know in the Comfort Zone or the panic zone.

I explained my point to the reader as follows:

  1. Relax, working for just over a year, 10,000 hours to become a Master of Python Web development;
  2. It doesn’t take 10,000 hours to get a Python job. Basically, 1,000 hours is probably enough, but you have to learn and use it to be effective;
  3. Start using, not learning. I saw you fork awsome-Python. There are a lot of tools in it. Don’t just chase after them.
  4. Constantly submitting your Github code and seeing more and more features on the project can also reduce anxiety;
  5. Two hours a day is also a bit low. It’s best to increase it to four hours.

The next day, the reader sent me an Amazon gift card to say thank you. So I share this story with you, and I hope you learn something from it.

Here’s another example from my own experience.

To keep a “feel” for algorithms and data structures, I occasionally look for topics to work on in LeetCode, especially since the site now supports JavaScript.

One day I saw such a topic.

So before you look at my answer, let’s think about how to solve this problem.

.

.

.

.

.

.

.

.

.

So my first solution was pretty straightforward, and every time I had to compute the sum from I to j, I would loop through it. After a mental calculation, I felt there should be no problem, so I submitted it.

However, the system prompts you to calculate a timeout!

I looked at the test case for timeout, which is an extremely long array. More importantly, the system runs multiple sumRange operations on this object, resulting in a timeout.

Well… So how do you stop running so many loops? Use your brains…

The emphasis is on the “tips” part of the question.

.

.

.

.

.

.

.

.

.

So I came up with this optimized solution: SumToNumber [j] -sumtonumber [i-1] = sumToNumber[i-1] = sumToNumber[i-1] = sumToNumber[i-1] = sumToNumber[i-1] = sumToNumber[i-1] And finally, let’s do the marginal case.

Because the array is assumed to remain unchanged, there is no need to update the contents of the array.

Pass the test with flying colors!

Through this topic, I deepened my impression of time complexity and space complexity, which cannot be improved simply by reading algorithm books.

Above, that is my experience in learning programming and polishing skills.

Having said the topic of “facing the future”, I will talk about the topic of “crossover development” in the next post. Stay tuned!

Welcome toTencent Cloud + communityOr pay attention to the wechat public account (QcloudCommunity), the first time to get more massive technical practice dry goods oh ~