• Avicenna@programming.dev
    link
    fedilink
    arrow-up
    164
    arrow-down
    2
    ·
    9 days ago

    alternative scenerio:

    Guy: “it turns javascript objects into texts in json format”

    Soldier: “He uses javascript, shoot the poor bastard”

    • Blue Label@lemmy.world
      link
      fedilink
      English
      arrow-up
      64
      arrow-down
      1
      ·
      9 days ago

      Alternative scenario:

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

        • Rose@slrpnk.net
          link
          fedilink
          arrow-up
          10
          ·
          8 days ago

          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?

  • porous_grey_matter@lemmy.ml
    link
    fedilink
    arrow-up
    65
    arrow-down
    1
    ·
    9 days ago

    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
      link
      fedilink
      English
      arrow-up
      8
      ·
      8 days ago

      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
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

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

      • Jakeroxs@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        8 days ago

        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.

    • Funkt4st1c@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      8 days ago

      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

      • Tetragrade@leminal.space
        link
        fedilink
        English
        arrow-up
        8
        ·
        8 days ago

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

          • uen3@sh.itjust.works
            link
            fedilink
            arrow-up
            6
            ·
            8 days 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…”_

  • Zacryon@feddit.org
    link
    fedilink
    arrow-up
    50
    arrow-down
    4
    ·
    8 days ago

    I have worked with JSON very often and do not know, what ‘Stringify’ is. Reading it for the first time. Does it… convert anything to strings?

    Looked it up:

    The JSON.stringify() Method

    The JSON.stringify() method converts a JavaScript value into JSON text.

    https://www.w3schools.com/js/js_json_stringify.asp

    Okay JavaScript. Never worked with JS before.

    Also, didn’t knew web devs are considered ‘software engineers’ now. /j

    • 3abas@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      7 days ago

      How is it that you worked with JSON very often and don’t know that it stands for JavaScript Object Notation or what stringify does?

      • Zacryon@feddit.org
        link
        fedilink
        arrow-up
        3
        ·
        7 days ago

        I use it as a format for, e.g., config files or for serializing data in a human readable format. Mainly from C++, sometimes from Python or C#.

        Never in these years did I stumble over stringify.

      • Hobo@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        7 days ago

        Cause json has become ubiquitous in a lot of other contexts. Heck on a ton of Cisco NXOS implementations you can even pipe output to json in the cli. It’s also used in a shitload of application configurations now instead of a flat .conf file too. In fact when I really think about it, I haven’t touched JS in a long freaking time (like years), but have probably touch json at least once a week. I just don’t find it that far fetched that someone would be working with json daily and be incredibly divorced from it’s original implementation.

        • 3abas@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          6 days ago

          But they keep implying they are software engineers using JSON in a development capacity… I’d understand a system admin updating a config file to only be familiar with the syntax, but if you’re consuming JSON in your code you either understand the spec enough to implement it, or you didn’t write that code…

          Something rubbed me wrong about not knowing what JSON is and insulting web developers as not real software engineers in the same breath.

      • locuester@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        7 days ago

        They didn’t say they don’t know what it stands for.

        They don’t work with JavaScript. I don’t deal with JS very often at all. I do know stringify, since I did a bunch of JS stuff back in the 2010s. But it’s not unreasonable for a dev to not know JS.

    • underscores@lemmy.zip
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      16
      ·
      8 days ago

      it’s funny seeing a gatekeeper talking about web devs not being a software engineer while also not knowing basic JavaScript

      📽️

      • mobyduck648@lemmy.world
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        8 days ago

        As a software engineer I avoid JS as much as possible frankly! Its typing semantics are genuinely horrible, personally I’d never consider eschewing typescript in this day and age.

        Then again I’m the sort of masochist who thinks we should all be writing Scala so maybe take this with a pinch of salt.

        • Upgrayedd1776@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          7 days ago

          with vibe coding, finding a library that is exhaustively covered is part of being successful. JS is very popular and llms like it, its sort of like moving to an aws shop from an azure shop, just different strokes for different blokes, as long as they leave the money on their way out

          • mobyduck648@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            7 days ago

            It’s not just about how many examples of a language exist in the LLM’s distribution though, dynamic typing is a poor choice if you’re using LLMs for software in my view because it turns compile-time errors into runtime errors which will only be caught if the LLM writes a suitable test; an area that they still leave a fair bit to be desired in.

            The whole virtue of dynamic typing is that it reduces cognitive load on the programmer, if you’re using LLMs there’s no reason to do that in my opinion, you’re offloading a bunch of cognitive load to begin with so expressiveness and constraint is more important than human ergonomics. Yes there’s loads of JS in an LLM corpus but a lot of it is going to be poor examples, because it’s generally quite easy to write JS badly. If you use typescript you’re at least forcing a few common hallucinations to produce compile-time errors which the model has immediate feedback for, and you’re giving the model more context on what it’s seeing.

            • Upgrayedd1776@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              7 days ago

              i also find a robust docs SOT directory of big domains, fallow, madge, knip, ts, and an extra declaritive schema documenation layer on top of migrations schema to be a big help in grounding and keeping rails up

  • _stranger_@lemmy.world
    link
    fedilink
    arrow-up
    31
    ·
    8 days ago

    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.

        • mel ♀@jlai.lu
          link
          fedilink
          arrow-up
          1
          ·
          8 days ago

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

          • _stranger_@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            7 days ago

            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.

            • mel ♀@jlai.lu
              link
              fedilink
              arrow-up
              1
              ·
              7 days ago

              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.

              • _stranger_@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                7 days 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.

    • Pup Biru@aussie.zone
      link
      fedilink
      English
      arrow-up
      9
      ·
      8 days ago

      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

      • iocase@lemmy.zip
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        8 days ago

        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.

  • Flagstaff@programming.dev
    link
    fedilink
    English
    arrow-up
    12
    ·
    8 days ago

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