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

    Всего: 4

  2. JavaScript / Говнокод #23608

    +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
    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
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    switch (true) {
                        case puid.TrafIntensityCoefficient>=0 && puid.TrafIntensityCoefficient<0.05:
                            value = "000";
                            break;
                        case puid.TrafIntensityCoefficient>=0.05 && puid.TrafIntensityCoefficient<0.1:
                            value = "005";
                            break;
                        case puid.TrafIntensityCoefficient>=0.1 && puid.TrafIntensityCoefficient<0.15:
                            value = "010";
                            break;
                        case puid.TrafIntensityCoefficient>=0.15 && puid.TrafIntensityCoefficient<0.2:
                            value = "015";
                            break;
                        case puid.TrafIntensityCoefficient>=0.2 && puid.TrafIntensityCoefficient<0.25:
                            value = "020";
                            break;
                        case puid.TrafIntensityCoefficient>=0.25 && puid.TrafIntensityCoefficient<0.3:
                            value = "025";
                            break;
                        case puid.TrafIntensityCoefficient>=0.3 && puid.TrafIntensityCoefficient<0.35:
                            value = "030";
                            break;
                        case puid.TrafIntensityCoefficient>=0.35 && puid.TrafIntensityCoefficient<0.4:
                            value = "035";
                            break;
                        case puid.TrafIntensityCoefficient>=0.4 && puid.TrafIntensityCoefficient<0.45:
                            value = "040";
                            break;
                        case puid.TrafIntensityCoefficient>=0.45 && puid.TrafIntensityCoefficient<0.5:
                            value = "045";
                            break;
                        case puid.TrafIntensityCoefficient>=0.5 && puid.TrafIntensityCoefficient<0.55:
                            value = "050";
                            break;
                        case puid.TrafIntensityCoefficient>=0.55 && puid.TrafIntensityCoefficient<0.6:
                            value = "055";
                            break;
                        case puid.TrafIntensityCoefficient>=0.6 && puid.TrafIntensityCoefficient<0.65:
                            value = "060";
                            break;
                        case puid.TrafIntensityCoefficient>=0.65 && puid.TrafIntensityCoefficient<0.7:
                            value = "065";
                            break;
                        case puid.TrafIntensityCoefficient>=0.7 && puid.TrafIntensityCoefficient<0.75:
                            value = "070";
                            break;
                        case puid.TrafIntensityCoefficient>=0.75 && puid.TrafIntensityCoefficient<0.8:
                            value = "075";
                            break;
                        case puid.TrafIntensityCoefficient>=0.8 && puid.TrafIntensityCoefficient<0.85:
                            value = "080";
                            break;
                        case puid.TrafIntensityCoefficient>=0.85 && puid.TrafIntensityCoefficient<0.9:
                            value = "085";
                            break;
                        case puid.TrafIntensityCoefficient>=0.9 && puid.TrafIntensityCoefficient<0.95:
                            value = "090";
                            break;
                        case puid.TrafIntensityCoefficient>=0.95:
                            value = "100";
                            break;
                    }

    ivli, 21 Декабря 2017

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

    −95

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    try
    {
    .........................
    ........................
    }
    catch(Exception e)
    {			
          throw new Exception("Мы тут" + e.ToString());
    }

    кто здесь?

    ivli, 16 Февраля 2016

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

    −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
    public async Task AddOrUpdateAsync<T>(string key, T value) where T : class
     {
          ConcurrentQueue<T> queue = null;
          await Task.Run(() =>
          {
                var cacheItem = _cache.GetCacheItem(key);
                if (cacheItem != null)
                {
                    queue = cacheItem.Value as ConcurrentQueue<T>;
                 }
            });
            await Task.Run(() => queue.Enqueue(value));
     }

    типа кусок из добавления нового элемента в кэш. Стильно, модно, асинхронно!

    ivli, 15 Февраля 2016

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

    −138

    1. 1
    2. 2
    3. 3
    4. 4
    public void SendMailToRagim(string subj, string body)
      {
       SendMail(RagimMail, subj, body);
      }

    в случае ошибки отправляется e-mail на адрес RagimMail, притом что этот Рагим уже 6 лет не работает в конторе и каждый из его последователей менял значение RagimMail на свой адрес

    ivli, 15 Февраля 2016

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