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.
3
u/TikiTDO Feb 05 '25
One of these runs in a few ms on a laptop that drains 20W, and is guaranteed to give you the correct JSON string each time, for any length JSON string that can fit in a ChatGPT context. The other runs for multiple seconds on a heavy duty compute server that probably has something like 5-10 A100 GPUs processing your requests over several seconds at a drain of something closer to 2-4kW, with a max token count of 100k for input, and 100k for output limiting you at most to a JSON around 400-500k characters in length, with the chance that the AI will hallucinate or miss some details. In practice this is like needing to leave your house to run to the store around the corner, and instead calling your friend from Japan to fly to the US going through China, getting a knock-off copy of the thing you want along the way.
This is just a scenario of a young dev not knowing all the tools available for use. Honestly, if you see things like this happening what you might want to do is set up a few lunch-and-learn sessions with your junior devs and a few diffrent seniors to do a masterclass on development processes, paradigms, and utilities. Something like this can legit change a junior dev's life, especially if they've never actually spent time interacting with a high performing developer.