top 100 comments

sorted by: hot top controversial new old
[–] 77 points 2 months ago (25 children)

i've designed my own communication protocols that run directly on udp. i couldn't tell you either.

  • source
  • hideshow 25 child comments
  • [–] 20 points 2 months ago (10 children)

    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.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 26 points 2 months ago (9 children)

    I mean, the meme could've been β€˜oh, it's JS, shoot me’

  • source
  • parent
  • hideshow 9 child comments
  • [–] 8 points 2 months ago (8 children)

    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)

  • source
  • parent
  • hideshow 8 child comments
  • [–] 10 points 2 months ago (5 children)

    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.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 3 points 2 months ago (4 children)

    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

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 2 months ago (1 child)

    Holy cow! I don't think I've ever met another developer who actually admits to using action script back in the day. Greetings fellow old person!

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 2 months ago

    Yup pre iPhone front end development was all over the place. I actually started with Macromedia flash when it was still just a few actions. I think 1998-99 was the first time I used it. AS3 was a neat language though, I still kinda miss it now and then.

  • source
  • parent
  • [–] 3 points 2 months ago (7 children)

    I refuse to believe you couldn't infer what this is, you're way too smart and you could definitely just guess.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 6 points 2 months ago (6 children)

    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.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 3 points 2 months ago* (last edited 2 months ago) (4 children)

    doesn’t really imply anything except something about the json being turned into a string

    yeah that's basically it, I know you're leaning into your existing knowledge (of likely C-based stuff) but your line of thinking is about right about how you're inferring things ... naming and stuff gets a bit "different" or less serious when you go into JS land sometimes.

    What's funny is if this were a real job interview question and you answered in the way that you did ... the way you answered it told me more about yourself and your qualifications than just getting it exactly right

  • source
  • parent
  • hideshow 4 child comments
  • [–] 4 points 2 months ago (3 children)

    man if i have to hear about "hydration" one mare time...

    that's exactly why i always prefer doing conversation-style interviews rather than quizzing people. knowledge is fine, but you only really get opinions by actually using tools.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 2 months ago (2 children)

    I much prefer conversational style interviews. I also like having them tell me about shit and then getting into the weeds of what they've been through.

    I've been through so many stupid quizzing type interviews. I remember one where they wanted to ask about covariance and contravariance and I roughly stated I learned about it when writing my own compiler and it's about types and how one can follow the typing direction of typing, for let's say parameter/return values and the other can go the other way but I forget which is which typically. The guy was like, "guess which one is which?" I said, "why? it'd just be a guess, I thought I demonstrated that I'm at least familiar with the concepts", he said, "I can't mark down you got this question is right unless you get the right answer" ... I said, "let's skip it then".

    Another one was where he asked me if I knew "WPF" which is a Microsoft framework to write desktop apps. I said, "it's not on my CV, and I've only used it at home a few times but you can ask me questions if you'd like", he then said with a smirk on his face, "if you want to answer the WPF portion, and you get it wrong then you look bad, but if you get it right then you look good, so what do you want to do?", I said, "I think this is up to you as an interviewer -- I've told you where I stand"

    There was a lot of that ... like based on THEIR questions -- I don't know shit ... but they're not quizzing my experience at all.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 months ago (1 child)

    whoof.

    conversational style interviews can go wrong quickly though; i recently interviewed for a position where the conversation turned into the interviewer explaining how he'd connected everything in his rv to home assistant. i'm not really into home automation but the communication bit was at least interesting until he dropped that he'd let claude do everything and he didn't actually care how it worked.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 2 months ago

    he’d let claude do everything and he didn’t actually care how it worked.

    😱

    I hired someone that recently put up PRs and when I asked what they were for, he had no idea ... he hasn't ran or tested a single one ... just vibing everything.

    When I saw his Terraform PRs ... I was like, "show me how you run this". I shortly found out he never had Terraform installed and didn't know how to switch AWS profile at all. He let's AI do everything. Also, he kept sending me AI convos and I was like, "if you send me another one without reading it first and summarizing it for me, I'm going to lose my shit". He said, "I wanted to send you the proof" ... I said, "you sent me half a page of nonsense where you didn't respect my time enough to read yourself first"

  • source
  • parent
  • [–] 0 points 2 months ago

    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.

  • source
  • parent
  • [–] 3 points 2 months ago (5 children)

    I mean, that’s fine, right up till you have to communicate with something else. Given that 99% of APIs out there use JSON.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 3 points 2 months ago (3 children)
  • [–] 6 points 2 months ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 63 points 2 months ago (10 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.

  • source
  • hideshow 10 child comments
  • [–] 8 points 2 months ago (3 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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 7 points 2 months ago (4 children)

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

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 2 months ago (2 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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 months 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

  • source
  • parent
  • load more comments (1 reply)
    [–] 61 points 2 months ago* (last edited 2 months ago) (5 children)

    TypeError: JSON.stringfy is not a function

  • source
  • hideshow 5 child comments
  • [–] 8 points 2 months ago (3 children)

    Oh shit didn’t notice the typo. Probably the all caps didn’t help.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 8 points 2 months ago (2 children)

    Its ok, JavaScript is an interpreted language so the client won't notice until after we've shipped.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 months ago (1 child)

    Maybe the client's interpreter's autocorrect will fix it at run time.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 2 months ago

    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.."_

  • source
  • parent
  • [–] 160 points 2 months ago (8 children)

    alternative scenerio:

    Guy: "it turns javascript objects into texts in json format"

    Soldier: "He uses javascript, shoot the poor bastard"

  • source
  • hideshow 8 child comments
  • [–] 61 points 2 months ago* (6 children)

    Alternative scenario:

    Soldier B: Soldier A asked a JavaScript question instead of a software engineering question. He's not a real soldier, shoot him

  • source
  • parent
  • hideshow 6 child comments
  • [–] 15 points 2 months ago (5 children)

    Name 3 UML diagrams and 3 architectures!

  • source
  • parent
  • hideshow 5 child comments
  • [–] 10 points 2 months ago (3 children)

    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?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 34 points 2 months ago (5 children)

    I ll do you a better one. Why is Jason?

  • source
  • hideshow 5 child comments
  • [–] 18 points 2 months ago (2 children)

    Don't ask - if he told you then he'd have to kill you...

    img

  • source
  • parent
  • hideshow 2 child comments
  • [–] 29 points 2 months ago (15 children)

    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.

  • source
  • hideshow 15 child comments
  • [–] 22 points 2 months ago (5 children)

    when i last did interviews we didn't do live coding, but chatted to applicants about things they liked about their preferred language (this was a consultancy position). people who actually like to program tend to have loads of opinions. juniors moreso. the less engaged people were with those questions, the worse the solution the their take-home task tended to be.

    a friend of mine interviewed a candidate who apparently visibly froze after every question, like it was a quiz. turns out they were being fed answers from people off-screen and those people hadn't expected casual conversation. they were found out when they forgot to mute.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 11 points 2 months ago* (3 children)

    I once had a candidate give the join link to the meeting out to several people (there were 3 unknown people in the call in addition to me and him). I immediately explained we can't do the interview with all these other people on the call and he proceeded to try and gaslight me that there were no other people in the call, like he honestly thought he had jedi mind truck powers.

    I called over several coworkers to witness the clusterfuck, many lols were had.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 4 points 2 months ago (1 child)

    Sounds like someone bullshitted their way through school to get a technical degree, not realizing that their bullshitting depended on the person they were bullshitting not being good or confident with technology, which gets rarer when you go into a technical career.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 2 months ago

    Haha I have also done an interview where the person had a friend in the room feeding them answers, though this one must have assumed his mic was worse than it was and didn't mute at all, so we could hear the mumbling of answers. To make it even funnier, though, their friend wouldn't have gotten hired either because none of their answers were good.

    I kinda wanted to tell them they should find a smarter friend to help them cheat at interviews but instead just thanked them for their time and ended the interview.

    Though tbh, I wasn't really impressed by any of the new grads from the schools we were looking at. Some of them made me wonder if they learned anything at all about software development during their time at school.

  • source
  • parent
  • [–] 14 points 2 months ago (5 children)
    cat = dict(name=β€˜Garfield’, color=β€˜orange’)
    str(cat)
    

    Can I have that job?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 5 points 2 months ago (4 children)

    I would have accepted this answer.

    I was hoping for json.dumps, but that'll work.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 2 months ago (3 children)

    I think json.dumps would not work if there is a datetime in the dict, right?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 2 months ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 months ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 2 months ago*

    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 unknown data (otherwise I prefer to model data like this so the IDE is happy) 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.

  • source
  • parent
  • [–] 17 points 2 months ago
    [–] 15 points 2 months ago (5 children)
  • [–] 5 points 2 months ago (3 children)
  • [–] 29 points 2 months ago (2 children)

    Ah, I see where he went wrong. The correct answer was "JavaScript? Ew."

  • source
  • hideshow 2 child comments
  • [–] 13 points 2 months ago

    "What does JWT stand for?"

    "That's easy. JWT tokens are..."

    "Shoot him."

  • source
  • [–] 25 points 2 months ago (4 children)

    Javascript is a human rights violation

  • source
  • hideshow 4 child comments
  • [–] 8 points 2 months ago (3 children)

    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

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 2 months ago* (last edited 2 months ago) (1 child)

    It is my GOD given RIGHT to pull half of NPM through MY MACHINE (and get compromised by 500 different MALICIOUS packages) due to my NEED for the MOST up to date PACKAGES!

    I WILL have my hourly update to iseven() or I WILL have DEATH.

    "There's just no way to prevent these kinds of attacks" says only language where this consistently happens.

    If you ARENT updating your libraries every 15 MINUTES are you even a REAL PROGRAMMER!?

    I MUST get ALL of the latest vulns and exploits on my machine NOW!

    I've even written a script to change my API tokens for me since they get STOLEN so OFTEN because my OTHER SCRIPT updates NPM dependencies CONSTANTLY so I can ALWAYS be the FIRST to PULL IN the newest MALWARE.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 12 points 2 months ago (10 children)

    Huh, this made me realize all these years that I've been pronouncing it as "jay-sawn." Is it really pronounced like "Jason?"

  • source
  • hideshow 10 child comments
  • [–] 9 points 2 months ago (3 children)

    I've heard both. Personally, I will continue to pronounce it "Jay-Sawn" until I hear a damn good reason for why I should stop.

  • source
  • parent
  • hideshow 3 child comments
  • load more comments
    view more: next β€Ί