I have been in the interview for some time, and I have a lot of insights. Today, I would like to share one of the topics.

Why did you leave your last job?

Among them, many students will mention such a reason, the current project code is too bad, predecessors left a lot of holes, I really can not bear.

In fact, this seems to me rather unprofessional and perhaps too idealistic of a job. If you leave because the code sucks, you’re going to be stuck in the same situation when you move on to the next company, because almost everyone thinks their project code sucks.

Let’s talk about what is the cause of this phenomenon, first of all, we have to believe that no one intentionally write your own code is very bad, everyone wants to write your own code is very elegant, scalability is very good, but maybe at the beginning level is not enough, when the code looks not bad, is the so-called junk code to others in the future, each of us in advance, If you look at your code from three months ago and you don’t feel like it’s crap, you’re stuck.

Secondly, the technology updates too fast, the market changes too fast, and the products naturally evolve all the time. Maybe the code that looks good at that time, with the passage of time, the function updates, the code piles up, and slowly becomes the bad code in the eyes of latecomers.

Maybe you say, I jumped to a new company, to do a new product, need not bear the junk code, I have confidence in the architectural design is very cow force, do sufficient scalability for after consideration, I can only say that you want to be too idealistic, we never can’t predict the future, as the change of demand and the market, we’ve been in iterative function, Our products also have been change, you will find that you may put a lot of work before the design of architecture, is completely overturned, especially in the stage of new products launched, this is a quick test fast iterative phase, your ideal technical thinking, to the product without any help, as the product update iteration, the increasing code of combination, As a result, your elegant code design is likely to be your own bad code.

Also spawned a problem here, in the early stages of the product, don’t too much consideration of architecture design, performance optimization and so on, the main energy the function first, up the experience of products, technology person always intoxicated with the perfect first write your own code, but actually, the product can’t into or one thing, to realize optimized again, Is the most basic principle of the rapid development of the Internet market today. But you don’t have to write bad code in order to find time to refactor later. I can tell you from experience that it’s almost impossible to set aside time for refactoring alone.

So, if a company development is good, just because the code sucks, moved to another company is likely to be worse, and the more mature product, the more code legacy, including big Internet companies such as Google, the BAT is still so, if you think the company is good, want to develop together, If the code sucks, try to change it. It’s hard to give yourself time to refactor. Refactor while you’re developing features, iterate while you’re optimizing.

Most of us complain about our environment, and very few of us will make a change, even if it’s a small change, and sometimes you’ll get a better opportunity because of that small change.

This article original release wechat public number AndroidDeveloper, welcome to pay attention to, listen to my bullshit.