this post was submitted on 12 Aug 2026
974 points (97.6% liked)

Programmer Humor

32786 readers
217 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] porous_grey_matter@lemmy.ml 68 points 3 days ago (3 children)

Not sure every software engineer needs to know this. If they'd said web developer I suppose this would really be expected knowledge, but then you'd probably want to shoot them anyway.

[–] SparroHawc@piefed.world 8 points 2 days ago (2 children)

Web developer, or business developer. A lot of inter-system communications these days is in JSON, whether there is any JavaScript involved or not.

[–] kkj@lemmy.dbzer0.com 1 points 1 day ago* (last edited 1 day ago)

Sure, but then you'd be using json_encode, json.dumps, Json.Serialize, etc., not JSON.stringify.

[–] Jakeroxs@sh.itjust.works 1 points 2 days ago (1 children)

Do people really conflate json and javascript normally though? Java and javacript I get but no one actually says the full json acronym and it basically has an identity of its own.

[–] SparroHawc@piefed.world 1 points 2 days ago

A lot of people in this comments section sure seem to be.

[–] Waterpumpee@lemmus.org 9 points 3 days ago (2 children)

honestly, this is used for debugging. Why not just pass the object as value to the console.log()

[–] jaybone@lemmy.zip 6 points 3 days ago (1 children)

Stringify is used to serialize an object. This is useful if you are going to store the object or transfer the object contents to some other system or component, possibly over a network using a network protocol.

For debugging, you should use a function like console.log, which depending on the client might even offer an interactive UI to explore the object with structurally aware context. Not just print a giant string, which you get from stringify.

[–] PumaStoleMyBluff@lemmy.world 3 points 3 days ago (1 children)

Stringify is used to serialize an object poorly

[–] pupbiru@aussie.zone 7 points 2 days ago

stringify is used to serialize an object good enough in the large majority of cases because we have far more poorly implemented hacks to work around

[–] TrickDacy@lemmy.world 4 points 3 days ago

Not only used for debugging and also if you log a complex object, the way it gets displayed in the console is not always easy/possible to fully inspect. It will get.. truncated for lack of a better word

[–] Funkt4st1c@lemmy.world 1 points 2 days ago (1 children)

A lot of info going through the network is either using or converted to either json or xml. If the software being developed is entirely local, then sure

[–] porous_grey_matter@lemmy.ml 1 points 2 days ago

Yeah, but the function isn't always called stringify