« BackAsk HN: Best AI Code Assistant?undefinedSubmitted by register 2 days ago
  • simonw 2 days ago

    I have yet to find a code assistant that's more generally useful than copying and pasting code back and forth from https://claude.ai and https://chatgpt.com

    I use Copilot in VS Code as a typing assistant, but for the most part I find copy and paste into the chat interfaces is the most valuable way to use LLMs for coding.

    Even more so with the Claude Artifacts feature, which lets me see an interactive prototype of frontend code instantly - and ChatGPT Code Interpreter, which can run, test, debug and rewrite Python snippets for me.

    • aidos 2 days ago

      I’ve been playing around recently trying to do a bit of refactoring work with copy pasting in Claude and using Cursor. This week I tried a task where I had a small script that used jquery (one Ajax call and a bunch of dom manipulations).

      I found that it was pretty easy to get cursor into a place where it had decimated the file and each tab complete suggestion became more and more broken.

      Claude was given the task wholesale and did a reasonable job but introduced a subtle bug by moving a tracking call outside of the Ajax promise and I could not convince it to put it right. It kept apologising and then offering up more incorrect code.

      I’d say that the original result was good enough that I could pretty much take it and fix it, but only because I knew all the code and libraries well enough. It was only about 150 lines of simple code and by the time I’d finished I was joking with the team that I could have spent all the time wrestling vim macros instead and come out about the same.

      What’s your experience been with correctness?

      • simonw 2 days ago

        I treat the LLM like a weird kind of pair-programming partner: I fully expect to have to review everything it writes, and I often prompt it with that in mind - I'll tell it exactly what I want it to write, "write a function that takes X and Y and does Z and returns ..." kind of stuff.

        I've spent so much time with them now that 90% of the time I get back exactly what I needed, because I can predict what prompt will get me the right result.

        • StefanWestfal 2 days ago

          Not op but a similar experience. I used cursor with claud to generate a small bash script to set up a Postgres container, iterate over local migration files, and apply them using psql. The generated code did all correct but called psql from within the container. Even when feeding the errors back in it could not correct the code or identify the bug.

        • padolsey 2 days ago

          I was in in the `concat->copy->[Claude/OAI]->paste` workflow until a few weeks ago. Cursor is a revelation. Nowadays I only very rarely pump things wholesale into Claude[dot]ai when I'm dealing with a massive cross-codebase issue. Otherwise Cursor is my salve.

          • zackproser 2 days ago

            Had the same experience. Cursor ux and also Zed are designed to make copy pasta'ing back and forth obsolete. It's certainly more comfortable to iterate within the IDE, for me.

          • KMnO4 2 days ago

            Have you tried Cursor? It’s the process you describe, minus the manual work of copy/pasting.

            You can just select a block of code, and tell it to (e.g.) “make this function work as a decorator with graceful exception handling” and it will modify your selected code and provide you with a nice diff to apply in one keypress.

            Or you can chat with the LLM directly in VS Code, with every snippet easily applied with a click. It can even catalog your codebase in a vector DB for really easy RAG:

            “Create a view that allows premium users to view their billing history”

            “Okay, I’ve found a function called get_premium_status in auth/user_profile.py. I’ll use that to create api/user/billing_history.py”

            (Which then shows the code it will add or change, separated by file, with the option to apply the change)

            • flashgordon 2 days ago

              Interesting you mention this. I actually first started with cursor (ok copy pasta from gpt4 doesn't count). It blew my mind away (may it felt this way due to co mparison with gpt). The cmd-k was awesome.

              Then when I tried plain Claude the delta felt way way too small for me. The eng in me kicked in and I started hacking away on continue.dev + claude3 and the delta was very very little. Plus I could bring in more functionality with extra visibility in my own hacks the way I wanted it (macros) which I couldn't with cursor.

            • paradite a day ago

              I also use this simple workflow. However, copy-pasting can get tedious after a while.

              So I built a small tool to streamline this copy-paste process and manage source code context to include in the prompt: https://prompt.16x.engineer/

              • Vanclief 2 days ago

                That used to be my flow, but I just added Avante to my Neovim and it has been a awesome for working with a single file.

                If I need to do something more high level or that requires multiple files I still copy and paste to Claude / ChatGPT.

                https://github.com/yetone/avante.nvim

                • screye 2 days ago

                  Seconded.

                  Would recommend using a tool to save your codebase as an upload-able file.

                  Parent comment (simonw) has written a tool. I use another called ai-digest. Pick any one. It solves the 'my model doesn't understand my codebase' problem.

                • dtquad 2 days ago

                  It's also useful as a solution architect. Claude Artifact can do non-trivial sequence diagrams and state machines.

                  • smusamashah 2 days ago

                    Using a chat api client like webchat or betterchat are way more cost efficient than Claude.ai. I use https://web.chatboxai.app/ these days but wish it had some features from betterchat.

                  • padolsey 2 days ago

                    Cursor is incredible. You can use whatever model you like. Give it your openAI key if you want o1-preview. Using it with Claude Sonnet is usually enough though. I use it everyday and it makes it possible to work between dependencies and it can create and edit files on the fly -- pending your approval of git-vibe diffs it presents to you. I've been programming 19 years and it's honestly a life-changer.

                    • elpocko 2 days ago

                      They took open source code and made a closed source, subscription-only product from it with no support for open/free/self-hosted models. No thanks, I'm not gonna support that.

                      • Alifatisk a day ago

                        But vscode isn't open-source? It's open-core I believe. I remember trying vscodium but not everything was there that I had on vscode, and that mainly stem from extensions relying on the proprietary parts of vscode.

                        • elpocko a day ago
                          • Alifatisk a day ago

                            MIT license makes it open-source? As far as I know, you can't get vscode up and running from that repo. It requires some proprietary parts too.

                            Even the language server is proprietary, though the protocol is open.

                            I think open-core is better label.

                            • elpocko a day ago

                              Yes, an open source license makes a project open source.

                              Cursor took the code and modified it for their product, so it's at least open enough to be able to do that.

                        • padolsey 2 days ago

                          Umm it does have support for open/free/self-hosted models through either openrouter or by changing the oai endpoint (as long as you've got an openai compatible endpoint which is usually the case).

                        • prophesi 2 days ago

                          I would switch to Cursor if you could bring your own keys. Products with LLM's these days are costly subscriptions to cover running OpenAI / Anthropic inferences when they could instead give the option for the end user to take on that cost themselves, and from there I can check my own OpenAI / Anthropic console to see if it's worth it.

                          • dtquad 2 days ago

                                >Give it your openAI key if you want o1-preview.
                            
                            o1 sounds slow and expensive for the usual AI conversational coding and autocomplete stuff. But it might be the right model for scaffolding of new projects and do non-trivial refactoring s of existing projects.

                            Does Cursor support setting different models for different tasks?

                            • andix 2 days ago

                              Is cursors performance different to aider?

                              • padolsey 2 days ago

                                Cursor is a fully fledged fork of VSCode so IMHO it's in a different ballpark to Aider/Claude-Engineer/etc. Its LLM assistance is baked in to the IDE. Feels really comfortable. I switched over from SublimeText after a decade.

                                • andix 2 days ago

                                  Okay, but is the code it creates any better?

                                  • wellthisisgreat 2 days ago

                                    Wow you got me with Sublime

                                  • Alifatisk a day ago

                                    It feels more responsive compared to vscode, but I cannot say that is the case.

                                  • joshstrange 2 days ago

                                    Custom IDE is a non-starter.

                                  • ctoth 2 days ago

                                    I've had lots of luck with Aider, and it continues to get better. Another cool thing about Aider is that it is mostly written with itself[0], and so it's an example of a flywheel just as was predicted.

                                    [0]: https://aider.chat/HISTORY.html

                                    • wkirby 2 days ago

                                      I’ve yet to find any LLM that adds value instead of noise. Even the boilerplate you’d hope it could knock out easily is often subtly wrong or outdated.

                                      • andix 2 days ago

                                        Exactly my experience. Fails on the most basic tasks by introducing subtle bugs. It feels like you're passing tasks to that one junior developer that copy&pastes something from stack overflow instead of solving the problem.

                                        • simonbarker87 2 days ago

                                          I find that if I explain what I want and if I were speaking to a first day on the job junior then it produces code like that of a mid career dev.

                                          As always, the requirements planning and communication is the hardest part of coding.

                                          • andix 2 days ago

                                            If you exactly know what you need and describe it like that, sure the LLM can make code out of words.

                                            This is very different to my workflow though. Most of the time I don’t really know how the code will look like in the end, it’s a process of trial and error until I have a good solution. I know what to do on a high level, but often I need to read a lot of documentation to find the correct apis and so on.

                                        • jitl 2 days ago

                                          Cursor’s model of select text -> cmd+k -> type instructions -> enter makes it quite versatile and useful for lower level transformations that I’m previously use vim regex find/replace to do. It’s also great for pretty formatting table layouts strings and such; kind of stylistic changes that not even regex helps with. Those use cases it gets right all the time, but they aren’t worth doing if it involves several steps copy-pasting code from your editor to the LLM app/page, so that’s why Cursor really shines.

                                          • wkirby 2 days ago

                                            I just can't bring myself to expend the resources that a modern LLM requires for something 10% better than the LSP refactor commands.

                                            • jitl a day ago

                                              I think this task could easily be handled by an on device quantized model, I’m sure these companies will start thinking about their costs, right? (Maybe not though)

                                        • mistercow 2 days ago

                                          Copilot’s main thing is to be autocomplete on steroids, so I’m not sure what exactly you’re looking for. Cursor’s Copilot++ is able to make more complex edits, which is good in boilerplate heavy situations, but it’s not as good at inline completions. I use a combination, flipping copilot++ on only when I’m doing rote migrations and refactors.

                                          If you’re looking for “type in some English text and get fifty lines of code written”, Cursor’s chat is the best I’ve tried. But I’m not a fan of that workflow, so take my opinion with a grain of salt on that.

                                          • ChicagoDave 2 days ago

                                            I’ve been working on a complex game engine in C# 8 using Claude 3.5. I’m using Visual Studio so copying artifacts from Claude to VS, then replacing uploads in Claude is a bit of a chore, but does provide good results.

                                            There are definitely instances where Claude can’t solve a problem and I have to hand write the code and explain it.

                                            It definitely gets confused with designing multiple modules together.

                                            But there are times when it’s simply brilliant. I needed a specific inheritance pattern and Claude introduced the curious recurring template pattern, which had escaped my career. It’s not something I’d use in business code, but in this use case it was perfect.

                                            Claude also helped me build a bi-directional graph to host my game world.

                                            And Claude is phenomenal at unit testing whole projects, allowing me to find design flaws very fast.

                                            My overall experience is that if you know what you’re building, GenAI can be extremely powerful, but if you don’t, I could see both good and bad results coming out.

                                            The lessor experienced developer using it won’t know when it should direct the process in a certain direction and more senior developers will.

                                            • bearjaws 2 days ago

                                              https://aider.chat/

                                              Only uses CLI, so you have two contexts you work in. One is you manually writing code just like you are used to. The other is a specific context of files that you inform the LLM you are working on.

                                              By creating a separate context, you get much better results when you keep the tasks small.

                                              Specifically use it with claude 3.5 sonnet

                                              • tetha 2 days ago

                                                Hm, are other AI Assistants much more than just a bit fancier autocomplete?

                                                We're using CoPilot at work. When we were evaluating this, the question we asked our test group: How much time does it save you per week? And most people arrived at estimations of like 1-4 hours saved a week, especially when banging out new code in a code base with patterns and architecture. This was a good enough tradeoff to buy it.

                                                Like, I recently got a terraform provider going for one of our systems. Copilot was useful to generate the boilerplate code for resources so I just had to fill in the blanks of actual logic. Or you can just hand it sample JSON and it creates go structs for those to use in an API client, and generates the bulk of methods accessing APIs with these. Or it's decent at generating test cases for edge cases.

                                                It doesn't enable me to do things I could not do before, but it saves me a lot of typing.

                                                Well maybe I wouldn't test my functions with all of these edge cases because that's a lot of stuff to do, heh.

                                                • register 2 days ago

                                                  My experience with Copilot's productivity estimates differs significantly from these figures. As someone who rarely consults Stack Overflow, I've found their estimates to be exaggerated. During a recent 2-hour coding session (yesterday), I found Copilot's contributions to be minimal. The only substantial benefit was a single autocomplete suggestion for a unit test, which saved me approximately 5 minutes. While this may seem insignificant, it represents a mere 4% time savings in a focused coding session.Interestingly, I rejected at least 70% of Copilot's suggestions during this session. Most were either obvious or didn't align with my coding style. Your estimates appear to be based on scenarios where developers frequently consult external resources like Stack Overflow. Given that I don't typically seek help from such platforms, these estimates do not reflect my experience at all.

                                                  • vbezhenar 2 days ago

                                                    For me Copilot saves a sizeable chunk of coding time. That said, it might be because of my style. I often prefer writing repetitive dumb code, so Copilot fits perfectly, auto-completing obvious code which still must be written. Before Copilot I often used things like vim macroses, regex search&replace, multiple cursors and so on, but of course they take more time that hitting "<Tab>". At the same time Copilot is very smart at getting patterns and in my experience absolutely reliable, it never makes simple things wrong.

                                                    Also I can note, that some languages are just naturally fit for Copilot, one of them is Go with its constant `if err != nil` incantations.

                                                • thenipper 2 days ago

                                                  I really like Sourecgraphs Cody. It’s got diffing like Cursor. You can choose models, chat etc. plus it’s only 8 bucks a month

                                                  • dsissitka 2 days ago

                                                    Me too.

                                                    My only nit is they override common keyboard shortcuts in IntelliJ and VS Code. Like Alt + Enter in IntelliJ.

                                                  • longgamma2 17 hours ago

                                                    Just copy paste in sonnet for now. But I am having mixed feelings about AI assistants. Yesterday, I was dabbling in a pytorch pipeline to locally train a convnet for a Kaggle contest. I asked sonnet to write the dataset class and it did, but I took the effort to read pytorch documentation. Its quite well written and explains the design choices very well. Took me two hours to digest all of that and apply it on my own, but idk it felt better to learn it on my own.

                                                    • georg-stone 2 days ago

                                                      Supermaven seems to be a good option. It's extremely fast and has a decent free tier. I personally use the free tier, and it's okay.

                                                      • M4v3R 2 days ago

                                                        If you like the free tier, you will love the pro tier. I know it will sound like I’m shilling, but at times it literally feels like it reads my mind, especially when I’m doing something that requires changes across multiple files. Once I do the first change and switch to the next file often Supermaven will already suggest the exact code change that I wanted to make myself. It’s well worth the price.

                                                      • makk 2 days ago

                                                        I’m using the private beta of Solver by Laredo labs. It’s very early. That said, having tried Cody, cursor, copy/paste chatgpt… Solver is far and away the best.

                                                        It’s a straight up pair programmer. Point it at your GitHub repository and then just converse with it. It drives, you look over its shoulder. imagine OpenAI GPT o1 that connects to your GitHub repo and produces diffs or PRs on command, and a chat gpt view with tabs for switching between the conversation and the diff.

                                                        Also, for front end, there is v0.dev — which is great for whipping stuff together.

                                                        • uptownfunk a day ago

                                                          Most of these comments are just cursor folks selling the product

                                                          • wruza a day ago

                                                            I would like to join to the question by extending it (somewhat shamelessly). Do coding assisants already exist that only comment on your code in another window instead of writing it? Something like:

                                                              fs.promises.readFile(in_fi|
                                                            
                                                              You probably want 'utf-8' as a second parameter here, cause from the context I infer it’s a text file. 
                                                              Also, I see there’s a stream set up above. You can simply pipe a file stream to it, if that’s why you’re reading it: <link>
                                                            
                                                            Is there something like this?
                                                            • dgosling56 a day ago

                                                              I'll use cursor for direct coding assistance when working with an existing codebase. If I'm writing something new from scratch (especially frontend), I'll use Claude artifacts / ChatGpt canvas. If I'm browsing docs online for something, I'll use https://rockyai.me/ to quickly find the content I need.

                                                              • smukherjee19 2 days ago

                                                                I personally don't use any AI Code Assistant, but I did find the below video a level-headed and nice analysis of the subject, where the author uses 4 different AIs to build an HTTP server in Python.

                                                                Kinda different from your specific use case, but should give some hints on which one would serve you best, and is an interesting watch:

                                                                https://www.youtube.com/watch?v=-ONQvxqLXqE

                                                                • yoduhvegas 2 days ago

                                                                  i like zed, which uses claude 3.5 sonnet.

                                                                  i had cursor then ran out of free credit. i had github copilot then found it too expensive.

                                                                  given i'm a software engineer i'm basically looking for free. a.i. is like the t-shirt of the digital world, as in, i don't care where it comes from, just give me a free one when i use your product.

                                                                  • Alifatisk a day ago

                                                                    The problem I had with Zed is that it does not offer the needed extensions like Java Task Runner. It doesn't offer anything at all except code completion and syntax highlight in my experience.

                                                                    It's very fast though.

                                                                  • djeastm 2 days ago

                                                                    Are the authors of the code assistants using those assistants to write the code assistant's code?

                                                                    • maille 2 days ago

                                                                      I find Codeium on PyCharm very powerful. Too bad their plugin for MSVC is so limited in comparison.

                                                                      • Ancapistani 2 days ago

                                                                        I’m using Codeium as well. It’s great for coding, but also shines when writing prose.

                                                                        I use Neovim, and it’s unfortunate that the plugin isn’t quite as full-featured as their plugins for other editors (e.g. VSCode). It works great for completions, but the “chat” functionality opens in a browser.

                                                                        Still, it’s well worth the license cost. The completions I get from it save a ton of time, and are often much longer than what I’d get from my normal LSP - and more importantly, they’re generally “correct”.

                                                                      • tikkun 2 days ago

                                                                        I polled my friends and there were two major themes:

                                                                        1) Claude/ChatGPT (copy and pasting back and forth)

                                                                        2) Cursor

                                                                        • mergisi 2 days ago

                                                                          If Copilot felt underwhelming, try Cursor or Claude both are great for backend languages. They handle more complex logic and boilerplate better than simple autocomplete. Also, check out AI2sql https://ai2sql.io/ if you work with SQL; it's a solid tool for generating complex queries and could save you time on database-related tasks.

                                                                          • qup 2 days ago
                                                                            • redox99 2 days ago

                                                                              I really enjoy Cursor. A bit expensive at 20 USD but still good ROI.

                                                                              • tensor 2 days ago

                                                                                But 40 USD a month is the only tier that doesn't take your code as training data. I'm surprised at how many people are ok with that.

                                                                                • kjhughes 2 days ago

                                                                                  I don't think that's correct. They prompt for "Privacy mode" (https://www.cursor.com/privacy) during installation even at the free tier (although that may be tied to the Pro two-week trial -- unclear).

                                                                                  You probably got the wrong impression from their pricing plan page (https://www.cursor.com/pricing), which only mentions "Enforce privacy mode org-wide" for their $40/user/month Business tier. The point there is that the Business tier enables employees to be forced to use privacy mode at the organizational level. It doesn't mean that you must purchase the Business tier to enable privacy mode yourself.

                                                                              • ErikBjare a day ago

                                                                                I use my general-purpose gptme CLI, which I really like the simplicity of, gets rid of all the copy-pasting, and works great alongside vim: https://github.com/ErikBjare/gptme

                                                                                • vbezhenar 2 days ago

                                                                                  Related question, does any assistant do continuous code review? I feel that AI could really help with uncovering subtle bugs, but it must be good enough not to bother often with false positives and unrelated issues.

                                                                                  I often submit my code for review to ChatGPT but 99% of issues that it finds make very little sense and 1% of issues usually just wrong, so I'm kind of disappointed, but may be I miss some good prompt or something.

                                                                                  • jamil7 2 days ago

                                                                                    I use aider and claude for some work but I’ve found that the quality varies a huge amount and the fact that I need to closely check it’s output negates some of the productivity gains. Claude in general seems to have gone downhill the last few months, likely as they’re scaling. I’m still, like a lot of us I guess, figuring out what tasks LLMs are actually good for.

                                                                                    • hnrodey 2 days ago

                                                                                      Three options I've tried:

                                                                                      - Copilot using Visual Studio and VS Code

                                                                                      - ChatGPT Plus / Claude, copy/pasting back and forth

                                                                                      - Cursor, free trial and w/ Claude api key

                                                                                      Copilot was like 30/70 good-to-bad. The autocomplete hijacks my mind whereby creating a mental block at my ability to write the next token of code. The suggestions were occasionally amazing, but multiple times it introduced a subtle bug that I missed and later spent hours debugging. Not really a time saver. I quit Copilot just as they were introducing the embedded chat feature so maybe it's got better.

                                                                                      In Visual Studio, I thought Copilot was garbage. The results (compared to using in VS Code) were just awful. The VS extension felt unrefined and lacking.

                                                                                      ChatGPT / Claude - this is a decent way to get AI programming. Multiple times it fixed bugs for me that just simply blew me away with it's ability to understand the code and fix it. Love it's ability to scaffold large chunks of working code so I can then get busy enhancing it for the real stuff. Often, it will suggest code using older version of a framework or API so it's necessary to prompt it with stuff like "For Next.js, use code from v14 and the app router". There is thought required that goes into the prompt to increase chances of getting it right the first time.

                                                                                      Cursor - ah, Cursor. Thus far, my favorite. I went through my free trial and opted into the free plan. The embedded sidebar is nice for AI chat - all of the benefits of using ChatGPT/Claude but keeping me directly in the "IDE". The cost is relatively cheap when hooked to my Claude api key. I like the ability to ask questions about specific lines of code (embedded in the current window), or add multiple files to the chat window to give it more context.

                                                                                      Cursor does a great job at keeping you in the code the entire time so there's less jumping from Cursor to browser and back.

                                                                                      Winner: Cursor

                                                                                      As a C#/Java backend developer, you might not like leaving IntelliJ or Visual Studio to use Cursor or VS Code. Very understandable. In that case, I'd probably stick to using ChatGPT Plus or paid Claude. I suggest the premium versions so for premium uptime access to the services and higher limits for their flagship models.

                                                                                      The free versions might get you by, but expect to be kicked out of them from time to time based on system demand.

                                                                                      • pftg 2 days ago

                                                                                        CodePilot delivers the most effective performance for its cost.

                                                                                        After trying other options like Continue + deepseek-v2, I found that the expense of hosting a bigger local version of LLM is too high to match CodePilot's performance.

                                                                                        Played with Continue + Yi-Coder too - requires a lot of time to clarify requests to generate valid code.

                                                                                        I made the decision to stick with CodePilot.

                                                                                        • muratsu 2 days ago

                                                                                          Auto-complete on steroids sounds like the correct assessment.

                                                                                          Aider & Cursor is worth the try if you're interested in trying out multi-file edits. I think both are interesting (ergonomics-wise) but the current SOTA models do not perform well.

                                                                                          For single file edits or chat, I would recommend Cody (generous free tier) or some self-hosted alternative.

                                                                                          • ssousa666 a day ago

                                                                                            I have been using Codeium's IntelliJ extension for the past nine months and have found it to be very useful.

                                                                                            • yapyap 2 days ago

                                                                                              Github Copilot for me is finez

                                                                                              It is meant to be an autocomplete on steroids-ish feature where you will have to read through all the code it generated because at the end off the day it’s a black box you can’t trust.

                                                                                              But for low intelligence easy tasks it’s generally a fine product.

                                                                                              I feel like most AI coding assistants are though.

                                                                                              • devinsvysh 2 days ago

                                                                                                Found qodo (IntelliJ plug-in)helpful for Java. Haven’t tried it for complex request. Used for personal repo, can see that it’s recommendation useful to avoid PR review churn if you are new to a code base.

                                                                                                (Not affiliated with the company, it was called CodiumAI earlier)

                                                                                                • mlboss 2 days ago

                                                                                                  Cursor. It is so smart. Feels like it understand what I am thinking. The killer feature is it can directly modify the source files and present a diff that you can accept/reject. They are doing cool work on top of VSCode fork.

                                                                                                  • chistev a day ago

                                                                                                    I only use chatgpt, it's good.

                                                                                                    • amelius 2 days ago

                                                                                                      Any open-source (or on premises) assistants that are worth trying?

                                                                                                      • number6 2 days ago

                                                                                                        Wow this thread here reads like a Cursor ad

                                                                                                        • jitl 2 days ago

                                                                                                          It’s good

                                                                                                        • agadius 2 days ago

                                                                                                          ChatGPT has a new canvas mode that allows for editing code. I found it very good. Less copy paste than before

                                                                                                          • Havoc 2 days ago

                                                                                                            Cursor seems to be flavour of the month

                                                                                                            • joshstrange 2 days ago

                                                                                                              Copilot for autocomplete++

                                                                                                              ChatGPT/Claude for larger chunks

                                                                                                              Aider for multi-file edits

                                                                                                              • fzil 2 days ago

                                                                                                                unless I'm doing some basic front-end stuff, i've found that AI code assistants are an absolute waste of time.

                                                                                                                • shahzaibmushtaq 2 days ago

                                                                                                                  For some best AI code assistant is Copilot, for some its others.

                                                                                                                  It depends entirely on the subjective experience because everyone experiences things differently.

                                                                                                                  • 0points 2 days ago

                                                                                                                    > So far, I've tried Copilot, but to say that I'm disappointed is an understatement.

                                                                                                                    Don't expect any other offerings to change your mind. We are years away from AGI or anything generally useful in this area. It's only a matter of time until the rest of the world realizes this and stops the hype.

                                                                                                                    • emmanueloga_ 2 days ago

                                                                                                                      TL;DR: Writing custom scripts may be more effective for communicating with LLMs than using a fancy GUI. Details follow below :-).

                                                                                                                      ----

                                                                                                                      Like many here, I’ve been using both GitHub Copilot on VS Code and copy-pasting from a ChatGPT window.

                                                                                                                      Copilot is super hit or miss. Honestly, it rarely spits out anything useful unless I’m writing really repetitive code, where it might save me a few keystrokes. But even then, I could often just use some "Vim tricks" (like recording a macro or something) and get the same result. The built-in chat is a total waste of time... sigh.

                                                                                                                      ChatGPT has been way more helpful. But even with that, I often feel like it’s just a really fancy rubber duck or a glorified search engine. Still, it's way better than a Google/Bing search sometimes. I’ve been using a prompt someone here shared (maybe this one verbatim? [0] I need to shop for prompts again :-p) and that could be making a difference... I did not A/B test prompts but at least ChatGPT stopped apologizing so much lol.

                                                                                                                      I do want to try Cursor and Zed AI since I’ve heard good things. I also saw a recent post here about layouts.dev [1], and it looks really impressive. I’ve been asking ChatGPT for nice Tailwind CSS patterns, and the workflow in the that tool seems really streamlined and nice for web design (only caveat is... I'm not really interested in NextJS right now #shrug). BTW, nobody ever seems to talk about Gemini? I personally don't reach for it almost ever, for whatever reason...

                                                                                                                      ----

                                                                                                                      Now for the part about scripting your LLM interaction yourself... I’ve been working on a passion project lately, a programming languages database. I stumbled across this cool pattern [2] where I write code that generates data, and that data can then be used to generate more code. (Code is data is code, right?). I used OpenAI's Structured Output [3] and after massaging TypeScript types and JSON Schemas for a while, it generated pretty easy to digest output.

                                                                                                                      The interesting part is that you can use this setup to feed prompts into ChatGPT in a much easier way. Imagine something like this:

                                                                                                                          const code = SelectThingfromCodeBase(); // Not necessarily SQL! Perhaps just concatenating your files as ppl mention here.
                                                                                                                      
                                                                                                                          const answer = sendChatGPT(promptFrom(code));
                                                                                                                      
                                                                                                                          const newCode = generateCodeFrom(answer);
                                                                                                                      
                                                                                                                          profitFrom(newCode); // :-p
                                                                                                                      
                                                                                                                      
                                                                                                                      I think this pattern has a lot of potential, but I need to play around with it more. For now, I’ve got a super crude but working example of how I pulled this off for my little programming languages database (coming soon, hopefully :-p). I did this so me or a contributor can run a script to generate the code for a pull-request to add more data to my project.

                                                                                                                      NOTE: my example isn’t very... "meta" since the data<->code thing doesn't really describe the project itself. To expand on this idea, we might need to dust off some of the old declarative tools like UML or 4GLs or come up with something inspired by those things. If this sounds vague, it’s because it is—but maybe it makes some sense to someone here :-p.

                                                                                                                      ---

                                                                                                                      0: https://www.reddit.com/r/ChatGPTPro/comments/15ffpx3/comment...

                                                                                                                      1: https://news.ycombinator.com/item?id=41785751

                                                                                                                      2: https://github.com/EmmanuelOga/plangs2/blob/main/packages/ai...

                                                                                                                      3: https://platform.openai.com/docs/guides/structured-outputs