I'd be particularly interested to hear how you use GPT to write or correct code beyond Copilot or asking ChatGPT about code in chat format.
But I'm also interested in hearing about useful prompts that you use to increase your productivity.
1–10 of 752 posts
I'd be particularly interested to hear how you use GPT to write or correct code beyond Copilot or asking ChatGPT about code in chat format.
But I'm also interested in hearing about useful prompts that you use to increase your productivity.
It’s great for bash one-liners with flags and OS-specific nuances.
Haven’t really been able to use it for really advanced things. But maybe someday.
Do I always get stuff that I can apply? No, not really. But given that discoverability can be low for things like that, it's usually helpful at finding me things to, at the very least, look into.
- Asked it to improve a HN comment I wrote.
- Asked about an idiom I couldn't remember, by saying it in other words.
- Asked it to dumb down some things about options (finance) I didn't understand.
- Asked it if I could use the eBay API to list my purchase history (you can, and it knew how).
- Asked it to generate pretty standard Terms of Service for an app I'm working on.
- Asked it to generate a moderately complex Prisma (ORM) query that I described in natural language.
- Described what I wanted Nginx to do in natural language (e.g. "the index file will be served whenever no file is found") and asked it to output a configuration file.
- Asked it what the "XDG" in "XDG_CONFIG_HOME" stood for.
Also, occasionally ask it to generate shell commands using a CLI I wrote[0].
Search engines with SEO are so reliant on keywords that it often feels like I'm suggesting answers rather than asking questions - it's so refreshing to be able to just ask again.
Later, when they released their API, I developed a CLI tool for this purpose (https://github.com/pncnmnp/grammatical). Note that it is not flawless, but it works well. It has improved my writing productivity, both for blogging and emails.
For programming, all sorts of things. I use it all the time for programming languages that I'm not fluent in, like AppleScript or bash/zsh/jq. One recent example: https://til.simonwillison.net/gpt3/chatgpt-applescript
I use it as a rapid prototyping tool. I got it to build me a textarea I could paste TSV values into to preview that data as a table recently, one prompt produced exactly the prototype I wanted: https://github.com/simonw/datasette-paste-table/issues/1
I use it for brainstorming. "Give me 40 ideas for Datasette plugins involving AI" - asking for 40 ideas means that even if the first ten are generic and obvious there will be some interesting ones further down the list.
I used it to generate an OpenAPI schema when I wrote my first ChatGPT plugin, see prompt in https://simonwillison.net/2023/Mar/24/datasette-chatgpt-plug...
It's fantastic for explaining code that I don't understand: just paste it in and it will break down what it's doing, then I can ask follow up questions about specific syntax to get further deeper explanations.
Similar to that, I use it for jargon all the time. I'll even paste in a tweet and say "what did this mean by X?" and it will tell me. It's great for decoding abstracts from academic papers.
It's good for discovering command line tools - it taught me about the macOS "sips" tool a few weeks ago: https://til.simonwillison.net/macos/sips
In the past, I'd have used forums to find examples. There were still some forum posts about wxWidgets on Google, but I got the impression they were hiding most. Either way, GPT had them on demand.
With the understanding that it's only trained up to Sep 2021, I'm using it to spot check for any libraries that have flown under my radar, or any other methods of doing work that I usually do, but in a different fashion. Do I always get stuff that I can apply? No, not really. But given that discoverability can be low for things like that, it's usually helpful at finding me things to, at the very least, look into.