The post has been translated automatically. Original language: Russian
Hi everyone!
Over the past few years, AI assistants have become a standard tool both across the software development world and in our studio. We use them for frontend and backend alike, and in that time I've noticed something interesting: you can't really say which part of the stack AI is more useful for. What you can say quite precisely is which tasks it saves you hours on, and which ones it turns into problems you have to clean up later.
The Core Principle
How hard a task is for AI doesn't depend on whether it's frontend or backend. It depends on three things.
The first is how typical the task is. If similar code appears in open-source repositories millions of times, the model will write it confidently and with almost no mistakes.
The second is whether the result can be verified quickly. If correctness is confirmed by a test in a second, AI's mistakes get caught right away. If you have to check it by eye or wait for real-world load, mistakes slip through.
The third is how much an unnoticed mistake costs. One mistake is merely annoying; another can cost you your data.
Once you map tasks along these axes, the picture becomes clear.
Frontend: Where AI Helps
Typical components: forms, tables, cards, modals. AI writes all of these quickly and well. Building layouts from a clear description or (often, but not always) from a screenshot, porting components between frameworks, TypeScript typing, refactoring legacy code — these are all tasks where the model genuinely saves time.
The reason is simple: there's a huge amount of this kind of code in open sources, and the result is visible immediately. You open the page, and the form either works or it doesn't.
Frontend: Where AI Gets in the Way
Problems start where quality is defined by feel. Animations, timings, smooth transitions, interface responsiveness: AI writes code that formally works and matches the task description, but looks wrong in the browser. The animation stutters, the easing feels unnatural, an element appears a fraction of a second too early. This is especially noticeable for us, because special projects involve a lot of game mechanics and complex interactivity. These are exactly the tasks where AI most often produces something that's easier to rewrite than to fix.
Another weak spot is matching the design precisely and behaving correctly across devices. The model can't see how a page looks on an old Android phone or in Safari, and it doesn't notice that a margin is 0.4rem off from the design. Vision-capable models can already look at screenshots, but for now it's slow and imprecise.
Backend: Where AI Helps
In the backend, AI is often more useful than in the frontend. CRUD, REST endpoints, SQL queries, migrations, data validation, unit tests: this is code with a clear input and output. You write a function, run the test, get an answer. Feedback is instant and objective, so AI's mistakes are caught on the very first run.
Speaking of tests: generating tests is one of the most useful things AI can do in the backend. The model quickly covers the obvious scenarios, and a human adds the complex ones.
Backend: Where AI Gets in the Way
Here the problem is the exact opposite of the frontend. In the frontend, an AI mistake is visible immediately; in the backend, it can be invisible.
Concurrency and race conditions, consistency in distributed systems, performance under load, security: in these areas AI writes code that passes the tests, works on a local machine, and breaks only in production. A classic example is caching in Redis: the model will easily write cache reads and writes, but it may miss invalidation, or the case where two requests update the same data at the same time.
The worst part is that AI sounds very confident in exactly these places. The code looks clean and logical, and the mistake is easy to miss in review.
The Cost of a Mistake
This is probably the main practical takeaway. An AI mistake in the frontend is usually cheap: a button shifts, someone spots it in a hallway test, and it's fixed in five minutes. A mistake in the backend can cost you lost data, a leak, or a service going down under load.
How We Handle It
That's why we treat AI-generated code differently depending on where it lives. Frontend code we check by eye and on real devices. AI-generated backend code goes through a more careful review, especially anything involving data, concurrency, and security.
Where has AI let you down?
Всем привет!
За последние несколько лет AI-ассистенты стали обычным инструментом как в целом в мире разработки, так и в нашей студии. Мы используем их и во фронтенде, и в бэкенде, и за это время я заметил интересную вещь: сказать, в какой части стека AI полезнее, нельзя. Зато можно довольно точно сказать, в каких задачах он экономит часы, а в каких создаёт проблемы, которые потом приходится разгребать.
Главный принцип
Сложность задачи для AI зависит не от того, фронтенд это или бэкенд, а от трёх вещей.
Первая - насколько задача типовая. Если похожий код встречается в открытых репозиториях миллионы раз, модель напишет его уверенно и почти без ошибок.
Вторая - можно ли быстро проверить результат. Если корректность подтверждается тестом за секунду, ошибки AI ловятся сразу. Если нужно смотреть глазами или ждать реальной нагрузки, ошибки проскакивают.
Третья - сколько стоит незамеченная ошибка. Одна ошибка просто раздражает, другая может стоить потери данных.
Если разложить задачи по этим осям, картина становится понятной.
Фронтенд: где AI помогает
Типовые компоненты - формы, таблицы, карточки, модальные окна. AI пишет все это быстро и качественно. Вёрстка по понятному описанию или (часто, но не всегда) скриншоту, перенос компонентов между фреймворками, типизация на TypeScript, рефакторинг старого кода - всё это задачи, на которых модель реально экономит время.
Причина простая: такого кода огромное количество в открытых источниках, а результат виден сразу. Открыл страницу - форма либо работает, либо нет.
Фронтенд: где AI мешает
Проблемы начинаются там, где качество определяется ощущением. Анимации, тайминги, плавность переходов, отзывчивость интерфейса - AI пишет код, который формально работает и соответствует описанию задачи, но в браузере выглядит не так. Анимация дёргается, easing неестественный, элемент появляется на доли секунды раньше, чем нужно. Для нас это особенно заметно, потому что в спецпроектах много игровых механик и сложной интерактивности. Именно в таких задачах AI чаще всего даёт результат, который проще переписать, чем исправить.
Ещё одна слабая зона - точное попадание в макет и поведение на разных устройствах. Модель не видит, как страница выглядит на старом Android или в Safari, и не замечает, что отступ отличается от дизайна на 0.4rem. Модели со зрением уже умеют смотреть на скриншоты, но пока это медленно, неточно и дорого по токенам.
Бэкенд: где AI помогает
В бэкенде AI часто полезнее, чем во фронтенде. CRUD, REST-эндпоинты, SQL-запросы, миграции, валидация данных, юнит-тесты - это код с чётким входом и выходом. Написал функцию, прогнал тест, получил ответ. Обратная связь мгновенная и объективная, поэтому ошибки AI ловятся на первом же прогоне.
Кстати о тестах: генерация тестов - одна из самых полезных задач для AI в бэкенде. Модель быстро покрывает очевидные сценарии, а человек декларативно добавляет сложные.
Бэкенд: где AI мешает
Тут проблема прямо противоположна фронтенду. Во фронтенде ошибка AI видна сразу, в бэкенде она может быть невидимой.
Конкурентность и гонки данных, консистентность в распределённых системах, производительность под нагрузкой, безопасность - в этих задачах AI пишет код, который проходит тесты, работает на локальной машине и ломается только в продакшене. Типичный пример - кэширование в Redis: модель легко напишет запись и чтение из кэша, но может упустить инвалидацию или ситуацию, когда два запроса одновременно обновляют одни и те же данные.
Хуже всего то, что AI в таких местах звучит очень уверенно. Код выглядит чисто и логично, и ошибку легко пропустить на ревью.
Цена ошибки
Это, пожалуй, главный практический вывод. Ошибка AI во фронтенде обычно дешёвая: кнопка уехала - заметили в коридорном тесте - поправили за пять минут. Ошибка в бэкенде может стоить потерянных данных, утечки или падения сервиса под нагрузкой.
Как это устроено у нас
Поэтому к коду от AI мы относимся по-разному. Фронтенд-код проверяем глазами и на реальных устройствах. Бэкенд-код от AI проходит более внимательное ревью, особенно всё, что касается данных, конкурентности и безопасности.
А в каких задачах AI подводил вас?