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

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

    −6

    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
    includelib  C:\Irvine\User32.Lib
    includelib  C:\Irvine\Kernel32.Lib
    includelib  D:\masm32\lib\Irvine32.lib
    include     \masm32\include\Irvine32.inc
    
    ; D:/masm32/bin/ml.exe /c  /coff  "D:\asm\rcl.asm"
    ; D:/masm32\bin\link.exe /subsystem:console  "D:\asm\rcl.obj"
    
    .data
    
      
    .code
    main PROC
      xor eax, eax
      xor edx , edx
      
      mov al , 10101010b
      
      cmp al,80h
      jns just
      shr al,1
      jmp print
      
      just:
     
      shr al,1
      or ax,80h
     
      print:
      call WriteBin
    		
    	exit
    	main ENDP
    END main

    Дай бог здоровья товарищу Ирвину.

    Madhouse_camomile, 10 Января 2021

    Комментарии (18)
  3. C# / Говнокод #26858

    +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
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Windows.Data;
    using Indusoft.PolypropylenPowder.Info;
    
    //СУКИ ИНДАСОФТОВСКИЕ
    namespace Indusoft.PolypropylenPowder.Converters
    {
        public class BeginXxConverter : IValueConverter
        {
            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            {
                if (value == null) return null;
                var s = value as IEnumerable<object>;
    
                var res = 45.0;
                var flag = false;
                if (s != null)
                {
                    foreach (var a in s)
                    {
                        var b = a as DataTemplate5Item;
                        if (b != null)
                        {
                            if (b.IsActive5)
                            {
                                flag = true;
                                break;
                            }
                        }
                        res += 91;
                    }
                }
                if (!flag)
                {
                    return 0;
                }
                return res;
            }
    
            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            {
                throw new NotImplementedException();
            }
        }
    }

    ух сука питухи, а мне это говно поддерживать

    GreatMASTERcpp, 12 Августа 2020

    Комментарии (18)
  4. 1C / Говнокод #26806

    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
    ПапкаПоставщика = СокрЛП(Поставщик);
    Попытка Excel.ActiveWorkbook.Close(); Исключение КонецПопытки;
    Попытка Excel.Quit(); Исключение КонецПопытки;
    Попытка Excel = 0; Исключение КонецПопытки;
    Попытка Предупреждение("ПАУЗА", 1); Исключение КонецПопытки;
    Попытка СоздатьКаталог(Файл.Путь + "\отклонено\" + ПапкаПоставщика); Исключение КонецПопытки;
    Попытка
    	ПереместитьФайл(Файл.ПолноеИмя, Файл.Путь + "\отклонено\" + ПапкаПоставщика + "\" + Файл.Имя);
    Исключение
    	Попытка
    		ПереместитьФайл(Файл.ПолноеИмя, Файл.Путь + "\отклонено\" + Файл.Имя);
    	Исключение
    	КонецПопытки;
    КонецПопытки;
    Попытка
    	ФайлЛог = Новый ЗаписьТекста(Файл.Путь + "\отклонено\" + ПапкаПоставщика + "\" + Файл.Имя + ".txt");
    	ФайлЛог.ЗаписатьСтроку(Сообщение);
    Исключение
    	Попытка
    		ФайлЛог = Новый ЗаписьТекста(Файл.Путь + "\отклонено\" + Файл.Имя + ".txt");
    		ФайлЛог.ЗаписатьСтроку(Сообщение);
    	Исключение
    	КонецПопытки;
    КонецПопытки;

    Больше попыток Богу попыток!

    pgenav, 15 Июля 2020

    Комментарии (18)
  5. PHP / Говнокод #26466

    +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
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    <?php
    var lastmsgid=$('.chat-msg:eq(0)',$(this).parent()).data('messageid');
    var lastmsg=$('#chat .chat-msg[data-messageid='+lastmsgid+']');
    var lastmsgscroll=lastmsg.offset().top;
    var lastscroll=$('#chat .messages').scrollTop();
    $(this).attr('disabled','disabled');var button=$(this);$.ajax({
    
              url: '<?=$baseHref;?>chat.php?more=1&user=<?=(int)$_GET['user'];?>&last=<?=(int)$last;?>',
    
              success: function(data) {
            if(data!='err'){
    data=JSON.parse(data);
    button.parent().prepend(data.messages);button.remove();fixdates();
    /*smiles*/$('#chat .messages .chat-msg div:not(.smilesadded)').each(function(){$(this).addClass('smilesadded').html(replacesmiles($(this).html()));});
    if($('#chat .messages').scrollTop()==0)$('#chat .messages').scrollTop(lastscroll-lastmsgscroll+lastmsg.offset().top);//prepend и так это делает. но не всегда
    
    } else {alert('Error');button.removeAttr('disabled');}
              },
              error:  function(xhr, str){
    	    alert('Error: ' + xhr.responseCode);
                   button.removeAttr('disabled');
              }
            });" class="btn-more button" style="margin-top:20px;margin-bottom:20px;"><?_e('Загрузить ещё');?></button><?}
    if(!isset($_GET['checknew']))$messages=array_reverse($messages);
    $user=mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT * FROM users WHERE `id`=".(int)$_GET['user']." LIMIT 1;"));
    foreach($messages as $data){
    if($yourdirection==$data['direction'])$userid=$account['id']; else $userid=(int)$_GET['user'];
    
    
    $fake=0;
    if(substr($data['text'],0,7)==':attach' && substr($data['text'],-1)==':'){$data['attachment']='../no-attach-premium.png?';if($premium)$data['attachment']=substr($data['text'],7,-1);$data['text']='';$fake=1;}
    ?>

    И сказал Господь: сойдем же и смешаем языки их, чтобы один не понимал речи другого.

    soxati, 05 Марта 2020

    Комментарии (18)
  6. C++ / Говнокод #26343

    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
    void main(void)
    {
    	int a1,a2,a3,a4,a5,a6,a7,a8,a9;
    	int b1,b2,b3,b4,b5,b6,b7,b8,b9;
    	int c1,c2,c3,c4,c5,c6,c7,c8,c9;
    	int d1,d2,d3,d4,d5,d6,d7,d8,d9;
    	int e1,e2,e3,e4,e5,e6,e7,e8,e9;
    	int f1,f2,f3,f4,f5,f6,f7,f8,f9;
    	int g1,g2,g3,g4,g5,g6,g7,g8,g9;
    	int h1,h2,h3,h4,h5,h6,h7,h8,h9;
    	int i1,i2,i3,i4,i5,i6,i7,i8,i9;
    
    ....
    
    }

    Когда-то когда я еще не знал о существовании массивов.... это начало программы для решения судоку.
    В продолжении этого были определены еще 729 переменных для вариантов решения.

    fomenokdima, 11 Января 2020

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    $interval = $interval->m;
    
    switch ($interval){
        case 1: brake;
        case 3: brake;
    }

    от предыдущего тимлида

    Sm0_ker, 09 Декабря 2019

    Комментарии (18)
  8. PHP / Говнокод #26047

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    foreach ($cart = LaraCart::getItems() as $product) {         
        $product->id;      
           $product->name;      
           $product->title_slug;       
          $product->price;         
        $product->qty;      
           $product->photo;     
            $product->item_type;  
           }

    А не прогнать бы нам просто данные ммм?

    ARTWIN_PRO, 26 Ноября 2019

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

    +1

    1. 1
    2. 2
    3. 3
    size_t 	nChLen = it_ch_end - it_ch;
    
    до меня дошло не сразу.

    OlegUP, 03 Октября 2019

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

    +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
    There was once a programmer who was attached to the court of the
    warlord Wu.  The warlord asked the programmer: "Which is easier to design:
    an accounting package or an operating system?"
            "An operating system," replied the programmer.
            The warlord uttered an exclamation of disbelief. "Surely an
    accounting package is trivial next to the complexity of an operating
    system," he said.
            "Not so," said the programmer, "when designing an accounting package,
    the programmer operates as a mediator between people having different ideas:
    how it must operate, how its reports must appear, and how it must conform to
    tax laws.  By contrast, an operating system is not limited by outward
    appearances.  When designing an operating system, the programmer seeks the
    simplest harmony between machine and ideas.  This is why an operating system
    is easier to design."
            The warlord of Wu nodded and smiled. "That is all good and well,"
    he said, "but which is easier to debug?"
            The programmer made no reply.
                    -- Geoffrey James, "The Tao of Programming"

    друзья, а как думаете вы?
    что проще делать, а что дебажить?

    MAPTbIwKA, 26 Сентября 2019

    Комментарии (18)
  11. PHP / Говнокод #25800

    −2

    1. 1
    https://www.php.net/manual/en/migration70.deprecated.php

    > The salt option for the password_hash() function has been deprecated to prevent developers from generating their own (usually insecure) salts.
    Какой анскилл )))

    Stallman, 03 Сентября 2019

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