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

    В номинации:
    За время:
  2. Куча / Говнокод #24039

    −106

    1. 1
    Зубы против хуя!

    PaulDenisevich, 30 Марта 2018

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

    0

    1. 1
    https://youtu.be/dV2e3FlOmYU

    Что думаете об этом?

    vvkir, 28 Марта 2018

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

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    // OK
    class foo {};
    void foo();
    
    // не ОК: error: 'void bar()' redeclared as different kind of symbol
    namespace bar {}
    void bar();

    "Двойные стандарты"

    Elvenfighter, 22 Марта 2018

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

    +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
    foreach ($imagesData['file_title'] as $i1 => $d1) {
                usleep(5);
                
                if($i1>0) {
                    Media::find($i1)->update(['title'=>$imagesData['file_title'][$i1]]);
                }
            }
            foreach ($imagesData['author_name'] as $i2 => $d2) {
                usleep(5);
                
                if($i2>0) {
                    Media::find($i2)->update(['author_name'=>$imagesData['author_name'][$i2]]);
                } 
            }
            foreach ($imagesData['author_link'] as $i3 => $d3) {
                usleep(5);
                
                if($i3>0) {
                    Media::find($i3)->update(['author_url'=>$imagesData['author_link'][$i3]]);
                } 
            }
            foreach ($imagesData['source_link'] as $i4 => $d4) {
                usleep(5);
                
                if($i4>0) {
                    Media::find($i4)->update(['source_url'=>$imagesData['source_link'][$i4]]);
                } 
            }
            foreach ($imagesData['license_name'] as $i5 => $d5) {
                usleep(5);
                
                if($i5>0) {
                    Media::find($i5)->update(['license_name'=>$imagesData['license_name'][$i5]]);
                } 
            }
            foreach ($imagesData['license_link'] as $i6 => $d6) {
                usleep(5);
                
                if($i6>0) {
                    Media::find($i6)->update(['license_url'=>$imagesData['license_link'][$i6]]);
                } 
            }

    Laravel, блять.
    Вот и пусти араба в свою ветку.

    Romanovich095, 19 Марта 2018

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

    −2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    assert exec("from my_runtime_analyze_lib import do_amazing_magic") or True
    
    
    if __name__ == '__main__':
        do_smth()
        assert do_amazing_magic()
        do_smth_else()

    Как вхерачить в код любую ересь для dev окружения, а потом отключить на продакшене. Только не забыть бы на проде при запуске флаг оптимизации.

    intestinalbrain, 16 Марта 2018

    Комментарии (5)
  7. JavaScript / Говнокод #23845

    −2

    1. 1
    $scope.storage.oldDriver = JSON.parse(JSON.stringify($scope.storage.driverEdit || {})); // @TODO: ни _.clone ни Object.assign не сработали

    Нашел на работе в коде

    Stud, 01 Марта 2018

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

    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
    25. 25
    setInterval(function(){
    jQuery.get('/comments', function(response){
    var html=jQuery(response);
    var breaked=false;
    jQuery.each(html.find('.hentry'), function(){
    if(!breaked){
    var entry=jQuery(this);
    var username=jQuery.trim(entry.find('.entry-author').first().text());
    var comment=jQuery.trim(entry.find('.entry-comment').first().text());
    if(username!='g0_1494089147006' && username!=''){
    breaked=true;
    var link=jQuery.trim(entry.find('.answer').first().attr('href'));
    jQuery.get(link, function(response2){
    var html2=jQuery(response2);
    var form2=html2.find('form').first().serialize();
    jQuery.post('https://localhost/gkwordanalyzer/wanal.php', 'q='+encodeURIComponent(comment), function(response3){
    if(jQuery.trim(response3)==''){ response3='Трижды остоебу.'; }
    jQuery.post(link, form2+'&text='+encodeURIComponent(response3));
    });
    });
    }
    }
    });
    });
    }, 5000);

    g0_1494089147006, 15 Февраля 2018

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

    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
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    function PrepareGetList(
    		&$arIblockElementFields,
    		&$arJoinProps,
    		&$bOnlyCount,
    		&$bDistinct,
    
    		&$arSelectFields,
    		&$sSelect,
    		&$arAddSelectFields,
    
    		&$arFilter,
    		&$sWhere,
    		&$sSectionWhere,
    		&$arAddWhereFields,
    
    		&$arGroupBy,
    		&$sGroupBy,
    
    		&$arOrder,
    		&$arSqlOrder,
    		&$arAddOrderByFields,
    
    		&$arIBlockFilter,
    		&$arIBlockMultProps,
    		&$arIBlockConvProps,
    		&$arIBlockAllProps,
    		&$arIBlockNumProps,
    		&$arIBlockLongProps
    		)
    	{

    Метод из ядра битрикса

    aat, 01 Февраля 2018

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

    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
    <?php
    /**
     * FoursquareApi
     * A PHP-based Foursquare client library with a focus on simplicity and ease of integration
     * 
     * @package php-foursquare 
     * @author Stephen Young <[email protected]>, @hownowstephen
     * @version 1.2.0
     * @license GPLv3 <http://www.gnu.org/licenses/gpl.txt>
     */
    // Set the default version
    // @TODO: Warning when the version becomes too out of date
    define("DEFAULT_VERSION", "20140201");
    // I have no explanation as to why this is necessary
    define("HTTP_GET","GET");
    define("HTTP_POST","POST");

    PHP-клиент для foursquare, рекомендуемый самим foursquare

    Fike, 30 Января 2018

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

    +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
    brainfuck()
        
          .plus .plus .plus .plus .plus .plus .plus 
          .plus .plus .plus .plus .plus .plus .plus
          .begin
                .minus.next .plus .plus .plus .plus
                .plus .next .plus .plus .plus .plus
                .plus .plus .next .plus .plus .plus
                .plus .plus .plus .prev .prev .prev
          .end
          .next .plus .print.next .minus.minus.minus
          .minus.minus.print.next .plus .plus .print
          .prev .minus.print.plus .print.minus.minus
          .minus.minus.print.plus .plus .plus .plus
          .print.prev .minus.minus.minus.print

    https://github.com/1024--/peetooshnya/blob/master/bfdot.js

    huesto, 09 Января 2018

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