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

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

    +146

    1. 1
    $news = new news($_GET["news"]);

    Обьект класса news. Выводит нужную новость в соответствии с get запросом.

    Somov, 09 Ноября 2010

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

    +146

    1. 1
    2. 2
    3. 3
    4. 4
    logit("e", "%s No Menu! Wait 5 minutes and try again.\n", whoami);
    for(j=0;j<60;j++) {
        sleep_ew( 5000 );       /* wait around */
    }

    sgram из earthworm

    ftptrash, 08 Ноября 2010

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

    +146

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    function testPrint($str){
    
    
    	return $str;        
    
    }
    print testPrint("<br>");

    Недавно видел такую полезную функцию:)

    dexif, 07 Ноября 2010

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

    +146

    1. 1
    <? if (1==0) { ?>

    сложно было комментарий написать(/**/)

    ferry-very-good, 17 Августа 2010

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

    +146

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    $this->load->model('Bimail');
    			$this->Bimail->beautymail(
    					$this->adminmail,
    					$this->input->post('mail'),
    					$$this->adminsubject,
    					$this->input->post('name'),
    					$this->input->post('text'));
    			$this->redirect('conn/ok');

    Как видите я написал два знака доллара на 5 строке. При таком вызове фукции у мея виснет httpd.exe (это Apach). Кто может объяснить почему?
    И еще: почему РНР не выдает ошибки?
    *Провернуть такую ошибку в простом коде не получилось.

    increazon, 05 Августа 2010

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

    +146

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    $module=(!empty($_GET['mod']))?$_GET['mod']:"static";
    
    if(is_file("modules/".$module.".class.php"))
    {
        include_once("modules/".$module.".class.php");
    }
    else
    {
        include_once("modules/error.class.php");
    }

    от такая хитрожопая система, позволяющая подгружать "модули"

    zloiia, 04 Августа 2010

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

    +146

    1. 1
    2. 2
    3. 3
    4. 4
    if (cur1!=NULL){
    	while(cur1!=NULL){
    	...
    }

    Вот такие вот потрясающие проверки в духе "нуавдруг?"

    tony, 22 Июня 2010

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

    +146

    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
    <?php $this->html('headscripts') ?>
    <?php	if($this->data['jsvarurl'  ]) { ?>
    		<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl'  ) ?>"><!-- site js --></script>
    <?php	} ?>
    <?php	if($this->data['pagecss'   ]) { ?>
    		<style type="text/css"><?php $this->html('pagecss'   ) ?></style>
    <?php	}
    		if($this->data['usercss'   ]) { ?>
    		<style type="text/css"><?php $this->html('usercss'   ) ?></style>
    <?php	}
    		if($this->data['userjs'    ]) { ?>
    		<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
    <?php	}
    		if($this->data['userjsprev']) { ?>
    		<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
    <?php	}
    		if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
    	</head>
    <body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
    <?php if($this->data['body_onload'    ]) { ?> onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
     class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>

    Разработчики википедии обожают php-теги

    guest, 02 Августа 2009

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

    +146

    1. 1
    return ($pkey? $pkey : true); // раньше здесь всегда возвращалось true - теперь тоже

    guest, 31 Июля 2009

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

    +146

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    ...
    then begin 
    sl.Add('['+tt+' '+inttostr(col)+'] '+Edit2.Text+' -> '+nic+edit1.Text);
    ProgressBar1.Position:=30;
    Re_SL(sl,true);ProgressBar1.Position:=40;
    RichEdit2.Lines.Assign(sl);
    Re_SL(sl,false);ProgressBar1.Position:=50;
    sl.SaveToFile('.\data\chat.hkd');ProgressBar1.Position:=60;StatusBar1.Refresh;
    reColor(richEdit2);ProgressBar1.Position:=70;
    RichEdit2.Lines.SaveToFile('.\data\_.~tmp');ProgressBar1.Position:=75;StatusBar1.Refresh;
    RichEdit1.Lines.LoadFromFile('.\data\_.~tmp');ProgressBar1.Position:=70;
    sl.Free;ProgressBar1.Position:=80; StatusBar1.Refresh;

    http://codingrus.ru/forum/viewthread.php?forum_id=33&thread_id=30

    guest, 27 Июля 2009

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