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

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

    +152

    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
    ISQ.Widget.Query.keyUpHandler=function(c){
        var b=c||window.event;
        if(!ISQ.Widget.userActive){
    	return
        }
        if(typeof(b.keyCode)!="unknown"&&ISQ.Widget.Query.ignoreKeyCodes[b.keyCode]){
    	return false
        }
        if(ISQ.Cnf.limited&&ISQ.Widget.state!==ISQ.Widget.enumState.contactForm){
    	return false
        }
        if(ISQ.Widget.state===ISQ.Widget.enumState.customLink){
    	ISQ.Widget.state=ISQ.Widget.enumState.questions
        }
        ISQ.Widget.Query.clearQuestionTrail();
        var a=_query(false);
        if(ISQ.Widget.Query.lastQueryWritten!=a){
    	ISQ.Widget.Query.analyzeQuery(a)
        }
        return false
    };

    По поводу уверенных программистов (явно задел на будущее, а вдруг добаят).

    wvxvw, 04 Июня 2012

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

    +163

    1. 1
    2. 2
    3. 3
    ISQ.Html.scrollBarWidth=function(){
        return 17
    };

    С одной стороны, конечно, проблематично посчитать, но возможно же...

    wvxvw, 01 Июня 2012

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

    +65

    1. 1
    2. 2
    3. 3
    <?if (strpos($img, 'no_photo') !== false) {} else {?>     
    	  <img title="<?=util::prepareHTML($a_info['cap'])?>" src="<?=$img?>" width="361" height="238" class="clipart-news-l" alt="<?=util::prepareHTML($a_info['cap'])?>" />         
        <?}?>

    no comment.

    nethak, 31 Мая 2012

    Комментарии (16)
  5. Java / Говнокод #10395

    +123

    1. 1
    createCanvas(); // create canvas!

    Комментарии от Кэпа.

    someone, 29 Мая 2012

    Комментарии (16)
  6. SQL / Говнокод #10376

    −131

    1. 1
    2. 2
    alter table EqualityCodes add constraint chk_EqualityCodes_Code
      check (Code not in ('', ' ', '  ', '   ', '    ', '     ', '      ', '       '));

    glprizes, 28 Мая 2012

    Комментарии (16)
  7. C++ / Говнокод #10287

    −22

    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
    class TFunctorMap
    	{
    	public:
    		typedef bool (*TFunctor)(const TSentenceList&, unsigned short &);
    	private:
    		std::map<char, TFunctor> _functorMap;
    	public:
    		TFunctorMap(void)
    		{
    			_functorMap.insert(std::make_pair('g', &RZC));
    			_functorMap.insert(std::make_pair('t', &STN));
    			_functorMap.insert(std::make_pair('d', &RTC));
    		}
    		TFunctor GetFunctor(const char Key)
    		{
    			if (_functorMap.find(Key) == _functorMap.end())
    				return NULL;
    			return _functorMap[Key];
    		}
    	};

    Говногость, 16 Мая 2012

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

    +141

    1. 1
    2. 2
    string Signal = Console.ReadLine();
    Console.WriteLine(Convert.ToString(bool.Parse(Signal))); //НУ НАХУЯ?!?!?

    Для непонятных: Автор говна создает переменную типа string и записывает туда введенную в консоли строку, после он нехилым образом вызывает метод Parse который из string переводит в bool, а потом этот поносопроггер переконвертирует полученную переменную типа bool в переменную типа string. Ну нахуя спрашивается????

    KusokGovna, 15 Мая 2012

    Комментарии (16)
  9. JavaScript / Говнокод #10256

    +160

    1. 1
    2. 2
    3. 3
    4. 4
    <button type='button' id='button-download'>download zipfile</button>
    $("#button-download").live("click", function() {
        $.get("http://localhost/admin/zip/002140.zip"); // doesn't work?
    })

    Ссылка на скачивание файла, современный вариант.

    mozg, 13 Мая 2012

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

    +83

    1. 1
    $v = (((bool) $v) ? true : false);

    somnambulism, 05 Мая 2012

    Комментарии (16)
  11. Objective C / Говнокод #10117

    −282

    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
    NSArray *beautifulValues = [[NSArray alloc] initWithObjects:
                                    [NSNumber numberWithFloat:0.00001], 
                                    [NSNumber numberWithFloat:0.00005], 
                                    [NSNumber numberWithFloat:0.0001],
                                    [NSNumber numberWithFloat:0.005],
                                    [NSNumber numberWithFloat:0.001],
                                    [NSNumber numberWithFloat:0.005],
                                    [NSNumber numberWithFloat:0.01],
                                    [NSNumber numberWithFloat:0.05], 
                                    [NSNumber numberWithFloat:0.1],
                                    [NSNumber numberWithFloat:0.5],
                                    [NSNumber numberWithFloat:1],
                                    [NSNumber numberWithFloat:5],
                                    [NSNumber numberWithFloat:10],
                                    [NSNumber numberWithFloat:50],
                                    [NSNumber numberWithFloat:100],
                                    [NSNumber numberWithFloat:500],
                                    [NSNumber numberWithFloat:1000],
                                    [NSNumber numberWithFloat:5000],
                                    [NSNumber numberWithFloat:10000],
                                    [NSNumber numberWithFloat:50000],
                                    [NSNumber numberWithFloat:100000],
                                    [NSNumber numberWithFloat:500000],
                                    [NSNumber numberWithFloat:1000000],
                                    [NSNumber numberWithFloat:5000000],
                                    [NSNumber numberWithFloat:10000000], nil];

    Нашел в одном из проектов.

    itruf, 30 Апреля 2012

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