Web front-end development Engineer's ability to program and soar

Source: Internet
Author: User

Category: Javascript | Blog from Graceie

Read this article today. It's very interesting to write. Find yourself still a long way to go.

Background

If you are just entering the Web front-end research and development field, want to try this pond water how deep, read this article;

If you are doing a two or three-year web product front-end research and development, confused to find ways to improve, read this article;

If you are the front-end development experts in the 45, no problem can be rare to live your lonely master, to see this article it;

Web front-end research and development engineer, in the country is a Chaoyang career, since 07-08 years formally has this profession, but also only three or four years of time. There is no formal education in this field, there is no theoretical guide to the internal system, and almost all the people who are engaged in this profession are self-taught by themselves. Self-taught, a hard bumpy road, I also walked all the way. Since 2002, contact web front-end research and development has been 9 years, and now look back, during the many detours. Push already and people, if can let those who later take a few detours, symplectic very very!

Objective

The so-called genius, is just faster than ordinary people to master the skills, to complete the work, as long as you find the right direction, and supplemented by enough time, you can set foot on the other side of success.

This article divides the Web front-end development programming ability to divide eight levels, each level has enumerated the corresponding characteristic and the broken level promotion method, hoped each person looks at this article the classmate first accurate localization own level (does not take your current ability the highest point, but with your current ability the mid-range and the grade compares, lest many detours), The method of the reference breakthrough is broken.

The so-called level is just an attitude when you are faced with a need: to be able to complete, to be completed perfectly, to be completed more than expected. The pursuit of a perfect attitude to a solid programming skills, that is your programming level.

Remember impatient air dry, level enough, that level of things naturally understand. Understanding is the understanding, not understanding also does not matter, quiet heart to, put time just.

I. "Getting Started"

Able to solve some of the problem levels. There are certain foundations (such as the most common HTML tags and their properties, events, methods, the most common CSS properties, basic JavaScript programming capabilities), and the ability to accomplish some simple web front-end research and development needs.

For example, delete a character specified in a string.

var str= "Www.baidu.com/?page"; strstr=str.replace ('? Page ', ""); alert (str); Strstr=str.substring (0,str.indexof ("/") ); alert (str);

First of all, do not criticize the code of the right and wrong rigorous, after all, each programmer has such a process; second, these two pieces of code in this instance there is no big fault, there may be flaws, but can solve the problem (delete the specified character), this is the level of characteristics.

Let me give you an example:

The computing system is currently the day of the week var str = ""; var week = new Date (). GetDay (); if (week = = 0) {str = "today is Sunday";} else if (week = = 1) {str = "today is Monday";} else if (week = = 2) {str = "today is Tuesday";} else if (week = = 3) {str = "today is Wednesday";} else I F (Week = = 4) {str = "today is Thursday";} else if (week = = 5) {str = "today is Friday";} else if (week = = 6) {str = "today is Saturday";} Or better some var str1 = "Today is the Week"; var week = new Date (). GetDay (); switch (week) {case 0:STR1 + = "Day"; break;case 1:str1 + = "one"; BR Eak;case 2:str1 + = "two"; Break;case 3:str1 + = "three"; break;case 4:str1 + = "four"; break;case 5:str1 + = "Five"; Break;case 6:str1 + = "six"; break;} alert (str); alert (STR1);

The Getting Started stage is the only way for every programmer to get started and you're on the road. The so-called "teacher leads the door, the practice relies on individual", with this "primer" foundation, oneself can grope forward.

"The way of Advanced"

Read through each of the methods/properties in the coding help manuals, such as JavaScript, HTML, CSS, and more! Only after the foundation is played, the road can go smoothly. Refer to these help documents and try to write a flawless code.

These coding documents are recommended not only in the beginning of the improvement period, you should look at each stage of the break, the most basic things are often the most power, and sometimes can bring you unexpected gains.

Two. "Boarding Hall"

Be able to solve the problem correctly. Whether you are searching the Web, or by transforming some of the finished code (JQUERY/DOJO/EXT/YUI) cases, you can complete the requirements without errors.

Also take the "string clipping" code above as an example:

var str= "Www.baidu.com/?page"; Strstr=str.replace (/?page/, ""); alert (str);

Just solving the problem is no longer a problem for the "Don" stage, and the solution given at this level cannot be flawed. Take this code example: the first parameter of the Replace method can support a string, but the best type is a regular expression;

var a = new Array ("Day", "one", "two", "three", "four", "five", "six"); var week = new Date (). GetDay (); var str = "Today is Week" + a[week];alert (str);

Compared to the "entry-level" code, whether it is from the code, code efficiency, code elegance, code thinking, "Hall" level of this date processing code is much better.

"The way of Advanced"

Although this stage can give the correct solution, but not necessarily the best solution. How can we get the best solution? The first is to accumulate a variety of solutions that can solve the requirements, and then validate each scenario to choose the best one in these scenarios. Therefore, the stage of the advanced Road is "traveling thousands of miles, read the book", the accumulation of various requirements of the various solutions.

You can go through all the FAQs and posts in the Professional forum (blue ideal, hassle-free, CSDN), and you can open the search engine and make all the search results exhaustive. Build your own test environment to validate the code: try to figure out the intent of each piece of code to compare the differences between each piece of code. These two roads will allow you to quickly complete the primitive accumulation, and when you face most of the requirements to be able to say these questions I have done before, then you will be in the right order.

Three. "Break-ins"

The strongest code, knowing all the solutions that can solve the requirements, can choose to use the best solution to meet the requirements. This level is basically the code main in product development programming. Given the one-trick, strokes are the trick.

In the example above, can you tell the difference between 1, 2, 3, and apply to that environment?

var str= "www.baidu.com/?page";//1, String clipping str.substring (0, Str.indexof ("? page")),//2, Regular expression str.replace (/?page/, ""); /3, string splitting, merging Str.split ("? Page"). Join ("");

There are many ways to solve problems, but for programmers, you should choose the best. The above code "regular expression" is the best in terms of code, from the Efficiency of code execution: "String clipping" the highest ("regular expression" in chrome is the most efficient), split method The most, and from the extensibility, the "regular expression" method is optimal. The specific use of that option depends on the specific requirements environment.

During the "break-in" phase, the programmer should be able to answer with certainty: My code is the best code for this requirement.

"Today is the day of the week" for example, "Hall" level of code you dare to say is the best code?

The computing system is currently the day of the week var str = "Today is the Week" + "Day 123456". CharAt (new Date (). GetDay ());

Compare the "Hall" level of the sample code, above this code to give you how to feel? The programmer pursues perfection. The "break-in" level pursues the perfection of every trick.

From the Web front-end programming, through 2 years of effort, many people can achieve this level, but a large part of the people's programming ability also stopped here. or limited to the demand of the product, or limited to the urgency of the time required for development, or limited to human inertia, can perfectly solve the current demand is enough.

Due to the long-term technical platform period, the technical improvement, usually this level of engineers will be relatively dry. A little technical, or the pursuit of personal breakthroughs, or the pursuit of product differentiation to bring freshness, or just want to change the mood, so many of this level of engineers will often change the company.

Rashness

Do not think you can write a beautiful code and complacent;

Do not think that others "honorific" you a "hero" you will be "heroes";

Don't think that you have accumulated some of the proud code has become a framework development.

The details determine success or failure, and good solutions do not guarantee eventual success. Also take "delete specified string" as an example, the original string from the format should be a URL link, after the removal of "pn=0", the end of the left a tail "?"; If the original string is "Http://www.xxx.com/?pn=0&a=1", after removing "pn=0"? and & two symbols close together, this is more obvious bug.

"The way of Advanced"

This stage of the Advanced Road is: Do not impatient air, you are no longer required to take the lead, but you take the demand to go. Pay attention to the details and note the details that are not in the current requirements: differences in code performance, differences in running platforms (browsers), implicit expansion of requirements, backward compatibility of code, and so on.

Read through the Html/css/javascript help document a few more times.

I recommend this level of engineer to do a Webtreeview control, requires the total node volume of 10,000 or so smooth operation, your promotion is in the process of encoding this control.

Four. "Attentive"

The most powerful solution. You can walk in front of the demand, the current needs of some, not directly mentioned, now temporarily no but possible in the future and so on, and the front-end programming unspoken rules and other aspects of the comprehensive consideration, give the best program. Take a recruit to win million strokes.

var str = "http://www.xxx.com/?pn=0";   Delete the specified character pn=0//I'll enumerate all the possible scenarios in this string. var a = ["http://www.xxx.com/VMpn=?pn=0"//pn= may appear before, "Http://www.xxx.com/VMp n=?pn= "//URL allows the PN value to be empty," http://www.xxx.com/VMpn=?pn=0&a=1 "//url can have more than one field," http://www.xxx.com/VMpn=?a=1&pn= 0 "//may be at the end," http://www.xxx.com/VMpn=?a=1&pn=0&pn=1 "//may have multiple PN fields," http://www.xxx.com/VMpn=?a=1&pn=0 &b=2 "//may be in the middle," http://www.xxx.com/VMpn=?a=1&pn=0&pn=1&b=1 "  //may be in the middle of a group," http://www.xxx.com/ Vmpn=?a=1&pn=0&b=1&pn=1 "  //may be sporadic distribution];/* demand of the unspoken secret:? What if it appears at the end of the string? & two symbols not overlapping */var reg =/((\?) (pn=[^&]*&) + (?! pn=)) | (((\?| &) pn=[^&]*) +$) | (&pn=[^&]*)/g;  for (var i = 0; i < a.length; i++) {alert (a[i] + "\ n" + a[i].replace (Reg, "$"));}

This stage is no longer the pursuit of a recruit, not for you to use any innovative trick to solve the demand, but to give a mature and stable solution, from the root of the problem. Your code may not be optimal for a current requirement, but your code is the best code for this type of requirement.

"The way of Advanced"

Many web front-end development engineers have been in a bottleneck for 3-4 years: Product development needs are a piece of cake, there is nothing new to challenge, and the bizarre methods of solving code development have been tried. There is no challenge, lost the passion of exploration, there is no further upward momentum, and finally through the "break-in" level of the people will be eight or nine stop here. or turn to a technical leader, or go to another area, or change a company.

Where is the rise of these people?

This phase alone depends on the skill and quantity accumulation has no effect, the breakthrough road in the 5th layer of "Butterfly" will be detailed, I suggest you at this stage focus on programming Theory: Object-oriented/process, code organization, compilation, code specification, other framework design and so on.

I recommend this level of engineers do a webeditor control, do not require full functionality, but the control of the module Division, Code organization, programming ideas to do in place, give a system solution.

Five. "Butterfly"

Rebirth of the cocoon, this level of concern is the programming language itself, and no longer care about product requirements. What is cocoon? Product demand is cocoon. When you are a recruit to win all the world's needs, if you still adhere to the needs of development, it is you are confined to the cocoon and not know. Either in this cocoon silently old, or break open cocoon to get a new life.

Or the old example of a "string clipping":

/** * eliminates the interference of special characters in the original string to regular expressions when stitching a regular expression string * @author: Meizz * @version                : 2010/12/16 * @param {string} str protected encoded string by regular expression String * @return {string} The protected string */function Escapereg (str) {return str.replace (New RegExp ("([. *+?^=!:\ x24{} () |  [\\]\/\\\\]) "," G ")," \\\x241 ");} /** * Delete the Query specified in the URL string * @author: Meizz * @version: 2010/12/16 * @param {string} URL url String * @pa   Ram {string} Key was deleted by the query name * @return {string} is deleted after the specified query URL string */ function delurlquery (URL, key) {key = Escapereg (key); var reg = new RegExp ("(\ \?) ("+ key +" =[^&]*&) + (?! ") + key + "=)" | (((\\?| &) "+ key +" =[^&]*) +$) |   (& "+ key +" =[^&]*) "," G "), Return Url.replace (Reg," \x241 ")}//Application example var str =" Http://www.xxx.com/?pn=0 "; Deletes the specified character pn=0delurlquery (str, "PN"); 

What is the difference between this code and the level 4 "nuanced"? From the implementation of the code is not too big difference, but from the thinking of it has an essential difference: 1, no longer is the case, headache medical head, but to a class of abstract theory, a recruit broken million strokes; 2, the concept of encapsulation, no longer every time from zero, Instead, he stood halfway up the hill and started climbing.

In the Web front-end research and development team also has a large part of the "break-in" at the level of self-feeling good, jump directly to the "butterfly", accumulate their own code base, abstract problems. But there is no foundation, lack of strong stamina, even can break the cocoon can not withstand the wind and rain. An immature architecture design is more harmful to team development than the benefits it brings, an example that is common in the industry. Do not destructive enthusiasm, do not want to walk on the thought of running, tamping the foundation, the inevitable growth, thick thin hair, strong to break the cocoon and out.

"The way of Advanced"

You have been from the primitive accumulation, to the thick thin hair, to break the cocoon and out, you should not be concerned about a recruit, a project, a module, but should be a way of thinking, a theory. There are several steps you can take to break through to a higher level: Look again at the Html/css/javascript interface Help documentation, select a strong language (C++/c#/java, etc.) to observe the organizational structure of these languages, language design; Look at the prototype chain, chained grammar programming, generics, Interface programming, DOM remote control, etc. carefully read the design documentation for the mature web front-end development framework to see why they are designed like this.

Six. "Heroes"

Here is the hero, not everyone touts the "warrior", but the best-deserved master. This level of people is fully capable of writing the same level of front-end development framework that is not inferior to Bindows/jquery/ext/yui/dojo. Apply mature development Framework to guide and solve problems.

Library file/mz/string/escapereg.js/** * eliminates the interference of special characters in the original string with regular expressions when stitching a regular expression string * @author: Meizz * @version: 2010/12/16 * @param {string} str is protected by a regular expression string, encoded by the string * @return {string} is protected after the string */mz.string is processed. Escapereg = function (str) {return str.replace (New RegExp ("([. *+?^=!:\ x24{} () |  [\\]\/\\\\]) "," G ")," \\\x241 ");}  Library file/mz/url/delquery.js///include mz.string.escapereg;/** * Delete the Query specified in the URL string * @author: Meizz * @version: 2010/12/16 *              @param {string} URL url String * @param {string} key is deleted by the query name * @return {string} was deleted after specifying query URL string */mz.url.delquery = function (URL, key) {key = Mz.string.escapeReg (key); var reg = new RegExp ("(\ \?) ("+ key +" =[^&]*&) + (?! ") + key + "=)" | (((\\?| &) "+ key +" =[^&]*) +$) | (& "+ key +" =[^&]*) "," G "), Return Url.replace (Reg," \x241 ")}//Application instance///include mz.url.delquery;var str =" http://   Www.xxx.com/?pn=0 "; Deletes the specified character Pn=0mz.Url.delquery (str, "PN"); Self-made system, has the foundation, also has the theory height. Know why this design, also know what kind of design best. For example, this example can have such a package://library file/mz/url/delquery.js///include mz.string.escapereg;/** * Delete the URL string specified in the Query * @author: Meizz * @vers ION:2010/12/16 * @param {string} URL url String * @param {string} key is deleted Qu  ery name * @return {string} is removed the URL string after the specified query */string.prototype.delquery = function (key) {key = Mz.string.escapeReg (key); var reg = new RegExp ("(\ \ \) ("+ key +" =[^&]*&) + (?! ") + key + "=)" | (((\\?| &) "+ key +" =[^&]*) +$) | (& "+ key +" =[^&]*) "," G "), Return This.replace (Reg," \x241 ")}//Application instance///include Mz.url.delquery;var str =" http:/   /www.xxx.com/?pn=0 "; Deletes the specified character pn=0str.delquery ("PN");

And why not use the following package? After the "Micro" and "butterfly" you will understand.

"Advanced Way Out"

Tao Nature, from the root to find a breakthrough opportunity. You can study HTML parsing engine design and implementation, JS parsing engine design and implementation, other language code parsing and compilation implementation, and so on.

or a few books. A book written by a low-level person is either a large copy, empty or harmful.

Seven. "Guru"

This level of people has been to the realm of no recruit wins. Problems in project development? There is no problem! What is the difference between running a platform? Code specification, development mode, has been left behind. This level of people is no longer focused on a front-end development framework, but rather to provide the best theoretical guidance for the specific environment.

This level of attention should be based on the most reasonable system architecture to guide the progress of the whole team, in what scenarios should be used in what kind of architecture design. What is the best model for 3, 10, 50, 100-person teams? When you arrive at the guru level, you can answer it again.

"Advanced Way Out"

Every Guru is a mountain, a god in a field, but are you content to show your strength in a group that is weaker than you? If you are still on the ground, there will always be someone on the plane, the spaceship from your leader across, high place cold!

To break through this field, you have to jump out of this field. To break through the guru of Web front-end development, jump out of the Web front end, with web development on it. Even if you are the guru of the Web front, but there is no fast data response, no high-speed network architecture, no graceful system support, what can you do? So the breakthrough is to focus on the whole web development chain.

Eight. "Soaring"

In fact, strictly speaking, soaring is not the scope of the original field. In the field of web research and development, there is a very nice appellation for this level: architect. Of course, those "pseudo-architects" are another matter.

One FA Tong, Lawspirit Tong. In other areas of technology, can also be in accordance with the "entry" "Entrance" "The Room" "The" "The Butterfly" "Hero" "guru" to classify the rank; You can also follow the "Advanced path" of each level as I write here to quickly ascend.

Congratulations on your success!

Web front-end development Engineer's ability to program and soar

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.