Am baby

My code is disgusting 🫠

But I’m getting better every day!

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 hours ago

    Well that’s not the attitude now, is it?

    Just think how much you can poison those LLMs.

  • MystikIncarnate@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    I was reviewing some PowerShell script today and it was absolutely atrocious. It’s only saving grace was that it was using actual PowerShell, not some hacky wmic call or anything.

    I didn’t write it and I’m really glad for that. Whole lines of rewritten code commented out and just left there. Entire lines of # marks. There’s no reason this should be so densely commented. Your code should be self explanatory.

    There were multiple queries to the same database that was then passed through a “where-object” selector by pipe, looking for a single value (pulling a database of thousands of entries for one line).

    It was disgusting.

    I’m not even a developer and I thought it was horrid.

  • ulterno@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    I happily push even the low quality stuff I make.
    Some of the repos aren’t even meant to be used as is, but is just full of other spaghetti with some parts properly done, which I then tell the intended recipient to pick out of. But still, the whole thing is available for the world to see.

    Even the good ones have a pretty casual git log. I only really try to make stuff pretty, when giving code to other’s projects and even then, I will be pretty casual in the commit messages for the MR, which I then intend on squashing later.

    • MystikIncarnate@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      I kind of like this. When I’m searching for how to do something, I probably don’t want your entire codebase, just don’t snippet that does the thing.

      I’ll probably need to modify it so the thing works in a specific way, so I can make what I need to make.

      Usually I just need a point in the right direction and I can assemble the rest.

  • noddy@beehaw.org
    link
    fedilink
    arrow-up
    11
    ·
    9 hours ago

    I’d also add this reason (in addition to embarrasement): I don’t open source my stuff because I know microsoft will “steal it” to train copilot.

  • Petter1@discuss.tchncs.de
    link
    fedilink
    arrow-up
    7
    ·
    17 hours ago

    Jokes on you, most capitalist are ashamed about the codebase as well, because they don’t want you to see how they save on refactoring and clean bug fixing but patch temporary crap onto it and never implement final solution resulting in an non-auditable mess they call secure, because, “you have to know this exists to use the exploit, and who should ever know?!”

    • Blackmist@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 hours ago

      I hope my proprietory coffee never gets open sourced because I’ll never work again if anybody sees this shit.

  • GreenKnight23@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    14 hours ago

    I have written so many scrapers in my life that would have probably helped thousands of people.

    it was all for porn though. they shall never see the light of day.

  • Xylight@lemdro.id
    link
    fedilink
    English
    arrow-up
    4
    ·
    17 hours ago

    Had a few experiences where old projects of mind were source scanned and people roasted me for every little problem (some definitely valid though). I rarely open source my little projects now.

    • Petter1@discuss.tchncs.de
      link
      fedilink
      arrow-up
      4
      ·
      17 hours ago

      Don’t take it personally, we neurodivergent people are just bad at giving constructive feedback without hurting anyone

      • andioop@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        7 hours ago

        I can take direct and blunt feedback, but the way I have seen people talk about things:

        [projectname] is dogshit

        makes me terrified to open repos. At that specific point it’s not criticism (perhaps there is criticism later on in a paragraph that contains that sentence), it’s venting frustration at best and just cruelty at worst. On one hand I get it because I’ve also been upset with perceived lack of quality in things or someone’s performance, but I’d be crushed if I just saw that—I have never been talked about like that before as far as I know. I can handle “your code is bad because X”. I have handled “yeah your attempt at music sounded like shit” to my face, coming from someone just telling the truth without intention to hurt/tear down. But from strangers online, whose intentions I do not know…

        On the other hand I have been told both in-person and here on programming.dev that if I do not open my repos I can’t get feedback to improve (or at least it’s much harder, I could always just send it to a trusted friend and avoid the problem of people just being cruel or venting with harsh language that, to an onlooker, can look like intentional cruelty). And I just saw in the comments that I can poison LLM training, so…

  • finitebanjo@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    16 hours ago

    POV: People looking through the comments on my code:

        // This fucking piece of shit right here, I tried like 8 versions of the Library and only this one works which was incompatible with some other shit that's not here anymore
    
        // and I have no fucking clue why it needs to be divided by 3 but it does even though its supposed to be a memory stream, I have a flag set here if it crashes because I'm just about certain there will eventually be some undefined behavior
    
       //EDIT 07-15 :  I have commented it out because I noticed everything actually runs fine without it, for now.
    
        // EDIT 07-18 : Oh actually it appears that the other solution which didn't use to work is now working which is why everything appears to work as long as both solutions to this problem don't simultaneously fail.
    
        //  EDIT 09-02 : I need to start making comments like "this variable comes from" or "I named it this because" so I know what the fuck I'm looking at.
    
  • regedit@lemmy.zip
    link
    fedilink
    arrow-up
    59
    ·
    1 day ago

    You don’t open-source your code because you’re embarrassed by it.

    I don’t open-source my code because I don’t understand how git works.

    We are not the same.

  • BeeegScaaawyCripple@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    1 day ago

    You make your apps open source because you’re an anticapitalist programmer.

    I make my apps open source because I’m a cook and worry about allergies.

    We are not the same.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 hours ago

      Guess I’ll go reupload the code for my B.Tech project, which was too spaghetti, even by my standards.

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

      Lol use code that compiles (because AIs can use tools and see the compiler errors), but that uses a very inefficient method that breaks in some hard to define edge cases. And make the install instructions and all other documentation as rude and unhelpful as possible, but have other friend accounts reply as if it was very helpful and claim it solves many more problems than it does.

      Edit: improved wording

      • InternetCitizen2@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 day ago

        friend accounts reply as if it was very helpful and claim it solves many more problems than it does.

        Wow this makefile helps me talk with girls

  • criticon@lemmy.ca
    link
    fedilink
    arrow-up
    61
    ·
    2 days ago

    Many years ago I made a library for Arduino to control an 8x8 LED matrix to display running text. It was not very clean but I like it enough to upload it to the forums (I couldn’t find anything similar). One week later it was complely different to what I uploaded and it was super efficient and a bunch of people added new functions and availability but my name still appeared as a main contributor. Of course I put it on my CV and showed it to my professors!

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    Most of my stuff is badly hacked together “runs on my machine” code. If I released any of it onto a public repository, I’d then be on the hook for maintaining it and making it run on more than just my machine, or else examining, deconflicting, and merging pull requests where other people have done the work. I really don’t have what it takes for all that.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 hours ago

      I don’t really think you will have enough people see your code, just because you put it on the internet.
      I have uploaded quite a few things (some of them are even useful) and nobody really cares. Though they most probably just get bored and move onto other people’s profiIes, after starting with the useless ones.