r/programming • • Sep 04 '26

Avoid adding new library to project: 10-year retrospective

https://pvs-studio.com/en/blog/posts/1408/
170 Upvotes

35 comments sorted by

View all comments

Show parent comment

2

u/-Y0- Sep 05 '26 edited Sep 05 '26

JSON parsers are trivial enough that rolling your own is often cheaper than pulling in a dependency.

HAHAHAHAHAHAHAHHAHAHAHAHAAHA.

No.

Now realize that JSON is the simplest possible of these challenges. And it's a fucking nightmare.


Reminds me how one particularly smort individual managed to implement a "rough" XML parser as output verifier. It even supported namespaces! ... Except it didn't check what XMLNS expanded names, but checked only namespace by prefix.

Took me 12hrs to debug that exceptionally smart piece of NIH-engineering. I didn't have the code, and was convinced for the first 8hrs that there was an error in my XML somehow. Next 2hrs was spent decompiling and cursing the idiot in question.