Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)C
Posts
2
Comments
628
Joined
3 yr. ago

  • Thanks for the 2am nerd snipe :D

    You can do this via git hooks and a script. Specifically the prepare-commit-msg hook (.git/hooks/prepare-commit-msg). In your script, check for the GIT_REFLOG_ACTION env variable, and check if its value is "revert". If so, you are in a revert, and you can echo/printf out whatever you would like in your template.

    Might be a bit more work to get to where you want, but hopefully that points you in the right direction?

  • It is over simplified, but there are often implicit requirements that a human would be aware of from the broader context that the LLM may not be.

    i.e add is used to increment a health bar, so wrap around doesn't make sense.

  •  c
        
    int add(int a, int b) {
        return a + b;
    }
    
    
      

    This code is clearly functional, it'll compile and execute.

    However, the customer actually needs the code to do a saturating add.

    With that knowledge, we can clearly see that the code is not correct. It will not saturate, it will wrap around instead.


    Without that knowledge, an LLM will happily write some basic unit tests that won't cover the saturation edge case, and the bug would live on until its hit in prod.

    If you're lucky, and your function doco is good, the LLM might spot the bug, and notify you.

    My personal preference for how to generate tests is to ask the agent to write specific tests. E.g: "write a test for add that demonstrates that it saturates".

  • Timing and tests, name a better migraine duo :D.

    We continuously create tests that ensure a process completes in an set amount of time, and every time, we don't give them enough leeway, and the test will fail randomly if the CI runner gets overloaded.

  • Testing functionality isn't the same as correctness.

  • I have experience with AI generated test suites, and while its good for generating coverage, it isn't so good for actually ensuring correctness, which is the actual point.

    I've watched the robot happily introduce bugs to pass broken tests, and also break tests to match code, and everything in between.

    I don't want lots of tests, I want good tests.

  • There are a few thousand other developers, any one of them could start working on a replacement if it bothered them enough. Granted, a lot of them will be grey beards who are happy with mailing lists, but still, the overall friction hasn't pushed them far enough over the edge to replace it.

  • The problem highlighted by this article is the flood of slop. The mailing list is almost irrelevant, because regardless of whatever alternative you use, the flood of slop will still keep overwhelming it.

  • Git was created because one of those developers actually had a problem. The fact that they haven't tried to replace the mailing list yet suggests they don't actually have a problem with it.

  • Because they have to nerf him somehow, can't just have worlds sexiest kernel developer getting everyone soaking wet all the time.

  • Single commit, clearly AI generated readme.

    Slop.

  • Private homes have people in them at night, which tends to make methheads skittish. Carparks do not. And its not unheard of for thiefs to strip copper from unoccupied homes.

    We've had copper thiefs destroy school buildings for a few hundred dollars of copper, I don't see why they wouldn't go for a solar install.

  • Google translate:

    Image: No....!! Not Java!! Chemical weapons, not for me, man, I prefer bullets...!!!

    Caption: For Java lovers and haters

    Meme not intended to offend anyone (it's sad to have to clarify that these days)


    Gotta be honest, confused about the relevance to Java?

  • Free copper!

  • If you moved the printfs back, you'd end up with 6 printfs, and you can just hardcode in the wasiswill value in the format string.

    As it happens, the strcpys are unnecessary anyway, you can just assign "will be" to a char pointer:

     c
        
    char* williswas = "";
    if (year == 2026) {
        williswas = "is";
    }
    ...
    
    
      

    The strings are already in your read only memory, you just need a pointer to them.

    Making the GOTO targets unique makes a stronger argument for just dropping the gotos entirely, because the execution flow for each of the 6 cases is now getting intertwined. You may understand it today, but in 3 months time you'll hate reading it.

  • This is not a good way to use GOTO :(.

    For starters: Your GOTO targets aren't unique, NLEAP1 and NLEAP2 are the same, and LEAP and NLEAP3 are the same.

    I would probably just put the printfs where the gotos are and save the strcpys. Just make sure to return out after the printfs. Sometimes being verbose in your code is better than being clever with gotos.

    Your returns are returning the return value from the printfs.

    I.e: same as:

     
        
    int ret = printf(...);
    return ret;
    
      

    Printfs returns an int with the number of bytes it wrote out.

  • Just skips the preamble and starts info dumping. If part of the info is lost, doesn't matter, just keep dumping.