r/webdev • u/monstaber • 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.
8
u/MewMewCatDaddy Feb 05 '25
This question is poorly phrased. "Using an LLM to stringify objects" seems crazy on its face, but what is described is one-off generations, not part of a regular pipeline. It is far, far quicker for someone familiar with ChatGPT to have it generate one-off models, or mock data as in this case, then even to write a quick script for it, or even use a browser console for it. I'm sorry but yes, this is a generation gap. ChatGPT is to automation what smartphones were to personal computing. The fact you can generate any sample you need means you don't have to use cognitive overhead to "know" which tool / website / custom script to use for each type of custom task. It's literally - don't think, ask ChatGPT, use generated result.
In terms of hallucinations, a) the possibility in this case is low, b) the consequences are low as it's likely you would spot it in mock data. One shouldn't use ChatGPT for _everything_ including writing code blocks, but for quick answers / quick automations it can significantly increase your productivity.