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

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

    +1429.9

    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
    bool IsBukva(char symbol)
    {
    switch(symbol)
    {
    case'a':return 1;break;
    case'b':return 1;break;
    case'c':return 1;break;
    case'd':return 1;break;
    case'e':return 1;break;
    case'f':return 1;break;
    case'g':return 1;break;
    case'h':return 1;break;
    case'i':return 1;break;
    case'j':return 1;break;
    case'k':return 1;break;
    case'l':return 1;break;
    case'm':return 1;break;
    case'n':return 1;break;
    case'o':return 1;break;
    case'p':return 1;break;
    case'q':return 1;break;
    case'r':return 1;break;
    case's':return 1;break;
    case't':return 1;break;
    case'u':return 1;break;
    case'v':return 1;break;
    case'w':return 1;break;
    case'x':return 1;break;
    case'y':return 1;break;
    case'z':return 1;break;
    case'A':return 1;break;
    case'B':return 1;break;
    case'C':return 1;break;
    case'D':return 1;break;
    case'E':return 1;break;
    case'F':return 1;break;
    case'G':return 1;break;
    case'H':return 1;break;
    case'I':return 1;break;
    case'J':return 1;break;
    case'K':return 1;break;
    case'L':return 1;break;
    case'M':return 1;break;
    case'N':return 1;break;
    case'O':return 1;break;
    case'P':return 1;break;
    case'Q':return 1;break;
    case'R':return 1;break;
    case'S':return 1;break;
    case'T':return 1;break;
    case'U':return 1;break;
    case'V':return 1;break;
    case'W':return 1;break;
    case'X':return 1;break;
    case'Y':return 1;break;
    case'Z':return 1;break;
    default:return 0;
    }
    }

    Женский вариант проверки символа на букву.
    Оригинал тут: http://forum.vingrad.ru/forum/topic-240593.html

    guest, 17 Декабря 2008

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

    +1

    1. 1
    Что за мемчик про вореции?

    Желательно со ссылками на лурк.

    kurwa, 02 Апреля 2016

    Комментарии (216)
  4. Pascal / Говнокод #14318

    +80

    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
    procedure WriteString(ST: Ansistring);
    var
      leng: dword;
      I: dword;
      ss: Ansistring;
      stk: Ansistring;
    begin
      leng := Length(ST);
      for I := 1 to leng do
      begin
        ss := Copy(ST, I, 1);
        stk := stk + ss;
      end;
      filestream1.Write(stk[1], Length(stk));
    end;

    Процедура записи строки в файл.
    Использование:

    var
    filestream1: TfileStream;

    begin
    filestream1 := TfileStream.Create('file.dat', fmcreate);
    WriteString('bla bla bla');
    filestream1.Destroy;
    end;

    ka3ax, 06 Января 2014

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

    0

    1. 1
    Минск #3

    Встреча говнокодеров.

    #1: https://govnokod.ru/25937 https://govnokod.xyz/_25937
    #2: https://govnokod.ru/26458 https://govnokod.xyz/_26458

    OCETuHCKuu_nemyx, 03 Февраля 2021

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

    0

    1. 1
    2. 2
    3. 3
    <?php
    
    echo 'Именно поэтому я за' . ' ' . 'Silverlight' . '!';

    Кто программировал на silverlight, стоит начинать изучение в 2к20 ?

    phpBidlokoder2, 15 Апреля 2020

    Комментарии (215)
  7. PHP / Говнокод #26465

    +1

    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
    <?php
    
      class Pet {
      
        protected $name;
    
        public function __construct($name) {
          echo "Setting name to " . $name . "\n";
          $this->name = $name;
        } 
    
        public function eat() {
          echo $this->name . " is eating.\n";
        }
      }
    
      $var = 30;
      $a_pet = new Pet("Spike"); 
      $a_pet->eat();
    ?>
    
    ---
    
    <?php
    
    function Pet__construct(&$objInst, $name)
    {
        echo 'Setting name to ' . $name . '
    ';
        $objInst['name'] = $name;
    }
    function Pet_eat(&$objInst)
    {
        echo $objInst['name'] . ' is eating.
    ';
    }
    $Pet = array('__vars' => array('name' => null));
    $var = 30;
    $a_pet = array_merge($Pet['__vars'], array('__type' => 'Pet'));
    Pet__construct($a_pet, 'Spike');
    Pet_eat($a_pet);

    Конвертер из ООП в процедурный стиль.
    Make PHP great again.

    https://github.com/PatrickZurekUIC/PHP-OOP-Converter

    Fike, 05 Марта 2020

    Комментарии (215)
  8. Си / Говнокод #24496

    +5

    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
    void sort3(uint32_t a[static 3])
    {
      //                   0     1     2     3     4     5     6     7     8
      uint32_t tmp[9] = {a[0], a[1], a[2], a[0], a[1], a[0], a[2], a[1], a[0]};
      uint8_t bits = (a[0] <= a[1]) | ((a[1] <= a[2]) << 1) | ((a[0] <= a[2]) << 2);
      static const uint8_t b[] =
      {
        [0b000] = 6,
        [0b001] = 2,
        [0b010] = 1,
        [0b101] = 5,
        [0b110] = 4,
        [0b111] = 0,
      };
      memcpy(a, tmp+b[bits], 3*sizeof(uint32_t));
    }

    Новая инновационная сортировка на 3 элемента без if-ов
    https://wandbox.org/permlink/pTLXgxKKQuaiVCxb

    j123123, 15 Июля 2018

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

    +11

    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
    /// Represents the model of a Writer document.
    class SW_DLLPUBLIC SwDoc :
        public IInterface,
        public IDocumentSettingAccess,
        public IDocumentDeviceAccess,
        public IDocumentRedlineAccess,
        public IDocumentLinksAdministration,
        public IDocumentFieldsAccess,
        public IDocumentContentOperations,
        public IDocumentStylePoolAccess,
        public IDocumentLineNumberAccess,
        public IDocumentStatistics,
        public IDocumentState,
        public IDocumentDrawModelAccess,
        public IDocumentLayoutAccess,
        public IDocumentTimerAccess,
        public IDocumentChartDataProviderAccess,
        public IDocumentListItems,
        public IDocumentOutlineNodes,
        public IDocumentListsAccess,
        public IDocumentExternalData
    {
    ...

    Вот это монстрище!

    http://opengrok.libreoffice.org/xref/core/sw/inc/doc.hxx

    Sauron, 23 Декабря 2013

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

    0

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

    #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: (vanished) 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
    #17: https://govnokod.ru/28394 https://govnokod.xyz/_28394
    #18: https://govnokod.ru/28440 https://govnokod.xyz/_28440
    #19: https://govnokod.ru/28572 https://govnokod.xyz/_28572
    #20: https://govnokod.ru/28656 https://govnokod.xyz/_28656
    #21: (vanished) https://govnokod.xyz/_28666
    #22: https://govnokod.ru/28676 https://govnokod.xyz/_28676
    #23: https://govnokod.ru/28684 https://govnokod.xyz/_28684
    #24: https://govnokod.ru/28691 https://govnokod.xyz/_28691
    #25: https://govnokod.ru/28698 https://govnokod.xyz/_28698
    #26: https://govnokod.ru/28704 https://govnokod.xyz/_28704
    #27: https://govnokod.ru/28711 https://govnokod.xyz/_28711
    #28: https://govnokod.ru/28721 https://govnokod.xyz/_28721
    #29: https://govnokod.ru/28728 https://govnokod.xyz/_28728
    #30: (vanished) https://govnokod.xyz/_28747
    #31: https://govnokod.ru/28757 https://govnokod.xyz/_28757
    #32: https://govnokod.ru/28770 https://govnokod.xyz/_28770
    #33: https://govnokod.ru/28835 https://govnokod.xyz/_28835
    #34: https://govnokod.ru/28924 https://govnokod.xyz/_28924
    #35: https://govnokod.ru/29080 https://govnokod.xyz/_29080

    nepeKamHblu_nemyx, 11 Сентября 2025

    Комментарии (214)
  11. bash / Говнокод #27650

    +4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    #!/bin/bash 
    # apt install jq w3m curl
    
    curl https://gcode.space/api/comments  \
    | jq -r 'map("-"*99+"<br>"+.user_name+" "+.posted+"<br>","<ul>"+.text+"</ul>") | reduce .[] as $item (""; . + $item) '  \
    |  w3m -T text/html -cols 99 -dump \
    | less -R

    Консольная читалка для стока ГК

    3.14159265, 08 Сентября 2021

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