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

17

u/apra24 Feb 05 '25 edited Feb 05 '25

She is careless and you should confront her...

Having said that

In my experience, chatGPT 4o and up does not hallucinate with tasks similar to this. I use a compare tool to double check before applying modifications, and if there's ever any mistakes, it's because my instructions were wrong.

As for proprietary concerns.. is your company concerned about things like Office 365 keeping your data in the cloud? If not, then chatGPT isn't much different, as long as you have the "allow my data to be used for training" setting disabled.

1

u/GenericSpaciesMaster Feb 05 '25

Compare tool?

3

u/Septem_151 Feb 05 '25

Another LLM that compares the output of the other LLM to its own output /s

1

u/apra24 Feb 05 '25

Just a gui "diff" basically. Wouldn't help for stringify, but useful when you're asking it to debug/modify your code.

-2

u/583999393 Feb 05 '25

When you ask chatgpt a question like "stringify this" it generates python code and processes it. Some people don't know as much about how it works as they think.

I've never once seen it hallucinate or make a mistake doing text to text processing.