1. Лучший говнокод

    В номинации:
    За время:
  2. Куча / Говнокод #29132

    0

    1. 1
    IT Оффтоп #216

    #186: https://govnokod.ru/28815 https://govnokod.xyz/_28815
    #187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
    #188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
    #189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
    #190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
    #191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
    #192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
    #193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
    #194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
    #195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
    #196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
    #197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
    #198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
    #199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
    #200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
    #201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
    #202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
    #203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
    #204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
    #205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
    #206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
    #207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
    #208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
    #209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
    #210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
    #211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
    #212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
    #213: https://govnokod.ru/29104 https://govnokod.xyz/_29104
    #214: https://govnokod.ru/29114 https://govnokod.xyz/_29114
    #215: https://govnokod.ru/29125 https://govnokod.xyz/_29125

    nepeKamHblu_nemyx, 11 Мая 2025

    Комментарии (127)
  3. Python / Говнокод #29134

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    def pause(c):                                             #replace, assist
        if c > 100: waitLong(c)
        elif c== 1: wait1s()
        elif c== 2: wait2s()
        elif c== 3: wait3s()
        elif c== 5: wait5s()
        elif c== 8: wait8s()
        elif c== 10: wait10s()
        else:
            logger.debug(f"custom timeout, need recheck({c})")
            p(c)   #ping raspberry instead of direct sleep
    
    def p(c):
        time.sleep(c)
    
    def wait1s():
        p(1)
    
    def wait2s():
        wait1s()
        wait1s()
    
    def wait3s():
        logger.debug("one, two, three")
        p(3)   
    
    def wait5s():
        logger.debug("5, 4, 3, 2, 1..")
        p(5)
    
    def wait8s():
        wait5s()
        wait3s()
    
    def wait10s():
        wait5s()
        wait5s()
    
    def waitLong(c):
        logger.debug(f"Attention, wait time is too long({c}), need to replace with waiting for some event or ping")
        p(c)
    
    def cc():
        global client
        client.connect()
        return(client)

    NikitaTsyb, 15 Мая 2025

    Комментарии (6)
  4. Си / Говнокод #29130

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    #include <stdio.h>
    
    int bts(unsigned int n, int bitN) {
        return n & (1 << bitN);
    }
    
    int main() {
        volatile char *p_lacoon;
        unsigned char res = 0;
        
        p_lacoon = ((unsigned )p_lacoon | 01 << 1);
        res |= bts(p_lacoon, 0) | bts(p_lacoon, 1);
    
        p_lacoon = ((unsigned )p_lacoon | 01 & ~!~0);
        p_lacoon = ((unsigned )p_lacoon | 01 << 1 << 0);
        res |= 4 << (bts(p_lacoon, 0) | bts(p_lacoon, 1) ^ 3);
    
        p_lacoon = ((int)p_lacoon | 01 & ~0xFE | 00);
        p_lacoon = ((int)p_lacoon | 01 << 1);
        res |= ~!0xFF << (bts(p_lacoon, 0) | 6 ^ 0x29b);
        res |= ~!0xFC << (bts(p_lacoon, 1) | 4 ^ 0x29c);
        res |= ~!0xF0 << 5;
    
        p_lacoon = (int)p_lacoon >> 01 >> 001 << 001 << 01;
    
        printf("%x, %X %s\n", p_lacoon, (res & 001) ? res-1 : res, "*****. Challenge everything.");
    }

    Предтерминальная стадия мозгфускации.
    Из собеса в подразделение AMD: продемонстрировать варианты хранения при недостатке памяти.
    Работает в GCC, ICC, Clang только -O0.
    Кто хочет разобраться - welcome https://godbolt.org/z/hd4eYeM1Y

    OdduOne, 09 Мая 2025

    Комментарии (3)
  5. Python / Говнокод #29131

    0

    1. 1
    2. 2
    import photoshop
    photoshop.CreateProgram()

    BelCodeMonkey, 10 Мая 2025

    Комментарии (2)
  6. Python / Говнокод #29135

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    before = []
    
    def bef():
        global before
        return before
    
    def setB(b):
        global before
        before = b
    
    def foo():
        revert(bef())

    NikitaTsyb, 15 Мая 2025

    Комментарии (1)
  7. Куча / Говнокод #29133

    0

    1. 1
    2. 2
    Привет, писюны. Что-то слишком много стало нападений собаков на людей...
    Кто как считает, виноваты собаки или люди?

    KPblCA, 14 Мая 2025

    Комментарии (1)