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

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

    0

    1. 1
    Просто оффтоп #42

    #12: https://govnokod.ru/27153 https://govnokod.xyz/_27153
    #13: https://govnokod.ru/27159 https://govnokod.xyz/_27159
    #14: https://govnokod.ru/27200 https://govnokod.xyz/_27200
    #15: https://govnokod.ru/27237 https://govnokod.xyz/_27237
    #16: (vanished) https://govnokod.xyz/_27282
    #17: https://govnokod.ru/27319 https://govnokod.xyz/_27319
    #18: https://govnokod.ru/27380 https://govnokod.xyz/_27380
    #19: (vanished) https://govnokod.xyz/_27500
    #20: https://govnokod.ru/27607 https://govnokod.xyz/_27607
    #21: https://govnokod.ru/27951 https://govnokod.xyz/_27951
    #22: https://govnokod.ru/28076 https://govnokod.xyz/_28076
    #23: https://govnokod.ru/28266 https://govnokod.xyz/_28266
    #24: https://govnokod.ru/28373 https://govnokod.xyz/_28373
    #25: https://govnokod.ru/28474 https://govnokod.xyz/_28474
    #26: https://govnokod.ru/28563 https://govnokod.xyz/_28563
    #27: https://govnokod.ru/28645 https://govnokod.xyz/_28645
    #28: (vanished) https://govnokod.xyz/_28664
    #29: https://govnokod.ru/28674 https://govnokod.xyz/_28674
    #30: https://govnokod.ru/28680 https://govnokod.xyz/_28680
    #31: https://govnokod.ru/28688 https://govnokod.xyz/_28688
    #32: https://govnokod.ru/28695 https://govnokod.xyz/_28695
    #33: https://govnokod.ru/28702 https://govnokod.xyz/_28702
    #34: (vanished) https://govnokod.xyz/_28708
    #35: https://govnokod.ru/28715 https://govnokod.xyz/_28715
    #36: https://govnokod.ru/28725 https://govnokod.xyz/_28725
    #37: https://govnokod.ru/28733 https://govnokod.xyz/_28733
    #38: (vanished) https://govnokod.xyz/_28748
    #39: https://govnokod.ru/28758 https://govnokod.xyz/_28758
    #40: https://govnokod.ru/28885 https://govnokod.xyz/_28885
    #41: https://govnokod.ru/29061 https://govnokod.xyz/_29061

    nepeKamHblu_nemyx, 19 Апреля 2025

    Комментарии (84)
  3. JavaScript / Говнокод #27991

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    function fib<T>(n: T) {
        return n <= 2 ? n : fib(n - 1) + fib(n - 2);
    }
    
    function main()
    {
      print (fib(5));
      print (fib(6.0));
    }

    я вам принес "рекурсивные генерики"..... внимание вопрос... а каким таким хером получилось вычеслить тут возвращаемый тип, а ?

    ASD_77, 04 Февраля 2022

    Комментарии (84)
  4. JavaScript / Говнокод #27896

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    function main()
    {
        	let o = { x: 'hi', y: 17 }
    	const o2 = { ...o };
    
    	print(o2.x, o2.y);
    }

    а ты так можешь говнокодить на С/C++? дамп не дам.. (толку?)

    ASD_77, 26 Декабря 2021

    Комментарии (84)
  5. C++ / Говнокод #26789

    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
    #include <iostream>
    #include <string>
    
    using namespace std;
    
    struct A
    {
        A() { cout << "A::A()" << endl; }
        ~A() { cout << "~A::A()" << endl; }    
    };
    
    struct B
    {
        B() { cout << "B::B()" << endl; }
        ~B() { cout << "~B::B()" << endl; }    
    };
    
    union U
    {
        A a;
        B b;
        int n;
        
        U() { a = A {}; b = B {}; }
        ~U() {}
    };
    
    int main()
    {
        U u;
    }

    Запустить тут: cpp.sh/3ewfw

    Получается информация о том, какой сейчас объект активен в union где-то хранится.

    OlegUP, 03 Июля 2020

    Комментарии (84)
  6. Куча / Говнокод #25420

    −104

    1. 1
    2. 2
    Кто победит на выборах?
    Я за Зеленского. Чисто по приколу.

    nOJlumu4ecKuu_nemyx, 02 Марта 2019

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

    −1

    1. 1
    "phpMyAdmin" или "Adminer"?

    Wrotberry, 11 Ноября 2018

    Комментарии (84)
  8. C++ / Говнокод #24844

    −3

    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
    #define m_from(format)			\
    char buff[128];					\
    sprintf(buff, format, value);	\
    data_ = std::string(buff);
    
    inline void fromShort(short value)
    {
        m_from("%i");
    }
    inline void fromInt(int value)
    {
        m_from("%i");
    }
    inline void fromLong(long value)
    {
        m_from("%li");
    }
    inline void fromFloat(float value)
    {
        m_from("%f");
    }
    inline void fromDouble(double value)
    {
        m_from("%f");
    }

    https://github.com/FlightBlaze/Newtoo/blob/master/modules/misc/USVString.h

    Собственно, занесения в аналы ГК достоин весь этот класс целиком.

    gost, 01 Октября 2018

    Комментарии (84)
  9. PHP / Говнокод #23492

    +5

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    if ($count == 1 or $count == 21 or $count == 31 or $count == 41 or $count == 51 or $count == 61 or $count == 71 or $count == 81) ( $str = ' товар');
            if ($count == 2 or $count == 3 or $count == 4 or $count == 22 or $count == 23 or $count == 24 or $count == 32 or $count == 33 or $count == 34 or $count == 42 or $count == 43 or $count == 44 or $count == 52 or $count == 53 or $count == 54 or $count == 62 or $count == 63 or $count == 64) ( $str = ' товара');
            if ($count == 5 or $count == 6 or $count == 7 or $count == 8 or $count == 9 or $count == 10 or $count == 11 or $count == 12 or $count == 13 or $count == 14 or $count == 15 or $count == 16 or $count == 17 or $count == 18 or $count == 19 or $count == 20 or $count == 25 or $count == 26 or $count == 27 or $count == 28 or $count == 29 or $count == 30 or $count == 35 or $count == 36 or $count == 37 or $count == 38 or $count == 39 or $count == 40 or $count == 45 or $count == 46 or $count == 47 or $count == 48 or $count == 49 or $count == 50 or $count == 55 or $count == 56 or $count == 57 or $count == 58 or $count == 59 or $count == 60 or $count == 65) ( $str = ' товаров');
    
            if ($count > 81){
                $str=" тов";
            }

    Бронебойный pluralize

    arth, 05 Ноября 2017

    Комментарии (84)
  10. C# / Говнокод #17456

    +134

    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
    public enum Hours
    	{
    		[Description("01")]
    		One = 1,
    
    		[Description("02")]
    		Two = 2,
    
    		[Description("03")]
    		Three = 3,
    
    		[Description("04")]
    		Four = 4,
    
    		[Description("05")]
    		Five = 5,
    
    		[Description("06")]
    		Six = 6,
    
    		[Description("07")]
    		Seven = 7,
    
    		[Description("08")]
    		Eight = 8,
    
    		[Description("09")]
    		Nine = 9,
    
    		[Description("10")]
    		Ten = 10,
    
    		[Description("11")]
    		Eleven = 11,
    
    		[Description("12")]
    		Twelve = 12
    	}

    schecterXA, 16 Января 2015

    Комментарии (84)
  11. C# / Говнокод #13872

    +109

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    BusinessLogic.Entity_InheritanceSetting.Save(
                        Session.SessionSettings.Settings.ContactID.Value,
                        Session.SessionSettings.Settings.SessionID.Value, copyID.Value,
                        true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
                        true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
                        true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
                        true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
                        true, true, true, true, true, true, true, true, true, true, true, true, true, true, true);

    kore_sar, 30 Сентября 2013

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