跪拜 Guibai
← Back to the summary

Business Frontend Devs Are First to Hit the Wall — and AI Is Just the Latest Reason

focus-software-engineer-desk-ai-code-suggestions-knowledge-library-digital-illustration.webp

Throughout the internet industry, the midlife crisis at 35 is a well-worn topic. But if you look closely, you'll notice that business-oriented frontend developers are often the first to be affected by this crisis and carry the heaviest anxiety.

Many people, in their first five years in the industry, rely on a quick mind to master Vue and React, can hand-write complex Webpack configurations, and can even recite every component parameter in Ant Design by heart. Give them a high-fidelity design mockup, and they can stack out a perfect admin dashboard in two days.

But when the macro environment cools, AI emerges, or the company's business contracts, these skilled workers who can quickly paint pages are often the first to be optimized out. Especially under the dimensionality-reducing strike of Claude and various large models that can directly write code from screenshots, many suddenly realize: the craft they've painstakingly cultivated for years has no moat whatsoever 🤷‍♂️.

Why? Because frontend developers who only know how to translate UI and call APIs are essentially just assembly-line workers on a production line.


Are You Still Obsessed with Proficiency?

The daily routine of most business frontend developers is an endless cycle of taking requirements -> painting pages -> calling APIs -> releasing.

When this repetitive labor occupies 90% of your time, you develop a false sense of fulfillment. You think you've learned the latest Composition API, you think you've mastered various fancy ways of writing Tailwind CSS, or that using AI tools makes you stronger 😒.

But this is merely syntactic proficiency, never engineering depth.

Your deadlock is this: you are always solving the problem of how to render this button, and never thinking about if this API call fails, how should the page degrade? or if the user is on a high-speed train with a weak network, could this payment request cause a race condition or even a duplicate charge?.

When your core competitiveness is merely writing pages a bit faster than others, you will inevitably be ruthlessly eliminated by fresh graduates who demand half your salary and have twice your energy, or by tireless AI programming tools 🤔.


You Should Possess Irreplaceable Engineering Fallback Capabilities

How to break the deadlock? The fundamental watershed between a senior frontend architect and an ordinary business developer lies in the ability to handle exceptions in deep waters and a reverence for the stability of business delivery.

You can no longer see yourself as a frontend developer only responsible for displaying data. You must force yourself to become the last line of defense controlling the quality of the entire chain.

For example, consider writing the business logic for a payment status polling. A junior frontend developer often just uses a setInterval and calls it a day. Once the user switches to the background or the network jitters, it instantly triggers severe memory leaks and state chaos.

In contrast, a veteran facing a midlife crisis has code filled with defenses against the physical network and harsh environments:

// Payment polling with exponential backoff, memory leak prevention, and network jitter defense
export async function pollPaymentStatus(
  orderId: string,
  signal: AbortSignal, // Strongly relies on the native interrupt signal to ensure the underlying network request is immediately cut off when the component unmounts
  maxRetries = 5
): Promise<'SUCCESS' | 'FAILED'> {
  let attempt = 0;
  
  while (attempt < maxRetries) {
    // Before each physical request, rigorously check the component's lifecycle
    if (signal.aborted) {
      throw new Error('Polling aborted by user or component unmount');
    }
    
    try {
      const response = await fetch(`/api/payment/status?orderId=${orderId}`, {
        signal,
        headers: {
          'Cache-Control': 'no-cache' // Core: Payment requests must resolutely reject any implicit caching by CDN or browser
        }
      });
      
      const data = await response.json();
      
      if (data.status === 'SUCCESS') return 'SUCCESS';
      if (data.status === 'FAILED') return 'FAILED';
      
      // If still PENDING, enter a flexible backoff wait (exponential backoff algorithm)
      // Don't rigidly check every second; the longer you wait, the more you protect the server's concurrency resources
      const delay = Math.min(1000 * Math.pow(2, attempt), 10000);
      await new Promise(res => setTimeout(res, delay));
      attempt++;
    } catch (err: unknown) {
      // If we actively cut it off, throw it upwards directly, never swallow the error
      if (err instanceof Error && err.name === 'AbortError') throw err;
      
      // Encountered a real physical network jitter, don't let the page crash directly, but silently wait and retry
      console.warn(`Network jitter caused polling failure, preparing to retry...`, err);
      await new Promise(res => setTimeout(res, 2000)); 
    }
  }
  
  throw new Error('Payment status polling timeout');
}

In this code, there are no flashy new framework syntaxes; it's all extremely restrained engineering methods: native AbortController to sever zombie requests, Cache-Control to forcefully penetrate caches, and an exponential backoff algorithm to protect server bandwidth. This code quality, capable of withstanding millions of high-frequency clicks, is the core architectural skill that even AI large models cannot easily replace.


You Must Understand Business Boundaries and Underlying Security

Beyond writing indestructible code, you must also step out of the frontend comfort zone and extend towards the backend's boundaries and the core of the business.

Never be satisfied with just writing an admin page that runs on a top-spec MacBook Pro. When facing the offline rendering of hundreds of thousands of data records, do you know how to use Web Workers to offload the massive JSON parsing from the main thread? Do you know how to use on-demand rendering and Canvas degradation strategies on a low-end thousand-yuan Android phone to keep the page's physical memory footprint strictly within an absolute safety line?

Don't be the passive receiver who just connects to APIs; be the rule-maker who defines the APIs. When a backend engineer designs an extremely counter-intuitive API that requires the frontend to make five serial requests to get complete data, you must have the confidence and ability to slam the table 🖐️. You need to use a BFF (Backend for Frontend) layer or edge functions to forcibly take over this logic, consolidating the dirty and tiring work in the middle layer, ensuring the data reaching the client is always extremely clean and immediately usable.


What is the Real Midlife Crisis?

It's when you stop having reverence for frontend engineering 🫡

For many people, their midlife crisis was already sealed in their third year in the industry, when they thought they had mastered various popular frameworks.

Age is never the original sin; high homogeneity and replaceability are.

Stop wasting vast amounts of time arguing about which framework is better or which state management library is more elegant—these are extremely superficial issues. Go dive into the dirtiest and most tiring quagmires of the business, solve the trickiest memory leaks, fill in the state chaos under weak network environments, and figure out the underlying network protocols 🫵.

Good luck everyone 🙏

Comments

Top 1 of 2 from juejin.cn, machine-translated. The original thread is authoritative.

一只老猪的逆袭

Thank you

ErpanOmer

You're welcome 😊