• 0 Posts
  • 50 Comments
Joined 1 year ago
cake
Cake day: June 22nd, 2023

help-circle






  • masterspace@lemmy.catoProgrammer Humor@programming.devTrying to understand JSON…
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    5 days ago

    No there isn’t.

    Tell me how you partially change an object.

    Object User :

    { Name: whatever, age: 0}

    Tell me how you change the name without knowing the age. You fundamentally cannot, meaning that you either have to shuttle useless information back and forth constantly so that you can always patch the whole object, or you have to create a useless and unscalable number of endpoints, one for every possible field change.

    As others have roundly pointed out, it is asinine to generally assume that undefined and null are the same thing, and no, it flat out it is not possible to design around that, because at a fundamental level those are different statements.





  • masterspace@lemmy.catoProgrammer Humor@programming.devTrying to understand JSON…
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    2
    ·
    edit-2
    6 days ago

    They’re not subtle distinctions.

    There’s a huge difference between checking whether a field is present and checking whether it’s value is null.

    If you use lazy loading, doing the wrong thing can trigger a whole network request and ruin performance.

    Similarly when making a partial change to an object it is often flat out infeasible to return the whole object if you were never provided it in the first place, which will generally happen if you have a performance focused API since you don’t want to be wasting huge amounts of bandwidth on unneeded data.






  • masterspace@lemmy.catoProgrammer Humor@programming.devGOD DAMMIT STEVEN! NOT AGAIN!
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    2 months ago

    No it wouldn’t. You’d have git beginners committing IDE configs and secrets left and right if -A was the default behavior.

    No, you wouldn’t because no one is a git beginner, they’re a software developer beginner who need to use git. In that scenario, you are almost always using repos that are created by someone else or by some framework with precreated git ignores.

    You know what else it could do? Say “hey, youve said add with no files selected, press enter to add all changed files”

    Esc, :, q. Sure it’s a funny internet meme to say vim is impossible to quit out of, but any self-respecting software developer should know how, and if you don’t, you have google. If you think this is hard, no wonder you struggle with git.

    Dumping people into an archaic cli program that doesn’t follow the universal conventions for exiting a cli program, all for the the goal of entering 150 characters of text that can be captured through the CLI with one prompt, is bad CLI design.

    There is no reason to ever dump the user to an external editor unless they specifically request it, yet git does, knowing full well that that means VIM in many cases.

    And no, a self respecting software developer wouldn’t tolerate standards breaking, user unfriendly software and would change their default away from VIM.

    Git’s authors were the first users. The team that started the linux kernel project created it and used it because no other version control tool in existence at that time suited their needs. The subtle implication that you, as a user of git, know better than the authors, who were the original users, is laughable.

    Lmao, the idea that we should hero worship every decision Linus Torvalds ever made is the only thing laughable here.




  • Lol if an employer can’t have an intelligent discussion about user friendly interface design I’m happy to not work for them.

    Every interview I’ve ever been in there’s been some moment where I say ‘yeah I don’t remember that specific command, but conceptually you need to do this and that, if you want I can look up the command’ and they always say something along the lines of ‘oh no, yeah, that makes conceptual sense don’t worry about it, this isn’t a memory test’.


  • git add with no arguments outputs a message telling you to specify a path.

    Yes, but a more sensible default would be -A since that is how most developers use it most of the time.

    git commit with no arguments drops you into a text editor with instructions on how to write a commit message.

    Git commit with no arguments drops you into vim, less a text editor and more a cruel joke of figuring out how to exit it.

    Again, I recognize that git has a steep learning curve, but you chose just about the worst possible examples to try and prove that point lol.

    Git has a steep learning curve not because it’s necessary but because it chose defaults that made sense to the person programming it, not to the developer using it and interacting with it.

    It is great software and obviously better than most other version control systems, but it still has asinine defaults and it’s cli surface is over complicated. When I worked at a MAANG company and had to learn their proprietary version control system my first thought was “this is dumb, why wouldn’t you just use git like everyone else”, then I went back to Git and realized how much easier and more sensible their system was.