DEV Community

Cover image for Do we need npm packages after Chat GPT?

Do we need npm packages after Chat GPT?

shrey vijayvargiya on May 24, 2023

Well, small npm modules have to be deprecated or will become useless. Under the Hood This story is again another prediction in the last...
Collapse
 
ervin_szilagyi profile image
Ervin Szilagyi

Unfortunately, articles like perfectly reflect the problem with code generation tools based on AI. The problem is the confidence, with which ChatGPT/Copilot/etc. are offering us a seemingly flawless solution.

Certainly, small npm packages can have their on problems with possibility of having undiscovered bugs. But I would very much trust some code written and reviewed by actual humans, rather than code generated by a statistical model.

Please use due diligence and don't just rely on code generated by AI.

Collapse
 
blindfish3 profile image
Ben Calder

^ this!
Carefully selected small npm modules are usually well established and tested in the wild. If an issue is found it is reported and the issue can be fixed. The maintenance burden is distributed and, in general, this is a reliable model (albeit with some risks).

ChatGPT will at best give you equivalent code to one of these modules and leave you with the maintenance burden and not warn you of an issue is found. I see no advantage whatsoever 🤷

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

That's a good point to be mentioned, I think Chat GPT will give the way out to maintain these packages, not sure but AI has the capability

Thread Thread
 
blindfish3 profile image
Ben Calder

Maybe later something will come along that can maintain the code it provides you; but right now ChatGPT is totally incapable of doing that. It simply doesn't work that way...
And that's the great conceit. So much hype; but it's just the accumulation of huge amounts of stolen data. There's no "intelligence" there whatsoever. It's the technical equivalent of Donald Trump...

Collapse
 
rmoskal profile image
Robert Moskal

Go far down this road and you and chatgpt are going to be maintaining lots of code.

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Yeah definitely!!

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

Please add the language tag to the codeblocks

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Sure!!!

Collapse
 
raythurnevoid profile image
Ray Thurne Void

I agree, i see many good points in the comments about maintainability and be able to solve only trivial tasks.
I think this is not the time yet but we may end up in this direction, maybe we'll see "library" specific fine tuned models that are able to generate code and even update the code when a change is made in the main repository (even if you have customized the code); this is theoretically possible, just very hard and probably 2-5 years away.

Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

Yeah, agreed!!!!

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
shreyvijayvargiya profile image
shrey vijayvargiya

I will take care of it next time!!!