top | item 44465320

(no title)

twalkz | 8 months ago

I'm really enjoying reading over the prompts used for development: (https://github.com/maciej-trebacz/tower-of-time-game/blob/ma...)

A lot of posts about "vibe coding success stories" would have you believe that with the right mix of MCPs, some complex claude code orchestration flow that uses 20 agents in parallel, and a bunch of LLM-generated rules files you can one-shot a game like this with the prompt "create a tower defense game where you rewind time. No security holes. No bugs."

But the prompts used for this project match my experience of what works best with AI-coding: a strong and thorough idea of what you want, broken up into hundreds of smaller problems, with specific architectural steers on the really critical pieces.

discuss

order

Swizec|8 months ago

> what works best with AI-coding: a strong and thorough idea of what you want, broken up into hundreds of smaller problems, with specific architectural steers on the really critical pieces

As a tech lead who also wears product owner hats sometimes: This is how you should do it with humans also. At least 70% of my job is translating an executive’s “Time travel tower game. No bugs” into that long series of prompts with a strong architectural vision that people can work on as a team with the right levels of abstraction to avoid stepping on each other’s toes.

stavros|8 months ago

I tried to build a simple static HTML game for the board game Just One, where you get a text box, type a word in, and it's shown full screen on the phone. There's a bug where, when you type, the text box jumps around, and none of the four LLMs I tried managed to fix it, no matter how much I prompted them. I don't know how you guys manage to one-shot entire games when I can't even stop a text box from jumping around the screen :(

M4v3R|8 months ago

Browser text entry on mobile phones is notoriously hard to get right and some bugs are literally unfixable [1]. I'm a frontend developer in my day job and I struggled with this even before AI was a thing. I think you just accidentally picked one of the hardest tasks for the AI to do for you.

[1] Example: https://www.reddit.com/r/webdev/comments/xaksu6/on_ios_safar...

gametorch|8 months ago

> what works best with AI-coding: a strong and thorough idea of what you want, broken up into hundreds of smaller problems, with specific architectural steers on the really critical pieces

This has worked extremely well for me.

mberning|8 months ago

Same. I had some idea that I wanted to build a basic sinatra webapp with a couple features. First version was pretty good. Then I asked it to use tailwind for the css. Again pretty good. Then I said I wanted to use htmx to load content dynamically. Suddenly it decides every backend method needs to check if the call is from htmx and alter what it does based on that. No amount of prompting could get it to fix it.

fragmede|8 months ago

CSS is the devil and I fully admit to burning many hours of dev time, mine without an LLM, an LLM by itself, and a combination of the two together to iron out similar layout nonsense for a game I was helping a friend with. In the end, what solved it was breaking things into hierarchical react components and adding divs by hand and using the chrome dev tools inspector, and good old fashioned human brain power to solve it. The other one was translating a python script to rust. I let the LLM run me around in circles, but what finally did it was using Google to find a different library to use, and then to tell the LLM to use that library instead.

fallinditch|8 months ago

> what works best with AI-coding: a strong and thorough idea of what you want, broken up into hundreds of smaller problems

A technique that works well for me is to get the AI to one-shot the basic functionality or gameplay, and then build on top of that with many iterations.

The one-shot should be immediately impressive, if not then ditch it and try again with an amended prompt until you get something good to build on.

mvkel|8 months ago

What I've found works best is to hand-code the first feature, rendering the codebase itself effectively a self-documenting entity. Then you can vibe code the rest.

All future features will have enough patterns defined from the first one (schema, folder structure, modules, views, components, etc), that very few explicit vibe coding rules need to be defined.

unclebucknasty|8 months ago

>a strong and thorough idea of what you want, broken up into hundreds of smaller problems, with specific architectural steers on the really critical pieces.

Serious question: at what point is it easier to just write the code?

kenjackson|8 months ago

Depends. If you have written other Tower Defense games then it’s probably really close to that line. If you just took a CS class in high school then this vibe approach is probably 20x faster.

My aunt would always tell me that making fresh pasta or grounding your own meat was basically just as fast as buying it. And while it may have have been true for her it definitely wasn’t for me.

skydhash|8 months ago

And if it's a work project, you're going to spend a few years working on the same tech. So by the time you're done, there's going to be templates, snippets,... that you can quickly reuse for any prototyping with the tech. You would be faster by the fact that you know that it's correct and you don't have to review it. Helps greatly with mental load. I remember initializing a project in React by lifting whole modules out of an old one. Those modules could have been libraries the way they were coded.

marviel|8 months ago

I totally agree!

this is the idea behind my recent post actually[1] where I recommend people use AI to write specs before they code. If all you have to do is a human is edit the spec, not write it from scratch, you're more likely to actually make one.

[1] https://lukebechtel.com/blog/vibe-speccing

UncleEntity|8 months ago

Heh, didn't know there was a name for it...

What I've taken to lately is getting the robots to write "scientific papers" on what I want them to get up to so instead of iterating over broken code I can just ask them "does this change follow the specification?" Seems to stop them from doing overly stupid things...mostly.

Plus, since what I've been working on is just a mash-up of other people's ideas, it provides a good theoretical foundation of how all the different bits fit together. Just give them the paper you've been working on and some other paper and ask how the two can be used together, a lot of the time the two ideas aren't compatible so it saves a lot of time trying to force two thing to work when they really shouldn't. Very good way to explore different ideas without the robots going all crazy and producing a full code project (complete with test and build suites) instead of just giving a simple answer.

recursive|8 months ago

Coincidentally those seem to be strongly correlated with success in old fashioned application development as well.

antonvs|8 months ago

> No security holes. No bugs.

You forgot “Don’t hallucinate.” Noob.

cainxinth|8 months ago

> No security holes. No bugs.

A friend called me for advice on trouble he was having with an LLM and I asked “What exactly do you want the LLM to do?” He said “I want it to knock this project out of the park.” And I had to explain to him it doesn’t work that way. You can’t just ask for perfection.

I mean, you can, but you won’t get it.

exographicskip|7 months ago

Writing tests and/or PRDs helps. Gives llms tangible direction that can be quantified.

AndrewKemendo|8 months ago

> A lot of posts about "vibe coding success stories"

Where are you reading “a lot of posts” making this specific claim? I’ve never seen any serious person make such a claim

> a strong and thorough idea of what you want, broken up into hundreds of smaller problems, with specific architectural steers on the really critical pieces.

This is how I’ve been using LLM bots since CGPT preview and it’s been phenomenally useful and 100x my productivity

The gap seems to be between people who never knew how to build, looking for a perfect Oracle that would be like a genie in a lamp, then mad when its actual work

The thing the last few years have beat into me is that most engineers are actually functionally bad engineers who only know 1:1000th of what they should know in order to know how to build a successful project end to end

My assumption was that all of the bad engineers I worked with in person were a accidental sample of some larger group of really good ones (who I’ve also been able to work with over the years) and that it’s just rare to find an actual capable engineer who understands the whole process

Turns out that’s a trivial minority (like every other field) and most people are pretty bad at what they do

johnrob|8 months ago

I see 100x used quite a bit related to LLM productivity. It seems extreme because it implies one could generate a year’s worth of value in a few days. I would think delivering features involves too much non coding work for this to be possible.

barrkel|8 months ago

The bottleneck IME is people. It's almost never code. It's getting alignment, buy-in, everyone rowing in the same direction.

Tech that powers up an individual so they can go faster can be a bit of a liability for a company, bus factor 1 and all that.

mberning|8 months ago

100x is a bold statement.

jaggs|8 months ago

> Where are you reading “a lot of posts” making this specific claim?

Reddit.