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

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

    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
    31. 31
    32. 32
    enum ErrorViewHelper {
    
        static var errorIsShown = false
        static var errorView: ErrorView?
    
        private static var errorWindow: UIWindow = {
            let width = (UIApplication.shared.delegate as? AppDelegate)?.window?.frame.size.width ?? 300
            let window = UIWindow(frame: CGRect(x: 0, y: 0, width: width, height: 300))
            return window
        }()
    
        static func show(error: Error) {
            if let error = error as? RequestError {
                switch error {
                case .error(description: let text):
                    showErrorView(error: text)
                case .errorWithMeta(description: let text, meta: _):
                    showErrorView(error: text)
                case .needAuthError:
                    showErrorAlert(title: nil, message: R.string.localizable.needAuthError()) {
                        // TODO: remove router from this class
                        AuthRouterImpl().showAuthPage()
                        AuthRouterImpl().showAuthFlowModally()
                    }
                case .badResponse:
                    showErrorView(error: R.string.localizable.badResponse())
                default: break
                }
            } else {
                showErrorView(error: error.text)
            }
        }

    vkasci, 09 Октября 2018

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    https://r.mradx.net/img/02/039F10.png
    
    
    Даже такой гигант, как "Mail.Ru", использует "SQL". А вы продолжайте подтекать от "NoSQL"-говна.

    tuberkulez, 12 Сентября 2018

    Комментарии (20)
  4. JavaScript / Говнокод #24743

    +5

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    http://govnokod.ru/javascript/
    
    Forbidden
    
    You don't have permission to access /javascript/ on this server.
    Apache/2.4.18 (Ubuntu) Server at govnokod.ru Port 80

    dm_fomenok, 11 Сентября 2018

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

    +1

    1. 1
    Давайте течь от отступов и ругать код без оных.

    rotoeb, 17 Августа 2018

    Комментарии (20)
  6. C# / Говнокод #24601

    0

    1. 1
    2. 2
    Ненавижу "Console.WriteLine("something");", "Cube coin = new Cube(2);" и "int[ , ] arr = new int[2,3];".
    В крестах все проще: "cout << "something";", "Cube coin(2);" и "int arr[2,3];".

    Для меня идеальным языком был бы сисярп с синтаксисом крестов.

    shite, 08 Августа 2018

    Комментарии (20)
  7. Куча / Говнокод #24597

    0

    1. 1
    In 2011, a woman in Georgia pierced a fiber backbone line with a shovel and left the neighboring country of Armenia without Internet access for 12 hours (с) Wikipedia

    Давайте что-нить ругать

    roskomgovno, 07 Августа 2018

    Комментарии (20)
  8. Swift / Говнокод #24591

    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
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    func createCrossForRemovingImage() {
    		var firstCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
    		firstCrossView.layer.cornerRadius = 15
    		firstCrossView.image = UIImage(named: "Cross")
    		firstCrossView.tag = 200
    		firstCrossView.userInteractionEnabled = true
    		firstCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
    		firstCrossView.hidden = true
    		
    		var secondCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
    		secondCrossView.layer.cornerRadius = 15
    		secondCrossView.image = UIImage(named: "Cross")
    		secondCrossView.tag = 200
    		secondCrossView.userInteractionEnabled = true
    		secondCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
    		secondCrossView.hidden = true
    		
    		var thirdCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
    		thirdCrossView.layer.cornerRadius = 15
    		thirdCrossView.image = UIImage(named: "Cross")
    		thirdCrossView.tag = 200
    		thirdCrossView.userInteractionEnabled = true
    		thirdCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
    		thirdCrossView.hidden = true
    		
    		var fourthCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
    		fourthCrossView.layer.cornerRadius = 15
    		fourthCrossView.image = UIImage(named: "Cross")
    		fourthCrossView.tag = 200
    		fourthCrossView.userInteractionEnabled = true
    		fourthCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
    		fourthCrossView.hidden = true
    		
    		firstImageView.addSubview(firstCrossView)
    		secondImageView.addSubview(secondCrossView)
    		thirdImageView.addSubview(thirdCrossView)
    		fourthImageView.addSubview(fourthCrossView)
    	}

    Когда-то я это написал Оо

    def, 06 Августа 2018

    Комментарии (20)
  9. Assembler / Говнокод #24532

    −2

    1. 1
    2. 2
    А что если конпелятору переносить комментарии в ассемблерный код?
    Это относится к швабодке?

    OlegUP, 23 Июля 2018

    Комментарии (20)
  10. Perl / Говнокод #24491

    −1

    1. 1
    SADASD

    kezzyhko, 13 Июля 2018

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    https://github.com/mikael-s-persson/templight
    Templight 2.0 - Template Instantiation Profiler and Debugger
    
    Templight is a Clang-based tool to profile the time and memory consumption of
    template instantiations and to perform interactive debugging sessions to gain
    introspection into the template instantiation process.

    Шаблонные метапрограммисты будут довольны.
    Осталось еще сделать такое же, но чтобы constexpr можно было профилировать и интерактивно дебажить

    j123123, 02 Июля 2018

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