News for hackers. Stuff that matters.
Re:Bard coding update with Colab exporting by bg24 on Friday April 21, 2023 @02:15PM (#35657818)
Tried it and love it. This is still not at par with ChatGPT 3.5. I use ChatGPT all the time, and will increase use of Bard from now.

Good that Bard is aware of latest version of software (eg. NextJS). Helps when APIs of a software evolves quickly.

I use a lot of Google products and really hope that they manage to nail it as at least #2 player in the space. As a company, they have not proven to come back and take the lead from behind.

Re:Bard coding update with Colab exporting by r3trohack3r on Friday April 21, 2023 @02:32PM (#35658021)
GPT-4 has a lot of problems with recent versions of APIs. Working with Cloudflare workers was initially painful because of the dated code it would generate. The code would be valid, it just didn't work with the initial scaffolding wrangler generated.

I've found copying and pasting chunks of the API context into the prompt solves 99% of it. I'm now able to get it to generate modern workers just fine. You can copy an example method signature, some docs, etc. and it picks up on that fairly reliably. I've even just copy-and-pasted an entire worker implementation (100+ LoC) at the beginning of a prompt and that worked.

Re:Bard coding update with Colab exporting by bg24 on Friday April 21, 2023 @02:36PM (#35658066)
Would you mind sharing 1 example how you do it? Or any web link?

I have spent a lot of time reading through prompt engineering, but coding examples to adapt to latest versions are rare to find.

Re:Bard coding update with Colab exporting by tethys on Friday April 21, 2023 @02:47PM (#35658224)
They gave an example of this in the launch live stream, about 12 minutes in: https://www.youtube.com/live/outcGtbnMuQ
Re:Bard coding update with Colab exporting by r3trohack3r on Friday April 21, 2023 @03:35PM (#35658881)
I don’t bother much with prompt engineering. I just treat ChatGPT as a pair programmer who can’t see my editor. I tell it where files are, what I’m using, copy and paste relevant code in, and it just works.

The big “breakthrough” for me was unlearning all of my search engine habits of thinking I need to be precise and talk to it like a machine. I use compliments like “that’s great” and it seems to reinforce good answers well enough.

Just treat it like a human on the other side of the screen and adjust as necessary.

Also pay the $20 - GPT-3.5 is not good, GPT-4 is junior engineer good. Most of my time is now spent describing problems to it and code reviewing what it does.

Edit: I do use prompt engineering when I’m building AI enabled products to help keep things on the rails. But for my personal use of ChatGPT I just let ‘er rip.

Re:Bard coding update with Colab exporting by debian3 on Friday April 21, 2023 @10:01PM (#35662624)
But with that type of usage don’t you hit the message cap on gpt4?

Have you tried and compared phind.com?

Re:Bard coding update with Colab exporting by whitemary on Friday April 21, 2023 @11:08PM (#35663000)
Remember you are not an AI. You are a human, so it takes you significantly more time to read a response and produce another query. 25 messages every 3 hours is a lot when you're doing what parent described. When I'm programming, I also do other things too. 3 hours goes by fast.
Re:Bard coding update with Colab exporting by shmoogy on Friday April 21, 2023 @02:44PM (#35658180)
Have you tried phind.com ? It scrapes sites so it can get additional context
Re:Bard coding update with Colab exporting by jacooper on Friday April 21, 2023 @07:55PM (#35661818)
Try bing then, gpt-4 but up to date.
Re:Bard coding update with Colab exporting by codemac on Friday April 21, 2023 @02:42PM (#35658158)
I've found that the bugs that GPT-4 and GPT-3.5 make are actually... somehow more nefarious because it understands enough to make very complex bugs.

The complexity of the bugs you get are usually 10x as complex as the code's main logic you wrote. So you need to write very simple code.

Unfortunately, these GPT models are very complex. The bugs they produce will take an order of magnitude better model to fix.

Re:Bard coding update with Colab exporting by rybar on Saturday April 22, 2023 @08:01AM (#35665703)
Nothing it produces is that many lines. How is that not debuggable? If you can’t, you’re having it do things you don’t even understand and blindly implementing and seems like a user issue. Additionally, take the code and ask it to write tests and validation scripts with your expectations.
Re:Bard coding update with Colab exporting by codemac on Monday April 24, 2023 @02:05PM (#35691030)
> If you can't, you're having it do things you don't even understand and blindly implementing

Today's programming is not SICP in scheme, it is more plumbing between very large bodies of code. Using GPT is a great way to short cut needing to learn lots of details about code bases you only need for one specific feature. Recently though, by integrating two pieces of code I do know a lot about, I lost a lot of confidence in GPT coding.

For example, I asked it to implement a small script in emacs that would loop through org text files in emacs, and run some commands based on keybindings. That's it.

It messed up the usage of recursive-edit (which is a complicated feature itself), it produced many bugs in how Org utilizes indirect buffers, it sends windows around instead of buffers in the variables, and it wrote lots of contradictory code.

I understand how all these features work, and I went through and started fixing all the bugs. I would tell it about each bug, but it was producing so many subtle bugs with org-mode, inventing functions that didn't exist and it couldn't define... I gave up and just re-implemented it myself.

So no, I do not understand 100% of all code I refer to when I write code, that's why APIs actually exist.

Re:Bard coding update with Colab exporting by bamboozled on Saturday April 22, 2023 @07:49AM (#35665600)
Good that Bard is aware of latest version of software (eg. NextJS). Helps when APIs of a software evolves quickly.

This alone will help Google destroy the competition.