Ask HN: How can I get better at using AI for programming?
471 pointsI've had a fairly steady process for doing this: look at each route defined in Django, build out my `+page.server.ts`, and then split each major section of the page into a Svelte component with a matching Storybook story. It takes a lot of time to do this, since I have to ensure I'm not just copying the template but rather recreating it in a more idiomatic style.
This kind of work seems like a great use case for AI assisted programming, but I've failed to use it effectively. At most, I can only get Claude Code to recreate some slightly less spaghetti code in Svelte. Simple prompting just isn't able to get AI's code quality within 90% of what I'd write by hand. Ideally, AI could get it's code to something I could review manually in 15-20 minutes, which would massively speed up the time spent on this project (right now it takes me 1-2 hours to properly translate a route).
Do you guys have tips or suggestions on how to improve my efficiency and code quality with AI?
Comments (469) 111 threads
Earlier commentsDon't feel like you might get "left behind". LLM assisted development is still changing rapidly. What was best practice 6 months ago is irrelevant today. By being an early adopter you will just learn useless workarounds that might soon not be necessary to know.
On the other hand if you keep coding "by hand" will keep your skills sharp. You will protect yourself against the negative mental effects of using LLMs like skill decline, general decline of mental capacity, danger of developing psychosis because of the sycophantic nature of LLMs and so on.
LLM based coding tools are only getting easier to use and if you actually know how to code and know software architecture you will able to easily integrate LLM based workflows and deliver far superior results compared to someone who spend their years vibe coding, even if you picked up Claude Code or whatever just a month ago. No need for FOMO,
One day these things will actually do what they are supposed to do with a measure of consistency that doesn't involve GRIMOIRE.md or whatever and you can use them then. And most of the early mover advantage will be gone, because LLMs will not be the winning technology.
In the meantime be the person who learned the lessons of social media: popular isn't the same as good, appropriate or sensible.
Do you need better auto-completion? Do you need code auto-generation? do you need test cases to be generated, and lots of them? maybe llms can are ideal for you, or not.
Personally, the best use i've gotten out of it so far is to replace the old pattern of googling something and clicking through a bunch of sites like stackoverflow to figure things out. and asking llms to generate an example code of how to do something, and using that as a reference to solve problems. sometimes i really just need the damn answer without having a deep debate with someone on the internet, and sometimes I need a holistic solution engineering. AI helps with either, but if I don't know what questions to ask to begin with, it will be forced to make assumptions, and then I can't validate the suggestions or code it generated based on those assumptions. So, it's very important to me that the questions I ask an AI tool are questions whose subject domain I have a good understanding of, and where the answers are things I can independently validate.
One is called Superpowers (you should be able to find it by typing “claude code superpowers github”), and there are many other skills installed for all sorts of things. Gotta give props to whoever came up with the skills idea at Anthropic. It’s a smart way of handling context — instead of dumping pages of helper text into the prompt (for example, how to properly build a frontend website), it just provides some metadata and lets the agent decide whether it needs to load more.
I highly recommend spending time finding and installing lots of these skill plugins. They can make even the cheapest small AI models work way better.
I’ve been using the Superpowers plan mode: it creates a detailed plan first, then there’s an execute mode (and a few others I’m forgetting). I can give it a long, hard task — like converting a large app to another language - and if I run plan first and then execute, I can just let it run for hours and come back to something that’s basically done: fully tested, following best practices, with most bugs fixed.
There are some skills for frontend development, and now anytime I make a website, its crazy amazing looking and has all the stuff I usually forget.
All comments shown.
Couldn't load more comments. Check your connection and try again.