<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr" -->

---
title: AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It
description: A developer shares a firsthand experience using an AI coding agent (GLM-5 via z.ai) to build a PHP media manager for a personal blog. The AI generated ~5,000...
canonical: https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It | daily.dev
og:description: A developer shares a firsthand experience using an AI coding agent (GLM-5 via z.ai) to build a PHP media manager for a personal blog. The AI generated ~5,000...
og:url: https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr
og:image: https://api.daily.dev/og/posts/2VZlNj5Lr.png
og:image:alt: AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It

**[Ibrahim Diallo](https://daily.dev/sources/idiallo)** · 8 min read · 21 upvotes · 7 comments

## Summary

A developer shares a firsthand experience using an AI coding agent (GLM-5 via z.ai) to build a PHP media manager for a personal blog. The AI generated ~5,000 lines of spaghetti code in 12 minutes, but it took 10 hours of debugging, restructuring, and rewriting to produce a maintainable 1,254-line codebase. Key issues included incorrect file includes, missing session_start() calls, SQLite permission quirks, and conflicting system prompts causing Node.js code generation. The author reflects on the real cost of AI-generated code: the cleanup and comprehension burden often negates the speed gains, and deploying code you don't understand is a liability.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://idiallo.com/blog/it-took-me-10-hours-to-fix-ai-code>

## Community discussion

Top comments from developers on daily.dev.

**@feforeboot** · 6 upvotes

> For fuck's sake, the guy literally admits to 1) not being sure what he wanted and needing to reason through it, and 2) USING A WRONG AI MODEL.
>
>
> And then the cascading issues from that are pinned on the AI anyway. Why is this post being allowed to waste our time?

**@fabianletsch** · 3 upvotes

> Shit in -> Shit out 😅

**@fabianletsch** · 2 upvotes

> You went through an interesting process but i think you forgot to draw the right conclusions.
>
>
> Instead of questioning vibe coding itself you should have questioned your process.
>
>
> For better results you should have:
>
> 1. Used a more competent model
> 2. Used a better system prompt/agent
> 3. Should have made it possible somehow for the ai to fix its mistakes, for example by it seeing linting and type errors itself
> 4. Spent way more time planning the thing and discussing the architecture with the AI.
>
>
> You may still have ended up wasting lots of time but i believe it would have been less time and...

**@confidentcoding** · 2 upvotes

> _"This reminds me of several non-technical friends who built/vibe-coded apps last year. The initial results looked impressive. Most of them don't have a working app anymore, because they realized that the cleanup is just as important as the generation if you want something that actually holds together. I can only imagine what "vibe-debugging" looks like."_
>
> These are the kind of stories that honestly motivated me to start [confident-coding.com](http://confident-coding.com) and begin teaching people what real troubleshooting and debugging looks like. As these tools make it so easy to get a...

**@rucaua** · 0 upvotes

> AI for small tasks - work amazing. Complex tasks - 50/50. Huge tasks - event do not try.

## Similar posts on daily.dev

- [I Let AI Write My Code for 7 Days. Days 1–6 Were Magic. Day 7 Nearly Broke Me.](https://daily.dev/posts/i-let-ai-write-my-code-for-7-days-days-1-6-were-magic-day-7-nearly-broke-me--ohycaidt0) · Medium · 1 upvotes · 0 comments
- [The Unbearable Lightness of Coding](https://daily.dev/posts/the-unbearable-lightness-of-coding-vlnmxgw0d) · Towards Data Science · 0 upvotes · 0 comments
- [Eight years of wanting, three months of building with AI](https://daily.dev/posts/eight-years-of-wanting-three-months-of-building-with-ai-fxpxl1dnh) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#sqlite](https://daily.dev/tags/sqlite), [#ai-coding](https://daily.dev/tags/ai-coding), [#vibe-coding](https://daily.dev/tags/vibe-coding)

[View this post on daily.dev](https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It","url":"https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr"},"datePublished":"2026-04-06T13:04:57.567Z","dateModified":"2026-04-06T13:05:21.546Z","description":"A developer shares a firsthand experience using an AI coding agent (GLM-5 via z.ai) to build a PHP media manager for a personal blog. The AI generated ~5,000...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"Ibrahim Diallo","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ibrahim Diallo","logo":"https://media.daily.dev/image/upload/s--UBuPzW64--/f_auto,q_auto/v1774960037/logos/idiallo?_a=BAMAMiWQ0","url":"https://daily.dev/sources/idiallo"},"commentCount":7,"discussionUrl":"https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":21},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":7}],"keywords":"php,sqlite,ai-coding,vibe-coding","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ibrahim Diallo","item":"https://daily.dev/sources/idiallo"},{"@type":"ListItem","position":3,"name":"AI Did It in 12 Minutes. It Took Me 10 Hours to Fix It"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/ai-did-it-in-12-minutes-it-took-me-10-hours-to-fix-it-2vzlnj5lr","comment":[{"@type":"Comment","text":"For fuck’s sake, the guy literally admits to 1) not being sure what he wanted and needing to reason through it, and 2) USING A WRONG AI MODEL.\nAnd then the cascading issues from that are pinned on the AI anyway. Why is this post being allowed to waste our time?","datePublished":"2026-04-07T19:47:58.271Z","url":"https://daily.dev/posts/2VZlNj5Lr#c-EGoh9KoMA","author":{"@type":"Person","name":"FG","url":"https://daily.dev/feforeboot","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"Shit in -&gt; Shit out 😅","datePublished":"2026-04-10T08:07:57.924Z","url":"https://daily.dev/posts/2VZlNj5Lr#c-O9yEJElZK","author":{"@type":"Person","name":"Fabian Letsch","url":"https://daily.dev/fabianletsch","image":"https://lh3.googleusercontent.com/a/ACg8ocKR6BVy_wn23EoOKq7-BlszlcXcLmASlnb7l-GtS-q1bePnkaJf=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"You went through an interesting process but i think you forgot to draw the right conclusions.\nInstead of questioning vibe coding itself you should have questioned your process.\nFor better results you should have:\n\nUsed a more competent model\nUsed a better system prompt/agent\nShould have made it possible somehow for the ai to fix its mistakes, for example by it seeing linting and type errors itself\nSpent way more time planning the thing and discussing the architecture with the AI.\n\nYou may still have ended up wasting lots of time but i believe it would have been less time and you would have been happier with the results.","datePublished":"2026-04-10T08:02:16.031Z","url":"https://daily.dev/posts/2VZlNj5Lr#c-rh3eMO37k","author":{"@type":"Person","name":"Fabian Letsch","url":"https://daily.dev/fabianletsch","image":"https://lh3.googleusercontent.com/a/ACg8ocKR6BVy_wn23EoOKq7-BlszlcXcLmASlnb7l-GtS-q1bePnkaJf=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"“This reminds me of several non-technical friends who built/vibe-coded apps last year. The initial results looked impressive. Most of them don’t have a working app anymore, because they realized that the cleanup is just as important as the generation if you want something that actually holds together. I can only imagine what “vibe-debugging” looks like.”\nThese are the kind of stories that honestly motivated me to start confident-coding.com and begin teaching people what real troubleshooting and debugging looks like. As these tools make it so easy to get a faux-product created with virtually no development skills to start with, we’re going to need to be educating people through alternative means of how to think critically and debug effectively.","datePublished":"2026-04-07T16:31:32.661Z","dateModified":"2026-04-07T16:31:39.587Z","url":"https://daily.dev/posts/2VZlNj5Lr#c-5ohVbK2jy","author":{"@type":"Person","name":"Lars Faye | Confident Coding","url":"https://daily.dev/confidentcoding","image":"https://media.daily.dev/image/upload/s--OGZu5DEc--/f_auto/v1772569630/avatars/avatar_umWZ9aQAng34qk5aaJl2q?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"AI for small tasks - work amazing. Complex tasks - 50/50. Huge tasks - event do not try.","datePublished":"2026-04-20T15:28:27.025Z","url":"https://daily.dev/posts/2VZlNj5Lr#c-Qhx3Fcr7z","author":{"@type":"Person","name":"Maksym Tymofeiev","url":"https://daily.dev/rucaua","image":"https://media.daily.dev/image/upload/s--caTJyFHC--/f_auto/v1736549445/avatars/avatar_sIPMygD4Ld90iZsdsEqh7"}}]}
```

