Skip to content

AI Programming: A Super Assistant or a Pitfall King? My Practical Reflection on AdminLTE Backend Overhaul

A Few Opening Words

Lately, claims like "AI will disrupt software development" and "90% of programmers will lose their jobs" have been spreading like wildfire. Various AI programming tools and IDE plugins have indeed showcased impressive capabilities. Honestly, as a developer, I'm both curious and a bit excited, wondering if AI can make development efficiency "take off like a rocket."

Coincidentally, I recently took on a task: upgrading an outdated CRM backend system (PHP 5 + CodeIgniter 3.1.10) to PHP 7, integrating the new AdminLTE 3.x, and adding some new features. Throughout the process, I was practically "welded" to AI (mainly tools like Gemini), having it write code for me.

To be honest, although AdminLTE is widely used, I hadn't worked with it before. Official documentation? Well... I was a bit lazy to go through it, thinking this was the perfect opportunity for AI to shine! Just let it generate the code directly.

This "human-machine collaboration" experience gave me some heartfelt insights into AI's true capabilities and limitations in the world of programming.

AI's "Highlight Moments": Efficiency Is Undeniably Impressive

It must be admitted that in many scenarios, AI is like the perfect "copilot":

  1. Handling "Routine Work": Creating basic structures for controllers and models, writing standard CRUD operations, generating configuration files, or building common front-end components (like dropdown menus, form validation rules)—AI can whip these up quickly with high accuracy, saving a lot of copy-pasting effort.
  2. Quickly Tackling General Functions: Want to auto-generate an AdminLTE-style form based on database fields? Or quickly set up a paginated data table? For such needs, AI often provides runnable code snippets promptly.
  3. Becoming a "Walking Documentation Library": When encountering unfamiliar PHP functions, library usage, or specific framework rules, asking AI is usually faster than digging through documentation manually, and it provides examples directly.
  4. Code Snippet "Generator" and "Translator": Need a small code block for a specific function (like date formatting, string processing), or trying to understand someone else's cryptic code? AI's explanation and generation abilities are mostly reliable.
  5. Front-End Styling "Magic Brush": Want to give the interface a "tech blue" or "modern minimalist" look? With clear requirements, AI's CSS solutions and layout suggestions can be quite effective, sometimes even usable with minor tweaks.

Especially at the start of a project, when dealing with these "standardized, general, somewhat mechanical" tasks, AI's efficiency is explosive, truly giving a sense that "the future is here."

AI's "Crash Moments": It Struggles with Complexity, Details, and "New Stuff"

But the good times didn't last. As the project moved into deeper waters, with increasingly complex logic or finely detailed requirements, AI's shortcomings became glaringly obvious, sometimes to the point of being laughable:

  1. Complex Flows and State Management? It Gets Confused: Handling intricate logic that involves interactions across multiple pages and remembering user states (like the AdminLTE IFrame mode's Hash navigation challenges, cross-IFrame window messaging, dynamically adding/removing tabs while maintaining state) left AI struggling. It might understand each step individually, but piecing together dependencies between components and state flows perfectly is too much to ask.
  2. Context: Too Little, It Doesn't Get It; Too Much... It Forgets! This is arguably AI's biggest pain point, bar none.
    • Insufficient "Feeding": If you only provide a small code snippet or vague requirements, the generated code often can't be integrated directly into your system, or it might misinterpret your intent.
    • Over-"Feeding": When you painstakingly feed it the entire file, related module code, and context, hoping it can "grasp the big picture," it tends to get "confused." It might forget key points discussed earlier or silently break previously adjusted parts while modifying others. The result is a "patchwork" situation, requiring constant checking and fixing on your part.
  3. Fine Details and Precise Control? It Only Does "Close Enough": For precise UI tweaks, specific interactive animations, or strict business rules, AI's solutions are often "roughly correct" but fall short of "perfectly meeting requirements." For example, fixing a layout misalignment for a specific element on a certain mobile resolution or implementing an unconventional chart interaction—it might offer a generic fix but fail at edge cases.
  4. Struggles with "New" or "Niche" Technologies: No matter how vast AI's knowledge base is, it can't keep up with fast-evolving technologies or obscure usage. For newer, poorly documented, or less-discussed tech, framework versions, or specific libraries (like various tricks in AdminLTE IFrame 3.2 mode), AI's "hallucinations" worsen. It might confidently invent non-existent APIs, recommend outdated methods, or provide completely wrong understandings of library internals. In my development, tasks like handling AdminLTE IFrame's postMessage cross-window communication, pushState/popstate for no-refresh navigation (especially ensuring each page has a fixed URL for direct sharing), and precise code-triggered tab creation and switching were disaster zones—AI's solutions were almost never directly usable.
  5. Debugging? A Nightmare! Debugging AI-generated code, especially for complex logic or library interactions, can be more time-consuming than writing from scratch. You not only need to understand the business logic but also guess how AI "thought," figuring out where its sometimes non-intuitive code logic went wrong. It truly lives up to the joke: "AI codes for 5 minutes, humans debug for hours."

Whether using IDE-integrated AI assistants or pasting code into chat windows, these hurdles are unavoidable.

The Value of Human Programmers: More Than Just "Code Monkeys"

After this "close collaboration" with AI, I've gained a clearer understanding of where we programmers add value—far beyond just typing code:

  • Building the Framework and Blueprint (System Design and Architecture): Understanding the entire business, designing scalable, maintainable system architectures—this is something AI can't do yet.
  • Dissecting the Ox (Complex Problem Decomposition): Breaking down large, vague requirements into manageable, implementable small modules and tasks.
  • Getting to the Root (Deep Debugging and Root Cause Analysis): Facing weird bugs, using logic and tools to peel back layers and find the underlying cause.
  • Balancing Act (Trade-offs and Decision-Making): Finding the right balance among conflicting requirements, technical constraints, and performance needs.
  • Ultimate Brain (Learning and Adaptability): Quickly learning new technologies, tackling difficult documentation, solving problems with no online answers.
  • Communication Bridge (Communication and Collaboration): Understanding what product managers or clients really want (not just what they say) and collaborating effectively with other developers.

Take the AdminLTE IFrame navigation issue: after AI repeatedly gave wrong solutions, I had to dig into the official documentation (though sparse) and source code, understand its quirks, and write the key DOM operations and state management logic myself to fully resolve it. AI couldn't help with that.

Dancing with AI: The New Posture for Future Programming

So, how should we view this new "colleague," AI?

  • Treat It as a Super "Intern" or "Pattern Recognition Master": Let it handle repetitive, standardized tasks and generate code "rough drafts."
  • Treat It as a "Walking Documentation Library" or "Idea Bank": Use it to quickly look up syntax, API usage, or get ideas for solving common problems.
  • Treat It as a Junior "Code Reviewer": Have it check code style and catch obvious low-level errors (but never fully trust its judgment).

However, final architecture design, complex logic challenges, fine-tuning details, diagnosing tricky issues, and overall system integration must be led and controlled by human developers. We need to:

  1. Learn to "Feed" Precisely: Ask clear, accurate questions with sufficient context.
  2. Learn to "Break It Down": Decompose complex tasks into smaller chunks that AI can handle better.
  3. Maintain a "Skeptical" Mindset: Never copy-paste AI code directly; always understand and test it yourself.
  4. Build a Solid Foundation: Strong programming basics, data structures, algorithms, and deep knowledge of your frameworks/libraries are essential for leveraging AI and fixing its "pits."
  5. Treat It as a "Tool," Not a "Crutch": AI is an efficiency booster, not a replacement for your thinking and creativity.
  6. Know When to Let Go: If AI repeatedly fails on a problem or can't grasp complex needs, switch back to "manual mode"—check docs, read source code, and do it yourself.

Final Thoughts

AI is indeed changing the game in programming, greatly boosting efficiency in some areas and lowering barriers to entry for certain technologies. But it's far from replacing programmers. Currently, AI is more like a highly capable, knowledgeable intern or assistant that sometimes "confidently spouts nonsense" and lacks big-picture thinking and deep reasoning.

Future developers need to continuously enhance their system design, problem decomposition, critical thinking, and lifelong learning skills, learning to collaborate smartly with AI—leveraging its strengths and avoiding its weaknesses.

AI programming isn't the end; it's a new chapter in developer evolution. What we must do is learn to dance more steadily and go further in this new era of human-machine collaboration.