alternative scenerio:
Guy: “it turns javascript objects into texts in json format”
Soldier: “He uses javascript, shoot the poor bastard”
Alternative scenario:
Soldier B: Soldier A asked a JavaScript question instead of a software engineering question. He’s not a real soldier, shoot him
Name 3 UML diagrams and 3 architectures!
“It’s ok. Just shoot me.”
Name 3 UML diagrams
Class diagram, use case diagram and… What was the useless, barely readable evolution of flowcharts called again? Activity diagram?
and 3 architectures!
MOS 6502, amd64, and… I’ve never figured out the ARM naming scheme. AAAAAAarch64 or something?
You only get shot in one knee.
By architecture I meant software architecture.
Micro services, Service Oriented Architecture, and big old monolith ?
Are they from the army of Rust Neckbeardistan.
i’ve designed my own communication protocols that run directly on udp. i couldn’t tell you either.
Ima guess it’s javascript-ese to turn a json object into a string, perhaps for serialization. But no clue, coding for decades but always hated js, I guess my way through with a linter and IDE when I absolutely, positively, cannot find an alternative, which seldom happens.
I mean, the meme could’ve been ‘oh, it’s JS, shoot me’
Before yaml, I used json with Ruby it was way nicer to read than xml config files ( but way before that I started using it with PHP and Actionscript)
Yeah you don’t have to be using JavaScript to use json. Yes I know it’s part of the name, but it’s just an object notation which is the other part of the name, and this has become widely accepted for use in nearly all popular languages and frameworks.
Are there any other languages that would also have Json.Stringify? I only read JS sometimes and never write those, so I may be wrong about that.
JSON itself is fine, yeah
Not sure but with Ruby it was JSON.generate(ruby_object).
And it returned - JSON string of your argument.
I mean, that’s fine, right up till you have to communicate with something else. Given that 99% of APIs out there use JSON.
only on the web.
Uh-huh, and where do you think most “something else that you would interact with” live from a computing standpoint. It’s not like you’re using X12 or HL7 everywhere.
you’re a few layers too high up then. i work mostly in ble and lora networks. json is waaay to verbose.
Wait until you hear about this XML thing.
I refuse to believe you couldn’t infer what this is, you’re way too smart and you could definitely just guess.
turning a data structure into a string is usually called like “marshal” or “render” or “dump” or something, “stringify” doesn’t really imply anything except something about the json being turned into a string. for all i know it could be replacing all the values with toString’ed versions.
Another guess just based on the terms is it could be a method that throws your json object into a black hole and returns the version of the object that is stretched out to infinity.
Though that’s just an optical illusion, in reality the object would be ripped apart by the gravity or extreme radiation, depending on whether it was a small or large black hole.
Your guesses are more useful, but I can’t fathom what goes on in the mind of JavaScript devs.
TypeError: JSON.stringfy is not a function
Oh shit didn’t notice the typo. Probably the all caps didn’t help.
Its ok, JavaScript is an interpreted language so the client won’t notice until after we’ve shipped.
Maybe the client’s interpreter’s autocorrect will fix it at run time.
Not as far-fetched a scenario as in a sane world it should be. I could imagine the next version of Chrome running a local mini-Gemini instance with a custom system prompt __“You are a fast, secure, and error-free Javascript JIT compiler…”_
of course MIT uses their own JSON primitives
I ll do you a better one. Why is Jason?
Don’t ask - if he told you then he’d have to kill you…

Jesus Christ!
No no no no no - keep up! We’re talking about “Jason” - the one who was killed but came back to continue his task anyway… oh, I see the confusion now 🤔🤪

because otherwise the javascript objects would be unnoted
Drax the Destroyed.
Ugh, terrible memory unlocked.
I asked someone a similar question in an interview once. They weren’t doing well and I wanted to end on a positive at least. I asked them to make a dict in python and for extra credit, turn it into a string using whatever library or method they want.
This was not for a junior position.
5 minutes of for loop insanity later they disconnected crying. I always felt bad for that guy.
cat = dict(name=‘Garfield’, color=‘orange’) str(cat)Can I have that job?
I would have accepted this answer.
I was hoping for json.dumps, but that’ll work.
I think json.dumps would not work if there is a datetime in the dict, right?
Yeah there’s other edge cases too, like Decimal, but as long as you have those things imported when you send it through dumps it should work.
Just tried it in an ipython shell
import datetime import json json.dumps({"a": datetime.datetime(1970,1,1)})And I got the TypeError: datetime not JSON serializable though.
If you don’t care you can pass in default=str (I think) but if you do care you can define a function for what the string representation should look like and pass that in, but that’s a happy path case to be honest. I usually only run into this problem when something is logging unk own data, so I pass in the default=str just to get it functional.
Duck typing usually works but, datetime man, datetime is the warp from Warhammer 40K, it will drive you mad.
Subtle hint that this is not for them.
When imposter syndrome meets an actual imposter!
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.
Web developer, or business developer. A lot of inter-system communications these days is in JSON, whether there is any JavaScript involved or not.
honestly, this is used for debugging. Why not just pass the object as value to the console.log()
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.
Stringify is used to serialize an object poorly
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
Javascript is a human rights violation
i agree but hate to add the caveat that it (well, typescript) these days is by far the language that i’m most productive in, with the fewest bugs
it took me a long time to admit that to myself
it’s still a human rights violation
Ah, I see where he went wrong. The correct answer was “JavaScript? Ew.”
I was with Jason Stringify just last night, but he tried to convert me to a new religion so I left.
Ew JavaScript
Dude, it runs client side code for most of the Internet.

“What does JWT stand for?”
“That’s easy. JWT tokens are…”
“Shoot him.”
Sprechen sie YAML?
XML has entered the chat
Norway I dont
just jq and cut to the chase
It’s spelled “j/k”
JSON Statham














