Blog: bugstack.cn Github: github.com/fuzhengwei/…

Precipitation, share, grow, let yourself and others can gain something! 😄

One, foreword

Are you work-oriented?

If the programming is simply to undertake the product requirements development system functions, then the basic program development can be simply understood as according to the requirements PRD, define attributes, create methods, call display, these three steps.

Especially in some large companies, there will be easy to use, perfect, standard architecture system and operation and maintenance services, such as: RPC, MQ, Redis cluster, distributed task, configuration center, sub-library sub-table component, gateway and other matching system architecture. So let programmers only care about business function development!

Let programmers only care about business development, mature system architecture, standard development process, and common function design, for the improvement of team effectiveness is very good. But some programmers become tool people by doing the same thing day in and day out.

If frameworks and middleware exist, then programmers only care about business development. Why are you asked about the design and rationale of the core components in your interview? In this day and age, learning is almost your only way to survive.

Two, multithreading and locking have not used?

Interview must ask about multi-threading, locks, and may even ask quite in-depth, such as: AQS, CAS, CLH, MCS, lock upgrade, object, etc. But do you use it in real business development? Maybe this is also where most students say the interview makes the rocket!

There are some business scenarios in Internet applications that really rarely use multithreading and hardly require you to lock. Even where you can use multiple threads, you can do it in a better way, like if you need multiple threads to drop data into a repository, then you can use asynchronous MQ to spread the load across application instances. This evolution is due to the fact that application development and deployment are now based on distributed thinking, so there is less need to squeeze single-instance cpus with threads.

Based on RPC+MQ+ database routing + gateway, and all kinds of matching components, to build a distributed application, at some time is to change our development model. Maybe we need to use a lot of multi-threading in a single instance of development thinking, in the use of distributed architecture, we need to change this idea, so the use of multi-threading and locking at any time will be reduced.

Figure 14-1 Distributed simplified application deployment

However, it is not that there is no multi-threading and locking business scenarios, for example, in our core components, database connection pool, distributed tasks, will involve the use of multi-threading and locking. There are some similar commodity kill scenarios that also require the use of locks.

Therefore, multi-threading is used to maximize the use of resources to improve efficiency, locking is to ensure the correctness of business processes in the case of competition for the same resources. For example: database connection pooling for rational allocation of database resources, commodity killing is for inventory competition.

However, multithreading is generally not used in distributed scenarios without the need to compete and allocate resources. If we do a single count of user resources, then the original application is a single instance or can lock cumulative count. But now it’s distributed application deployment, so you might have instance A providing your requirements at one point, and then you might have instance B when you refresh the page again. It’s not so convenient when you want to add up some instances.

This is why there aren’t many places you can use multithreading and locking in a distributed application framework. But if you need to understand the design of middleware or core components, you need to understand the core knowledge.

A lot of paper skills, that’s where you build wheels and rockets and become architects! If you want to go further on this path, you need to keep learning.

What is your growth stage goal?

As far as programming goes, every growth goal has its own set of challenges.

  • When you’re in school, it’s hard to get all this weird stuff running on your computer.
  • Work for 1 to 3 years, the previous grasp is fur, then need to have in-depth learning, and after in-depth will be tough with mathematics.
  • Working for 3~5 years, it is not so difficult to look at the theoretical knowledge before, but how to actually solve some complex projects, or concentrate on the brain stem.
  • Working for 5 to 7 years, the salary and position will become the bottleneck that is very difficult to break through at this stage. The accumulation and precipitation are not enough, and the status quo is not satisfied!
  • After working for 7 to 10 years, you might find it difficult to learn anything before, but now you may find it difficult to have free time. Skill does not always come with age.

As you get older, each stage has its own difficulties. And the ones who seem to have broken through and reached the heights you want. In fact, at every stage, they are ahead.

But in terms of pure technical growth, in fact, theoretical knowledge is not difficult, as long as you learn it can still be, but the time cost is different. But after the theory, the next step is creativity, which is why you feel like you know so much technical stuff, but when you’re actually developing it feels like you can’t write good code.

Knowing core skills but not being able to write good code is like knowing Chinese characters but not being able to write poetry, knowing colors but not being able to draw mountains and rivers, jumping but not being able to dance.

So, working with project code and looking at design patterns will give you a better understanding of how the code should be used, which will help you break through the current phase barrier. 😄 recommend “Relearning Java Design Patterns”, public number: BugStack wormhole stack, reply: Design Patterns, download.

How to become an architect?

Speaking of architects, it’s really hard because you sign up for a course and you become an architect. The growth of an architect depends more on whether you need an architect in your development group, and also on your role in that role.

If you’re not an architect yet, but you want to be one. It also depends on whether your employer is willing to train you as an architect, and whether you have the versatility you need. In addition, senior developers are not necessarily inferior to architects. Senior development is sometimes more focused and core than what architects do.

So beyond figure 14-3, what are the specifics of the architect’s capabilities?

  1. The specification was established and the architecture was designed.
  2. There is a certain depth and breadth of technology, to change the bug, deal with the accident.
  3. Led the team to promote the project implementation, can also cooperate with other groups.
  4. Understand operations and business planning and get involved in product development early.
  5. Understand business and operations, data indicators and ROI.
  6. Architecture is more a combination of experience and experience than a single channel of single content.
  7. It is not that there is no architecture without an architect. Sometimes a company or group undertakes a project of a smaller size and just uses a formative architecture pattern.
  8. But if you have a very complex scenario design, which is developed in groups of dozens of systems, providing services, supporting tens of thousands of seconds to kill, hundreds of thousands of days to live, and scaling to millions of DAUs, you need an architect to control it.
  9. For example: from ordering, to trading, to payment, to settlement, to activities, to gameplay, how to support. The complexity of this volume requires an architectural tradeoff.
  10. There is no right or wrong, just a better time. Learn more, do not set boundaries for themselves, just better break through!

** Good structure, from a distant view is the efficiency of the department, from a near view is to solve the bad code! ** A lot of time urgent, may let the whole project rot. More and more bad will eventually affect business development. So where does all this bad code come from?

  1. Bugs are often inherited bad code or ideas not inherited from others.
  2. Business requirements are simply written from the beginning without extensibility, and then continue to pile up.
  3. Not well structured and named, and never formatted.
  4. Unable to predict the future business trend, the design of a reasonable expansion system.
  5. Showmanship over overall planning and design, the introduction of a new skill, but lack of matching.
  6. There is no design, the function is flow, if you need anything, write ifelse.
  7. Always want a shuttle, it doesn’t matter, there are complaints in the heart, the department is eager for quick success and instant benefits, not to give you a long matting, no one with, can’t write a good thing.
  8. There is no corresponding process specification and review, design review, code review, and benchmarking project to refer to.
  9. Knowing a few JDK sources is never the basis for writing good code. It’s like an old carpenter with an axe and a new carpenter with a chainsaw, but some things are good and some are not.
  10. No code is always good. If it’s better, it needs to be maintained and modified all the time.
  11. There is no corresponding business volume, do not talk about QPS, TPS, TP99, TP999, service health, a lot of empty talk is playing hooligan.

Crap. It comes from a lot of things, and it’s not something you can just sign up for a course. The joint efforts of business, product and R&D can better reduce the occurrence of bad, and these are the direction that every R&D should strive for, and are almost the only way to become an architect.

Five, the summary

  • Writing so much is mainly to help those who like me in this road to continue to struggle, may be everyone will be confused in these stages: how to learn technology in school, how to write resume when applying for a job, how to grow in the work and so on. So most of the time more is still their own restraint and their own choice!
  • It is Already December in 2020. There are the beginning of the epidemic, the year of wearing masks, some people get rich in stocks, some people cannot pay the mortgage, some people are impatient and aimless, and some people have learned a lot of knowledge. Anyway, time is fast!
  • You use the sword, I use the knife, both have a target, are very wind burn! Keep it up!

Six, series recommendation

  • Why do programmers build wheels and get promotions and pay raises?
  • Just graduated soon, received private work to earn 20 thousand dollars!
  • BATJTMD, large factory recruitment, are recruiting what kind of Java programmers?
  • North drift code farmer of me, in the big city had become a village as comfortable, ha ha ha ha ha ha!
  • Be reasonable, as long as you are a programmer who love to toss about, graduation job really do not need to spend money training!