DEV Community

Cover image for How can I use AI to help me code?
OpenSource for WebCrumbs

Posted on • Updated on

How can I use AI to help me code?

GitHub Repo: https://github.com/webcrumbs-community/webcrumbs

I’m trying to gather useful tips.
Thanks for helping!

Edit:


Support us! 🙏⭐️

By the way, I'm part of the WebCrumbs team, and it would mean a lot if you could check out our no-code solution for Node.js that simplifies web development. Giving us a star would be fantastic.

We're putting in a ton of effort to help devs take their ideas to a live website as quickly and easily as possible (think: effortless plugin and theme integration), and every bit of support is truly appreciated!

⭐️ Give WebCrumbs a Star! ⭐️

Top comments (48)

Collapse
 
sreno77 profile image
Scott Reno

I use GitHub Copilot in my IDE. it saves a lot of time and it's eerily close to what I'm wanting most of the time.

Collapse
 
lazysherwin profile image
LazySherwin

is it free ?

Collapse
 
best_codes profile image
Best Codes

No, GitHub copilot is not free. You can get a 30 day trial, though.

Collapse
 
opensourcee profile image
OpenSource

If I had to chose between paying the pro account of ChatGPT or GitHub Copilot, I’d go with the first, because you can do everything GitHub copilot does (less immediate, but still) and more.

Thread Thread
 
opensourcee profile image
OpenSource

But it’s better to have both: GitHub copilot feels like magic sometimes. You’ll still have to know what you want to accomplish piece by piece, but it saves a lot of time.

Thread Thread
 
donghoon759 profile image
Donghoon Song

I thknk choosing GitHub Copilot is better option. Because it reads the codes on your IDE. You don't need to provide code base and it automatically suggests codes when you are coding. ChatGPT is more passive.

Thread Thread
 
atheror profile image
Atheror

With OpenAI API Key, you can use ChatGPT like copilot and it's a lot cheaper.. well it depends of usage. There are Plugins extensions to use this api key like CodeGPT Chat, Continue or Genie in VSCode. I have tried Copilot and there is no difference.

Collapse
 
cixing profile image
cixing

Me too ,bro.

Collapse
 
opensourcee profile image
OpenSource

I tried GitHub copilot and I like it for its autocompletion, but ChatGPT is still better. Do you agree?

Collapse
 
best_codes profile image
Best Codes • Edited

Have you tried codeium in VS Code? It has an in IDE chat.

codeium.com/

Image description
It uses Chat GPT-4 if you can get early access like me. It helped me build my website.

Collapse
 
opensourcee profile image
OpenSource

Seems like the best of both worlds. I’ll give it a try! Thanks!

Thread Thread
 
best_codes profile image
Best Codes

No problem! It's really easy to use! As you can see by my profile, I'm a fan. You have to get early access to the GPT-4 chat, but that other one is pretty good, it autocompletes, writes JS docs, refactors functions, has an in code editor, and much more:

Image description

Plus, it is free, which is awesome. I hope you enjoy it! Good luck with your coding!

Collapse
 
miketalbot profile image
Mike Talbot ⭐

I hate the autocompletion, it's like having an adhd junior developer constantly talking in your ear while you are trying to think. It damages my ability to be creative, when I pair with people I have to get them to turn it off lol.

Collapse
 
opensourcee profile image
OpenSource

It does sound like someone trying to complete your thoughts while you speak.

Thread Thread
 
miketalbot profile image
Mike Talbot ⭐

Yeah that's it, like someone trying to pre-empt you and sometimes just totally getting it wrong by jumping in too early :)

Thread Thread
 
opensourcee profile image
OpenSource

Image description

Collapse
 
hardik242 profile image
Hardik Goel

True said, I used Codeium AI for building websites for my personal projects that are complex and uses APIs to work on and I can say that it's auto completion really hinders my ability to think and write logic for the code. Few times when I used it I don't think about logic and just make it write the code which at first I am looking it but after some time when I give it a think I got to know that it reduced my ability to think logically and write the code. After that I wrote my code in my own without any help at any AI, yes it takes time to write, but it's worth taking time.

Collapse
 
best_codes profile image
Best Codes

Yeah. :D

Collapse
 
mathcpimenta profile image
Matheus

I think that today the simplest and most functional way would be to use Copilot with VS Code. What is also worthwhile if "evolving" is also a concern at the moment is to write the code before asking for a solution and/or help and then ask how to improve readability, performance, quality and the like. That way he'll end up helping to enrich your range of knowledge.

Collapse
 
best_codes profile image
Best Codes

Probably so, but it isn't free, which makes it not be an option for me.

Collapse
 
evanmarshalldev profile image
Evan Marshall

It's free with a student account...

Thread Thread
 
best_codes profile image
Best Codes

I'm not a student, though. :(

Thread Thread
 
evanmarshalldev profile image
Evan Marshall

There is that...

Thread Thread
 
best_codes profile image
Best Codes

:D I've heard that it's a pretty good extension, though. I wish I could use it.

Collapse
 
b1ek profile image
Alice 🌈

I've used some AI tools, and they have proven to be quite useless to me. Seriously, its not capable of building an entire app from a prompt, the only thing it can do is make some rather simple code snippets (which are easier to write manually than asking an AI to do it)

Collapse
 
opensourcee profile image
OpenSource

You’re right, it doesn’t deal well with end to end solutions. You still have to ask it piece by piece. It may also be the version you’re using. For example, ChatGPT 4 is way better than the 3. It can be really useful

Collapse
 
best_codes profile image
Best Codes

What language / frameworks are we talking here @opensourcee ?

Collapse
 
opensourcee profile image
OpenSource

React with Node, or React family

Collapse
 
best_codes profile image
Best Codes

Ah, I see. You can always use Codeium (Free!!) as I mentioned before for nearly any coding language. As for my favorite AI coding tool of all time that is slightly related, that would be MAGE:

usemage.ai/

It's awesome!! It basically makes a whole web app for you. (Wasp, React, Node.js, & Prisma). You can always use free online AI chatbots, like my unlimited one at:
best-codes.zapier.app/
Or one of the many others available.

Still, nothing beats learning a lot of the language yourself — AIs are very experimental, have frequent 'hallucinations', and are the subject of much controversy. (You do learn quite a bit from watching an AI code, though, as it explains what it is doing.)

So, there's my two cents.

Thread Thread
 
opensourcee profile image
OpenSource

I agree! Nothing replace knowing the language, or you’ll end up with spaghetti code almost impossible to debug in the long term. Thanks for the references. I didn’t know them. Seem interesting

Thread Thread
 
best_codes profile image
Best Codes

No problem! Best of luck!

Collapse
 
opensourcee profile image
OpenSource

Today I read this post. Haven’t tried yet, but sounds promising. It’s about using AI to translate code from one language to another.

Collapse
 
sattineez profile image
Sattineez_SSC • Edited

Integrated on vs code (extension) I'm between Phind and CodiumAi.
Although DeepSeekCode, the old and the new Mistral (8x7B) are not integrated and you need to do the "back and forward", if I don't the output with the extensions, I use this 2.
I "waste" a bit of time but I rather prefer to have options than to stick with and output that I don't like 😅

//Nothing against other llms, it's just my opinion

Collapse
 
sadique profile image
Sadique Mannan

Use prompts properly and you will get to know how smart is ChatGpt

Collapse
 
opensourcee profile image
OpenSource

Yes, definitely. ChatGPT 4 changes everything. Do you have any tips on prompts?

Collapse
 
sadique profile image
Sadique Mannan

Every individual has their way of interpreting and solving the problem. Just dig into it and use your smart brain.

Collapse
 
shanif profile image
Shani Fedida

Some tasks I have is to copy existing endpoint across all layers and the tests of course, and change the signature, names and types. For example bulkUpdateEntityX and i need to create bulkUpdateEntityY.
Can one of the AI tools help me with that?

Collapse
 
opensourcee profile image
OpenSource • Edited

Yes, for sure, @shanif! Try asking exactly what you want to ChatGPT 4 (Pro version). For instance, say:

Get me all the existing (x) in this code and change the signature, 
names and types to (x). I want to create bulkUpdateEntityY.

Base code:
# your bulkUpdateEntityX code here
Enter fullscreen mode Exit fullscreen mode

Or with GitHub copilot you can just write on your vscode a new function after the one you're referring:

# your bulkUpdateEntityX code here
def  bulkUpdateEntityX():
    # ...
    return

# similar function but for bulkUpdateEntityY
def bulkUpdateEntityY # then waits for the autocomplete
Enter fullscreen mode Exit fullscreen mode

Try and trick it until it works!

Collapse
 
1ribeirolucas profile image
Lucas Martins Ribeiro

I use them as my duck, but instead of going silent and staring at me with judgment, it gives me useful answers.

  • I start my prompt with something like "As a senior game developer, explain etc etc etc" or "As a computer scientist, tell me some optimal ways to think about etc etc etc"
  • If the answer does not satisfy me, I change the target of the prompt: "As a computer scientist, explain to a mid-level software engineer the concept blablablabla". Sometimes I even ask it to explain to a five year old, hah.
  • When I need examples, I ask them exactly what I want: "As a backend developer, give me an example of algorithm X in C#, Swift and Ruby".

I tried using them directly inside my coding environment, but it didn't help me much. It has helped me way more when I started using them as a talking rubber duck.

Collapse
 
opensourcee profile image
OpenSource

Interesting prompts! I’ll try them

Collapse
 
kwnaidoo profile image
Kevin Naidoo

As a code generator. For example, I write Nginx configs a thousand times - there's no need for me to waste 10 minutes. So I prompt ChatGPT to just generate this code for me.

The same applies to CRUD and even languages I don't write often, like, for example, I don't normally write C# and I forget stuff, I use the AI to quickly get me up to speed by generating code.

They do hallucinate - so just be aware and review the code generated before use.

Collapse
 
evanmarshalldev profile image
Evan Marshall

github.com/di-sukharev/opencommit

Great if you don't like having to write commit messages!

Collapse
 
opensourcee profile image
OpenSource

Perfect! I wonder if there is someone who likes writing them

Collapse
 
evanmarshalldev profile image
Evan Marshall

I've yet to find anyone

Collapse
 
best_codes profile image
Best Codes

Me too! :D

Collapse
 
trilliuminstitutions profile image
Trillium Institutions

Use correct prompt to leverage ChatGPT

Collapse
 
opensourcee profile image
OpenSource

100%. If you have ideas, I'd love to know

Collapse
 
jackspar profile image
Info Comment hidden by post author - thread only accessible via permalink
jacksparrow

Ah, diving into the AI coding realm? Start with AI-powered code completion tools like OpenAI's Codex or GitHub Copilot. They're wizards at turning your thoughts into lines of code. Remember, they're more like coding companion and inshot for pc download than solo artists, so stay engaged in the process. Happy coding!

Some comments have been hidden by the post's author - find out more