1. Список говнокодов пользователя voice

    Всего: 5

  2. Python / Говнокод #12317

    −96

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    def run(self):
            count = 0
    
            while True:
                if count < 5:
                    self.saveUsers(self.queue.get())
                    count += 5
                else:
                    GlobalConfig().setUsers(self.db.selectUsers())
                    count = 0
    
            self.db.close()

    bool не нужен!

    voice, 19 Декабря 2012

    Комментарии (78)
  3. Java / Говнокод #6015

    +82

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    int cont = 1;
    String d01 = turnsSubscribedByUsers.contains(cont++) ? "S" : "N";
    String d02 = turnsSubscribedByUsers.contains(cont++) ? "S" : "N";
    ....
    String d36 = turnsSubscribedByUsers.contains(cont++) ? "S" : "N";
    
    ...
    
    os.write(d01.getBytes("UTF-8"));
    os.write(d02.getBytes("UTF-8"));
    ...
    os.write(d36.getBytes("UTF-8"));

    Генерация какого-то файла :)

    voice, 17 Марта 2011

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

    +78

    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
    public void setDomainSearchFilter(String domainSearchFilter) {
    	if (this.domainSearchFilter == null)
    	{
    		if (domainSearchFilter != null)
    		{
    			this.domainSearchFilter = domainSearchFilter;
    		}
    
    		return;
    	}
    
    	if (domainSearchFilter == null)
    	{
    		this.domainSearchFilter = null;
    		return;
    	}
    
    	if (!this.domainSearchFilter.equals(domainSearchFilter))
    	{
    		this.domainSearchFilter = domainSearchFilter;
    	}
    }

    voice, 24 Января 2011

    Комментарии (12)
  5. ActionScript / Говнокод #3203

    −86

    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
    if (event.customerName != "")
    {
    	criteria.xmlCriteria =
    		"<criteria>" +
    		"<billingDetailsName>" + event.customerName + "</billingDetailsName>" +
    		"</criteria>";
    }
    else
    {
    	criteria.xmlCriteria =
    		"<criteria>" +
    		"</criteria>";
    }

    voice, 12 Мая 2010

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

    +160

    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
    <?  switch ($passoAttivo) {
                        case 1:
                            ?>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo1_attivo.gif" alt="Passo 1 attivo" width="56" height="52"></td>
                                        <td width="9%"><img src="<?=base_url()?>/images/passi/passo2.gif" alt="Passo 2" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo3.gif" alt="Passo 3" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo4.gif" alt="Passo 4" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo5.gif" alt="Passo 5" width="57" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo6.gif" alt="Passo 6" width="57" height="52"></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><div align="left"><img src="<?=base_url()?>/images/passi/passo7.gif" alt="Passo 7" width="57" height="52"></div></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo8.gif" alt="Passo 8" width="56" height="52"></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo9.gif" alt="Passo 9" width="56" height="52"></td>
                                    <td width="45%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo10.gif" alt="Passo 10" width="56" height="52"></td>
                                    
                            <?
                            break;
                        case 2:
                            ?>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo1.gif" alt="Passo 1" width="56" height="52"></td>
                                        <td width="9%"><img src="<?=base_url()?>/images/passi/passo2_attivo.gif" alt="Passo 2 attivo" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo3.gif" alt="Passo 3" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo4.gif" alt="Passo 4" width="56" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo5.gif" alt="Passo 5" width="57" height="52"></td>
                                    <td width="9%"><img src="<?=base_url()?>/images/passi/passo6.gif" alt="Passo 6" width="57" height="52"></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><div align="left"><img src="<?=base_url()?>/images/passi/passo7.gif" alt="Passo 7" width="57" height="52"></div></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo8.gif" alt="Passo 8" width="56" height="52"></td>
                                    <td width="9%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo9.gif" alt="Passo 9" width="56" height="52"></td>
                                    <td width="28%" background="<?=base_url()?>/images/passi/passi_fine_menu.gif"><img src="<?=base_url()?>/images/passi/passo10.gif" alt="Passo 10" width="56" height="52"></td>
                            <?
                            break;
    // ....
    // И так всего десять веток.

    Реализация подсветки активного пункта меню, в индусском стиле в исполнении итальянского php-хакера.

    voice, 27 Октября 2009

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