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
Judge Schnoopy
Nov 2, 2005

dont even TRY it, pal
I mean, if I just copy and pasted chatgpt code I would get eviscerated at code review.

Not that any test suite is complete but if you can't tell whether the code is safe or not, you might have bigger problems than people using AI generated code.

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance
The people that are gonna use code from ChatGPT or Copilot without reviewing it are the same people that are gonna use code from StackOverflow without reviewing it.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Judge Schnoopy posted:

I mean, if I just copy and pasted chatgpt code I would get eviscerated at code review.

Not that any test suite is complete but if you can't tell whether the code is safe or not, you might have bigger problems than people using AI generated code.

That depends on what code safety means. If you're just writing a CRUD app, inspection is good enough, but if you're doing any kind of non-trivial multithreading it can be quite a bit tougher to figure out whether your code works right.

CPColin
Sep 9, 2003

Big ol' smile.

Canine Blues Arooo posted:

Does anyone actually have a test suite that they'd call 'complete'?

I have one with 69 tests in it, so yes.

steckles
Jan 14, 2006

Judge Schnoopy posted:

This seems insane to me. ChatGPT is amazing for so many things beyond "write my entire function". I've been starting new projects with asking chatgpt a bunch of domain questions about what I'm building so I can quickly collect ideas. I might ask for a few code snippets as examples, and then write my work myself. It's a huge productivity accelerator.
Most of our dev work is years past the ideation stage, so that's not super useful. Beyond code quality and potential licensing issues, ChatGPT's terms of service are pretty vague about what they're allowed to do with the data you send it, how its being stored, and for how long on their end. Leaking sensitive data by accidentally pasting like an API key, or some other meaningful text into ChatGPT is something we'd like to minimize the possibility of. Like that could result in legal action in some cases if it were discovered and I feel much more comfortable avoiding the possibility altogether.

Where it works, it's great, but there are too many grey areas for us to feel confident allowing its use right now. Like I said, we regularly reevaluate the landscape, so maybe things will change.

Judge Schnoopy posted:

Complaining that copilot code isn't safe enough for your liking has me extremely curious about your testing environment. Shouldn't unit tests / integration tests / end-to-end (or staging) smoke tests prove your code base is safe, regardless of what's in it?
We've got unit tests, integration tests, end-to-end tests, a long release validation period, and QA and Security teams which seem to possess a supernatural ability to try things nobody has ever thought of, but there are always corner cases. Opening the door to a bunch more code of vague provenance that the original developers don't really understand might not increase the likelihood of some huge flaw making it to production, but it doesn't fill me with optimism either.

steckles fucked around with this message at 00:11 on May 26, 2023

Walh Hara
May 11, 2012
I posted this before somewhere: I had two (not overly complex) programming questions recently where I didn't find the question immediately when searching via google or stackoverflow directly. When I later tried ChatGPT it was able to answer these questions pretty correctly. So it's at the very least a more powerful search sometimes.

edit: found my previous post about this https://forums.somethingawful.com/showthread.php?threadid=3763277&userid=186820#post529762833

Walh Hara fucked around with this message at 00:16 on May 26, 2023

smackfu
Jun 7, 2004

Boy, it will be fun to see a bunch of new grads who used copilot for all their school work run into hard blocks at employers.

Judge Schnoopy
Nov 2, 2005

dont even TRY it, pal
You'll start to see "GPT-FREE" in job descriptions to dissuade them from applying in the first place

epswing
Nov 4, 2003

Soiled Meat
How are companies enforcing bans on ChatGPT?

smackfu
Jun 7, 2004

chat.openai.com blocked at the proxy

Smugworth
Apr 18, 2003

I feel like copilot will be banned where I work, it's being looked at by the new AI ethics group whose function is probably largely useless to the business.
Can I just keep the superior autocomplete functionality, or can jetbrains build something that doesn't make network calls. It's so good

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
We have about four times as many lines of code of test code as non-test and it's still utterly insufficient to be confident that something is correct just because the tests pass.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
I turned Copilot off when interviewed at my current job. But recently someone else interviewed with it on, and it produced an error that they didn’t notice and couldn’t fix even after my boss pointed out to them.

So don’t do that.

I love it though. I’m writing Rust, and I have to write these giant, boring match statements. So often I can just type “match”, hit the spacebar, wait a second, and it will produce a shocking amount of correct code.

prom candy
Dec 16, 2005

Only I may dance

lifg posted:

I love it though. I’m writing Rust, and I have to write these giant, boring match statements. So often I can just type “match”, hit the spacebar, wait a second, and it will produce a shocking amount of correct code.

Yeah this is the good poo poo. It often writes the exact boring, simple code that I was going to write myself. It helps me stay focused because I fall out of flow state pretty easily when I have to do something tedious.

I tried to use ChatGPT to write me a radial progress indicator React component yesterday and it gave me a circle that filled in from left to right.

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
See I just found copilot annoying.
Boiler plate is boring but I usually use it to think about what I'm doing next, so if it's being done for me I'm gonna just get those time savings spent on me spinning in my chair anyway.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Canine Blues Arooo posted:

Does anyone actually have a test suite that they'd call 'complete'?

I've never worked on a project where our testing was that complete, and my current project has the most complete set of tests I've ever seen, and it's hardly exhaustive.

This is back a page, but I've been trying to wrap my head around testing a lot lately, and one thing that's come up quite a bit is that testing is...pretty loving complicated, and is a lot more of a tradeoff than people sometimes admit. I don't know if there's a way to write complete test suites for a product that isn't absolutely finalized, or at least has tolerance for extremely long delivery times in exchange for safety, like medical devices or NASA landers.

Fundamentally the high level downside of testing is that it makes refactoring or changes harder to do, which...isn't bad, but is a tradeoff. If you had exhaustive tests and then had to make even a minor bugfix, you'd probably have to do a lot more test modification and writing than code writing. Especially early in a product's life, when changes are common, that becomes a real problem for achieving business goals if you're like 'Yeah, 4 hours to make the change and 20 more to fix the tests'.

This is where things get away from 'get your code coverage to X' and into the territory of writing the 'right' tests, which are frankly highly dependent on your application. I write a lot of 'glue' stuff in my current job where I'm making a couple systems work together or otherwise interact in a safe manner, and so there's a lot of behavior we don't really care about that you would care a lot more about if you were writing a popular library, for example.

None of this means testing is bad, by the way. I love testing, testing is great, and I still think a general guidance of 'get your code coverage up into the 90% range' is probably the sanest starting point, but I think anyone that tries you give you any sort of absolute dogma around it is probably wrong for most developers.

smackfu
Jun 7, 2004

I’m definitely trending to writing tests as high up conceptually as you can, and then only filling in the gaps with unit tests.

In my ideal world, a refactor PR has no changes to the tests.

Bongo Bill
Jan 17, 2012

Tests exercise a component through its interface. Changing a component's interface requires changing its tests. If the component's interface isn't meaningful then no test that uses that interface can be meaningful. It's as difficult to design a good test as it is to design a good component with a good interface. But you should still try to do it as well as you're able given what you know. There are no shortcuts.

Hughlander
May 11, 2005

Canine Blues Arooo posted:

Does anyone actually have a test suite that they'd call 'complete'?

I've never worked on a project where our testing was that complete, and my current project has the most complete set of tests I've ever seen, and it's hardly exhaustive.

To that end, I could see some fear about ChatGPT or CoPilot writing 'bad' code for a complex project. I use it a lot for syntax-like questions (and it's awesome for that), but I would not copy/paste whole methods or even substantial chunks into the code base without careful review.

https://www.sqlite.org/testing.html

quote:

1.1. Executive Summary
Four independently developed test harnesses
100% branch test coverage in an as-deployed configuration
Millions and millions of test cases
Out-of-memory tests
I/O error tests
Crash and power loss tests
Fuzz tests
Boundary value tests
Disabled optimization tests
Regression tests
Malformed database tests
Extensive use of assert() and run-time checks
Valgrind analysis
Undefined behavior checks
Checklists

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


epswing posted:

When you ask "why am I not paid more when I spend more time on work" do you mean outside of business hours, or during business hours?

Outside of business hours. I am salaried. If I devote more time to the company, I am paid the same amount; therefore, I am not paid for my time.

epswing posted:

Maybe writing documentation or attending meetings feels like a waste of your valuable time because you're some solid gold marvel of a programmer, but what do you care? Let the faceless corporation pay you software development prices to sit in meetings.

Attending meetings isn't a waste of my time, I'm happy to get paid to attend virtual meetings. What I object to is having to have a camera on so that I have to stare at the laptop screen during that meeting instead of dicking around.

epswing posted:

Edit: I suppose if I were at the beginning of my career, as a fresh-faced junior I'd be actively looking to level-up my skills and my role in the company, and I would probably look at long and perhaps useless meetings being a barrier to those goals. If that's you, fair enough.

No, it's not me. I'm doing as little work as possible for as much money as possible in order to spend time with my family and hobbies. I don't really give a gently caress about the company except insofar as doing enough that they don't catch on that I am doing this, so they continue paying me lots of money to spend on stuff I like doing. Hope this clears things up. :)

Cup Runneth Over fucked around with this message at 06:48 on May 27, 2023

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I would expect having truly complete coverage is not possible so long as the program is bound by the halting problem. Even with 100% coverage of each line of code, the actual data flow in the tests is making some assumptions that can turn out to be wrong.

ChickenWing
Jul 22, 2010

:v:

Rocko Bonaparte posted:

I would expect having truly complete coverage is not possible so long as the program is bound by the halting problem. Even with 100% coverage of each line of code, the actual data flow in the tests is making some assumptions that can turn out to be wrong.

That's covered by integration tests




Testing is a cost/benefit tradeoff - you balance the time taken to implement/run the tests with the increased confidence in your code correctness that you recieve from those tests. I think the thing that most people get hung up on is that tests are not inherently valuable - adding a new test is not always a valuable use of time. I had a huge fight with a coworker a couple years back that I think ended up getting him fired because he was adamant that we couldn't possibly remove anything from our integration test suite that took 20m to complete, meanwhile 80% of the functionality it was testing was accurately captured by our unit test suite. Eventually I won that argument, cut our integration tests down from 20 to like 5, and lost zero real coverage in the offing, while halving our CI time.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
There's also the possibility that your tests are providing negative value - increasing friction in the changes that you are deliberately and intentionally making, while also not really doing anything to catch unintentional regressions.

This becomes especially likely if your testing regimen has things like code coverage metrics as a requirement on checkins - Goodhart's Law and all that.

prom candy
Dec 16, 2005

Only I may dance

Jabor posted:

There's also the possibility that your tests are providing negative value - increasing friction in the changes that you are deliberately and intentionally making, while also not really doing anything to catch unintentional regressions.

One of the projects I work on has a lot of unit tests with mocks and yes, their job seems to be to slow things down and make sure I don't get too many things done in one day.

StumblyWumbly
Sep 12, 2007

Batmanticore!
The best is when I add in a fix and a test, but the test can only be run on PR, so the commit log is 1 meaningful change and 10 commits alternating between "fixing test" and "fixing typo"

wilderthanmild
Jun 21, 2010

Posting shit




Grimey Drawer
My current company has 100% coverage on all new things. It catches lots of stuff, but still misses some, and oh man is it a maintenance nightmare.

Jen heir rick
Aug 4, 2004
when a woman says something's not funny, you better not laugh your ass off

Cup Runneth Over posted:

No, it's not me. I'm doing as little work as possible for as much money as possible in order to spend time with my family and hobbies. I don't really give a gently caress about the company except insofar as doing enough that they don't catch on that I am doing this, so they continue paying me lots of money to spend on stuff I like doing. Hope this clears things up. :)

Same

Erg
Oct 31, 2010

Cup Runneth Over posted:

Attending meetings isn't a waste of my time, I'm happy to get paid to attend virtual meetings. What I object to is having to have a camera on so that I have to stare at the laptop screen during that meeting instead of dicking around.

No, it's not me. I'm doing as little work as possible for as much money as possible in order to spend time with my family and hobbies. I don't really give a gently caress about the company except insofar as doing enough that they don't catch on that I am doing this, so they continue paying me lots of money to spend on stuff I like doing. Hope this clears things up. :)

you sound like a terrible coworker unless you’re on a team of one

have you considered getting a job you don’t despise

Gildiss
Aug 24, 2010

Grimey Drawer

Erg posted:

you sound like a terrible coworker unless you’re on a team of one

have you considered getting a job you don’t despise

Lol sounds like someone needs to lower their output to match the good workers.

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


Erg posted:

you sound like a terrible coworker unless you’re on a team of one

have you considered getting a job you don’t despise

I've considered it but fully automated luxury communism ain't here yet so I'm paying the bills until then

FlapYoJacks
Feb 12, 2009

Erg posted:

you sound like a terrible coworker unless you’re on a team of one

have you considered getting a job you don’t despise

They sound like a good employee and you sound like an employee everyone hates because they think of they work hard and on weekends they will get a promotion. This behavior sets the expectation from management that everyone works just as hard.

biceps crimes
Apr 12, 2008


Erg posted:

have you considered getting a job you don’t despise

i've been considering this for 20 years but no luck yet.

CPColin
Sep 9, 2003

Big ol' smile.

Cup Runneth Over posted:

No, it's not me. I'm doing as little work as possible for as much money as possible in order to spend time with my family and hobbies. I don't really give a gently caress about the company except insofar as doing enough that they don't catch on that I am doing this, so they continue paying me lots of money to spend on stuff I like doing. Hope this clears things up. :)

This is a good reason why I don't care if my 100% test coverage is helping or hurting. The boss hears that "100%" and likes it and if it takes me longer to tweak the padding on the Fart button on page 2, oh well, guess I'll vacuum my house while it "takes me longer".

FlapYoJacks
Feb 12, 2009

CPColin posted:

This is a good reason why I don't care if my 100% test coverage is helping or hurting. The boss hears that "100%" and likes it and if it takes me longer to tweak the padding on the Fart button on page 2, oh well, guess I'll vacuum my house while it "takes me longer".

The trick is to finish your tickets on a Monday and slow-trickle them in at EOD for the rest of the days in the week.

biceps crimes
Apr 12, 2008


FlapYoJacks posted:

The trick is to finish your tickets on a Monday and slow-trickle them in at EOD for the rest of the days in the week.

i did this at my last job that was 100% in the office. I'd grind out the week's work in about 4-5 hours. Spent the rest of the time in empty conference rooms farting around or helping fight fires or day dreaming in meetings. Consistently received exceeds expectations ratings and was promoted twice. :shepface:

Erg
Oct 31, 2010

FlapYoJacks posted:

They sound like a good employee and you sound like an employee everyone hates because they think of they work hard and on weekends they will get a promotion. This behavior sets the expectation from management that everyone works just as hard.

Lol I clock out at 5 on the dot most days and if I’m working late for whatever reason you’d better believe I’m leaving at 3 on Friday or whatever

Going above and beyond to impress management is a fools errand, they don’t want to pay you more.

Idk, the only non software job I’ve ever had was at a lawn care company. Cannot imagine how pissed I’d be if people I was working with were jacking off in the truck for an hour because everyone else was going to take care of doing the actual work

e: i guess if you're finishing everything you're assigned in 2 hours and then goofing off the rest of the day, who cares. i just don't get the idea of accepting a meeting just so you can ignore it. don't go and spend that time doing the forum browsing you were going to do anyways

Erg fucked around with this message at 22:31 on May 28, 2023

Wibla
Feb 16, 2011

biceps crimes posted:

i did this at my last job that was 100% in the office. I'd grind out the week's work in about 4-5 hours. Spent the rest of the time in empty conference rooms farting around or helping fight fires or day dreaming in meetings. Consistently received exceeds expectations ratings and was promoted twice. :shepface:

So you're getting your actual work done, in addition to being a visible, helpful person in the office? No wonder you got promoted twice.

Optics matter, even in (or maybe particularly in?) tech. Learning how to communicate effectively and be able to play enough office politics that you are generally favoured by leadership is a very good thing.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Wibla posted:

So you're getting your actual work done, in addition to being a visible, helpful person in the office? No wonder you got promoted twice.

Optics matter, even in (or maybe particularly in?) tech. Learning how to communicate effectively and be able to play enough office politics that you are generally favoured by leadership is a very good thing.

Yeah, I think there's a middle ground between 'boot licking corporate wageslave who thinks there is any reward for hard work other than more work' and 'nihilist rear end in a top hat disliked by all their coworkers' and I think in tech there's far too many people clustered on either side of that spectrum.

Humans are social creatures; every job has stuff that sucks, but you should probably try and do a good job, and not murder yourself doing it, and try and find some sort of common ground with your coworkers to at least be polite with them. When I was younger I had a few rear end in a top hat coworkers I mostly just tried to ignore, but as I've gotten older I've found I can mostly find something to commiserate with; and I also learned to stop working myself to death to try and make the soulless corporate machine happy.

Work is a cake eating contest and the only reward is more cake, but if you don't take at least some level of professional pride in your work, that's gotta be incredibly soul draining.

ninja edit: Oh yeah also optics matter, but they can matter in a way that doesn't require you to flat out lie to people too.

When I worked in an ops center, we had a lot of downtime because our role didn't really allow us to code stuff, and we were reactive, and I always told my guys the same thing: 'I don't give a gently caress what you do in your downtime as long as the tickets get closed and everything gets done, but if management walks in shut your goddamn 3DS for a while'. My boss knew my team would dick around when stuff was quiet, but there's a difference between knowing it happens and having it pushed as your memory of the situation, especially once leadership far enough away to not understand start showing up.

Falcon2001 fucked around with this message at 04:06 on May 29, 2023

Xarn
Jun 26, 2015

steckles posted:

ChatGPT's terms of service are pretty vague about what they're allowed to do with the data you send it, how its being stored, and for how long on their end. Leaking sensitive data by accidentally pasting like an API key, or some other meaningful text into ChatGPT is something we'd like to minimize the possibility of.

This is why we forbid ChatGPT for our core library.

Adbot
ADBOT LOVES YOU

Mega Comrade
Apr 22, 2004

Listen buddy, we all got problems!
We are currently migrating off rackspace. And almost like a parting spite gift they are having huge storage speed issues. Completely blown our migration schedules out the water.

Don't use rackspace.

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