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

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

    +174.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
    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
    function _start() {
    	var $p = $("input#text-f").val();
    	if (($p == 'undefined')||($p == '')||($p.length != 10))
    		return false;
    	$("#callsexample").animate({height: "hide", opacity: "0"}, "fast")
    	$("#demoexample").animate({height: "show", opacity: "0"}, "low", function(){
    		$("#close").html('<a href="">Инициализация</a>');
    		for (i=1; i<15; i++)
    			$("#res"+i).html('');
    		$("#demoexample").animate({height: "hide", opacity: "0"}, "fast", function(){
    			$("#provider").load("/info?a=p&p="+$("select#pref-code").val()+$("input#text-f").val());
    			$("#region").load("/info?a=r&p="+$("select#pref-code").val()+$("input#text-f").val());
    			$("#status").load("/info?a=s&p="+$("select#pref-code").val()+$("input#text-f").val());
    			setTimeout(function(){
    				$("#close").html('<a href="">Определение оператора абонента</a>');
    				$("#res1").html('Определение оператора абонента');
    				setTimeout(function(){
    					$("#close").html('<a href="">Получение сервисных параметров</a>');
    					$("#res3").html('Получение сервисных параметров');
    					$("#res2").html('OK');
    					setTimeout(function(){
    						$("#close").html('<a href="">Запуск эмулятора устройства GSM</a>');
    						$("#res5").html('Запуск эмулятора устройства GSM');
    						$("#res4").html('OK');
    						setTimeout(function(){
    							$("#close").html('<a href="">Формирование запроса</a>');
    							$("#res7").html('Формирование запроса');
    							$("#res6").html('OK');
    							setTimeout(function(){
    								$("#close").html('<a href="">Отправка запроса оператору</a>');
    								$("#res9").html('Отправка запроса оператору');
    								$("#res8").html('OK');
    								setTimeout(function(){
    									$("#close").html('<a href="">Получение списка SMS</a>');
    									$("#res11").html('Получение списка SMS');
    									$("#res10").html('OK');
    									setTimeout(function(){
    										$("#close").html('<a href="">Получение списка звонков</a>');
    										$("#res13").html('Получение списка звонков');
    										$("#res12").html('OK');
    										setTimeout(function(){
    											$("#close").html('<a href="">Завершение соединения</a>');
    											$("#res14").html('OK');
    											setTimeout(function(){
    											$("#demoresult").animate({height: 200, opacity: "1"}, "low", function(){});
    											$("#demosearch").animate({height: "hide", opacity: "0"}, "low");
    									$("#demoexample").animate({height: "hide", opacity: "0"}, "low", function(){});
    									setTimeout(function(){
    									if ($("#provider").html() == 'ERROR') {
    											$("#demoresult").animate({height: "hide", opacity: "0"}, "fast");
    											$("#demosearch").animate({height: "hide", opacity: "0"}, "fast");
    											$("#demoexample").animate({height: "show", opacity: "1"}, "fast");
    											$("#close").html('<a href="">Получение данных невозможно</a>');
    											} else {
    											$("#demosearch").animate({height: "hide", opacity: "0"}, "low");
    											$("#demoresult").animate({height: "show", opacity: "1"}, "low");
    											$("#close").html('<a href="">Данные успешно получены</a>');
    													}
    												}, 200);
    											},2100);
    										},2100);
    									},2700);
    								},2000);
    							},3700);
    						},3500);

    Это "чудо" - один из вариантов "Эмулятора GSM для получения чужих СМСок доверчивыми хомячками". "Назначение" этого... кхм... высера, доставляет не хуже способа реализации...
    Использует jQuery

    Shitafaka, 07 Февраля 2010

    Комментарии (25)
  3. SQL / Говнокод #2147

    −858.3

    1. 1
    Функция nullif( a, b ) возвращает null если a=b, иначе а.

    Всем отделом думали зачем это нужно. С трудом высосали пример из пальца. Видимо какой-то индус решил написать функцию века.

    dim1r, 16 Ноября 2009

    Комментарии (25)
  4. Java / Говнокод #1785

    +71.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
    /**
         * Возбуждает IllegalArgumentException если аргумент null.
         * Формирует сообщение об ошибке с именем условия.
         *
         * @param argument     проверяемый аргумент
         * @param argumentName имя аргумента
         */
        public static void ensureNotNull(Object argument, String argumentName) {
            if (argument == null) {
                throw new IllegalArgumentException("Null '" + argumentName + "' not allowed.");
            }
        }

    johnsoft, 07 Сентября 2009

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

    +178.4

    1. 1
    defined( '_VALID_MOS' ) or die( 'Пошел на хуй отсюдова ...' );

    залез поправить шаблон и офигел, интересно как мог офигеть пользователь сайта

    guest, 11 Марта 2009

    Комментарии (25)
  6. Python / Говнокод #85

    −276.5

    1. 1
    2. 2
    3. 3
    4. 4
    text=string.replace(text,"<br>","\n")
    text=string.replace(text,"<BR>","\n")
    text=string.replace(text,"<Br>","\n")
    text=string.replace(text,"<bR>","\n")

    Twisted Words, протокол Oscar.
    Кусок функции dehtml()

    SvartalF, 09 Декабря 2008

    Комментарии (25)
  7. Java / Говнокод #48

    −11.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
    public static Date createDate(Integer iYear, Integer iMonth, Integer iDay) throws Exception
        {
            if ((!(iYear instanceof Integer))
                    || (!(iMonth instanceof Integer))
                    || (!(iDay instanceof Integer))
                    )
            {
                throw new Exception();
            }
    
            Date date = null;
            String year, month, day;
    
            year = iYear.toString();
            month = iMonth.toString();
            day = iDay.toString();
            try
            {
                date = new SimpleDateFormat("yyyy/MM/dd").parse(year + "/" + month + "/" + day);
    
            } catch (ParseException e)
            {
                log.warn("Date transformation failed for year, month, day:  " + iYear + ", " + iMonth + ", " + iDay);
            }
            return date;
        }

    Индусы Рулят!!!

    guest, 02 Декабря 2008

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

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    // java types for typescript
    export type int = number;
    export type float= number;
    export type double = number;
    export type long = number;
    export type short = number;
    export type byte = number;
    export type char = string;
    export type boolean = boolean;
    export type void = void;

    veiny, 12 Апреля 2025

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

    +1

    1. 1
    Петух иньо забыл продлить домен

    inho-pidar, 25 Марта 2022

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

    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
    def getMyIPAddress():
        global __ip__
        if __ip__:
            return __ip__
        with suppress(Exception):
            __ip__ = get('https://api.my-ip.io/ip', timeout=.1).text
        with suppress(Exception):
            __ip__ = get('https://ipwhois.app/json/', timeout=.1).json()["ip"]
        with suppress(Exception):
            __ip__ = get('https://ipinfo.io/json', timeout=.1).json()["ip"]
        with suppress(Exception):
            __ip__ = ProxyTools.Patterns.IP.search(get('http://checkip.dyndns.org/', timeout=.1).text)
        with suppress(Exception):
            __ip__ = ProxyTools.Patterns.IP.search(get('https://spaceiran.com/myip/', timeout=.1).text)
        with suppress(Exception):
            __ip__ = get('https://ip.42.pl/raw', timeout=.1).text
        return getMyIPAddress()

    Что имел в виду автор? Кто понял?

    inho-pidar, 24 Марта 2022

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

    −3

    1. 1
    https://t.me/stdvector

    го в вектор

    CkpunmoBbIu_nemyx, 12 Января 2022

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