How much is your code value?

Source: Internet
Author: User

EmployerProgramStaff to writeCodeThe programmer's salary is the cost, and the valid code generated is the product. Or the Boss buys code from programmers. How much can a programmer earn by writing a line of code? Let's deduce it.

We require programmers to write, reconstruct, and modify Bug The number of changed rows is calculated as the production row ( Line All production lines are divided into three levels: Framework ( Structure ), Function ( Feature ), Logic ( Logic ); Set the three production lines written by programmers per unit time Ls , Lf , Ll ; The weights of each production line are WS , WF , WL . Production failure rate is P (between 0 and 1) Invalid production line refers to the code that is restructured into a new code after the old code has been run several times (during the development phase, fast iteration and refactoring only calculate the final production line is not invalid) or is verified to have Bug Code to be corrected. The value of the code written by the programmer per unit time is Vt = (LS × WS + Lf × WF + Ll × WL) ; Valid code value Ve = vt × (1 - P) . Set the programmer's salary per unit time S To further obtain the programmer's cost effectiveness C = VE/s .

 

There are only these formulas. Next, let's assume that some values are substituted into the formula for calculation. There are two programmers: A (Advanced ), B (Elementary), assuming A Monthly salary 5000 , Daily code value 50 , ( 22 Workday calculation, the same below) Monthly code value Vt (A) = 50 × 22 = 1100 , Then A Cost-effective C (A) = vt () × (1 - P (A)/S (A) = 1100 × (1 - P (A)/5000 . Likewise B Cost effectiveness C (B) = vt (B) × (1 - P (B)/S (B) . Consider the ideal situation, A , B The error code efficiency is 0 That is P (A) = P (B) = 0 To A , B If programmers have the same cost performance C (A) = 1100/5000 = vt (B)/S (B) = C (B) If B Daily valid code value 25 , Monthly valid code value 25 × 22 = 550 , Monthly salary 2500 . C (A) = C (B) The company's salary structure is balanced. Here are some of your questions and some additional ideas.

 

"I have seen that some companies write a small amount of code with a high amount of money. Some new users contribute the most to the code. How can they balance the cost-effectiveness ?" The number of lines of code does not directly represent the value of the Code. These are also three types of code weights. W The meaning of existence, writing framework code relies on deep knowledge. The weights of the Framework, function, and logic are progressively decreasing. WS> WF> WL . At the early stage of the project, Senior programmers basically write all their energy into the underlying framework rather than the upper-layer applications. 4 Write in hours 2 Hours later 2 After several hours of reconstruction, Senior programmers often contribute the most code in writing functions and logic when there is nothing to do in the framework in the middle and late stages of the project. The daily framework code production may be very low, but the amount of gold is very high, which is the basis for the survival and maintenance of the entire project.

"Is the cost-effectiveness of advanced and junior programmers really ideologically equal ?"No. The idealized cost effectiveness is more difficult than creating high-temperature superconducting material in the laboratory. The reason is that there are many uncertain and random factors. No programmer can write high-quality code that does not need to be reworked for a lifetime. The calculation above regards Code failure efficiency as an ideal0If a Senior Programmer is more aware of the traps and spoofing in the code to avoid them, then he can write less efficient code, that is to say, new people with high error rates need to write more code to be as cost-effective as senior programmers.

"How do I calculate the industry salary standard ?" When they talk about salary and treatment in job search, employment and personnel departments, they will say: according to industry statistics, your salary is Xxxx . On the surface, I understand that the establishment of industry salary standards requires a large amount of statistics. However, I don't know how companies collect and process data. I would like to calculate this: Two pieces of data need to be counted, and the value of valid code for programmers Ve , Salary S These two data calculations obtain the cost-effectiveness derived above. C = VE/s . When there is a large amount of data, we can get an industry average price/performance ratio. Cavg (If You Need To perform other analyses, You need to obtain the maximum value, minimum value, and variance ). After a programmer's written test interview, he can make a preliminary evaluation of the ability to produce valid code values. On this basis, he can give the programmer a salary, if the salary offered by the boss to most programmers in the company is too low, the cost-effectiveness is higher Cavg Frequent job hopping and hacking may occur. If the salary is too high or cost-effective, it may attract a large number of talents, but the boss is really rich and generous. Build and Cavg Equal cost effectiveness.

"As a boss, why don't I hire the best cost-effective senior programmers ?"It is neither possible nor good. It is impossible for practitioners to have a high level of technology. If the boss is hired by the top programmers but cannot arrange these workers, the communication and management costs will increase a lot. A Senior Programmer leads a few people with smooth communication (no matter senior or junior) so that they can do things very efficiently, if a few stubborn senior programmers get together and quarrel, then the production efficiency is not as good as two mediocre programmers Add a good guiding ideology. This article only talks about the problems related to the above formula and the internal management balance of the company.

"How to save costs ?" The two program development principles I boast about are complexity isolation and code reuse. The complexity is reduced, the code reading and modification will become easier, the expansion and maintenance costs will be reduced, and the writing and use of code that can be fully reused will also be reduced. Repeat yourself . Developing and using open-source software is also a good method. If a manager destroys a program team to develop a certain function, it is really necessary to reflect on the situation caused by the pressure of a short-term result as soon as possible: programmers rush to work, the effect is quick, but the code is less time-consuming, the complexity may be high, and hidden Bug There may be more opportunities for reuse in the future ...... In the long run, it is better to encourage programmers to write high-quality reusable code, use, participate in and invest in several open-source projects, and even encourage programmers to do their desired programs with a certain amount of free time ( Google With this offer, several of its business projects originate from employee personal projects one day a week), reducing the company's cost. Assume that a set of code (reusable code written by employees or ready-to-use open-source projects) has 10 Tens of thousands of valid code values, or by a Senior Programmer 1100 The value of the monthly code is calculated. This code may save the boss in the ideal situation without errors. 100000/1100 = 90.91 Man-month Cost, 5 Senior programmers also need to work 18.19 And the boss can save 99.91 × 5000 = 45.45 RMB It saves time and money. Why not? Why don't we use the cost saved by using open-source projects to add more humane benefits to employees? This is not the case with a good corporate culture. I think most commercial game engines come from abroad, because they don't want to seek out a fake game that can cheat money in a short period of time. Instead, they want to give programmers a certain degree of freedom to develop very cool programs, in the long run, these companies have taken the lead in the industry standards, and the selling engine has been rolled over. Will you blindly press the progress.

" I think you have such a set, and I am very rewarding or inspired. I am very serious !" seriously, you lose! Programmers who use this simple and crude formula to generate value are not ready! To put it bluntly, it is not a project but a person that manages any project. The most unique and powerful value of a programmer may not be involved in writing a piece of code to implement a function, but it may be complicated. For example, what kind of improvements can be made to the team, inspired by everyone's hard work on a problem, he can come up with creative suggestions. He is a good character, and he can coordinate internal and external affairs of the program team ......

" as a programmer, How can I improve my self-worth?" make the code you write less error-prone, and enable you to grow from a beginner programmer who only writes simple code to a more advanced programmer ...... I am tired today. I will talk about it again in another day.

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.