Programmer: write code during the day, set up a street stall at night, and deliver food on weekends

Some people say that in the profession of programmers, three years of promotion, seven years of construction, ten years of delivery. Although I have very much approved of this, I can now say four words forward-looking (after an afterthought), which is unfounded! Superficial eyes!


image.png

Picture from Pexels


As the saying goes, I am born with useful materials. I will deliver the takeaway when I use it up. Now, a new outlet-trillion yuan [pyrotechnic economy] is here. In addition to delivering takeaway, we have another new option: set up a street stall!


A person has only a few opportunities in his life to achieve financial freedom. The opportunities are fleeting and must be grasped firmly.image.png

The picture comes from the Internet, the copyright belongs to the original author


So, today we come to seriously talk about the correct posture for programmers to set up a street stand.


01

Technical reserve


Who is the programmer?

  • A group of people who are lofty and determined to change the world through technology!

  • A group of people who always stand in the front of technology!

  • A group of people who can make rockets in the interview with Lu Yue Caiyun!

  • A group of people who are always worried about the future at 28 years old!


As the saying goes, we still need our own hard work. Before we decide to devote ourselves to the big business of stall setting, we must recognize ourselves to find the right position and understand what level we can achieve in the stall industry?


Based on the programmer's experience in interviews and recruitment over the years, I can give you a bit of reference. I think a qualified P6-level apprentice should have the ability to change the global macroeconomic trend, and have the ability to extract all kinds of appellations from 0 to 1.


Examples of interview questions for P6 staff:

  • Please talk about the economics behind the street stall.

  • Draw a map from home to the street stall. 0 means you can go, 1 means you can't go. Please write a program to find the shortest route using a suitable algorithm.

  • There are many tools for a street stall: a piece of cloth, a street stall tricycle, a private car trunk, a Wuling Hongguang, and a Lanxiang excavator. Please compare the advantages and disadvantages of some of these tools? And talk about the running process of a tool you are most familiar with.

  • In the process of setting up a street stall, what should I do if a hundred million-level traffic comes? What about high concurrency? How to do high availability?


Are these questions familiar? If you can’t answer it, I suggest you go back and read more books and recommend a few:
  • "The Self-cultivation of Stall Staff"

  • "Twenty-three design patterns for stalls"

  • "Deep into the source parts, understand the working principle of the stall car"


In addition, you also need to read the English original works of foreign bigwigs, especially some Nobel Prize winners, such as Keynes's "General Theory of Employment, Interest, and Currency" and Joseph Schumpeter's " Economic Development Theory, Samuelson’s Economics, Simon Kuznets’ Economic Growth in Countries, etc.

image.png

PS: "You go back first. Normally we will give you a reply in about two weeks. " "Congratulations on passing our interview. Your next job is to move the lamb skewers with me."


It turned out that the so-called appropriateness is just whether you can play a cool cow with me and do ordinary things. I set up a street stall, but I just want to talk to you about Lu Yunheyue!


02

Find the right direction


After you have a good technical reserve and recognize yourself, the next step is to find the right direction. A good direction is half the battle. Many people also want to set up a street stall, but they are helpless and do not know what to do, which makes them unable to take the first step. This matter is relatively simple for programmers, there are no more than three choices.
Option 1: Technology-oriented entrepreneurship


Most programmers have technical feelings and use their own technology to change or influence a group of people, thereby bringing their own business value.


So if you choose a stall in this direction, you don’t need to think about it at all. It depends on your own ability to make stall carts and small commodities depending on what you are good at.
Option 2: Technology-based equity entrepreneurship


Do your skills well! In the professional jargon of programmers, it is a single responsibility, decoupling. As for what direction to give to your partner, let professional people do professional things!
Option 3: Join a great stall company


What we need to do is to do a good job of business abstraction and modeling, design a set of general stall architecture, what we sell is not important, the important thing is that we can sell everything. What to sell is discussed by the product manager and the operation boss.


At this time, it is very important to choose a good team. Our team is very good. We have a senior product manager who can mingle with programmers.


PS: "What are the two people doing over there", "The one wearing the grid is the programmer, and the other is the product manager. The product manager said that when setting up a stall, we must pay attention to the user experience and simplify the user's operation. For example, if our stall is The product is a mobile phone case. You can’t let the user pick and run. This is too bad and the efficiency is very low. You have to be able to automatically change the color and background according to the user’s mood. After talking, the two of them will start the fight. Stop it. "


You see, for programmers, the choice is so simple! What traps our hands and feet is worry! We, who are already grown-ups, may need such a young, frivolous and unscrupulous one!


03

Microservice architecture


First, let's look at a picture:

image.png

Do you see any problems? Yes, it is too obvious, this is still the traditional way of setting up a stall, the most basic single stall structure!


This makes the stall service too bloated, all concentrated on one person, which is not conducive to management; poor fault tolerance, once a small problem occurs, the entire service will be down.


For example, if a user wants to use Alipay to pay, and the phone runs out of power, you have to wait for him. What about other customers? And this is not conducive to expansion. How to support the expansion of the stall business? The biggest problem is that it doesn’t meet the trend of today’s street stall industry.


Therefore, the most correct posture should be: Demolition! Microservice the entire architecture of the stall. Don't care if it fits or not. It's 2020. Follow the trend and follow the current. Then you will not be overwhelmed by the trend and will not be abandoned by this era. Otherwise, you can only go back and continue to write your low-end code, and you won't be able to work as a staff member.

image.png

As shown in the above figure, after microservices, it becomes the above. Someone manages sales, somebody manages checkout, somebody manages goods, somebody manages inventory, and somebody manages the car.


Dismantled in this way, it makes the division of labor and responsibilities clearer for the entire stall. Everyone is dedicated to providing the most professional services to others:

  • Independent scalability, each microservice can be independently scaled horizontally or vertically; for example, the cashier service mentioned above is slow, let's just let someone else chant.

  • Independent upgradeability, each microservice can be upgraded and updated independently without relying on other services; for example, if Wuling Hongguang wants to upgrade to a Lanxiang excavator, just upgrade.

  • Ease of maintenance, each microservice only focuses on completing its own business scope; you don't have to worry about whether the inventory is enough, whether the money will be miscalculated, etc., everyone focuses on their part.

  • Isolation of faults and resources. When bad resource operation behaviors occur in the system, for example, sales are so busy that they become paralyzed and memory leaks, and subsequent checkouts can continue.

  • ......


There are specialties in the technical industry, and professional people do professional things. You, do we look like microservices?


当我们夸夸其谈其先进性的时候,以为自己走在技术前沿的时候,以为自己支撑了一整个服务集群的时候,我们可能已经忘了,这个事情我们已经做了很久很久,这个地方我们已经待了很久很久。


我们以为自己是一个独立的服务可以独立地运作,却从来没有想过脱离了这个服务体系的时候,其实,一无是处!

单体应用,还是微服务?我们需要什么?这个世界需要我们什么?

image.png

04

放眼未来


作为具有程序员背景的地摊员,我们的目光不能局限于当下,要充分考虑未来地摊事业发展对当前架构的依赖及可能存在的风险,提前做好风险预案。


比如:

  • 万一有亿级客户流量来访问我们的地摊呢?我们该如何做好流量控制?熔断降级?

  • 要不要再准备一队地摊员做好主备和负载均衡等?

  • 我们的地摊货要不要分库分表呢?

  • 要不要做读写分离,专门安排人员负责客户询价、地摊货咨询等?

  • 要不要引入排队机制?要不要给他们发个令牌才能来我们的地摊呢?

  • ......


还有很关键的一点,地摊事业未来会不会遭遇某些人的封禁或者打压,比如:

  • 万一有人说地摊是他们国家的物质文化遗产,是他们发明的呢?

  • 万一有人觉得红火的地摊事业影响到了他们的安全,要将我们列入实体清单进行管制呢?


地摊,作为一个炙手可热的风口产业,一个充满无限可能的产业,让我们一起去摆摊吧。


虽然我的想象力不足以想象地摊业的未来,但我的心里有火,眼里有光。即将投入地摊事业的程序员们,请接受我的祝福,奔涌吧,地摊员,我们在同一条奔涌的河流。


它是一个地摊,它是一个机会,它是大千世界,它是我们的内心。梦想还是要有的,万一实现了呢?梦想还是要有的,至少这样当我们想努力拼搏一把的时候,知道该往哪个方向!


As it was written, I suddenly remembered that there seems to be room for optimization in the architecture of this street stall. Should I use a middle-level system? Have to think about it!


Guess you like

Origin blog.51cto.com/14410880/2545876