Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
epswing
Nov 4, 2003

Soiled Meat

ultrafilter posted:

The "I'm feeling lucky" button can only return results that actually exist. Generative models can produce new content which may or may not be factual.

The "I'm feeling lucky" button often returns results containing content that is not factual.

Adbot
ADBOT LOVES YOU

The Dark Souls of Posters
Nov 4, 2011

Just Post, Kupo
Im going to use ChatGPT for any hackerrank interview challenge.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
These assertions are close to correct but also dangerously wrong. LLMs like GPT-4 are perfectly capable of stepping through and interpreting code. It's wrong to think of them as intelligent, even artificially intelligent, but the "stochastic bullshitting" is also an oversimplification

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Vulture Culture posted:

LLMs like GPT-4 are perfectly capable of stepping through and interpreting code.

No. They can parrot a facsimile of stepping through code because people have stepped through code on the internet before and the LLM can mimic the form of that.

It is not actually reasoning about what the underlying state of the program is and how each line changes that state.

Nybble
Jun 28, 2008

praise chuck, raise heck
speaking of the “leaving sounds like a great decision” title, what’s the best and quickest way to find a lawyer to review a severance agreement?

Aramoro
Jun 1, 2012




Bongo Bill posted:

ChatGPT can paraphrase existing content, including solutions to problems which have already been solved often. That has actual utility as a programming aid, just as long as you don't misunderstand what it's actually doing and assume it can program.

They need to fix the factual inaccuracies. I was seeing if it could generate cryptic crossword clues and it does but they're based massive factual inaccuracies. If you call it out it says oh yes my bad and spouts another load of poo poo.

biceps crimes
Apr 12, 2008


I pasted a few react components to chatGPT and told it to generate some reacting testing library tests for them for me. What it generated was 80% of the way there. I had to fix some busted imports, remove a few cases that weren't necessary, clean up some mocking and add some cases, but it was still better than not having it. I hesitate to recommend it to my coworkers or others in this codebase though, because a lot of them already don't know what they're doing and would just take its results and commit them as long as the build didn't fail. Lacking trust in my coworkers judgment isn't chatGPT's fault though

Cup Runneth Over
Aug 8, 2009

She said life's
Too short to worry
Life's too long to wait
It's too short
Not to love everybody
Life's too long to hate


Aramoro posted:

They need to fix the factual inaccuracies. I was seeing if it could generate cryptic crossword clues and it does but they're based massive factual inaccuracies. If you call it out it says oh yes my bad and spouts another load of poo poo.

That's not possible because the fundamental underlying mechanism by which it operates is just finding the most likely next token in the prompt. Plus its training corpus is chock full of factual inaccuracies. But fundamentally either it spits out a 1:1 copy of text it was trained on or it makes some poo poo up. Making some poo poo up is how the entire thing works.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
March 8:

Nybble posted:

^^ Levels.FYI is mandatory viewing every couple of months, even after being at a company for a few years.

Moved to SF, joined a startup. Startup failed at 11 months in so everyone got laid off, got at least a job that paid 30% more in base pay and finally got a senior in the job title. Moved away from SF while going remote, saw through an IPO, by the time the lockup came the stock options were barely profitable (and at times dipped below strike). Got laid off when they acquired another company. Got a new job with slight bump in pay and a big signing bonus and Staff Engineer in the job title, about a month before a hiring freeze. Hoping that doesn't portend a 3rd layoff, but who knows! That's the fun of this industry!!

April 1:

Nybble posted:

speaking of the “leaving sounds like a great decision” title, what’s the best and quickest way to find a lawyer to review a severance agreement?

That was pretty fast.

Nybble
Jun 28, 2008

praise chuck, raise heck
lol, lmao.

I don’t know if I would have done anything differently at offer time, but all the red flags that popped up soon after turned out to be right. At least the 4 month severance and signing bonus I don’t have to pay back (1.5 year earn out) means I’m gonna be fine. Practically a year’s salary in 6 months, with the downsides of having to interview again. Honestly if I could make insurance happen for my family I’d probably sit out of the market for a bit longer and wait out all this chaos.

Cup Runneth Over
Aug 8, 2009

She said life's
Too short to worry
Life's too long to wait
It's too short
Not to love everybody
Life's too long to hate


prom candy
Dec 16, 2005

Only I may dance
Yesterday I used ChatGPT to write a simple class that would take a query like "my search query from:2015-01-01 userId:abc" and turn it into an object. It gave me exactly what I wanted and wrote unit tests for me. For simple use cases like that it's pretty great, it saved me probably 20-40 minutes.

epswing
Nov 4, 2003

Soiled Meat

prom candy posted:

Yesterday I used ChatGPT to write a simple class that would take a query like "my search query from:2015-01-01 userId:abc" and turn it into an object. It gave me exactly what I wanted and wrote unit tests for me. For simple use cases like that it's pretty great, it saved me probably 20-40 minutes.

If you don’t mind, what was the text you used to generate what you wanted? How specific did you have to be? At what point does writing exactly what you want in paragraph form take longer than just coding it?

prom candy
Dec 16, 2005

Only I may dance

epswing posted:

If you don’t mind, what was the text you used to generate what you wanted? How specific did you have to be? At what point does writing exactly what you want in paragraph form take longer than just coding it?

First message:

quote:

Write a simple ruby class for parsing search terms like "my query from:2020-01-05 userId:abc123" into hashes. It should be able to take a list of the allowed keys and not transform any keys that don't match.

Second message:

quote:

Can you make it handle a query like "some query from:2020-01-05 userId:abc123 some further query" where the result is {:from=>"2020-01-05", :userId=>"abc123", :"query"=>"some query some further query"}

Third message:

quote:

Can you write some RSpec specs for this?

I don't think there's any way I could have coded it out and written unit tests faster than this.

biceps crimes
Apr 12, 2008


That's a similar approach I usually take. I'll ask clarifying questions, and paste error messages I encounter and ask how it would change its approach due to whatever runtime or buildtime error is encountered

Hughlander
May 11, 2005

I use it for a home project of gamedev and this was a recent exchange (my side only)

quote:

Write a Class for Unity that displays a toast on the screen for a few seconds then fade out. It should have a queue of messages and only display one at a time. If a user taps it, it should dismiss it before the fade out time.
It wrote a class that compiled and ran with a bunch of comments, but you'd be able to tap anywhere to dismiss so...

quote:

In the ToastManager class, I didn't mean a tap on the screen, I meant that the user had to click on the toast itself to dismiss it. Update FadeOutToast for that.

quote:

I'm using the new input system, update for that instead

quote:

I don't like that, modify it to use IPointerClickHandler instead

quote:

Update FadeOutToast to use DoTween instead of Lerp

At which point I pasted the class as written into my code base. You definitely had to know what you wanted, and could have gotten there on your own, but:
A) It wrote working code.
B) Got there in less time even just from a typing perspective than I would have otherwise.

The 'nice' part to me was that 2 of my clarifying questions were around "Use this API, not that API"

Itaipava
Jun 24, 2007
Not directing this at anyone in particular but to me it's interesting that people are hyped about turning some of their tasks from "develop" to "code review". Personally I like programming way more, and approach code reviews like I approach taking medicine and going to the gym: a necessary evil.

Maybe the fact that it's a soulless computer receiving the "reviews" makes the process less mentally taxing.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Large Language Models and Simple, Stupid Bugs

quote:

With the advent of powerful neural language models, AI-based systems to assist developers in coding tasks are becoming widely available; Copilot is one such system. Copilot uses Codex, a large language model (LLM), to complete code conditioned on a preceding "prompt". Codex, however, is trained on public GitHub repositories, viz., on code that may include bugs and vulnerabilities. Previous studies [1], [2] show Codex reproduces vulnerabilities seen in training. In this study, we examine how prone Codex is to generate an interesting bug category, single statement bugs, commonly referred to as simple, stupid bugs or SStuBs in the MSR community. We find that Codex and similar LLMs do help avoid some SStuBs, but do produce known, verbatim SStuBs as much as 2x as likely than known, verbatim correct code. We explore the consequences of the Codex generated SStuBs and propose avoidance strategies that suggest the possibility of reducing the production of known, verbatim SStubs, and increase the possibility of producing known, verbatim fixes.

prom candy
Dec 16, 2005

Only I may dance

Itaipava posted:

Not directing this at anyone in particular but to me it's interesting that people are hyped about turning some of their tasks from "develop" to "code review". Personally I like programming way more, and approach code reviews like I approach taking medicine and going to the gym: a necessary evil.

Maybe the fact that it's a soulless computer receiving the "reviews" makes the process less mentally taxing.

The part of development that's most interesting to me is figuring out how I'm going to solve the problem or make a bunch of pieces fit together. So far LLMs haven't taken that away from me. Like the fun part of developing that SearchParser class was figuring out various inputs and what kind of object they should output. Writing the actual string manipulation code to make it happen isn't all that exciting, especially for something pretty simple.

Cup Runneth Over
Aug 8, 2009

She said life's
Too short to worry
Life's too long to wait
It's too short
Not to love everybody
Life's too long to hate


Itaipava posted:

Not directing this at anyone in particular but to me it's interesting that people are hyped about turning some of their tasks from "develop" to "code review". Personally I like programming way more, and approach code reviews like I approach taking medicine and going to the gym: a necessary evil.

Maybe the fact that it's a soulless computer receiving the "reviews" makes the process less mentally taxing.

Yeah I don't understand why people seem to think that debugging was the most interesting part of their jobs

Itaipava
Jun 24, 2007
HOWEVER, if you use AI to get the task done in twenty minutes and then touch fish for the rest of the day you have my support & blessing

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Cup Runneth Over posted:

Yeah I don't understand why people seem to think that debugging was the most interesting part of their jobs

It was certainly the most interesting part in a "may you live in interesting times" way, at least.

Bongo Bill
Jan 17, 2012

Debugging is like a murder mystery where you are the detective, the killer, and the victim.

biceps crimes
Apr 12, 2008


Itaipava posted:

Not directing this at anyone in particular but to me it's interesting that people are hyped about turning some of their tasks from "develop" to "code review". Personally I like programming way more, and approach code reviews like I approach taking medicine and going to the gym: a necessary evil.

Maybe the fact that it's a soulless computer receiving the "reviews" makes the process less mentally taxing.

i get to offload a bunch of tedium and produce higher quality code. i don't have to talk to my annoying coworkers with it either. win-win. the time i'd spent futzing with yet another unit or integation test i can instead spend picking my nose in a booked conference room while i scroll around on my phone

StumblyWumbly
Sep 12, 2007

Batmanticore!
ChatGPT has been great for handling dumb single purpose language stuff like regex or GitHub action YaML, and I look forward to using it for AWS permissions.
I plan to use it to help the can't-really-program folks at my company to get them up to speed more quickly.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Bongo Bill posted:

Debugging is like a murder mystery where you are the detective, the killer, and the victim.

Sometimes you discover the bug is from the framework you use or the OS, which makes it a bit more Sherlock Holmes since you're left with a very improbable truth.

asur
Dec 28, 2012
Am I misunderstanding how people are asking ChatGPT to write tests? If you give it the code and ask it to write tests then you aren't actually testing your code as it will match any mistakes with incorrect tests. I guess in theory you can review the test code, but at least personally I'm way less likely to catch mistakes in a review as opposed to writing test cases where I know what should happen and have to write that out.

biceps crimes
Apr 12, 2008


asur posted:

Am I misunderstanding how people are asking ChatGPT to write tests? If you give it the code and ask it to write tests then you aren't actually testing your code as it will match any mistakes with incorrect tests. I guess in theory you can review the test code, but at least personally I'm way less likely to catch mistakes in a review as opposed to writing test cases where I know what should happen and have to write that out.

sometimes ill paste single functions to it, other times i'll enumerate the cases that need to be tested, the code, paste them to chatgpt, and basically review the results and make tweaks. im still writing some but it's the trickier bits or anything that's super domain specific or sensitive. you'd be a fool to trust it completely but it's a much faster way to stand some things up

biceps crimes fucked around with this message at 04:34 on Apr 4, 2023

prom candy
Dec 16, 2005

Only I may dance

asur posted:

Am I misunderstanding how people are asking ChatGPT to write tests? If you give it the code and ask it to write tests then you aren't actually testing your code as it will match any mistakes with incorrect tests. I guess in theory you can review the test code, but at least personally I'm way less likely to catch mistakes in a review as opposed to writing test cases where I know what should happen and have to write that out.

I read the tests that it spits out and even intentionally break a couple to make sure (the same way I intentionally break my own tests)

It really just saves a lot of typing time.

Cup Runneth Over
Aug 8, 2009

She said life's
Too short to worry
Life's too long to wait
It's too short
Not to love everybody
Life's too long to hate


I understand now. ChatGPT is for people who don't naturally type at 140wpm.

Carbon dioxide
Oct 9, 2012

We had one of those meetings the other day where teams can demo their new tech stuff.

One of the teams was like: "So we tried using ChatGPT for blah blah blah"

At the end:
"Any questions?"

"The company published an internal statement recently saying we should not put user info or internal information such as code into ChatGPT, since we don't know what exactly they might do with that. How did you deal with that?"

*crickets chirping*

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
Yeah I've been really clear with my team not to touch any AI stuff at work until management clear it. All these systems currently say they might read inputs, it's a pretty huge company IP violation that a lot of Devs are just ignoring.

Mega Comrade fucked around with this message at 10:37 on Apr 4, 2023

biceps crimes
Apr 12, 2008


I’m in a special group at work right now that’s approved for usage. But I don’t know what policy they’re cooking up for the whole company, I have no idea how they foolproof it. Then again, I constantly see people breaking current policies with their unapproved browser extensions, unapproved password managers, productivity apps. Hell, I’ve seen some people dump entire files of code into suspect webpages that format code. I’m glad I’m not in security, it’d be very depressing

biceps crimes fucked around with this message at 13:54 on Apr 4, 2023

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
My company is working on one too. I suspect they will go with "only use these ones and in these ways" which will be established company offerings with actual telemetry options, ie GitHub copilot (business) etc.

Although copilot still has that whole licensing lawsuit hanging over it, so maybe not even that.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
The killer feature is if you can train it on only your own company's code, allowing you to automate the really stupid incantations that are nonetheless idiomatic in your codebase, while also ducking copyright concerns about other people's code being used as a source.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
Would that be useful though? A copilot that can only suggest code that's already exists in your products? Most of the code across our products sucks. And it wouldn't work for new features that come out in the language you use.

I think new licenses that allow or disallow training are needed. But don't know how you solve the problem with the current models.

Mega Comrade fucked around with this message at 14:24 on Apr 4, 2023

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Code substantially similar to code that already exists elsewhere is the only thing an LLM can actually write, so explicitly limiting it to that is not as big a constraint as it initially sounds like.

epswing
Nov 4, 2003

Soiled Meat

Jabor posted:

Code substantially similar to code that already exists elsewhere is the only thing an LLM can actually write, so explicitly limiting it to that is not as big a constraint as it initially sounds like.

I wonder though how much training code is needed. Do you need like 1M+ LOC, or is a small 50k LOC project enough to be useful.

Fellatio del Toro
Mar 21, 2009

waiting for the tipping point as developers shift to ChatGPT where there isn't enough StackOverflow data to pull from on any new releases and people have to start reading documentation

Adbot
ADBOT LOVES YOU

Macichne Leainig
Jul 26, 2012

by VG

Fellatio del Toro posted:

waiting for the tipping point as developers shift to ChatGPT where there isn't enough StackOverflow data to pull from on any new releases and people have to start reading documentation

There are already versions of ChatGPT-based bots that basically just ingest entire git repos and let you interrogate them.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply