From billions of mistakes to a little bit, how did I do it [What to do if you make a mistake at work]

foreword

As long as we are still doing things, or we are still alive, there is no time when we are not wrong. As a front-end brick mover, even if you are careful in your work, you will inevitably make some mistakes.

So does this mean that mistakes are normal, just change it?

That seems to be true. As the person who made the mistake, thinking this way will keep him in a good attitude, but if he is too good, he will take it lightly, small mistakes will become big mistakes, and finally there will be results that he does not want to see.

Because workplace mistakes are very different from other life or learning mistakes:

  • Mistakes in the workplace can have an impact on the company, team, colleagues and customers. Mistakes in life or study generally only have a negative impact on the individual.
  • Mistakes in the workplace may involve major issues such as economic losses, damage to reputation, and jobs, and the resulting negative consequences will be more serious. And life or study mistakes usually only affect the life and study of the individual.
  • Mistakes in the workplace need to be reported to superiors in a timely manner and take responsibility, while in-depth reflection and effective corrective measures should be formulated. And mistakes in life or study need to be made up for through self-examination, improvement and adjustment.

Based on this, how should we face mistakes in the workplace?

1. He is strong and he is strong, and the breeze is blowing on the hills——Mentality

At work, being criticized by your boss or testers is a common phenomenon. This has nothing to do with your development level, as long as you are not the boss, you will encounter this situation. So, don't get frustrated as soon as you encounter a problem, cheer up and listen to what they have to say.

When facing criticism from your boss or testers, don't rush to argue, but listen carefully to the other party's opinions and suggestions, and actively seek solutions to the problem. If there is anything unclear, you can properly ask and discuss with the other party.

Listening carefully allows you to stay calm and analyze problems. After all, is there a possibility that the criticism is wrong? It could be a problem with the backend, or it could even be a problem with the test itself! I have encountered it before, the test said that my code has always had problems, and finally found that his cache was not cleared! ! ! !

If it is indeed our own fault, then don't rush to deny yourself first. As a front-end engineer, you need to believe in your abilities and face your shortcomings calmly. You can't deny yourself because of a mistake. Don't be overly pessimistic or blame yourself. We must properly adjust our emotions and mentality, and regard criticism as an opportunity for improvement, rather than a blow to the criticism itself.

After all, if the work has always been smooth and never made mistakes, is it possible that what I do is too simple for me now? Then you have to consider whether to change jobs to jump out of your comfort zone to improve your ability and salary.

In the final analysis, a mistake is a mistake, and it is not right to the person, whether it is the personal attack of others on oneself, or the PUA of oneself on oneself, baa.

2. Regardless of whether the cat is black or white, the cat that catches the mouse is a good cat—problem solving

When a mistake is discovered, or after a bug is discovered, it is actually our programmer's job to try our best to solve it. Generally speaking, there are several ways to deal with it, choose the most suitable one to use:

1. Debugging tools

Using debugging tools in the browser, viewing console output, error messages, etc., can help us quickly locate and correct problems. Commonly used are the following functions:

Console: View console output, debug JavaScript code, etc. Common commands include console.log(), console.error(), console.warn(), console.clear(), etc.

Breakpoints (Breakpoints): Set a breakpoint, when the program is executed, it will pause here, so that we can perform single-step debugging. You can click to set a breakpoint on the line number of the code.

Resources: View various resources of the current page, such as HTML, CSS, JavaScript, pictures, etc.

 (The picture comes from the Internet, invaded and deleted)

2. Version control tools

Using a version control system such as Git, etc., to keep code history records, you can quickly trace back to find the error location.

3. Write unit tests

Writing unit tests can help us verify whether the code functions are implemented correctly and find problems in the code in time.

For how to write unit tests, see the next step.

4. Programming for search engines

It's 2023, and chatGPT has been open source for two years. Most of the questions in front-end development can only be answered online. As long as you carefully search and write the correct keywords, it is easy to find a solution to the problem.

5. Ask others for advice

"If you have trouble, leave it to others. They will appreciate your generosity." - Harry Anderson

If you really can't solve some problems by yourself, ask your colleagues or anyone you can think of (programmer friends/online bosses, etc.). After going back and forth, everyone is more familiar with it.

But the reason why this method is put in the last step is because:

  1. Waste of co-workers time: If you are always asking questions in front of your co-workers, then you are likely to interrupt their work quite frequently, wasting their time and energy.

  2. Too much dependence: If you completely rely on your colleagues to solve problems, then you may lose the ability to think independently and solve problems, and even lose confidence, which will affect your career development.

3. Sharpen the knife without cutting firewood by mistake——Summary and improvement

Summarizing mistakes in work or problems in development is a very important process, which helps us better reflect and improve our skills and work level. In general, just a few steps:

1. Recording errors

In daily work, record your own mistakes in a timely manner, including information such as the cause of the mistakes, their impact, and how to improve them. This can help us better understand the problem and prevent the same error from happening again. MD records or blog records are recommended here.

2. Analyze the reasons

After summarizing the mistakes, for each mistake, it is necessary to deeply analyze the root cause and find out the key factors and bottlenecks that restrict you. This helps you understand the nature of the problem and take better control of your work.

3. Summarize experience

For each mistake, in addition to analyzing the cause, it is also necessary to summarize the experience, such as what has been learned from the mistake, what needs to be paid attention to, and how to avoid similar problems in the future, etc. This can help you progress and grow quickly.

4. Review and improve

After summing up the mistakes and summarizing the experience, formulate an improvement plan and continue to optimize your working methods. This helps you continually improve your skills and the quality of your work, and is also a self-driven way to advance your career.

 

The picture shows a corner of a personal note.

In short, every mistake is a rare opportunity to help us discover our own shortcomings and explore more possibilities. Therefore, stabilize your mentality and continue to move bricks.

Guess you like

Origin blog.csdn.net/weixin_42373175/article/details/131122116