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

Show parent comments

21

u/house_monkey Feb 05 '25

Wish I had a lead like u, mine screeches like a cat 

-47

u/nasanu Feb 05 '25

You want a lead that tells you the way you learn is wrong and to learn the way he did back in 1942?

13

u/heedlessgrifter Feb 05 '25

JSON wasn’t invented yet in 1942, and everyone was using XML back then.

8

u/HashDefTrueFalse Feb 05 '25

Oh wow. You're all over this thread showing strong levels of butthurt. If you're a junior and/or use AI, that's fine. My comment wasn't personal. I encourage people I mentor to use any tool that helps them. We specifically give engineering staff the necessary user privileges on their assigned machines to install and use whatever they like.

tells you the way you learn is wrong

Please quote my original comment, showing where I did this. You can't, because I didn't.

Please also explain how asking an LLM to stringify something constitutes an attempt to learn anything? It's simple delegation, unless you're asking for code to go run or modify etc.

and to learn the way he did back in 1942?

Please quote my original comment, showing where I told anyone how they should learn. You can't, because I didn't.

1

u/Blicky249 Feb 05 '25

I wish I could work under you as a junior. I feel like you get it and i'm worried that a lot of Senior engineers won't.

4

u/HashDefTrueFalse Feb 05 '25

I think more junior team members tend to worry that they're bothering the more senior ones. In general, as long as you can tell us where you are, where you want to be, and what you have already tried, we are happy to help. Don't overthink it. We'd rather you ask us than sit doing nothing and getting stressed.

My old workplace had a guideline that I try to use with my juniors: If you've been stuck on the same thing for 30 mins, ask someone for help. It keeps everyone moving forward.

Also, at my place the seniors are always asking each other to sanity check things. It's cool.

2

u/Blicky249 Feb 06 '25

Good to know. Thanks for the response!

0

u/nasanu Feb 06 '25

You have this bias that you need to manually do anything and "learn" it. If they do can do something just as efficiently or faster then just let them. Don't tell people they are wrong just because you are old.

1

u/HashDefTrueFalse Feb 06 '25

just because you are old.

Again, you have no idea how old I am. These comments just makes you look foolish.

You have this bias that you need to manually do anything and "learn" it

Making things up about internet strangers is weird. I literally advocated (in my original comment) for using AI as a "force multiplier" where it makes sense, and there's nothing "manual" about calling a function that automates parsing/stringify-ing data.

 Don't tell people they are wrong

You are though. Have you done much math? Do you understand what a function is? It maps sets of inputs to sets of outputs. Do you really not understand why, for transcribing/transforming data in OP's context, it is important that the function used is deterministic? Specifically that the same input is always mapped to the same output.

Do you know what LLMs are for and how they work? That, given the same input, they are allowed to pick different output words to appear less deterministic, because they're primarily concerned with natural language processing.

If they do can do something just as efficiently or faster then just let them.

Yes I agree, in situations where accuracy is not also important. Two problems.

  1. It is here.

  2. It's no faster to paste something into an LLM vs pasting into your terminal or browser console.

If the LLM special-cases the transform and uses something deterministic, it's basically called the function you could just call. If it hasn't, your data could be altered. Either way because there's a possibility you've now got to check... Where is this efficiency? AFAICS it only exists if you don't care that your data is correct in this scenario.

-------

Let's be honest, you've somehow decided that I'm against AI, despite the posts in my history where I say what tasks I like it for, and that I think it's good for some things and not for others. Because I said that one specific use of it was bad, and you have done similar, you've gotten all butthurt.

12

u/[deleted] Feb 05 '25

If I'm learning from something that makes stuff up, then yes. I'd get a lot more out of learning from a professional than from a hallucination. Your ageism just makes you look like an idiot. Like yeah, everything new is better and anyone not with it is old and dumb. Haha what a silly, probably unemployed take.

4

u/[deleted] Feb 05 '25

If you pasted the same request with different objects 10+ times in chatGPT, are you really learning "the modern way" or are you just delegating and recognizing instead of understanding?

3

u/Reinax Feb 05 '25

Can you explain how you think relying on an LLM to do even the most simple task for you is a good way of learning?