Live data from Hacker News

Ask HN: How can I get better at using AI for programming?

news.ycombinator.com

91–100 of 491 posts

Re: Ask HN: How can I get better at using AI for programming?

#91
Try specification-driven-development with something like speckit [0]. It helps tremendously for facilitating a process around gathering requirements, doing research, planning, breaking into tasks, and finally implementing. Much better than having a coding agent just go straight to coding.

[0] - https://github.com/github/spec-kit

Re: Ask HN: How can I get better at using AI for programming?

#93
post #68
post #61

Earlier quoted context omitted.

But that documentation shouldn’t need to be updated nearly every other day.

If you are consistent with how you do your projects you shouldn't need to update CLAUDE.md nearly every day. Early on, I was adjusting it nearly every day for maybe a couple of projects but now I have very little need to make any adjustments. Often the challenge is users aren't interacting with Claude Code about their rules file. If Claude Code doesn't seem to be working with you ask it why it ignore a rule. Often ti…

It takes a lot of uncached tokens to let it learn about your project again.

Re: Ask HN: How can I get better at using AI for programming?

#94
Honestly if your boss does not force you to use AI, don't.

Don'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,

Re: Ask HN: How can I get better at using AI for programming?

#95

You can using a single simple step: don't The more you use IA, the more your abilities decreases, the less you are able to use IA This is the law of cheese: the more cheese, the more holes; The more holes, the less cheese; Thus, the more cheese, the less cheese;

This is the fastest way to unemployment benefits (if that is the goal).

Re: Ask HN: How can I get better at using AI for programming?

#96
> This kind of work seems like a great use case for AI assisted programming

Always check your assumptions!

You might be thinking of it as a good task because it seems like some kind of translation of words from one language to another, and that's one of the classes of language transformations that LLM's can do a better job at than any prior automated tool.

And when we're talking about an LLM translating the gist of some English prose to French, for a human to critically interpret in an informal setting (i.e not something like diplomacy or law or poetry), it can work pretty well. LLM's introduce errors when doing this kind of thing, but the broader context of how the target prose is being used is very forgiving to those kinds of errors. The human reader can generally discount what doesn't make sense, redundancy across statements of the prose can reduce ambiguity or give insight to intent, the reader may be able to interactively probe for clarifications or validations, the stakes are intentionally low, etc

And for some kinds of code-to-code transforms, code-focused LLM's can make this work okay too. But here, you need a broader context that's either very forgiving (like the prose translation) or that's automatically verifiable, so that the LLM can work its way to the right transform through iteration.

But the transform you're trying to do doesn't easily satisfy either of those contexts. You have very strict structural, layout, and design expectations that you want to replicate in the later work and even small "mistranslations" will be visually or sometimes even functionally intolerable. And without something like a graphic or DOM snapshot to verify the output with, you can't aim for the iterative approach very effectively.

TLDR; what you're trying to do is not inherently a great use case. It's actually a poor one that can maybe be made workable through expert handling of the tool. That's why you've been finding it difficult and unnatural.

If your ultimate goal is to improve your expertise with LLM's so that you can apply them to challenging use cases like this, then it's a good learning opportunity for you and a lot of the advice in other comments is great. The most key factor being to have some kind of test goal that the tool can use for verify its work until it strikes gold.

On the other hand, if your ultimate goal is to just get your rewrite done efficiently and its not an enormous volume of code, you probably just want to do it yourself or find one of our many now-underemployed humans to help you. Without expertise that you don't yet have, and some non-trivial overhead of preparatory labor (for making verification targets), the tool is not well-suited to the work.

Re: Ask HN: How can I get better at using AI for programming?

#97
Go into planning mode and plan the overall refactor. Try to break the tasks down into things that you think will fit into a single context window.

For mid sized tasks and up, architecture absolutely has to be done up front in planning mode. You can ask it questions like "what are some alternatives?", "which approach is better?".

If it's producing spaghetti code, can you explain exactly what it's doing wrong? If you have an idea of what ideal solution should look like, it's not too difficult to guide the LLM to it.

In your prompt files, include bad and good examples. I have prompt files for API/interface design, comment writing, testing, etc. Some topics I split into multiple files like criteria for testing, testing conventions.

I've found the prompts where they go "you are a X engineer specializing in Y" don't really do much. You have to break things down into concrete instructions.

Re: Ask HN: How can I get better at using AI for programming?

#98

Ask people to do things for you. Then you will learn how to work with something/someone who has faults but can overall be useful if you know how to view the interaction.

Though remember that it's not a human. It's easy to waste a lot of time convincing it to do something in a certain way, then one prompt later it forgets everything you said and reverts back to its previous behavior. (Yes humans can do that too, but not usually to this level).

It's important (though often surprisingly hard!) to remember it's just a tool, so if it's not doing things the way you want, start over with something else. Don't spend too much time on a lost cause.

Re: Ask HN: How can I get better at using AI for programming?

#100

You can using a single simple step: don't The more you use IA, the more your abilities decreases, the less you are able to use IA This is the law of cheese: the more cheese, the more holes; The more holes, the less cheese; Thus, the more cheese, the less cheese;

This is the fastest way to unemployment benefits (if that is the goal).

This is just meaningless knee-jerking, try making an actual argument. At least the GP is arguing that more use of AI leads to loss of personal coding skills. It's unclear at this point what level AI will grow to, i.e. it could hit a hard wall at 70% of a good programmer's ability, and in that case you would really want those personal coding skills since they'll be worth a lot. It could also far exceed a good programmer, in which case the logic reverses and you want those AI handling skills…

NB: I'm talking about skill cap here, not speed of execution. Of course, an AI will be faster than a programmer… *if* it can handle the job, and *if* you can trust it enough to not need even more time in review…

Post reply on HN