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

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

    +339.8

    1. 1
    2. 2
    3. 3
    4. 4
    if (result == true)
      return true;
    else
     return result;

    этпипец... из разряда индокода, только в реале

    guest, 04 Декабря 2008

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

    −6

    1. 1
    Политота #17

    #1: https://govnokod.ru/15804 https://govnokod.xyz/_15804
    #2: https://govnokod.ru/19910 https://govnokod.xyz/_19910
    #3: https://govnokod.ru/23643 https://govnokod.xyz/_23643
    #4: (vanished) https://govnokod.xyz/_24822
    #5: https://govnokod.ru/24868 https://govnokod.xyz/_24868
    #6: (vanished) https://govnokod.xyz/_26648
    #7: https://govnokod.ru/26673 https://govnokod.xyz/_26673
    #8: https://govnokod.ru/27052 https://govnokod.xyz/_27052
    #9: https://govnokod.ru/27852 https://govnokod.xyz/_27852
    #10: https://govnokod.ru/28060 https://govnokod.xyz/_28060
    #11: https://govnokod.ru/28091 https://govnokod.xyz/_28091
    #12: https://govnokod.ru/28103 https://govnokod.xyz/_28103
    #13: https://govnokod.ru/28144 https://govnokod.xyz/_28144
    #14: https://govnokod.ru/28270 https://govnokod.xyz/_28270
    #15: https://govnokod.ru/28341 https://govnokod.xyz/_28341
    #16: https://govnokod.ru/28379 https://govnokod.xyz/_28379

    nepeKamHblu_nemyx, 03 Октября 2022

    Комментарии (459)
  4. Куча / Говнокод #26833

    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
    IT Оффтоп #53
    
    
    #1: https://govnokod.ru/18142 https://govnokod.xyz/_18142
    #2: https://govnokod.ru/18378 https://govnokod.xyz/_18378
    #3: https://govnokod.ru/19667 https://govnokod.xyz/_19667
    #4: https://govnokod.ru/21160 https://govnokod.xyz/_21160
    #5: https://govnokod.ru/21772 https://govnokod.xyz/_21772
    #6: (vanished) https://govnokod.xyz/_24063
    #7: https://govnokod.ru/24538 https://govnokod.xyz/_24538
    #8: (vanished) https://govnokod.xyz/_24815
    #9: https://govnokod.ru/24867 https://govnokod.xyz/_24867
    #10: https://govnokod.ru/25328 https://govnokod.xyz/_25328	
    #11: (vanished) https://govnokod.xyz/_25436
    #12: (vanished) https://govnokod.xyz/_25471
    #13: (vanished) https://govnokod.xyz/_25590
    #14: https://govnokod.ru/25684 https://govnokod.xyz/_25684
    #15: https://govnokod.ru/25694 https://govnokod.xyz/_25694
    #16: https://govnokod.ru/25725 https://govnokod.xyz/_25725
    #17: https://govnokod.ru/25731 https://govnokod.xyz/_25731
    #18: https://govnokod.ru/25762 https://govnokod.xyz/_25762
    #19: https://govnokod.ru/25767 https://govnokod.xyz/_25767
    #20: https://govnokod.ru/25776 https://govnokod.xyz/_25776
    #21: https://govnokod.ru/25798 https://govnokod.xyz/_25798
    #22: https://govnokod.ru/25811 https://govnokod.xyz/_25811
    #23: https://govnokod.ru/25863 https://govnokod.xyz/_25863
    #24: https://govnokod.ru/25941 https://govnokod.xyz/_25941

    #25: https://govnokod.ru/26026 https://govnokod.xyz/_26026
    #26: https://govnokod.ru/26050 https://govnokod.xyz/_26050
    #27: https://govnokod.ru/26340 https://govnokod.xyz/_26340
    #28: https://govnokod.ru/26372 https://govnokod.xyz/_26372
    #29: https://govnokod.ru/26385 https://govnokod.xyz/_26385
    #30: https://govnokod.ru/26413 https://govnokod.xyz/_26413
    #31: https://govnokod.ru/26423 https://govnokod.xyz/_26423
    #32: https://govnokod.ru/26440 https://govnokod.xyz/_26440
    #33: https://govnokod.ru/26449 https://govnokod.xyz/_26449
    #34: https://govnokod.ru/26456 https://govnokod.xyz/_26456
    #35: https://govnokod.ru/26463 https://govnokod.xyz/_26463
    #36: https://govnokod.ru/26508 https://govnokod.xyz/_26508
    #37: https://govnokod.ru/26524 https://govnokod.xyz/_26524
    #38: https://govnokod.ru/26539 https://govnokod.xyz/_26539
    #39: https://govnokod.ru/26556 https://govnokod.xyz/_26556
    #40: https://govnokod.ru/26568 https://govnokod.xyz/_26568
    #41: https://govnokod.ru/26589 https://govnokod.xyz/_26589
    #42: https://govnokod.ru/26600 https://govnokod.xyz/_26600
    #43: https://govnokod.ru/26604 https://govnokod.xyz/_26604
    #44: https://govnokod.ru/26627 https://govnokod.xyz/_26627
    #45: https://govnokod.ru/26635 https://govnokod.xyz/_26635
    #46: (vanished) https://govnokod.xyz/_26646
    #46: (vanished) https://govnokod.xyz/_26654
    #47: https://govnokod.ru/26671 https://govnokod.xyz/_26671
    #48: https://govnokod.ru/26707 https://govnokod.xyz/_26707
    #49: https://govnokod.ru/26750 https://govnokod.xyz/_26750
    #49: https://govnokod.ru/26776 https://govnokod.xyz/_26776
    #50: https://govnokod.ru/26804 https://govnokod.xyz/_26804
    #51: https://govnokod.ru/26809 https://govnokod.xyz/_26809
    #52: https://govnokod.ru/26817 https://govnokod.xyz/_26817

    gostinho, 31 Июля 2020

    Комментарии (457)
  5. Куча / Говнокод #28630

    −1

    1. 1
    Электрика / электроника #7

    #1: https://govnokod.ru/25437 https://govnokod.xyz/_25437
    #2: https://govnokod.ru/25820 https://govnokod.xyz/_25820
    #3: https://govnokod.ru/26570 https://govnokod.xyz/_26570
    #4: https://govnokod.ru/27622 https://govnokod.xyz/_27622
    #5: https://govnokod.ru/27741 https://govnokod.xyz/_27741
    #6: https://govnokod.ru/28191 https://govnokod.xyz/_28191

    nepeKamHblu_nemyx, 12 Марта 2023

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

    0

    1. 1
    Пиздец-оффтоп #64

    #34: https://govnokod.ru/27817 https://govnokod.xyz/_27817
    #35: https://govnokod.ru/27822 https://govnokod.xyz/_27822
    #36: https://govnokod.ru/27826 https://govnokod.xyz/_27826
    #37: https://govnokod.ru/27827 https://govnokod.xyz/_27827
    #38: https://govnokod.ru/27833 https://govnokod.xyz/_27833
    #39: https://govnokod.ru/27862 https://govnokod.xyz/_27862
    #40: https://govnokod.ru/27869 https://govnokod.xyz/_27869
    #41: https://govnokod.ru/27933 https://govnokod.xyz/_27933
    #42: (vanished) https://govnokod.xyz/_27997
    #43: https://govnokod.ru/28042 https://govnokod.xyz/_28042
    #44: https://govnokod.ru/28080 https://govnokod.xyz/_28080
    #45: https://govnokod.ru/28086 https://govnokod.xyz/_28086
    #46: https://govnokod.ru/28105 https://govnokod.xyz/_28105
    #47: https://govnokod.ru/28166 https://govnokod.xyz/_28166
    #48: https://govnokod.ru/28229 https://govnokod.xyz/_28229
    #49: https://govnokod.ru/28298 https://govnokod.xyz/_28298
    #50: https://govnokod.ru/28308 https://govnokod.xyz/_28308
    #51: https://govnokod.ru/28329 https://govnokod.xyz/_28329
    #52: https://govnokod.ru/28340 https://govnokod.xyz/_28340
    #53: (vanished) https://govnokod.xyz/_28346
    #54: https://govnokod.ru/28353 https://govnokod.xyz/_28353
    #55: https://govnokod.ru/28361 https://govnokod.xyz/_28361
    #56: https://govnokod.ru/28383 https://govnokod.xyz/_28383
    #57: https://govnokod.ru/28411 https://govnokod.xyz/_28411
    #58: https://govnokod.ru/28454 https://govnokod.xyz/_28454
    #59: https://govnokod.ru/28472 https://govnokod.xyz/_28472
    #60: https://govnokod.ru/28540 https://govnokod.xyz/_28540
    #61: https://govnokod.ru/28548 https://govnokod.xyz/_28548
    #62: https://govnokod.ru/28555 https://govnokod.xyz/_28555
    #63: https://govnokod.ru/28573 https://govnokod.xyz/_28573

    nepeKamHblu_nemyx, 04 Февраля 2023

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

    −1

    1. 1
    Питушня #21

    #1: https://govnokod.ru/26692 https://govnokod.xyz/_26692
    #2: https://govnokod.ru/26891 https://govnokod.xyz/_26891
    #3: https://govnokod.ru/26893 https://govnokod.xyz/_26893
    #4: https://govnokod.ru/26935 https://govnokod.xyz/_26935
    #5: (vanished) https://govnokod.xyz/_26954
    #6: (vanished) https://govnokod.xyz/_26956
    #7: https://govnokod.ru/26964 https://govnokod.xyz/_26964
    #8: (vanished) https://govnokod.xyz/_26966
    #9: https://govnokod.ru/27017 https://govnokod.xyz/_27017
    #10: https://govnokod.ru/27045 https://govnokod.xyz/_27045
    #11: https://govnokod.ru/27058 https://govnokod.xyz/_27058
    #12: https://govnokod.ru/27182 https://govnokod.xyz/_27182
    #13: https://govnokod.ru/27260 https://govnokod.xyz/_27260
    #14: https://govnokod.ru/27343 https://govnokod.xyz/_27343
    #15: https://govnokod.ru/27353 https://govnokod.xyz/_27353
    #16: https://govnokod.ru/27384 https://govnokod.xyz/_27384
    #17: https://govnokod.ru/27482 https://govnokod.xyz/_27482
    #18: https://govnokod.ru/27514 https://govnokod.xyz/_27514
    #19: https://govnokod.ru/27620 https://govnokod.xyz/_27620
    #20: https://govnokod.ru/27816 https://govnokod.xyz/_27816

    nepeKamHblu_nemyx, 16 Января 2022

    Комментарии (456)
  8. Куча / Говнокод #28588

    0

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

    #137: https://govnokod.ru/27857 https://govnokod.xyz/_27857
    #138: https://govnokod.ru/27867 https://govnokod.xyz/_27867
    #139: https://govnokod.ru/27887 https://govnokod.xyz/_27887
    #140: https://govnokod.ru/27900 https://govnokod.xyz/_27900
    #141: https://govnokod.ru/27914 https://govnokod.xyz/_27914
    #142: https://govnokod.ru/27942 https://govnokod.xyz/_27942
    #143: https://govnokod.ru/27960 https://govnokod.xyz/_27960
    #144: https://govnokod.ru/27972 https://govnokod.xyz/_27972
    #145: https://govnokod.ru/27996 https://govnokod.xyz/_27996
    #146: https://govnokod.ru/28008 https://govnokod.xyz/_28008
    #147: https://govnokod.ru/28049 https://govnokod.xyz/_28049
    #148: https://govnokod.ru/28087 https://govnokod.xyz/_28087
    #149: https://govnokod.ru/28136 https://govnokod.xyz/_28136
    #150: https://govnokod.ru/28157 https://govnokod.xyz/_28157
    #151: https://govnokod.ru/28209 https://govnokod.xyz/_28209
    #152: https://govnokod.ru/28217 https://govnokod.xyz/_28217
    #153: https://govnokod.ru/28232 https://govnokod.xyz/_28232
    #154: https://govnokod.ru/28275 https://govnokod.xyz/_28275
    #155: https://govnokod.ru/28281 https://govnokod.xyz/_28281
    #156: https://govnokod.ru/28322 https://govnokod.xyz/_28322
    #157: https://govnokod.ru/28344 https://govnokod.xyz/_28344
    #158: https://govnokod.ru/28366 https://govnokod.xyz/_28366
    #159: https://govnokod.ru/28391 https://govnokod.xyz/_28391
    #160: https://govnokod.ru/28434 https://govnokod.xyz/_28434
    #161: https://govnokod.ru/28449 https://govnokod.xyz/_28449
    #162: https://govnokod.ru/28477 https://govnokod.xyz/_28477
    #163: https://govnokod.ru/28501 https://govnokod.xyz/_28501
    #164: https://govnokod.ru/28527 https://govnokod.xyz/_28527
    #165: https://govnokod.ru/28557 https://govnokod.xyz/_28557
    #166: https://govnokod.ru/28574 https://govnokod.xyz/_28574

    nepeKamHblu_nemyx, 06 Февраля 2023

    Комментарии (455)
  9. Си / Говнокод #25013

    +2

    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
    #include <stdio.h>
    #include <stdlib.h>
    #include <stdalign.h>
    #include <inttypes.h>
    #include <string.h>
    
    float sum_f(const float arr[], const size_t len);
    int32_t sum_i32t(const int32_t arr[], const size_t len);
    
    #define sum(a, b) _Generic((a), float*:   sum_f, \
                                 const float*:   sum_f, \
                                 int32_t*: sum_i32t,\
                                 const int32_t*: sum_i32t)(a, b)
    
    
    // foldl (+) 0 arr
    float sum_f(const float arr[], const size_t len)
    {
      return (len != 0) ? ( sum(arr+1, len-1) + arr[0] ) : 0;
    }
    
    int32_t sum_i32t(const int32_t arr[], const size_t len)
    {
      return (len != 0) ? ( sum(arr+1, len-1) + arr[0] ) : 0;
    }
    
    enum { we_want_int, we_want_float } what_we_want;
    
    void test(int www)
    {
      void *a;
      if (www == we_want_int)
      {
        uint8_t buf[sizeof(int32_t[10])] __attribute__ ((aligned (alignof(int32_t[10]))));
        a = (void *) buf;
        memcpy ( a, (int32_t[10]){1,2,3,4,5,6,7,8,9,10},
                 sizeof((int32_t[10]){1,2,3,4,5,6,7,8,9,10})
                );
        printf("%" PRIi32 "\n", sum((int32_t *)a, 10));
      }
      else if (www == we_want_float)
      {
        uint8_t buf[sizeof(float[10])] __attribute__ ((aligned (alignof(float[10]))));
        a = (void *) buf;
        memcpy ( a, (float[10]){1,2,3,4,5,6,7,8,9,10},
                 sizeof((float[10]){1,2,3,4,5,6,7,8,9,10})
                );
        printf("%f\n", sum((float *)a, 10));    
      }
    }
    
    int main(void)
    {
      test(we_want_int);
      test(we_want_float);
      return EXIT_SUCCESS;
    }

    https://wandbox.org/permlink/TwbKHE8l7ZJc6PNI
    https://govnokod.ru/25005#comment436646
    https://i.imgur.com/yFYfuED.jpg

    j123123, 23 Октября 2018

    Комментарии (454)
  10. Куча / Говнокод #27942

    0

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

    #112: https://govnokod.ru/27648 https://govnokod.xyz/_27648
    #113: https://govnokod.ru/27652 https://govnokod.xyz/_27652
    #114: https://govnokod.ru/27659 https://govnokod.xyz/_27659
    #115: https://govnokod.ru/27665 https://govnokod.xyz/_27665
    #116: https://govnokod.ru/27671 https://govnokod.xyz/_27671
    #117: https://govnokod.ru/27675 https://govnokod.xyz/_27675
    #118: https://govnokod.ru/27685 https://govnokod.xyz/_27685
    #119: https://govnokod.ru/27701 https://govnokod.xyz/_27701
    #120: https://govnokod.ru/27703 https://govnokod.xyz/_27703
    #121: https://govnokod.ru/27710 https://govnokod.xyz/_27710
    #122: https://govnokod.ru/27728 https://govnokod.xyz/_27728
    #123: https://govnokod.ru/27729 https://govnokod.xyz/_27729
    #124: https://govnokod.ru/27730 https://govnokod.xyz/_27730
    #125: https://govnokod.ru/27732 https://govnokod.xyz/_27732
    #126: https://govnokod.ru/27733 https://govnokod.xyz/_27733
    #127: https://govnokod.ru/27737 https://govnokod.xyz/_27737
    #128: https://govnokod.ru/27742 https://govnokod.xyz/_27742
    #129: https://govnokod.ru/27747 https://govnokod.xyz/_27747
    #130: https://govnokod.ru/27755 https://govnokod.xyz/_27755
    #131: https://govnokod.ru/27766 https://govnokod.xyz/_27766
    #132: https://govnokod.ru/27790 https://govnokod.xyz/_27790
    #133: https://govnokod.ru/27828 https://govnokod.xyz/_27828
    #134: https://govnokod.ru/27834 https://govnokod.xyz/_27834
    #135: https://govnokod.ru/27839 https://govnokod.xyz/_27839
    #136: https://govnokod.ru/27845 https://govnokod.xyz/_27845
    #137: https://govnokod.ru/27857 https://govnokod.xyz/_27857
    #138: https://govnokod.ru/27867 https://govnokod.xyz/_27867
    #139: https://govnokod.ru/27887 https://govnokod.xyz/_27887
    #140: https://govnokod.ru/27900 https://govnokod.xyz/_27900
    #141: https://govnokod.ru/27914 https://govnokod.xyz/_27914

    nepeKamHblu_nemyx, 10 Января 2022

    Комментарии (453)
  11. Куча / Говнокод #28501

    0

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

    #133: https://govnokod.ru/27828 https://govnokod.xyz/_27828
    #134: https://govnokod.ru/27834 https://govnokod.xyz/_27834
    #135: https://govnokod.ru/27839 https://govnokod.xyz/_27839
    #136: https://govnokod.ru/27845 https://govnokod.xyz/_27845
    #137: https://govnokod.ru/27857 https://govnokod.xyz/_27857
    #138: https://govnokod.ru/27867 https://govnokod.xyz/_27867
    #139: https://govnokod.ru/27887 https://govnokod.xyz/_27887
    #140: https://govnokod.ru/27900 https://govnokod.xyz/_27900
    #141: https://govnokod.ru/27914 https://govnokod.xyz/_27914
    #142: https://govnokod.ru/27942 https://govnokod.xyz/_27942
    #143: https://govnokod.ru/27960 https://govnokod.xyz/_27960
    #144: https://govnokod.ru/27972 https://govnokod.xyz/_27972
    #145: https://govnokod.ru/27996 https://govnokod.xyz/_27996
    #146: https://govnokod.ru/28008 https://govnokod.xyz/_28008
    #147: https://govnokod.ru/28049 https://govnokod.xyz/_28049
    #148: https://govnokod.ru/28087 https://govnokod.xyz/_28087
    #149: https://govnokod.ru/28136 https://govnokod.xyz/_28136
    #150: https://govnokod.ru/28157 https://govnokod.xyz/_28157
    #151: https://govnokod.ru/28209 https://govnokod.xyz/_28209
    #152: https://govnokod.ru/28217 https://govnokod.xyz/_28217
    #153: https://govnokod.ru/28232 https://govnokod.xyz/_28232
    #154: https://govnokod.ru/28275 https://govnokod.xyz/_28275
    #155: https://govnokod.ru/28281 https://govnokod.xyz/_28281
    #156: https://govnokod.ru/28322 https://govnokod.xyz/_28322
    #157: https://govnokod.ru/28344 https://govnokod.xyz/_28344
    #158: https://govnokod.ru/28366 https://govnokod.xyz/_28366
    #159: https://govnokod.ru/28391 https://govnokod.xyz/_28391
    #160: https://govnokod.ru/28434 https://govnokod.xyz/_28434
    #161: https://govnokod.ru/28449 https://govnokod.xyz/_28449
    #162: https://govnokod.ru/28477 https://govnokod.xyz/_28477

    nepeKamHblu_nemyx, 17 Декабря 2022

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