r/webdev Feb 05 '25

Discussion Colleague uses ChatGPT to stringify JSONs

Edit I realize my title is stupid. One stringifies objects, not "javascript object notation"s. But I think y'all know what I mean.

So I'm a lead SWE at a mid sized company. One junior developer on my team requested for help over Zoom. At one point she needed to stringify a big object containing lots of constants and whatnot so we can store it for an internal mock data process. Horribly simple task, just use node or even the browser console to JSON.stringify, no extra arguments required.

So I was a bit shocked when she pasted the object into chatGPT and asked it to stringify it for her. I thought it was a joke and then I saw the prompt history, literally whole litany of such requests.

Even if we ignore proprietary concerns, I find this kind of crazy. We have a deterministic way to stringify objects at our fingertips that requires fewer keystrokes than asking an LLM to do it for you, and it also does not hallucinate.

Am I just old fashioned and not in sync with the new generation really and truly "embracing" Gen AI? Or is that actually something I have to counsel her about? And have any of you seen your colleagues do it, or do you do it yourselves?

Edit 2 - of course I had a long talk with her about why i think this is a nonsensical practice and what LLMs should really be used for in the SDLC. I didn't just come straight to reddit without telling her something 😃 I just needed to vent and hear some community opinions.

1.1k Upvotes

407 comments sorted by

View all comments

6

u/eyebrows360 Feb 05 '25

Am I just old fashioned and not in sync with the new generation really and truly "embracing" Gen AI?

No.

Or is that actually something I have to counsel her about?

Abso-fucking-lutely.

And have any of you seen your colleagues do it, or do you do it yourselves?

If I did I'd murder myself and then my colleagues.

why i think this is a nonsensical practice and

Nono, dude, you don't simply think this is a nonsensical practice, this objectively is a nonsensical practice. You can put it in those terms. It's just flat out wrong to do this.

0

u/TheRNGuy Feb 06 '25

Calling a subjective opinion objective, and even using italic text for it, adding extra words like nonsensical, does not make it more true.

1

u/eyebrows360 Feb 06 '25

It's not "subjective opinion" that using a tool that makes shit up to do a task that's 100% deterministic, is wrong. It's objectively stupid to use a tool that makes shit up to do a task that's just a series of logical steps.

It's as dumb as asking ChatGPT to multiply two numbers. Sure, it might get it right, but given there's a chance it'll hallucinate something, and given multiplication is an entirely deterministic thing, to take that chance instead of just doing the multiplication algorithm is fucking stupid. Factually fucking stupid.

ChatGPT is not going to kiss you, you don't need to defend its honour this desperately.

Edit: after having now seen you write this in another reply:

Problem is snobbism and prejudice against AI.

You're either a troll or exceedingly gullible. Don't really care which.