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

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

    +170.5

    1. 1
    2. 2
    3. 3
    float F(){
    	return F0() - mu() + Fs() + Fa()+3;
    }//

    Говнокод "по-студенчески": Ответ не сходился на тройку... :)

    Мультикасса.

    guest, 16 Февраля 2009

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

    +108

    1. 1
    return ((int)(Counter / 2) != Counter / 2.00 && Counter != 0);

    Не садил, так не ломай - у нас сегодня первомай :D
    Оставили в продакшене, чисто для музейной ценности :D

    guest, 13 Февраля 2009

    Комментарии (3)
  4. PHP / Говнокод #533

    +150.1

    1. 1
    $var=((string)$var==(string)(int)$var)?$var:"'{$var}'";

    в php подготавливался массив который затем сливался в .js файл,
    и вот что бы значения различить какие в кавычках выдавать (строки), а какие без кавычек (были только целые числа) появилась на свет эта конструкция

    guest, 11 Февраля 2009

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

    +144.5

    1. 1
    2. 2
    3. 3
    while (true.ToString().Length < 5)
    {
    }

    индусы рулят!!!

    guest, 10 Февраля 2009

    Комментарии (3)
  6. PHP / Говнокод #523

    +137

    1. 1
    2. 2
    $users_count = count($this->db->exe('select * from px_users'));  
    $users = $this->db->exe('select * from px_users order by name limit ' . $from . ',' . $perpage);

    guest, 10 Февраля 2009

    Комментарии (3)
  7. Python / Говнокод #522

    −349

    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
    def MappingRights(i, s, u, d):
        INS=i.split(":")
        SEL=s.split(":")
        UPD=u.split(":")
        DEL=d.split(":")
    
        id_group=INS[0];
        right=str(int(bool(INS[1].capitalize()))) + \
              str(int(bool(SEL[1].capitalize()))) + \
              str(int(bool(UPD[1].capitalize()))) + \
              str(int(bool(DEL[1].capitalize())))
    
        return id_group, right;

    Парсим массив с правами переданный из JavaScript.
    нужно из "true" получить "1", соответственно из "false" "0"

    guest, 10 Февраля 2009

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

    +146

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    callable Malkovich() as Malkovich
    
    def malkovich() as Malkovich:
        print("Malkovich!")
        return malkovich
    
    malkovich()()()

    из Boo manifest. Не говнокод конечно же.

    guest, 08 Февраля 2009

    Комментарии (3)
  9. PHP / Говнокод #500

    +165.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
    //Shop-Script PREMIUM  
    
    // -------------------------INITIALIZATION-----------------------------//
    	//include core files
    	include("./cfg/connect.inc.php");
    	include("./includes/database/".DBMS.".php");
    	include("./cfg/language_list.php");
    	include("./core_functions/functions.php");
    	include("./core_functions/category_functions.php");
    	include("./core_functions/cart_functions.php");
    	include("./core_functions/product_functions.php");
    	include("./core_functions/statistic_functions.php");
    	include("./core_functions/reg_fields_functions.php" );
    	include("./core_functions/registration_functions.php" );
    	include("./core_functions/country_functions.php" );
    	include("./core_functions/zone_functions.php" );
    	include("./core_functions/datetime_functions.php" );
    	include("./core_functions/order_status_functions.php" );
    	include("./core_functions/order_functions.php" );
    	include("./core_functions/aux_pages_functions.php" );
    	include("./core_functions/picture_functions.php" ); 
    	include("./core_functions/configurator_functions.php" );
    	include("./core_functions/option_functions.php" );
    	include("./core_functions/search_function.php" );
    	include("./core_functions/discount_functions.php" ); 
    	include("./core_functions/custgroup_functions.php" ); 
    	include("./core_functions/shipping_functions.php" );
    	include("./core_functions/payment_functions.php" );
    	include("./core_functions/tax_function.php" ); 
    	include("./core_functions/currency_functions.php" );
    	include("./core_functions/module_function.php" );
    	include("./core_functions/crypto/crypto_functions.php");
    	include("./core_functions/quick_order_function.php" ); 
    	include("./core_functions/setting_functions.php" );
    	include("./core_functions/subscribers_functions.php" );
    	include("./core_functions/version_function.php" );
    	include("./core_functions/discussion_functions.php" );
    	include("./core_functions/order_amount_functions.php" ); 
    	include("./core_functions/linkexchange_functions.php" ); 
    	include("./core_functions/affiliate_functions.php" );
    
    	include('./classes/xml2array.php');
    	include('./classes/class.virtual.shippingratecalculator.php');
    	include('./classes/class.virtual.paymentmodule.php');
    
    	include('./classes/class.virtual.smsmail.php');
    	include('./modules/smsmail/class.smsnotify.php');
    
    
    	MagicQuotesRuntimeSetting();
    
    	//init Smarty
    	require 'smarty/smarty.class.php';

    500!
    Весь сайт работает только на index.php. И грузит систему это безбожно.
    Взято из Shop-Script PREMIUM.

    guest, 04 Февраля 2009

    Комментарии (3)
  10. PHP / Говнокод #484

    +169.8

    1. 1
    2. 2
    3. 3
    if ( isset($_GET['action']) && !isset($_GET['action']) ) {
        die('Не не не, Девид Блейн, не не не!!!!! Сдрысни демон!!!!!');
    }

    o_O

    guest, 31 Января 2009

    Комментарии (3)
  11. JavaScript / Говнокод #451

    +32

    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
    /** 
     * Сабж: Проверка формы 
     * Для каждого поля в форме было понаколбашено по отдельной(!) функции для проверки
     * Но и это цветочки...
     */ 
    
    // Поехали!(С)
     
    // запуск проверки всех полей формы <- это древний комент
    function checkAll()
    	{
    	var elements = new Array('avto', 'duration', 'start_adress', 'end_adress', 'orderer_name', 'orderer_phone', 'orderer_mail');
    
    	for (i = 0; i < 7; i++)
    		{
    		    var	curEl = document.getElementById(elements[i]);
    		    curEl.focus(); // тут, suka, особенно жестоко!
    		    curEl.blur();  //
    		}
    
    	var StatSum = "";
    
    	for (j = 0; j < 7; j++)
    		{
    			// в форме сделаны были ккрытые инпупуты, куда
    			// проверяющая функция писала 0 или 1 в зависимости от результата проверки
    			var	curStat = document.getElementById(elements[j]+"Status");
    			if (curStat.value == "1")
    				{StatSum = StatSum + "1";}
    			if (curStat.value == "0" || curStat.value == "")
    				{StatSum = StatSum + "";}
    		}
    
    	// ну тут ваще пиздец)))
    	// семь нулей - это семь удачно проверенных полей формы 
    	if 	(StatSum == "" || StatSum == "0000000")
    		{
    			// щёлкаем, suka, по самбмиту..
    			var btn = document.getElementById("submit");
    			btn.click();
    		}
    	return (false);
    	}
    	// занавес...
    	
    /************************************************************/

    Блин, попёрло сейчас покурить свои извращения на JS двухлетней давности...
    У меня истерика = )

    guest, 23 Января 2009

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