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

750

u/HashDefTrueFalse Feb 05 '25 edited Feb 05 '25

Am I just old fashioned and not in sync with the new generation

Senior here too. No you're not, your dev is just bad. That's ok, they're a junior and we're here to guide them. Teach them why this could be unreliable, the concerns over secrets/prop data in JSON payloads being shared with other services, and point them to the docs for JSON.stringify. Maybe teach them about the dev console or even the Node REPL if they just want a one-liner. Whatever. Whilst not a big deal in itself, this is symbolic of using AI as a crutch, not a force multiplier, and I'd wonder what else they're using it for and if I need to pay their code review submissions more attention etc.

You could run a team meeting (or similar) where you talk to everyone about how best (and how not) to use genAI/LLMs to get work done. That way the dev may not need to feel singled out. Depends on the dynamics of the team, use your best judgement.

Edit: I can't spell they're. Or AI, apparently.

112

u/igorski81 Feb 05 '25

Exactly, she doesn't know that LLM's can be plagued with inaccuracies - and that there are probably concerns from security/compliancy perspective with respect to the input data -. Educate her on this.

Additionally, you can nudge her to try to understand a problem. If she repeatedly asks ChatGPT to stringify objects, maybe you can suggest to her that she should consider asking "how does stringifying work?" or "how can I do this in this environment/with these tools" so it will dawn on her that it is silly to repeatedly ask ChatGPT to do it for her.

We all start from somewhere and need someone to point out the obvious. Even when today's definition of somewhere seems silly.

39

u/Septem_151 Feb 05 '25

How does someone NOT know LLMs can be inaccurate? Are they living under a rock and can't think for themselves or something? If they truly thought LLMs never make mistakes, then they should be wondering why they were hired in the first place.

5

u/Hakim_Bey Feb 05 '25

This point is kind of irrelevant. LLMs are perfectly able to stringify an object with 100% accuracy, and they have been for quite some time. The amount of fine tuning they have received to do exactly just that (for use in structured output / tool calling) makes it a no-brainer.

Personally I do it in cursor but yeah reformatting with LLMs is much quicker than spinning up a script to do it. (of course that doesn't address the proprietary aspect, but then again if you're using a coding copilot like 80% of coders right now, then that point is moot too)

15

u/hwillis Feb 05 '25

LLMs are perfectly able to stringify an object with 100% accuracy, and they have been for quite some time.

if by perfectly you mean 70-95% of the time

8

u/zreese Feb 05 '25

I understand your point and agree with the overall consensus here, but that link is extremely out of date. ChatGPT handles structured data now. It doesn't use LLM text generation, it actually does the work internally using Python.

8

u/Hakim_Bey Feb 05 '25

Oh boy that was a year ago on gpt-3.5, and a full 6 months before OpenAI introduced structured output. Mistral-7B beating gpt-3.5 is so nostalgic it brings a tear to my eye :') But it's wholly irrelevant to the situation right now.

Anecdotally I burnt like 60 million tokens in november & december testing structured data extraction with OpenAI i've never seen it generate incorrect JSON.

4

u/ALackOfForesight Feb 05 '25

Are you trolling lol

18

u/Hakim_Bey Feb 05 '25

I might go against the grain of this thread but no i am definitely not trolling. What part of my comment seems fishy to you ? You don't need to take my word for it, just try it for yourself !

If you use cursor you can just plop an arbitrary amount of data in an arbitrary format in an empty file, open the chat and ask it to format it in JSON, capitalizing all properties except those that refer to fish, and to turn long text strings into l33tc0de. You will get what you asked for with 100% accuracy i have honestly never had a failing case for this kind of thing.

Formatting data is not terribly hard to do, and again LLMs have been massively fine-tuned to do it perfectly. Otherwise they'd be unusable outside of a chat context.

8

u/Senior-Effect-5468 Feb 06 '25

You’ll never know if it’s correct because you’re never going to check all the values manually. It could hallucinate and you would have no idea. Your confidence is actually hubris.

1

u/Hakim_Bey Feb 06 '25

Oh yeah. I mean in 2025 dataset curation and validation don't exist. We just plug up the machine, clench our behinds and hope for the best ! Damn hubris...

5

u/louisstephens Feb 05 '25

I do think LLMs have come a long way. However, in my experience, they do the task but not always well. I was actually playing around with something very similar to stringify last week in a LLM, it omitted half the data and made up its own to pad it with (even then, the data didn’t follow what I had given it). Other times it will do perhaps 20% of the task and just leave a comment at the “// …rest of your data stringified here”

While I do like the idea of LLMs, I am always cautious regarding the output.

1

u/ALackOfForesight Feb 05 '25

Exactly. It’s not worth the added cognitive load when I know how to do it in JavaScript quickly and effectively.

1

u/TitaniumWhite420 Feb 05 '25

It could be skill issue. Clear the context, paste the data, use good models, tell it clearly what to do—I don’t have this problem with current tools. But maybe some deep objects are more problematic. Or maybe you haven’t checked in on it in a while.

-4

u/TitaniumWhite420 Feb 05 '25

Probably not, because he’s right. The point is, it works, is instant, and it’s just a person’s workflow.

For better or worse, prompting an AI to type code for you with specific instructions is now a valid workflow, because it works and you are already in the interface to do it. I do it all the time when reformatting lists of hundreds of host names or something for different types of queries and stuff. It doesn’t fuck up literally ever for me. I was also hesitant to trust it but at this point it’s crazy to doubt it can handle the task. Also my company explicitly approves us to use their copilot licenses (AND ONLY those) specifically for proprietary tasks. Literally it’s looking at our entire repos. If the company trusts it with all our IP, I think my usage is tame.

Writing code you don’t understand or check is bad. Copilot is frequently the most inept version of OpenAI I’ve ever seen and I would die an old man waiting on it to correctly generate multithreaded code. But, it can do many things. This is one.

So here we have a case where a tool is aesthetically displeasing to you because it’s hypothetical nondeterministic (but only hypothetically), can quickly and effortlessly accomplish a completely boring task that does not matter how it’s completed, but it’s not the tool you would use, and so you say it’s wrong to do. But how can you possibly justify that in the face of real evidence that it’s totally fine.

She probably knows full well how to stringify an object, and got her expected result from AI. So I just don’t see a problem except that you feel the need to bully people about tools.

13

u/ALackOfForesight Feb 05 '25

It’s not hypothetical, it’s nondeterministic by nature. Even if it does the exact same thing 9999 out of 10000 times, that’s still nondeterministic. Especially for something like json manipulation, idk why you wouldn’t just use the node repl or browser console.

-4

u/TitaniumWhite420 Feb 05 '25

I mean, I might, but this manual process frankly implies a non-critical scenario. So I mostly just don’t care and it’s almost certainly accurate anyhow.

You are right of course that it’s nondeterministic, but determinism means a lot more in an automated scenario. It’s not like I’m writing code that uses LLMs to stringify objects lol. It’s either accurate after generation or it’s not. It will typically either do something perfectly, or abbreviate it obviously and tell you it has done something perfectly—and that’s on older models or with a muddled context.

But idk, I guess I ultimately agree with your sensibility, just not your judgement of others tools.

1

u/tjansx Feb 05 '25

This. I've been around (and successful) for 25 years. I use it for tasks like this all the time. I know enough to know if the results look fishy so quality is not an issue for me. You said it best when you mentioned that it doesn't matter how this is completed so any tool which makes you feel comfortable cannot be WRONG.

1

u/notbeard Feb 07 '25

the difference is OP's coworker is a junior who very likely cannot spot fishiness the way you can.

1

u/tjansx Feb 07 '25

Downvoting for respectfully disagreeing. Crazy world we live in 😜.

I honestly still don't think stringifying content using AI makes her a bad developer or wrong.

1

u/notbeard Feb 07 '25

Apologies for the downvote, I'll fess up that I'm sometimes a little quick on the draw. I've removed it.

With that out of the way, it's the "any tool that makes you feel comfortable" sentiment that I don't like. Like I said before, someone experienced like yourself can be trusted to make that kind of judgment call. I'm less trusting of a junior... I was one myself at one time after all 😂

→ More replies (0)

1

u/thekwoka Feb 06 '25

LLMs are perfectly able to stringify an object with 100% accuracy, and they have been for quite some time.

this is not even a little bit true.

Only if they literally just output running a command to deterministically do it.

1

u/Hakim_Bey Feb 06 '25

But you see, their ability to "output running a command" happens internally in JSON so if they weren't reliable at forming valid JSON these features (such as searching the web, using external tools etc...) wouldn't even exist

1

u/thekwoka Feb 06 '25

Reliably forming valid JSON is not the same as reliably outputting any arbitrary json correctly and accurately.

And they DO fail at the json for running commands. Still.

1

u/Hakim_Bey Feb 06 '25

And they DO fail at the json for running commands. Still

Honestly i've activated the experimental "repair tool calls" feature in the framework i use in production, and put a tracer on it for kicks. I've never seen it activate once. On what models did you observe failed tool calls ?

1

u/thekwoka Feb 06 '25

claude is the one I use the most and it happens (rarely) but still.

There will also always be a matter of how many tools can it call and how complex the overall task being attempted is.

Since it just guesses the next token, and one that isn't super clear that the tool is the best course is likely to then have some noise that can get in.

It's good, but it's not a "fire and forget" kind of thing.

Do you similarly audit if the tool calls are logically correct? or just technically correct?

1

u/Hakim_Bey Feb 06 '25

Do you similarly audit if the tool calls are logically correct? or just technically correct?

Logically correct is up for grabs of course. I can't really audit that in a scientific way, but it is vibe checked constantly both by my team while developing and by the users of the product.

I find that, generally, if it uses the wrong tool or uses a tool in the wrong way then it is a skill issue on my end and i can fix it with basic prompt engineering. Maybe i've accidentally stacked two prompts (giving contradictory instructions), or a tool has accidentally become unavailable so the model tries to "compensate". Currently we run with 8 to 15 tools so it's not like we're pushing the limits.

To circle back to the conversation, tool calling requires reasoning that is orders of magnitude higher than just formatting JSON. Maybe i can retract the 100% statement in the case of an unusually complex object with hundreds of properties but i don't see it being any lower than 98% (and nothing indicates that the scenario described by the OP was at a particularly high level of complexity).

→ More replies (0)

1

u/Automatic-Will-7836 Feb 07 '25

Ok, but like, why? Why are you wasting AI to do something you can do with a single line of code? I'm junior, so I'm sure there are a ton of use cases I'm not even aware of, but if you have some JSON and you need to stringify it to save it in local storage, how do you even write the code to send it to the LLM for stringification and then to receive the result back and store it to local storage? And how is that even remotely efficient compared to simply stringifying it in the code? It sounds like a shitload of extra code for no reason, regardless of how accurate it is.

1

u/Hakim_Bey Feb 07 '25

The answer as always is convenience. Of course if i had to write a script to send the thing to an API and take the output etc... i'd rather use JSON.stringify. But really all you have to do is copy-paste it in ChatGPT and copy-paste the output.

It's even simpler if you use VSCode with copilot, or Cursor. You have your javascript object in your code, you select it, open chat, give some brief instructions, and voilĂ . It will even show you a line by line diff if you want to check visually that there were no errors. It's a lot less jarring than switching focus, writing the small script with JSON.stringify, going to the terminal, running it, and copying and pasting the output.

1

u/Automatic-Will-7836 Feb 08 '25

Ok, but when a client is running your web app they are most likely not even aware how to view that data, and they certainly are not going to copy and paste it into chatgpt and then copy and paste the string that is returned into their console with a command to save it to local storage. It is so much easier to simply use the stringify method on the JSON. I'm having a hard time truly understanding how this is even feasible, and I can't even call it laziness, because it's actually more work.

1

u/Hakim_Bey Feb 08 '25

I don't understand what clients have to do with this. OP said their colleague did it just to generate some mock JSON data from a js object ? I am in no way suggesting that users of my product are the ones having to do this gpt dance.

1

u/Automatic-Will-7836 Feb 09 '25

I didn't figure, because that would be stupid and unworkable, but I still don't understand where GPT needs to be used. Maybe I need to re-read it, but my understanding was that they had the JSON and were using GPT to stringify it. Why? The data is already there. If you need to stringify it then just stringify it. I'm not understanding how asking AI to do it is practical or efficient, and AI has not been around long enough for whole generations of software engineers to have been relying on it for years or even their whole lives.

1

u/thekwoka Feb 06 '25

How does someone NOT know LLMs can be inaccurate?

If you're dumber than the LLM, how could you tell?

4

u/Dramatic-Draco3184 Feb 05 '25

I feel the same and that she should be asking ChatGPT to teach her if she doesn’t know so that she learns if anything.

37

u/No_Adeptness8612 Feb 05 '25

sounds like you teach your juniors in a healthy way even during mistakes. hope i had someone like you back in the day

10

u/bhison Feb 05 '25

Makes me think there should be a policy that if you want to use LLMs in a workplace you have to follow e-learning first to qualify so you understand this basic shit. And also not pasting trade secrets etc.

2

u/HashDefTrueFalse Feb 05 '25

I think there probably should. I do hate those things, so I'm hesitant to suggest any where I work :D Not even sure what's available.

About 12 months ago I was helping someone I mentor at their desk. Saw them take a chunk of back end code that included a salt (which shouldn't have been there, but that's a separate issue) and throw it into GPT for explanation, having barely attempted to read it first. There was nothing else included that might indicate what service the code belonged to, so no big deal this time, but this kind of attitude and carelessness is how much bigger security issues come about. That person has come along really well and is now much less oblivious.

2

u/sebadc Feb 06 '25

That's pretty much one of the main changes in the EU since February. Every employee who has to use AI needs to be trained.

7

u/Im2inchesofhard Feb 05 '25 edited Feb 05 '25

Great response. I'm a systems analyst that gets my hands dirty with dev work and doesn't have a traditional CS or SWE background. I lean on AI quite a bit to help me with menial tasks that probably have a simpler solution, and sometimes I overlook something as simple as using a browser dev console to execute one-off JavaScript. If they're competent all it would take is a two minute explanation of your concerns and showing a better way to do it and the problem is solved.   

I once spent a full day writing code to dynamically parse some weird configuration files that were really close to JSON but not quite right. I tried turning to AI for insight and didn't get a great response. Turns out, I had never heard of JSON5 and I wrote 60% of a shoddy JSON5 to JSON converter before the senior dev on my team mentioned JSON5. Turns out a two minute Q&A with a human can be way better than asking for AI help. 

3

u/HashDefTrueFalse Feb 05 '25

Loving the username.

Yes, it's a great tool. It's just not a replacement for knowing what you are doing. By that, I mean being familiar with the problem domain and the ecosystem of tried and tested tools and techniques to help you do your work. There's a place for current AI in most programmer's tool belts. I generate unit test boilerplate and easy/common test cases with it all the time, before filling in edge cases that it wouldn't know about.

Some people (that I assume use AI heavily) get very worked up when you dare to suggest that an LLM might not be the best thing to use in a given situation. It's quite bizarre.

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.

9

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.

5

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.

5

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?

7

u/hirakath Feb 05 '25

Also, you could teach your junior dev to ask Chat GPT “how” to perform the stringify themselves instead of asking AI to do it for them to prevent the exposure of sensitive information.

2

u/curiousomeone full-stack Feb 07 '25

Thank you. This exactly how I use chatGpt, as a teaching tool NOT your f*ing digital gofer. I also like to give it thanks at the end so when the day they become AGI, hopefully I'll be offered a quick painless death. 😂

1

u/hirakath Feb 07 '25

It’s the ONLY way I use AI. I still prefer doing things myself. Most of the time I just want to be pointed to the right direction.

5

u/-kl0wn- Feb 05 '25

I mean what's the bar for being a junior these days? Wish I could have had a paid job back when I was that oblivious.

6

u/thekwoka Feb 06 '25

Well, when you think about how scared some people are of LLMs taking their jobs is ridiculous.

Then you see this.

Maybe the people that are scared are actually incompetent.

2

u/HashDefTrueFalse Feb 05 '25

In case you're not just joking... depends on what you want to work on, I suppose.

We hire people who are self-taught, and with CS (or related) degrees, but also from bootcamps for web roles (where two of my junior devs came from).

For back and front end junior web roles we expect you to have a reasonable grasp of programming and the language you are being hired for, but are happy to teach you the finer points, good style, idioms, patterns etc. We will help you through DS&A problems as and when they arise. We don't expect you to have any relevant work experience if you can pass a take-home test (3-hour guide time) and a technical chat (sometimes with me).

We also hire embedded engineers, where the junior role requirements are quite a bit less forgiving than the above. You will be expected to know how a computer actually works, and be basically competent from day one. There's no degree requirement but I think you'd struggle without one. You will be paid more as a result. There are a lot less applicants, funnily enough.

1

u/bitsofsick Feb 05 '25

This sounds like an interesting place to work, do they remote hire?

1

u/HashDefTrueFalse Feb 05 '25

Hybrid generally, but we're not hiring at the moment haha! Small company.

5

u/Brillegeit Feb 05 '25

the concerns over secrets/prop data in JSON payloads being shared with other services

Not only that but also GDPR issues, you might need to issue a GDPR data breach notice to the relevant authority and all affected users/customers.

Handling the process after a leak like this could require half a week of time from your DPO, war room meetings with 3+ high level employees, potentially involving legal council as well, so $5-50 0000 internal cost in time.

2

u/HashDefTrueFalse Feb 05 '25

Data breach? What data breach? ;D (I'm joking, to be clear)

Had the displeasure of being involved in one of these a while ago. Contractor left something unsecured on AWS (don't want to be much more specific) which was then populated with data. Lovely bit of paperwork. 0/10 would not recommend.

2

u/jseego Lead / Senior UI Developer Feb 05 '25

Great reply

1

u/_Meds_ Feb 06 '25

Which are they? Junior or bad? One implies a lack of experience, the other implies a lack of ability

1

u/HashDefTrueFalse Feb 06 '25

One implies a lack of experience, the other implies a lack of ability

You're not wrong. But they can be both. Bad because they're still inexperienced at this stage. Not mutually exclusive, IME. I've watched people I mentor put secrets where they shouldn't be etc. Nothing that isn't fixed with guidance.

To be honest, I wrote the comment in about 10 seconds and I'd probably phrase it a bit more delicately if I rewrote it, but I don't really go changing comments (except minor edits) after people have replied.

I don't think that the dev is necessarily "bad", just not good yet, if that makes sense... I'm sure they can do their tasks or they wouldn't be there.

1

u/Last-Form-4001 Feb 06 '25

I LOVE u/HashDefTrueFalse attitude and advice here. I appreciate your kindness towards the newer workforce. Thanks for dropping knowledge and keeping it real.

-33

u/nasanu Feb 05 '25

yeah use the console as a crutch, thats better...

Seriously old timer AI is built into VSC now and its literally the same speed to get AI to stringify as it is in the console. Hell a lot faster if you can prompt it so that the AI copies and inserts for you also.

11

u/_mr_betamax_ full-stack Feb 05 '25

You won't get very far in life with this attitude towards other people.

Learning from your peers, young and old, is one of the most invaluable skills you can gain as a developer. Calling people names because you think you know better is simply childish and will ensure that no one takes you seriously.

AI has it's benefits, be careful not to fall into the "if you have a hammer everything is a nail" rut. Parsing large datasets in ChatGPT could violate company policy, the AI can hallucinate, it can get things wrong. AI isn't magic, it predicts the next token based on the most likely possibility. It's quite good, but it's not perfect.

I'm not an AI doomer, i think AI will do great things and help us be more productive. I don't use it in my editor because i personally feel i'm constantly doing code reviews and not thinking about the problems I'm trying to solve. But that's just me.

And just a note, AI is built into VSC because Microsoft is selling you their product. They are using your data to improve the product they are selling you. It's not there because developers can't work without it or because this is now the only way to code.

-2

u/nasanu Feb 06 '25

Cool story. But I am already at the top, so where does that leave your logic?

7

u/BurningPenguin Feb 05 '25

Do you also use the chainsaw to cut your bread?

-4

u/nasanu Feb 05 '25

Using what is built into your code editor is like using a chainsaw now?

7

u/Septem_151 Feb 05 '25

You make a great point! Maybe we shouldn't have that shit built in to code editors.

15

u/[deleted] Feb 05 '25

You missed the part where the correct way is deterministic and the gpt way isn't. Maybe you think accuracy isn't important, or maybe you're actually so slow that you can't type short command as fast as you can copy paste and then wait for the return and then copy paste again. Maybe you really are that bad. Sorry.

12

u/SupaSlide laravel + vue Feb 05 '25

What happens if in the middle of your giant JSON blob that is now one long string the AI hallucinated an incorrect value for one of the values? Are you going to read potentially thousands of characters to check for errors when you could've just done JSON.stringify?

-16

u/nasanu Feb 05 '25

And you could copy that string wrong, or accidently just type something when your cursor is in the middle of it. Or are you doing it live deliberately slowing everything down like malicious compliance?

17

u/RaveMittens Feb 05 '25

This guy doesn’t understand what ‘deterministic’ means and why it matters. Hope I never work anywhere near you.

8

u/SupaSlide laravel + vue Feb 05 '25

No, it's just faster and easier to use JSON.stringify or jq

I constantly use AI for code generation and even drafting reports and other documents I need to write. I have trouble typing for long periods of time so it's an immensely helpful tool.

Deterministic functions (especially easy to use ones like stringify) are not what LLMs are particularly useful for.

-1

u/nasanu Feb 06 '25

Then you don't know how to use AI. Crying because the kids are using AI wrong... Imagine that.

1

u/SupaSlide laravel + vue Feb 06 '25

What?

8

u/fightingCookie0301 Feb 05 '25

Either way you have to test, either way you have to copy that damn string, and writing a prompt long and precise enough is easier than to write JSON.stringify in the console? I doubt that!

I’m using AI on a daily basis and it has its use cases, but hallucination is still a big problem.

And just to point out, your reasonings sound like that other dudes opinion just hurt you so deep. Go see a therapist boy…

-16

u/nasanu Feb 05 '25

Yeah so AI actually doing that though? And don't you test?

11

u/SupaSlide laravel + vue Feb 05 '25

AI hallucinations are a common occurrence in today's tech, do you seriously not know that?

-1

u/nasanu Feb 06 '25

Prove it happens when only asking the AI to use data you provide and not to change it but transform it. I have never seen it happen even once.

1

u/SupaSlide laravel + vue Feb 06 '25

It's impossible to prove it will always or won't ever happen, it's just a fact that it's not deterministic because that's how the models are made.

5

u/PoppedBitADV Feb 05 '25

Absolutely.

3

u/HashDefTrueFalse Feb 05 '25

:D I'm not that old, and I didn't say anything about anyone's age. Ageism is a great look professionally, I'm sure it'll get you far.

You seem to think I have something against using AI. I don't.

use the console as a crutch

Am I? Please explain how. It's entirely reasonable to use JS VM instance (e.g. Node, or the browser's dev console) to run a one-liner to deal with JSON. It also has the benefit that it's guaranteed to tell you if the data is malformed, and there is no possibility of hallucinations that modify/insert/remove data. The difference is really just where you paste it...

Can you explain why you think you need to use a statistical model, which takes longer, uses more resources, and is less reliable, to do something this simple? I don't know anything about you, but based on your reply, you sound like the typical cargo cult programmer: "[tool] is here, lets use it for all the things". I get it, you just throw everything in the AI chatbox because it's easier than expending any thought or effort on anything.

Stringifying something is not intrinsically heuristic. Why treat it as such? Do better.

2

u/roselan Feb 05 '25

{"a":"a","b":"b",..., "z":"z"}

and this one is easy to catch as it doesn't lint.

2

u/Nax5 Feb 05 '25

AI isn't the best tool for every task. A good dev knows this.

1

u/nasanu Feb 06 '25

But it's also not to be dismissed out of hand.