Live data from Hacker News

Ask HN: What hacks/tips do you use to make AI work better for you?

news.ycombinator.com

51–60 of 108 posts

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#51

Earlier quoted context omitted.

> I am unable to get these things to do anything useful. My experience is widely different than yours. I use Copilot extensively to explain aspects of codebases, generate documentation, and even fill in boilerplate code for automated tests. You need to provide the right context with the right system prompts, which needs some effort from your end, and you cannot expect perfect outputs. In the end it's like any softwar…

These services retain historical records of interactions. Can you show me an example of successfully doing what you claim you do?

This is a WIP, but here's the test suite for a recursive decent powered search DSL:

https://github.com/williamcotton/search-query-parser-scratch...

Claude, using Projects, wrote perhaps 90% of this project with my detailed guidance.

It does a double pass, the first pass recursive descent to get strings as leaf nodes and then another pass to get multiple errors reported at once.

There's also a React component for a search input box powered by Monaco and complete with completions, error underlines and messaging, and syntax highlighting:

https://github.com/williamcotton/search-query-parser-scratch...

Feel free to browse the commit history to get an idea of how much time this saved me. Spoiler alert: it saved a lot of time. Frankly, I wouldn't have bothered with this project without offloading most of the work to an LLM.

There's a lot more than this and if you want a demo you can:

  git clone git@github.com:williamcotton/search-query-parser-scratchpad.git
  cd search-input-query-react
  npm install
  npm run dev
Put something like this into the input:

  -status:out price:
And then play around with valid and invalid syntax.

It has Sqlite WASM running in the browser with demo data so you'll get some actual results.

If you want a guided video chat tour of how I used the tool I'd be happy to arrange that. It takes too much work to get things out of Claude.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#52

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

Ya they are either astroturfed or... I think there's just a lot of like young junior JavaScript developers who really haven't built like a full program with multiple features by themselves. I think they do some sort of like online tutorial and then they sort of like go through some sort of a course and then they get a job but they're only like doing like small pieces of like code writing themselves and I guess that's…

I've been programming for about 30 years and I get a lot of benefit from these tools.

My day job is mainly data science and data forensics and these LLM tools are fantastic for both as they excel at writing scripts and data processing tools. SQL queries, R plots, Pandas data frame manipulation, etc.

They also work well for non-trivial applications like these that I made with Claude Projects writing 90% - 95% of the code:

https://github.com/williamcotton/guish

https://github.com/williamcotton/search-query-parser-scratch...

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#53
post #47

Earlier quoted context omitted.

Two recent examples. Please link to your history when you get one of these things to build my example so I can see how you managed to do it. First, a friend without technical knowledge wanted to query an API using SQL. (At a previous firm he learned how to write “SELECT * FROM … WHERE …” statements.) He asked one of these llms to do this, that he paid a premium for, and it suggested installing VSCode and writing an e…

As the other commenter said, prompting is everything, and most LLMs are sycophants and will try to do anything you tell them without pausing to tell you "why the hell are you trying to query an API with SQL? That's not what SQL is for". While it's possible to build stuff with llms with little to no technical knowledge, it's still very hit and miss. With that said, the space is moving incredibly fast and the latest Cl…

Not OP, but I believe Clojure has a REPL that lets you run and edit code, persisting the changes from the REPL.

Off the top of my head you would want a Dockerfile with the version of Clojure you're working in, a mounted volume for sharing between host/container data. My guess is the two different things they mentioned are dependency sources.

LLMs require a -fu, similar to the Googlefu of old, to get what you want out of them.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#54

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

No need to be exhausted by the post. If AI doesn't help you, move on.

Probably you're really smarter and faster than the average developer.

The post is about finding out what things can help to to make it work for others. :)

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#55
post #34

Earlier quoted context omitted.

I'm always stumped by comments like this. I'm at a point where ~70% of my code is AI-written, and the majority of the remaining is mostly because it would take too much time to provide enough context to the tool/LLM of choice for it to be able to produce the code I need. Given the right context and the right choice of model/tools, I think ~90-95% of the code I write could be generated. And this is not for doing trivi…

Two recent examples. Please link to your history when you get one of these things to build my example so I can see how you managed to do it. First, a friend without technical knowledge wanted to query an API using SQL. (At a previous firm he learned how to write “SELECT * FROM … WHERE …” statements.) He asked one of these llms to do this, that he paid a premium for, and it suggested installing VSCode and writing an e…

[dead]

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#57

I’m exhausted by these types of posts. I am a developer with >25 of professional experience. I am unable to get these things to do anything useful. I’ve tried: different models, limiting my scope, breaking it down to small tasks, prompt “engineering”; and am still getting less than useless results. I say less than useless, because I will then additionally waste time debugging or slamming my head against the wall the…

If you were sincere you’d share a single transcript where the AI was completely useless for solving your problem.

“This new search engine sucks it can’t find anything”.

“Share what you searched for”

“No”

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#58
post #48

Our entire history we’ve adapted technology to our requirements. Now some people believe that adapting our workflows to make use of “technology” is revolutionary.

This is not remotely true. We've been adapting our workflow to technology since forever.

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#59
post #2

I like using LLMs for building non-critical tools that make me more productive. Things like shell scripts, Github actions, or one-off tools for visualising some problem space. The kind of thing where code quality doesn't really matter, but which will save you a ton of time in the long run

This is an enormously fruitful part of using LLMs for me too.

As a programmer, there's always a million small scripts I can think of to improve my life, but it's often not worth spending time actually building them. But with LLMs, I can now usually build a script, even in a domain I don't know much about, in minutes.

I don't think this would work as easily for non-programmers yet, because the scripts still aren't perfect and the context of actually running them is sometimes non-trivial, but for me it works very well.

(I say scripts, but sometimes even tiny one-off things like "build me this Excel formula" is helpful.)

Re: Ask HN: What hacks/tips do you use to make AI work better for you?

#60

Earlier quoted context omitted.

> I am unable to get these things to do anything useful. My experience is widely different than yours. I use Copilot extensively to explain aspects of codebases, generate documentation, and even fill in boilerplate code for automated tests. You need to provide the right context with the right system prompts, which needs some effort from your end, and you cannot expect perfect outputs. In the end it's like any softwar…

These services retain historical records of interactions. Can you show me an example of successfully doing what you claim you do?

> Can you show me an example of successfully doing what you claim you do?

In theory technically nothing prevents me from doing that, but I use it for professional work. Do you understand what you're asking?

Post reply on HN