• onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    60
    arrow-down
    10
    ·
    1 month ago

    The reactions here are why people don’t join forums, don’t ask questions, or choose to learn alone. “duh, I knew that”. Yes, the dude didn’t, which is exactly why he’s frustrated. I think too many have forgotten what it’s like to be a beginner and make a fatal mistake, which would explain the mocking responses here and things like recommending new linux users Arch.

    Anti Commercial-AI license

    • CosmicTurtle0@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      18
      arrow-down
      9
      ·
      1 month ago

      There is a difference between someone who is new and experiences something like their IDE deletes a file that was unexpected and asking a question about why it did that.

      Then there are arrogant assholes who believe their shit doesn’t stink and that they couldn’t have done anything wrong and it was the IDE’s fault for not knowing what they wanted to do versus what they commanded it to do.

      The OP is the latter.

      • rothaine@lemm.ee
        link
        fedilink
        arrow-up
        20
        ·
        1 month ago

        I mean, not entirely, and he says he lost months worth of work. Like imagine you know nothing of git:

        • Click buttons in the IDE to add source control.

        • IDE says a bunch of files have been changed.

        • But I don’t want to make changes to the files, I want to source control them.

        • Attempt to undo the changes. Click “discard changes” thinking it will put them back to how they were before clicking add source control. Get a warning dialog that this is not undoable, but that’s fine because I don’t want whatever changes it made to my files anyway.

        • All files are deleted and unrecoverable.

        Like that experience sucks balls and it’s reasonable that a person wouldn’t expect “discard” == “delete”. Also, from reading the GitHub thread, apparently at that time VSCode was doing a git clean when you clicked this. Which like…yeah why the hell would it do that lol? I don’t think I have ever used git clean in my entire career.

        • Scary le Poo@beehaw.org
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          Months worth of work. Going an entire day without committing should never happen. Also, rawdogging it without a backup?

          Nope, dude learned a hard lesson. No sympathy. He thought that the rules of data storage don’t apply to him and he got boned.

          • rothaine@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            1 month ago

            He did learn a hard lesson, but it sounds like this was exactly what he was attempting to rectify. “This project is pretty important to me. I should probably figure out how to use source control and put it on GitHub” but then by doing so, and due to some arguably poor UX decisions in VSC, destroyed the project.

            If someone’s trying to learn how to do something you can’t just be like “well you should’ve already known how”, you know what I mean?

            Well actually, let’s qualify that: there are cases where people try to jump right in the deep end. “I’m just learning woodworking! Step 1: build a new deck for my house”, like yeah bro what are you doing, let’s start with a birdfeeder or something.

            But that’s not what happened here. He tried to use the built-in GUI, which many would assume would be easier to learn than jumping right to the CLI, and it burned him in a way he didn’t even realize was possible.

    • Zagorath@aussie.zone
      link
      fedilink
      English
      arrow-up
      42
      arrow-down
      5
      ·
      1 month ago

      I understand the impulse to be empathetic and kind. But it’s very hard to respond in good faith to someone who just made a post where more than half the words are “fuck you”.

      • madcaesar@lemmy.world
        link
        fedilink
        arrow-up
        34
        arrow-down
        5
        ·
        1 month ago

        A feature that permanently deletes 5000 files with one click without warning deserves a fuck you.

        • BatmanAoD@programming.dev
          link
          fedilink
          arrow-up
          24
          arrow-down
          4
          ·
          1 month ago

          It had a reasonably clear warning, though; a screenshot is included in this response from the devs. But note that the response also links to another issue where some bikeshedding on the warning occurred and the warning was ultimately improved.

          • ClassifiedPancake@discuss.tchncs.de
            link
            fedilink
            arrow-up
            4
            ·
            1 month ago

            If you have no idea what Git is, that warning message is not telling you you’re about to delete 5000 files.

            But I wonder if this person maybe does know about Git because they used the word „stage“.

          • tfw_no_toiletpaper@lemmy.world
            link
            fedilink
            arrow-up
            18
            ·
            1 month ago

            OK this is hilarious

            When you sell hammers you’ll likely have people using them to hit their own heads, which, understandably, they will put the hammer at fault. Now, we already put a big don’t hit this on your own head label on our hammer. Should we actually prohibit people from head hitting with our hammers? Probably not, since some users still want to hit heads with it. It’s just how hammers work.

          • Prandom_returns@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            1 month ago

            “Discard changes” is usually equivalent to “cancel” or “quit without saving”. Not shift+delete files lol.

          • Buddahriffic@lemmy.world
            link
            fedilink
            arrow-up
            14
            ·
            1 month ago

            I disagree that that warning is reasonably clear. Even the comment that included it has the line of thought, where the user, not knowing what terms git uses thinks that they just did an action that is going to change each of their files. It makes sense that they’d want to discard those changes. That user then goes on with some snark about not wanting to learn any more about what they are playing with and that other programs would do the same, but “discard changes” seems like it would have a clear meaning to someone who doesn’t know git.

            The warning says it isn’t undoable but also doesn’t clarify that the files themselves are the changes. Should probably have a special case for if someone hits discard changes on a brand new repository with no files ever checked in and hits discard on a large number of files instead of checking them in. Even a “(This deletes all of the local files!)” would make it clear enough to say what the warning is really about.

  • AnAmericanPotato@programming.dev
    link
    fedilink
    English
    arrow-up
    151
    arrow-down
    6
    ·
    1 month ago

    I feel bad for this kid. That really is a bad warning dialog. Nowhere does it say it’s going to delete files. Anyone who thinks that’s good design needs a break.

    Half the replies are basically “This should be obvious if your past five years of life experience is similar to mine, and if it isn’t then get fucked.” Just adding insult to injury.

    • Omega_Jimes@lemmy.ca
      link
      fedilink
      arrow-up
      74
      arrow-down
      2
      ·
      1 month ago

      I’m not great at English, but “discard all changes” shouldn’t ever mean “Delete”.

      • Michal@programming.dev
        link
        fedilink
        arrow-up
        40
        arrow-down
        9
        ·
        1 month ago

        In the context of version control it does. Discarding a change that creates a file means deleting the file.

        • thebestaquaman@lemmy.world
          link
          fedilink
          arrow-up
          15
          ·
          1 month ago

          If you have set up your staging area for a commit you may want to discard (unstage) changes from the staging area, as opposed to discarding changes in the working directory.

          Of course, the difference between the two is obvious if you’re using git CLI, but I can easily see someone using a GUI (and that maybe isn’t too familiar with git) misunderstanding “discard” as “unstage”.

          Either way, what happened here indicates that all the files were somehow added to the VC, without having been committed first, or something like that, because git will not let you discard a file that is untracked, because that wouldn’t make any sense. The fact that the GUI let this person delete a bunch of files without first committing them to the index is what makes this a terrible design choice, and also what makes the use of the word “discard” misleading.

        • Omega_Jimes@lemmy.ca
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          1 month ago

          Ok fair enough, but I’m under the impression these files existed before the source control was implemented.

          I guess it’s all up to how the program handles existing files.

          • FiskFisk33@startrek.website
            link
            fedilink
            arrow-up
            4
            ·
            1 month ago

            I guess the newly created git repository was empty, and all the files that was present in the folder represented “changes”

      • stebo@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        7
        arrow-down
        2
        ·
        1 month ago

        I’m pretty sure vscode shows a confirmation dialog when discarding changes will permanently delete a file. I’ve done that recently with temporary files that were no longer needed.

      • stebo@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        1 month ago

        the alternative to deleting is emptying the file contents, which is essentially the same…

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 month ago

      It’s so fucking infuriating that so many devs act like this. “This should’ve been obvious!” Fuck off, that’s an unhelpful statement. “You should’ve been using version control! No backup, no sympathy!” Fuck off, they were literally trying to begin using version control for backups.

      Even half the comments on this very Lemmy thread are disparaging this dev. I wonder how many actually read the thread and found that there was a bug discovered causing this feature to delete files not even associated with git?

      But, congratulations to them, I suppose. Congratulations on making fun of someone. I hope it makes them feel powerful. 🙄 Devs can be so toxic.

    • Scary le Poo@beehaw.org
      link
      fedilink
      arrow-up
      1
      arrow-down
      4
      ·
      edit-2
      1 month ago

      If you’re going to use a git tool, you need to know how git works.

      There are 0 excuses for not having months of work in a repo, none. I have no sympathy whatsoever. How the fuck do you spend so many months without backing up your project or stuffing it in a repo?

      No sympathy. Dude is a shit developer and he learned an invaluable lesson.

      • AnAmericanPotato@programming.dev
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 month ago

        My guess is that this is a teenager, and this is probably their first experience with git and version control in general. Just a hunch.

        Anyway, it is reasonable to expect a mainstream GUI app from one of the largest companies in the world to be approachable for people who do not know all the inner workings of the command line tools that are used behind the scenes. And it is reasonable to expect any destructive action to have clear and bold warnings. “Changes will be discarded” is not clear. What changes? From the user’s perspective, the only changes were regarding version control, so “discarding” that should leave them where they started — with their files intact but not in version control.

        Have mercy on the poor noobs. We were all there once.

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 month ago

        If you’re going to use a git tool, you need to know how git works.

        I guarantee you at least half of git users would get glossy eyes as soon as you mention blobs and trees, yet they all still manage to use it daily successfully.

        There are 0 excuses for not having months of work in a repo, none. I have no sympathy whatsoever. How the fuck do you spend so many months without backing up your project or stuffing it in a repo?

        I need you to listen to me very carefully: THEY WERE FUCKING SETTING UP A REPO WHEN THIS HAPPENED.

        • Scary le Poo@beehaw.org
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          1 month ago

          No, by his own admission, he was playing around with the IDE. He wasn’t interested in the version control, he was interested in the pretty editor.

          I suggest you go read the original issue.

    • cocobean@bookwormstory.social
      link
      fedilink
      English
      arrow-up
      43
      ·
      1 month ago

      Also, why not send them to the recycle bin? I never really thought about it before, but that does seem a reasonable UX improvement for this case

    • kehet@sopuli.xyz
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      1 month ago

      Came here to say this. No one deserves this, not even new programmers who try to learn things.

      Some programming tools are really powerful compared to what new users are used to. If you come from the world of Microsoft Office and Apple whatever it’s called, everything is saved automatically to cloud and there is some local backup file somewhere which you can just restore. Modern programs are designed to protect users against their own mistakes, and when suddenly that is taken away, it can be a jarring experience.

    • Korne127@lemmy.world
      link
      fedilink
      arrow-up
      20
      arrow-down
      1
      ·
      1 month ago

      The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation

    • Mixel@feddit.org
      link
      fedilink
      English
      arrow-up
      103
      ·
      1 month ago

      I have heard things from another apprentice who just does not use version control at all and the only copies are on his laptop and on his desktop. He is also using node.js with only 1 class and doesn’t know about OOP (not sure if you even use that in js no clue 😅) and has one big file with 20k lines of code I have absolutely no clue how he navigates through it

      • Blackmist@feddit.uk
        link
        fedilink
        English
        arrow-up
        18
        ·
        1 month ago

        Those are rookie numbers. I have at least a 35k one somewhere. More than one actually.

        People run their businesses on this.

        • fibojoly@sh.itjust.works
          link
          fedilink
          arrow-up
          6
          ·
          1 month ago

          I once landed a job at a small company doing a software for medical analysis labs all over the country. Software had been around for over ten years at this point. They had no source control. Nothing. Absolute nightmare.
          They were literally starting to use source control when I arrived.
          In 2015.

          • Blackmist@feddit.uk
            link
            fedilink
            English
            arrow-up
            7
            ·
            1 month ago

            The “source control” when I first started was all the code on a shared drive, to check out a file you copied it to your machine, and renamed the extension on the shared drive to your initials.

            When somebody edited without doing this there would be full blown meltdowns over lost work.

      • e8d79@discuss.tchncs.de
        link
        fedilink
        arrow-up
        87
        ·
        1 month ago

        I know the type. Usually the kind of confident know-it-all who refuses to learn anything but delivers changes really quickly so management loves them. I had the misfortune to fix such a project after that ‘rock-star’ programmer left the company. Unfortunately the lack of professional standards in our industry allows people like that to continuously fail upwards. When I left the project they rehired them and let them design the v2 of the project we just fixed.

        • MajorHavoc@programming.dev
          link
          fedilink
          arrow-up
          19
          ·
          1 month ago

          When I left the project they rehired them and let them design the v2 of the project we just fixed.

          Lol. Wow.

          And that is why I’ve been unable to work myself out of a job in all my long years as a developer.

        • RagingRobot@lemmy.world
          link
          fedilink
          arrow-up
          27
          ·
          1 month ago

          My company for the longest time had two engineers they would give all the new projects to. They would rush through some prototype code as fast as they could then management would bring in a new team to take the project over. The code was always garbage and crammed into one place. I kept getting new projects and instead of starting from a nice clean slate we always had to build on that garbage. It sucked so bad.

        • LANIK2000@lemmy.world
          link
          fedilink
          arrow-up
          11
          ·
          1 month ago

          Jesus, reminds me of a similar story. My gf once lost a job to someone who literally just pasted code into LLMs, also delivering quickly, even tho it was hot garbage. Anyhow, she spent a lot of her time fixing his shit and so her output went down. I hope that company burns to the ground with completely un manageable software.

        • AlexWIWA@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 month ago

          We really need some kind of board like the one that controls the title for engineers.

      • LANIK2000@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        1 month ago

        Ey! Reminds me of my middle-school years! I still can’t belive I made an entire game without a single class… Just storing info in arrays and writing in comments what location represents what data. But I was a literal child, too young to read guides or sit through “long” tutorials.

        I don’t want to sound too mean, but whenever I see anything similar at work, I wish that person get a job they’re actually good at. It’s fine and all that the company started hiring actual programmers to fix things, but the fact that the old crew still fucks shit up with senior privileges is a major grievance.

    • filcuk@lemmy.zip
      link
      fedilink
      arrow-up
      3
      ·
      1 month ago

      Like, damn son, at least make a daily archive of your project??
      You have to expect things to go wrong, otherwise you have no one but yourself to blame.

    • dosuser123456@lemmy.sdf.org
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      12 days ago

      80% of my used storage accross all my drives (theyre a lot of them) is backups 💀

      might be a little paranoid…? idk

  • riodoro1@lemmy.world
    link
    fedilink
    arrow-up
    40
    arrow-down
    22
    ·
    1 month ago

    Typical web developer. He didn’t even know files can be deleted without going into „recycle bin”

      • babybus@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        Look at him. He’s just learned that files can be deleted without going info the recycle bin, and he already wants to be treated as equal. Ha!

      • x00z@lemmy.world
        link
        fedilink
        English
        arrow-up
        21
        arrow-down
        1
        ·
        1 month ago

        I think it’s a joke about how noobs only learn javascript and make blazing fast webapps while knowing nothing about computers.

  • Artyom@lemm.ee
    link
    fedilink
    arrow-up
    29
    arrow-down
    5
    ·
    1 month ago

    If you ever happen to have 5000 uncommitted files, you shouldn’t be asking yourself if you should commit more often. You should be asking yourself how many new repos you should be making.

    • Korne127@lemmy.world
      link
      fedilink
      arrow-up
      43
      ·
      1 month ago

      The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation.

        • fum@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          1 month ago

          git clean does. Turns out VSCode did a clean with that GUI option at that time, not sure of current behaviour.

        • GreenAppleTree@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          1 month ago

          ‘git reset’ won’t. ‘git clean’, on the other hand, most certainly does. Even then you have to --force it by default, to prevent an accidental clean.

      • ByteOnBikes@slrpnk.net
        link
        fedilink
        arrow-up
        13
        arrow-down
        1
        ·
        1 month ago

        This person is why we have that meme where devs would rather struggle for a week than spend a few hours reading the documentation.

  • Treczoks@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    8
    ·
    1 month ago

    Someone who does not know about “permanent delete” and not having backups, especially when switching to a new system, should have no business complaining about this.

  • josefo@leminal.space
    link
    fedilink
    arrow-up
    6
    arrow-down
    13
    ·
    1 month ago

    Fuck around things you don’t understand, find out. Why even go near the source control area and start clicking stuff if you don’t know jack shit about it.

    • rothaine@lemm.ee
      link
      fedilink
      arrow-up
      34
      ·
      1 month ago

      It seems like he was trying to learn though? He clicked it, like “hell yes I want source control, let’s figure this out”

      “It says all my files are changed? Oh shit why did it change my files? Shit fuck, undo, how do I undo…Do I want to discard the changes? I don’t even know what it changed. Yes please undo whatever changes you did to my files”

      And poof.