by CityOfThrowaway on 3/16/24, 3:14 PM with 49 comments
It feels like so much has changed in the last 18 months and I feel like I'm behind the curve.
I love software engineering and have been somewhat hesitant to use these new tools. But I am now committed to becoming an expert on using AI in my development workflow.
What are the tips you would give to somebody who is trying to figure this stuff out for the first time?
I have Copilot installed. Are there other tools that are making a big difference? Any particular workflows that make these tools most effective? Etc. I'm open to hearing everything!
Thank you all!
EDIT: So many amazing answers. One thing I'm curious about... if you can, I would love to see example transcripts from ChatGPT. Obviously many won't be able to be shared, but hopefully somebody has something that can!
by throwaway74432 on 3/16/24, 4:28 PM
I also feel like this generation of senior/staff SWEs (the senior pre-AI engineer) is in a very unique position for the following reason: we know what the correct code should look like, because we've written it ourselves many times, and we know how to review and modify it quickly. I don't think new SWEs will have that same ability. At the same time, that ability may not be required in the future as AI gets better and better at following instructions correctly.
AI's future in coding is uncertain. I think there is a new unrealized engineering platform on the horizon that can only be realized through a very small and focused group of architects using AI (maybe even 1 person), and that this new platform, which is focused on complexity management and system evolution, will change how we "code" completely, at the same time resetting AI's copilot utility in this new world.
by Strom on 3/16/24, 5:10 PM
For code, I use it rarely. Mostly for small snippets, like shell scripts or SQL queries. It makes too many mistakes when dealing with bigger problem spaces and validating its work takes so much effort that I might as well write the code myself.
Overall I think it has a significant positive impact on saving me time, even though I still write almost all of the code myself. That's because writing code has never been a significant time chunk of my work. Figuring out what exactly to write is the hard part. Once you can describe it in detail, the actual mechanical act of converting it from English to a programming language is rather trivial.
by BewareTheYiga on 3/16/24, 4:20 PM
by Zambyte on 3/16/24, 4:29 PM
I use the language models conversationally as a supplement to, and interface to documentation. Things like high level design questions. I also use it to parse through error logs that I don't understand. Sometimes it can point me in the right direction faster than doing web searches for random snippets in the log. My actual code generation is fairly minimal. At most I usually just ask it for an example to convey an idea in some language, and then I adapt the example to meet my needs.
by abroadwin on 3/16/24, 4:32 PM
2) Mechanical operations (e.g. translate this SQL query into a knex query)
3) Code review, verification of modern idiomatic approaches in languages I use infrequently
by Ashken on 3/16/24, 3:27 PM
When it comes to pure code, ChatGPT will deceive you. I’m at the point now where I’m very hesitant to copy and paste ChatGPT code. I’ll have to completely vet it first, or it’ll have to literally just be a line or two. And even then I’ll likely have to refactor it. ChatGPT is just wrong too often when it comes to the actual code either due to lack of context about the problem or just downright hallucinations. It’s even gotten some boilerplate wrong.
When it comes to Copilot, I honestly haven’t been able to quantify how beneficial it’s been for me. I’ve often had to delete or modify its code. I think it could partially be because I’m not as skilled with it. It could also be that I’ve just had to write a lot of JS lately, and there’s probably a ton of bad JS that it’s been trained on. I remember being more impressed with it when I write Rust. But I’m also new with Rust. I need to try it with something like C#, which has more difficultly than JS but I’m also proficient with it.
All in all, AI tools for me have been just that, tools I can use to help me get the job done.
by al_borland on 3/16/24, 8:12 PM
I have Copilot installed, but don't really use it much. I had to disable the auto-complete, because it uses tab to accept, which made it impossible to simply use the tab key... you know, to indent my code. The idea that I would need to hit escape every time I wanted to press tab was stupid. Accepting a suggestion should require a modifier key, and there didn't seem to be a setting to change this. Therefore, I only use Copilot when I explicitly invoke it, which is almost never. (If someone knows how to make this better, I'm all ears)
by onion2k on 3/16/24, 4:30 PM
by wrs on 3/16/24, 5:00 PM
It’s good for “rubber duck” debugging when things don’t work. I just give a brief description of what I’m trying to do, and paste in some code with an error message or some log entries, and it’s pretty great at pointing to the problem and suggesting a fix.
Since its capabilities are opaque, I constantly try new things. Yesterday I asked it “what was the earliest version of sass-loader that supported the quietDeps option” and it actually answered the question, with a citation. That saved a lot of time!
There was a cookie error that showed up as a pop up in the Chrome devtools. I couldn’t copy and paste the error from the pop-up, but I took a screenshot of it and pasted that into a chat. ChatGPT read it and gave me a little tutorial on the SameSite cookie setting.
It seems to be getting a little bit more introspective lately. Last week I asked it about something, and it described a solution, then apologized and said that wouldn’t actually work, and gave a different answer. I mean all of that happened in one answer, not because I prompted it. Then I asked for clarification, and it apologized again and said the original solution would work. (It wouldn’t).
by mellosouls on 3/16/24, 4:25 PM
I also use copilot/chat in VSCode and have used GitHub copilot in the terminal in the past.
But really nothing above is as useful as ChatGPT.
Apparently Claude 3 Opus is it's first serious competitor, I haven't tried it.
Ignore negative feedback on ChatGPT from anybody who hasn't used the paid version, free stuff isn't the same.
by rekoros on 3/16/24, 4:36 PM
The two areas where it's been particularly helpful:
- Tricky Postgres queries - it essentially explains the pretty dry docs to you like you're five
- Partially because I use nvim without intellisense (made the switch after 23 years of vim last year!) - occasional TypeScript type issues
by pabe on 3/17/24, 7:31 AM
Cursor is great for diving into third party codebases as it can read your whole project if you tell it to. So, let's say you're in some frontend file and don't understand why it behaves weird, it can point you to a different file (e.g. "Hey, there's a global CSS file that has an impact here!"). I hope Jetbrains will catch up, soon.
Jetbrains mainly differentiates from ChatGPT through their IDE integration. You can select code and ask it to refactor, find issues or chat about it. It proposes Git commit messages.
When I feel lazy, I use AI to create simple functions, e.g. "write a function that recursively reads all files in a given directory and returns all file names containing a given string". But most of the time it's more about dealing with existing code than implementing something new.
by etothet on 3/16/24, 4:23 PM
I have briefly tried it in my IDE, but so for I don’t like the experience of any of the plugins. They feel a bit awkward to me in their current state. But, I know other devs who love the integration directly in their IDE.
by Difwif on 3/16/24, 4:32 PM
Design - ChatGPT
Major features - Aider
Fixups - GitHub Copilot
I'm thinking about forking Aider because I think it could easily handle the design portion if I had more control of how it applied diffs. Right now it decides when it applies diffs in chat and sometimes you want to go back and forth before it starts to wreck a file without enough requirements.
by standeven on 3/16/24, 4:26 PM
“I’m going to give you a list of 50 variables and I want you to format them into functions like this:”
It’s faster and easier than writing a script to do it.
by dakom on 3/16/24, 4:39 PM
by vander_elst on 3/16/24, 4:39 PM
by corytheboyd on 3/16/24, 4:34 PM
by hafley66 on 3/16/24, 4:33 PM
For example, making both redux and react-query drop in replacements using just rxjs.
I learned a great deal from these. I'm not going to use them but now I understand rxjs way more
by can16358p on 3/16/24, 4:26 PM
In some sense, it's a bit like pair programming... with a partner available 7/24 and responding immediately.
by ramesh31 on 3/16/24, 4:50 PM
by the_arun on 3/16/24, 4:48 PM
However, not using ai today. Mainly because, I am running legacy ucode.
by chc4 on 3/16/24, 4:50 PM
by jasfi on 3/16/24, 4:38 PM
by shambu2k on 3/16/24, 4:22 PM
by FrustratedMonky on 3/16/24, 4:27 PM
by hu3 on 3/16/24, 4:20 PM
ChatGPT to find fixes for weird errors.
Copilot to autocomplete code.
I feel guilty for not using paid ChatGPT subscription more.
by Havoc on 3/16/24, 4:26 PM