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

    В номинации:
    За время:
  2. JavaScript / Говнокод #17561

    +160

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    this.alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
    this.identityDefence = this.alphabet[Math.floor(Math.random() * (this.alphabet.length - 1))] + Math.floor(Math.random() * 1000) 
    + this.alphabet[Math.floor(Math.random() * (this.alphabet.length - 1))] 
    + this.alphabet[Math.floor(Math.random() * (this.alphabet.length - 1))] + Math.floor(Math.random() * 1000) 
    + this.alphabet[Math.floor(Math.random() * (this.alphabet.length - 1))] + Math.floor(Math.random() * 1000);

    А как вы генерируете случайный id объектов?

    SuperCuke, 02 Февраля 2015

    Комментарии (24)
  3. Куча / Говнокод #17516

    +132

    1. 1
    2. 2
    https://github.com/stulluk/FFmpeg-Cedrus
    Хотел клонировать реп. Ждал час. Ждал другой. Посмотрел внутрь

    Видимо человек встретился с git впервые.
    Хорошо хоть,что он исходник в .gitignore не хранит.

    mittorn, 25 Января 2015

    Комментарии (24)
  4. C++ / Говнокод #17419

    +51

    1. 1
    auto a = []{return 1;}();

    http://rextester.com/NQVDP75721

    LispGovno, 08 Января 2015

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

    +94

    1. 1
    2. 2
    3. 3
    4. 4
    public static string ToNew(this String source)
    {
        return new string(source.ToCharArray());
    }

    pushistayapodmyshka, 04 Декабря 2014

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

    +131

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    struct tm * localtime (const time_t * timer);
    
    A pointer to a tm structure with its members filled with the values
     that correspond to the local time representation of timer.
    
     The returned value points to an internal object whose validity or
     value may be altered by any subsequent call to gmtime or localtime.

    Я нуб, впервые вижу такой способ вернуть структуру.

    TarasB, 18 Октября 2014

    Комментарии (24)
  7. Си / Говнокод #16816

    +133

    1. 1
    2. 2
    //str will destroy
    char* strdup_(char* str){

    wat?

    LispGovno, 07 Октября 2014

    Комментарии (24)
  8. JavaScript / Говнокод #16763

    +165

    1. 1
    2. 2
    3. 3
    4. 4
    var shops=new Array();
    shops[shops.length] = new Array('',' ');
    shops[shops.length] = new Array(' The Jewel Box', '135956406_923');
    shops[shops.length] = new Array(' Склад 1', '135956406_923');

    И таких вызовов порядка 2к

    via http://pickpoint.ru/monitoring/

    kopoBko, 24 Сентября 2014

    Комментарии (24)
  9. C++ / Говнокод #16747

    +56

    1. 1
    for (size_t i=v.size()-1; i<v.size(); --i)

    unsigned в массивах не нужен, нахуй усрались длинные массивы?

    TarasB, 22 Сентября 2014

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

    +64

    1. 1
    2. 2
    3. 3
    4. 4
    void GetVoid()
    {
    	return delete &"Возвращаем void";
    };

    Функция для получения void.

    maxillion, 21 Сентября 2014

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

    +135

    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
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    private void button1_Click(object sender, EventArgs e)
            {
                if (comboBox1.Text == "Випадково")
                {
                   LoadMatrixRand(masP, dataGridView1);
                }
    
                if (comboBox1.Text == "Повна")
                {
                    LoadMatrixFull(masP, dataGridView1);
                }
    
                if (comboBox1.Text == "Пуста")
                {
                    LoadMatrixZero(masP, dataGridView1);
                }
    
                if (comboBox1.Text == "Діагональна")
                {
                    LoadMatrixDiagonal(masP, dataGridView1);
                }
    
                if (comboBox1.Text == "Антидіагональна")
                {
                    LoadMatrixAntiDiagonal(masP, dataGridView1);
                }
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                if (comboBox2.Text == "Випадково")
                {
                    LoadMatrixRand(masQ, dataGridView2);
                }
    
                if (comboBox2.Text == "Повна")
                {
                    LoadMatrixFull(masQ, dataGridView2);
                }
    
                if (comboBox2.Text == "Пуста")
                {
                    LoadMatrixZero(masQ, dataGridView2);
                }
    
                if (comboBox2.Text == "Діагональна")
                {
                    LoadMatrixDiagonal(masQ, dataGridView2);
                }
    
                if (comboBox2.Text == "Антидіагональна")
                {
                    LoadMatrixAntiDiagonal(masQ, dataGridView2);
                }
            }
    
            private void button3_Click(object sender, EventArgs e)
            {
                if (comboBox3.Text == "Випадково")
                {
                    LoadMatrixRand(masR, dataGridView3);
                }
    
                if (comboBox3.Text == "Повна")
                {
                    LoadMatrixFull(masR, dataGridView3);
                }
    
                if (comboBox3.Text == "Пуста")
                {
                    LoadMatrixZero(masR, dataGridView3);
                }
    
                if (comboBox3.Text == "Діагональна")
                {
                    LoadMatrixDiagonal(masR, dataGridView3);
                }
    
                if (comboBox3.Text == "Антидіагональна")
                {
                    LoadMatrixAntiDiagonal(masR, dataGridView3);
                }
            }

    shitty life as my code

    Nutell_a, 19 Сентября 2014

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