Can you elaborate on how you're actually using ChatGPT? I'm a developer and I haven't felt any need to use ChatGPT constantly.
What tasks are you delegating to ChatGPT that were previously done by humans? Most of my input from others is regarding current information specific to the task at hand. I don't see how ChatGPT would have any idea what I'm talking about.
Do you have some specific examples you could share?
I would love to know this too. For me it’s involved too much manual copy-pasting of existing code for context, for it to feel like it’s doing much for me.
For cases like that, copilot (with chat for context) might be more of what you’re looking for. Chatgpt specifically, I’ve been using for very light context / general tasks that I modify. I always consider the trade off between how much time I’m saving by having to write the prompt full of context.
I'd love to understand this too - my experience has been that I can generally write what I want faster than figuring out what prompt will get something close to right, and then editing/revising it to make it right.
Add to this the limited usefulness for generating code that's contextual - making some method deep inside a component tree that needs to reference a service class, and pick some dom elements to mutate etc... it requires knowledge and reasoning about the project and overall code structure.
I don't understand how folks are using it as a productivity booster, unless maybe as something like a better StackOverflow?
I have a bunch of examples myself. Here's a good recent one (prompts are linked about half way down the post): https://simonwillison.net/2023/Aug/6/annotated-presentations/#chatgpt-sessions https://simonwillison.net/2023/Aug/6/annotated-presentations...
A few more:
- "Write a Python script with no extra dependencies which can take a list of URLs and use a HEAD request to find the size of each one and then add those all up" https://simonwillison.net/2023/Aug/3/weird-world-of-llms/#using-them-for-code https://simonwillison.net/2023/Aug/3/weird-world-of-llms/#us...
- "Show me code examples of different web frameworks in Python and JavaScript and Go illustrating how HTTP routing works - in particular the problem of mapping an incoming HTTP request to some code based on both the URL path and the HTTP verb" https://til.simonwillison.net/gpt3/gpt4-api-design https://til.simonwillison.net/gpt3/gpt4-api-design
- "JavaScript to prepend a <input type="checkbox"> to the first table cell in each row of a table" https://til.simonwillison.net/datasette/row-selection-prototype https://til.simonwillison.net/datasette/row-selection-protot...
- "Write applescript to loop through all of my Apple Notes and output their contents" https://til.simonwillison.net/gpt3/chatgpt-applescript https://til.simonwillison.net/gpt3/chatgpt-applescript
After putting some thought into this I think it has to do with the kind of developer you are. In my case I'm usually across 10-20 ecommerce websites doing various semi-unique jobs with relatively simple code.
Largely I use CGPT for work that's boilerplate/LOC heavy but architecture light, things like writing first drafts of React hooks and the like. It's quite good with constraints like use typescript or use X function to do Y.
I usually give it about two goes if it goes in the wrong direction on the first try. If it seems to not conceptually understand what I'm asking I generally just write it directly rather than tinkering with prompts for 20 minutes.
I also have a couple of longer system prompts saved for converting Vue components to React using the house style and things like that using the playground.
> but architecture light
It does fairly well for architecture, if you don't expect too many specifics. It, at least, works as a reasonable sanity check/brainstorm.
All of these LLM becomes less expert the finer resolution you take the context. Keep it high level, and you still have a relatively expert assistant.
deleted 3y ago
[deleted]
My main use is TypeScript, which I am using for the first time and struggling with a bit. I'm fine with straightforward type definitions but I often hit complicated situationszi don't know how to solve. Googling doesn't really help because U don't know the abstract terms for what I want to do.
Instead I paste the JavaScript and tell ChatGPT to add type definitions. Mostly it gets it right. If it doesn't, it gets me closer.
I don't use it for JS in general because I'm particular about how I write stuff. Though occasionally I'll lean on Copilot to fill out a utility function.
yeah, I would like some examples that sent just trivial. I have failed to use it successfully for anything I cannot simply state in a condensed singular statement or paragraph. And almost none of my work is easily condensed into a single paragraph. Coupled with the complete misunderstanding it constantly seems to have and it's inability to understand nuance...I am struggling to make use of it and actually feel productive. Everything I use with it fails when I attempt to test it and it won't do anything complex because the tokens needed to explain the idea alone are quite numerous. I guess you could have it refactor code...?
For code I’ve found LLM mostly useless, since if I don’t understand something I need to read the docs anyway, and the generated code tends to be buggy even in react.
Where I have found LLM useful is in generating text. Where I used to use a thesaurus I now use LLM to find words to name things in themed UX. But it’s not great at function or variable names, it tends to pick names that look good but don’t precisely describe what something is. LLM is also great at generating text for role play.
I had a lot more success writing some code and have ChatGPT document it than doing the opposite. The documentation tends to be much better written than what I would have done by myself.
Indeed because ChatGPT is excellent at writing text. And because I know exactly what I want to see even if I have a hard time putting it into words myself, I can easily catch the mistakes and hallucinations.
I don't get why there is so much focus on code generating AIs and so little on code analysis. Have AIs do code reviews, write tests and analyze the results, etc... LLMs are awesome at reviewing code, they are able to tell you what's unexpected. And what is unexpected has a good chance of either being a bug or some key element of the code that needs attention. I think I have seen a single article about that, out of hundreds that are about code generation.
type a function signature and an opening squiggly brace, wait for "copilot" to autocomplete, press tab, ????, profit
if you use elasticsearch and not familiar with elastic search's syntax (I am not), you could use ChatGPT to write elastic queries for you.
same for SQL, if you are not familiar with SQL.
probably could be same with Splunk SPL, Kibana KQL, Prometheus PromQL, or any other DSL that you are not familiar with
I think that we are the silent majority. ChatGPT can be mildly useful for me as a dev, but in general it actually slows me down. There have been a few times when it has really shined, but it’s not the norm.
If it was actually a life altering tool (and it might be one day) there wouldn’t need to be an entire industry of people trying to convince everyone that with just one small trick Google doesn’t want you to know, you can quadruple your productivity.
It’s immensely helpful for learning. Orders of magnitude better than google which has ruined their search results with seo bait.
At the very least, its a much more powerful google (dont nitpick my comparison, i realize it hallucinates). Getting the EXACT context of your question is something generalized search/articles online will NEVER give you, and you can read hundreds of pages of docs all day. This is good for certain things, but not when you want to know just a single setting or atomic piece of information. I want to get the smallest amount of accurate information very specifically to my problem, as I'm programming many hours per day on my own companies as a one man show.
My search history on chat gpt includes a few things as examples:
- specific ways SOLID principles could be applied to Go which is non-OOP language
- helping me quickly learn nuances of Lua for configuring neovim, specifically for weird syntax or things annoying to google (ie what does # mean) or what does a specific error mean within the context of the configuration
- more efficient top k algorithms than what I was building for learning purposes
- asking to break down big o complexity of certain types of sort functions and whether they differ from n log n
- helping me learn enough rust to do a bug fix Pr that was annoying me
- x vs s in neovim config for keymap modes
- figuring out why Ruby doesn’t implement descending ranges
Etc etc etc
I've been coding 40+ years and I use it reasonably regularly, for things that are trivial time waster type stuff. Like I need some powershell command to automate something that I know will be automatable. Less so for coding, but I have a IDE AI code generator (Codeium) that is often good at predicting what you want to do next, especially for boilerplate type stuff. Then there's the times you are heading into unknown and just need a starting point, for instance I asked it to write a discord bot that did X Y and Z, and it pretty much gave me a good shell of a program. Didn't really have to refer to any other documentation. It's often good at finding ways to do obscure things. Quite often I find it most useful with TSQL stuff, not so much for basic queries, but there's lots of inbuilt toys I've just never come across nor care to spend the time researching. I can't see how it would replace a junior developer though. If anything, it makes it easier for junior developers to get up to speed.
Today I got chatgpt to generate a basic TCP server template in C for an app I'm working on. If I didn't have AI, I probably would have searched for a GitHub gist and there would have probably been a more accurate template.
I do Mac/iOS development and am constantly asking ChatGPT about various APIs and frameworks. Apple's documentation is not great for explaining how to actually use APIs, unless you can find the one WWDC video that explains it or a sample project that they released years ago. I would normally google for sample code, blog posts, tutorials, or Stack Overflow posts. Something that might take an hour of searching and reading now takes a few seconds of just asking ChatGPT.
Even for things that I've done before, it's often much easier to ask ChatGPT how to do something than to look through my projects to find how I did it previously. It might sound lazy, but if it takes me several minutes to search through various projects to find that one time I did something, why bother when I can just ask ChatGPT and know in seconds?
I will say that yes, ChatGPT can hallucinate APIs that don't exist, and that can be annoying, but even if it does it 20% of the time, it's still incredibly valuable in the time savings the other 80% of the time it does hit.