-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0

The Daily WTF





Curious Perversions in Information Technology


Добавить любой RSS - источник (включая журнал LiveJournal) в свою ленту друзей вы можете на странице синдикации.

Исходная информация - http://thedailywtf.com/.
Данный дневник сформирован из открытого RSS-источника по адресу http://syndication.thedailywtf.com/thedailywtf, и дополняется в соответствии с дополнением данного источника. Он может не соответствовать содержимому оригинальной страницы. Трансляция создана автоматически по запросу читателей этой RSS ленты.
По всем вопросам о работе данного сервиса обращаться со страницы контактной информации.

[Обновить трансляцию]

CodeSOD: Finding the File

Вторник, 22 Марта 2016 г. 13:30 + в цитатник

Theres one challenge we rarely think about when writing file-handling code: how do we know where the file actually is? Josh H. inherited some C# code that puts a lot of thought into that. A lot.

        longFileName = "x:\\isdn\\" + fileName;
        if (File.Exists(longFileName))
            fileExistsFlag = true;
        else if (!File.Exists(longFileName))
        {
            longFileName = "Y:\\isdnX\\" + fileName;
            if (File.Exists(longFileName))
                fileExistsFlag = true;
            else
            {
                longFileName = "z:\\isdn\\" + fileName;
                if (File.Exists(longFileName))
                    fileExistsFlag = true;
                else
                {
                    longFileName = "g:\\isdn\\a\\" + fileName;
                    if (File.Exists(longFileName))
                        fileExistsFlag = true;
                    else
                    {
                        longFileName = "g:\\isdn\\b\\" + fileName;
                        if (File.Exists(longFileName))
                            fileExistsFlag = true;
                        else
                        {
                            longFileName = "g:\\isdn\\c\\" + fileName;
                            if (File.Exists(longFileName))
                                fileExistsFlag = true;
                            else
                            {
                                longFileName = "g:\\isdn\\mbna\\" + fileName;
                                if (File.Exists(longFileName))
                                    fileExistsFlag = true;
                                else
                                {
                                    longFileName = "g:\\isdn\\sales\\" + fileName;
                                    if (File.Exists(longFileName))
                                        fileExistsFlag = true;
                                    else
                                    {
                                        longFileName = "g:\\isdn\\w\\" + fileName;
                                        if (File.Exists(longFileName))
                                            fileExistsFlag = true;
                                        else
                                        {
                                            longFileName = "g:\\isdn\\x\\" + fileName;
                                            if (File.Exists(longFileName))
                                                fileExistsFlag = true;
                                            else
                                            {
                                                longFileName = "g:\\isdn\\y\\" + fileName;
                                                if (File.Exists(longFileName))
                                                    fileExistsFlag = true;
                                                else
                                                {
                                                    longFileName = "g:\\isdn\\z\\" + fileName;
                                                    if (File.Exists(longFileName))
                                                        fileExistsFlag = true;
                                                    else
                                                    {
                                                        longFileName = "h:\\isdn\\a\\" + fileName;
                                                        if (File.Exists(longFileName))
                                                            fileExistsFlag = true;
                                                        else
                                                        {
                                                            longFileName = "h:\\isdn\\b\\" + fileName;
                                                            if (File.Exists(longFileName))
                                                                fileExistsFlag = true;
                                                            else
                                                            {
                                                                longFileName = "h:\\isdn\\c\\" + fileName;
                                                                if (File.Exists(longFileName))
                                                                    fileExistsFlag = true;
                                                                else
                                                                {
                                                                    longFileName = "h:\\isdn\\mbna\\" + fileName;
                                                                    if (File.Exists(longFileName))
                                                                        fileExistsFlag = true;
                                                                    else
                                                                    {
                                                                        longFileName = "h:\\isdn\\sales\\" + fileName;
                                                                        if (File.Exists(longFileName))
                                                                            fileExistsFlag = true;
                                                                        else
                                                                        {
                                                                            longFileName = "h:\\isdn\\w\\" + fileName;
                                                                            if (File.Exists(longFileName))
                                                                                fileExistsFlag = true;
                                                                            else
                                                                            {
                                                                                longFileName = "h:\\isdn\\x\\" + fileName;
                                                                                if (File.Exists(longFileName))
                                                                                    fileExistsFlag = true;
                                                                                else
                                                                                {
                                                                                    longFileName = "h:\\isdn\\y\\" + fileName;
                                                                                    if (File.Exists(longFileName))
                                                                                        fileExistsFlag = true;
                                                                                    else
                                                                                    {
                                                                                        longFileName = "h:\\isdn\\z\\" + fileName;
                                                                                        if (File.Exists(longFileName))
                                                                                            fileExistsFlag = true;
                                                                                        else
                                                                                        {
                                                                                            longFileName = "i:\\isdn\\a\\" + fileName;
                                                                                            if (File.Exists(longFileName))
                                                                                                fileExistsFlag = true;
                                                                                            else
                                                                                            {
                                                                                                longFileName = "i:\\isdn\\b\\" + fileName;
                                                                                                if (File.Exists(longFileName))
                                                                                                    fileExistsFlag = true;
                                                                                                else
                                                                                                {
                                                                                                    longFileName = "i:\\isdn\\c\\" + fileName;
                                                                                                    if (File.Exists(longFileName))
                                                                                                        fileExistsFlag = true;
                                                                                                    else
                                                                                                    {
                                                                                                        longFileName = "i:\\isdn\\mbna\\" + fileName;
                                                                                                        if (File.Exists(longFileName))
                                                                                                            fileExistsFlag = true;
                                                                                                        else
                                                                                                        {
                                                                                                            longFileName = "i:\\isdn\\sales\\" + fileName;
                                                                                                            if (File.Exists(longFileName))
                                                                                                                fileExistsFlag = true;
                                                                                                            else
                                                                                                            {
                                                                                                                longFileName = "i:\\isdn\\w\\" + fileName;
                                                                                                                if (File.Exists(longFileName))
                                                                                                                    fileExistsFlag = true;
                                                                                                                else
                                                                                                                {
                                                                                                                    longFileName = "i:\\isdn\\x\\" + fileName;
                                                                                                                    if (File.Exists(longFileName))
                                                                                                                        fileExistsFlag = true;
                                                                                                                    else
                                                                                                                    {
                                                                                                                        longFileName = "i:\\isdn\\y\\" + fileName;
                                                                                                                        if (File.Exists(longFileName))
                                                                                                                            fileExistsFlag = true;
                                                                                                                        else
                                                                                                                        {
                                                                                                                            longFileName = "i:\\isdn\\z\\" + fileName;
                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                fileExistsFlag = true;
                                                                                                                            else
                                                                                                                            {
                                                                                                                                longFileName = "z:\\isdn\\" + fileName;
                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                                            else
                                                                                                                                {
                                                                                                                                  longFileName = "j:\\isdn\\a\\" + fileName;
                                                                                                                                  if (File.Exists(longFileName))
                                                                                                                                    fileExistsFlag = true;
                                                                                                                                  else
                                                                                                                                  {
                                                                                                                                    longFileName = "j:\\isdn\\b\\" + fileName;
                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                        fileExistsFlag = true;
                                                                                                                                    else
                                                                                                                                    {
                                                                                                                                        longFileName = "j:\\isdn\\c\\" + fileName;
                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                            fileExistsFlag = true;
                                                                                                                                        else
                                                                                                                                        {
                                                                                                                                            longFileName = "j:\\isdn\\mbna\\" + fileName;
                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                fileExistsFlag = true;
                                                                                                                                            else
                                                                                                                                            {
                                                                                                                                                longFileName = "j:\\isdn\\sales\\" + fileName;
                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                else
                                                                                                                                                {
                                                                                                                                                    longFileName = "j:\\isdn\\w\\" + fileName;
                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                    else
                                                                                                                                                    {
                                                                                                                                                        longFileName = "j:\\isdn\\x\\" + fileName;
                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                        else
                                                                                                                                                        {
                                                                                                                                                            longFileName = "j:\\isdn\\y\\" + fileName;
                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                            else
                                                                                                                                                            {
                                                                                                                                                                longFileName = "j:\\isdn\\z\\" + fileName;
                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                else
                                                                                                                                                                {
                                                                                                                                                                    longFileName = "k:\\isdn\\a\\" + fileName;
                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                    else
                                                                                                                                                                    {
                                                                                                                                                                        longFileName = "k:\\isdn\\b\\" + fileName;
                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                        else
                                                                                                                                                                        {
                                                                                                                                                                            longFileName = "k:\\isdn\\c\\" + fileName;
                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                            else
                                                                                                                                                                            {
                                                                                                                                                                                longFileName = "k:\\isdn\\mbna\\" + fileName;
                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                else
                                                                                                                                                                                {
                                                                                                                                                                                    longFileName = "k:\\isdn\\sales\\" + fileName;
                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                    else
                                                                                                                                                                                    {
                                                                                                                                                                                        longFileName = "k:\\isdn\\w\\" + fileName;
                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                        else
                                                                                                                                                                                        {
                                                                                                                                                                                            longFileName = "k:\\isdn\\x\\" + fileName;
                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                            else
                                                                                                                                                                                            {
                                                                                                                                                                                                longFileName = "k:\\isdn\\y\\" + fileName;
                                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                else
                                                                                                                                                                                                {
                                                                                                                                                                                                    longFileName = "k:\\isdn\\z\\" + fileName;
                                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                                    else
                                                                                                                                                                                                    {
                                                                                                                                                                                                        longFileName = "l:\\isdn\\b\\" + fileName;
                                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                                        else
                                                                                                                                                                                                        {
                                                                                                                                                                                                            longFileName = "l:\\isdn\\c\\" + fileName;
                                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                                            else
                                                                                                                                                                                                            {
                                                                                                                                                                                                                longFileName = "l:\\isdn\\mbna\\" + fileName;
                                                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                                else
                                                                                                                                                                                                                {
                                                                                                                                                                                                                    longFileName = "l:\\isdn\\sales\\" + fileName;
                                                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                                                    else
                                                                                                                                                                                                                    {
                                                                                                                                                                                                                        longFileName = "l:\\isdn\\w\\" + fileName;
                                                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                                                        else
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            longFileName = "l:\\isdn\\x\\" + fileName;
                                                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                                                            else
                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                longFileName = "l:\\isdn\\y\\" + fileName;
                                                                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                                                else
                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                    longFileName = "l:\\isdn\\z\\" + fileName;
                                                                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                                                                   else
                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                        longFileName = "m:\\isdn\\b\\" + fileName;
                                                                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                                                                        else
                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                            longFileName = "m:\\isdn\\c\\" + fileName;
                                                                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                                                                            else
                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                longFileName = "m:\\isdn\\mbna\\" + fileName;
                                                                                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                                                                else
                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                    longFileName = "m:\\isdn\\sales\\" + fileName;
                                                                                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                                                                                    else
                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                        longFileName = "m:\\isdn\\w\\" + fileName;
                                                                                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                                                                                        else
                                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                                            longFileName = "m:\\isdn\\x\\" + fileName;
                                                                                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                                                                                            else
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                                longFileName = "m:\\isdn\\y\\" + fileName;
                                                                                                                                                                                                                                                                if (File.Exists(longFileName))
                                                                                                                                                                                                                                                                    fileExistsFlag = true;
                                                                                                                                                                                                                                                                else
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    longFileName = "m:\\isdn\\z\\" + fileName;
                                                                                                                                                                                                                                                                    if (File.Exists(longFileName))
                                                                                                                                                                                                                                                                        fileExistsFlag = true;
                                                                                                                                                                                                                                                                    else
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        longFileName = "m:\\isdn\\a\\" + fileName;
                                                                                                                                                                                                                                                                        if (File.Exists(longFileName))
                                                                                                                                                                                                                                                                            fileExistsFlag = true;
                                                                                                                                                                                                                                                                        else
                                                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                                                            longFileName = "l:\\isdn\\a\\" + fileName;
                                                                                                                                                                                                                                                                            if (File.Exists(longFileName))
                                                                                                                                                                                                                                                                                fileExistsFlag = true;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                }
                                                                                                                                                                                            }
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                  }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        if (fileExistsFlag)
            return longFileName;
        else
            return "NOTFOUND";
    }
[Advertisement] Otter enables DevOps best practices by providing a visual, dynamic, and intuitive UI that shows, at-a-glance, the configuration state of all your servers. Find out more and download today!

http://thedailywtf.com/articles/finding-the-file


Метки:  

Announcements: The New(ish) TDWTF

Понедельник, 21 Марта 2016 г. 17:00 + в цитатник

You might have noticed some updates to the site, although if we did our job right you won’t notice half of them.

What’s New?

We are saying goodbye to Discourse, our old forum and comments system. In its place reintroducing an in-house built system, thanks to the hard work of our newest team member Ben Lubar.

Now you don’t have to be a member of the forums to leave a comment on the main site. Plus you can login and comment through several third parties, like Facebook, Google and GitHub.

What’s New(ish)

A few years ago we redesigned our site. We loved the look, but it wasn’t built as efficiently as we would have liked. So we rebuilt a more lightweight version that should work and look almost exactly the same.

It’s not exactly the same, and I’m sure there will be some issues here and there, but now it will be much simpler to correct them. Everything is up on GitHub, so if have any problems or ideas for improvements, post an issue, submit a pull request, post something in this article's discussion, or contact us.

[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!

http://thedailywtf.com/articles/the-new-ish-tdwtf


Метки:  

Back Away Slowly

Понедельник, 21 Марта 2016 г. 13:30 + в цитатник

Weekend work 2012-07-16 28 (7583096606)

It'd been two hours since Mike had gone to bed. Two slow, miserable hours of counting sheep, staring at the barely visible ceiling, and trying to shake off the stress of the last few weeks at work.

His company had (finally) moved from bare metal to a modern, virtualized environment. Mike and a few coworkers were in charge of revamping the whole backup system to match the efficiency of the servers. They'd been handed a generous budget and a single task: make daily backups of all the key servers feasible.

Hundreds of emails, days of overtime work, and plenty of bickering had resulted in an impressive setup. Massive JBOD arrays, managed by virtual servers in a cabinet full of blades and hooked up to top-of-the-line 10G switches, all hummed along nicely in the server room.

The backup solution was ready for its first test. Mike had personally started the backup job late in the afternoon. The whole team had gathered over his monitor to watch the speed slowly crawl up.

One, two... six gigabits per second. With 30TB worth of snapshots, the whole process would take under half a day, meeting the original goal with a huge margin. Mike had gone home a few minutes later, hoping to see the backup completed by morning. But during the evening, his initial optimism had slowly faded.

What if we misconfigured something? he kept thinking. Or worse, the hardware fails?

Every time he felt close to sleep, his mind conjured yet another disastrous scenario, jolting him wide awake again.

Finally, Mike's eyes darted towards the laptop resting in a bag by his bedside. He knew he shouldn't be doing work this late at night ... but surely a little peek at the administration panel wouldn't hurt?

Mike crawled out of bed and booted up the laptop while rationalizing his surrender to temptation. It'll just take a few minutes. See that everything's fine, then get some sleep.

He logged in to the corporate VPN, opened up the dashboard ... and realized he wouldn't be returning to bed that night. The backup was stuck at less than four percent, and the speed had dropped from six gigabits to barely over a megabit per second.

Mike clicked around frantically, trying to pinpoint the problem. The only thing he could find was a warning in VMWare's logs saying that one of the logical units had ended up with over a second of latency. He browsed the network configurations, SMART error logs, but everything else seemed to be in perfect order. All he knew was that a few minutes after he'd left work, the latency had spiked and never returned to a reasonable level.

Over the next 20 minutes, Mike tried changing almost every single option even vaguely related to the problem. He was ready to give up—until finally, after closing what seemed to be a thousandth dialog window, the backup speed suddenly ramped back up to several gigabytes per second.

It took a while for Mike to remember what exactly he'd just changed. All he'd done was switch the load balancing algorithm used to communicate between the servers and the storage.

That shouldn't have changed a thing, he thought, puzzled. He decided to watch the process for a while.

The problems came back no more than a few minutes later, but by that time, Mike had an idea of what could be causing them. He remotely disabled the currently used port on the network switch.

Sure enough, the traffic flew freely through a different port for a few minutes before clogging up again.

The next few days, spent mostly on support calls and filing tickets with the switch manufacturer, confirmed Mike's suspicions. The large amount of data being pushed through the port slowly filled more and more space in the port's buffer. When that space ran out, the port crashed, decimating the network speed and slowing the backups down to a crawl.

Luckily, just a few firmware updates later the issue was fully resolved, and Mike was able to enjoy not only the blazing-fast backups and the convenience of virtual servers, but also a good night's sleep.

[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!

http://thedailywtf.com/articles/back-away-slowly


Метки:  

Error'd: Adequate Enough

Пятница, 18 Марта 2016 г. 13:00 + в цитатник

"Dell TechDirect's password policy is a lot like their computers," writes John, "Not the greatest, not the worse...just 'ok'."

Nate W.wrote, "Well, at least their template text fails gracefully."

"A large consumer electronic chain recently began offering a new Members Club program," Christiaan R. wrote, "Unfortunately, the German owned chain, which uses 6 digit postal codes, failed to properly 'localize' their validation logic for the Dutch market which uses 4 digits and two letters."

"I wonder if this is what happens when corporate profits exceed MAXINT," George wrote.

"I promise - I will not look and (potentially) ruin a surprise," writes Florian.

"I caught this error the Australian National Maritime Musuem," Simon wrote, "I sure hope that someone can rescue this display."

Steve writes, "I guess the city of Avignon didn't have much going on from the 16th to 18th century."

[Advertisement] Release! is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!

http://thedailywtf.com/articles/adequate-enough


Метки:  

CodeSOD: String Cheese

Четверг, 17 Марта 2016 г. 13:30 + в цитатник

Imagine youre a Java programmer. You need to iterate across a list of strings. Your natural instinct might be to just use a for loop, and thats proof that youre not a true enterprise Java programmer.

Diethers company is home to true enterprise developers, and they know how to get things done.

List brandSpecValues = specValueDao.getBrandSpecValues();
boolean brndValueFound = false;
String listString = brandSpecValues.toString().replace("[", "");
listString = listString.replace("]", "");
String[] arr = listString.split(",");
for (String s : arr) {
        if (s.trim().equals(brandSpecValueString.toUpperCase())) {
                brndValueFound = true;
        }
}

Why iterate across a list when you can turn the list into a string first then turn it back into an array? For a moment, I thought, well, maybe the interface to the DAO changed to use Generics and they were trying to minimize code changes? But that makes no sense, because the only thing they would have needed to change was the type of brandSpecValues. Im left with one conclusion: they just really like Strings.

For bonus points, the array contains only 5 values ever, and this block of code is called from inside of a for loop that runs thousands of times in a row.

[Advertisement] Application Release Automation for DevOps – integrating with best of breed development tools. Free for teams with up to 5 users. Download and learn more today!

http://thedailywtf.com/articles/string-cheese


Метки:  

Admin From Hell

Среда, 16 Марта 2016 г. 13:30 + в цитатник

"Hello, everyone!"

Daniel's eyes slowly rose from his desk as his manager entered the room.

"As you know, we've been looking for a systems administrator for a while. It's a pleasure to announce we've finally found a great candidate. Please welcome Mark, who's joining Initrode starting today."

FIRE 01

A tall young man emerged from the shadows and glanced over the people in the room. His black suit and tie rested over a perfectly pressed white shirt. Mark's formality stood in stark contrast not only with the team of geeks, but also the rather casually dressed manager.

"Mark is an MIT graduate with plenty of experience in both Linux and Windows administration," the manager continued, putting emphasis on the MIT part. "I'm sure he'll be a great addition to our team."

"Thank you, and hello," Mark spoke up in a silky smooth voice. "I'd just like to add that I'm very happy to be here, and I hope to introduce all the necessary infrastructure changes that will ensure our success."

Faint alarm bells rang in Daniel's head. Changes? he thought. I wonder what kind of changes he has in mind?


"And finally, the analytics team." Mark and the manager slowly approached Daniel's desk for the traditional round of hand-shaking. "Daniel, Alice, and Robert are our resident SAS experts. Their work is a huge part of what makes Initrode successful."

"Welcome to the company," Daniel said, grabbing Mark's hand in a firm grip.

"So, what do you think of the new guy?" Robert asked once the door closed behind Mark and the manager. "A bit pretentious, isn't he?"

"At least he can give you some style lessons." Alice shot a dirty look at Robert's worn-out t-shirt. "What do you think, Daniel?"

"Yeah, they sure do dress 'em nice at MIT," Daniel replied.

"I mean about Mark," Alice said.

Daniel went for the diplomatic answer. "He's a sysadmin. He's there to fix things when they break. Fine with me. The less we see of him, the better."

But something told Daniel the MIT graduate wouldn't restrain himself to rebooting a server once in a while.


It didn't take long to confirm Daniel's suspicions. Just two weeks later, he entered the office only to find his team staring at their monitors with a hopeless gaze.

"What's up? Monday blues getting to you?" he asked, trying to lighten the mood.

"Just read the mail," Alice muttered, more to herself than Daniel.

He opened the mail client, curious as to what happened, and found an e-mail that'd been waiting for him since Friday evening.

From: mark.b@initrode.com
To: analytics@initrode.com
Topic: Important - Server Access Policy

To whom it may concern,

After careful analysis, the systems administration team has identified major performance problems with the analytics servers. To mitigate the issue, access to servers has been restricted to the following logins:

SAS04 - alice.f
SAS05 - daniel.c
SAS06 - robert.o

This policy will be effective starting Monday. Refusal to comply will be reported.

Mark B.

"What?" Daniel could hardly say a word.

"I need access to SAS05!" Robert was almost crying. "All my data's on it!"

"Have you tried talking to the guy?" Daniel asked.

"He won't budge," Alice replied with melancholic despair. "Performance this, performance that. I guess we'll have to share our login details if we want to get things done."

"Sounds like a plan." Daniel wrote his password on a Post-It and passed it to Robert. That put the team back on track, but they couldn't help but think about what other tricks the new sysadmin would pull.


The login restrictions were merely a prelude of horrors to come. Every few weeks, the team would enter the office on Monday only to find a fresh, non-negotiable Server Access Policy from Mark—and rarely would the change bring anything but pain and lost productivity.

He "mitigated" the issue of shared logins by restricting the number of simultaneous sessions to one per user, which meant half a day spent on the team fighting over access to the server. Then, he "mitigated" the high disk space usage by removing "unnecessary tooling"—which for Mark meant all compilers, half of the libraries, and even a bunch of GNU coreutils.

Luckily for Daniel, his resume was already polished by the time the next e-mail came:

From: mark.b@initrode.com
To: analytics@initrode.com
Topic: Important - Server Access Policy

To whom it may concern,

After careful analysis, the systems administration team has identified major performance problems with the analytics servers. To mitigate the issue, usage of the Emacs editor will be forbidden. The application will be removed from all SAS servers and the company's software repositories.

This policy will be effective starting Monday. Refusal to comply will be reported.

Mark B.

"What performance problems?" He could hardly believe the words he stared at. "The X server alone takes more resources than Emacs, let alone SAS!"

"Should've switched to vi when you had the chance," Robert couldn't help cracking.

"Oh, shut up." Daniel threw a pen at him. "I'll just compile it from source."

"No, you won't," Robert said. "We don't have GCC anymore, remember? So unless you can rewrite it in SAS..."

Daniel decided to pass on the project. Instead, he dedicated his time to something much more productive: drafting and printing his resignation letter.


A few months later, Daniel was happily employed at Initrode's major competitor. At first he wasn't sure about the job, but in the end, a slightly smaller paycheck was a low price to pay for not having to put up with crazy restrictions and policies.

One day, as he walked around town, he spotted a familiar face in the crowd.

"Hi, Alice!" he greeted his former coworker cheerfully.

"Hey, long time no see!" Alice replied. "How's the new job working out for you?"

"Pretty well, actually. And how's Initrode? Is Mark still around?"

"From what I've heard, still pestering everyone in the company." Alice's smile faded. "But I doubt anyone's gonna fire an MIT graduate."

"From what you've heard?" Daniel was surprised. "So, you don't work for them anymore?"

"Oh, no, I left after you did. It took just one more Server Access Policy for me to call it quits."

Alice pulled out her cellphone and showed it to Daniel, who leaned in to read the e-mail displayed:

From: mark.b@initrode.com
To: analytics@initrode.com
Topic: Important - Server Access Policy

To whom it may concern,

After careful analysis, the systems administration team has identified major performance problems with the analytics servers. To mitigate the issue, usage of the "top" command will be restricted to systems administrators only.

This policy will be effective starting Monday. Refusal to comply will be reported.

Mark B.

[Advertisement] Otter, ProGet, BuildMaster – robust, powerful, scalable, and reliable additions to your existing DevOps toolchain.

http://thedailywtf.com/articles/admin-from-hell


Метки:  

Editor's Soapbox: Encryption By Analogy

Вторник, 15 Марта 2016 г. 13:30 + в цитатник

Last week, US President Obama said something that is usually the sort of line we give the idiot boss character in one of our stories. From Ars Technica:

I am not a software engineer, Obama made his beliefs wholly clear. You cannot take an absolutist view on this. If your view is strong encryption no matter what and we can and should create black boxes, that does not strike the balance that weve lived with for 200 or 300 years. And its fetishizing our phones above every other value. That cant be the right answer.

That was when I decided to write this article, and as it turns out, I wasnt the only one so inspired. John Olivers Last Week Tonight also weighed in on the subject.



Our readers are a technical audience, so I dont think I need to use this soapbox to preach to the choir. I think we all recognize that in security, an absolutist view is required. Any security that can be bypassed by a third party can be bypassed by any third party, or more colorfully: Two people can share a secret if one of them is dead. And of course, the hard reality is that encryption is math and anybody can do it, and you cant outlaw math.

I think President Obamas statement, though, highlights a more prosaic issue that impacts our lives as IT professionals. Obama, here, is standing in the role of upper level management- someone with power who is simultaneously ignorant. In this case, its downright terrifying, because Obama is in a position where his power can cause serious harm. In our daily lives, the damage caused by this kind of ignorance is… well, hit the random article button on the sidebar. Odds are, youll land on something that covers it.

Heres what I want to know: how does this happen, and what can we do about it? Why do non-technical people fail to grasp important issues, and how can we do a better job helping them?

Fro the purposes of this article, Im going to be generous- with all of my examples, Im going to assume the person Im talking about is sincere and attempting to make the correct choice. I will assume no one is being willfully ignorant, manipulative, or purposefully harmful.

Intuition and Common-Sense

Astronomer and science-popularizer Neil DeGrasse-Tyson put his foot in it last week, when he tweeted If there were ever a species for whom sex hurt, it surely went extinct long ago. Now, hes an extremely smart man, and has done great things for helping the public grasp with some serious cosmic questions- but this statement is wrong. Just ask bed-bugs.

This statement falls into a class of ideas that are intuitively correct, but actually wrong. It sounds perfectly reasonable, but isnt actually true.

Take a random person, and ask them: I flipped a coin ten times, and it came up heads every time. Is it more or less likely that the next flip will also be heads? Most people will get it wrong, because we intuitively know that 11 heads is very unlikely, but actually every coin flip is strict 50/50 odds. Our bad intuition when it comes to probability can be seen in the Monty Hall Problem or the continued existence of Las Vegas.

When the President says, Hey, if we have a warrant, we should be able to search your phone, thats intuitively correct (thats the whole point of a warrant), but actually wrong. As previously stated, encryption that can be broken isnt encryption worth having.

Wishful Thinking

Related, but subtly different is when our intuition starts feeding into how we think the world should work. Every few months, a journalist hears about the Alcubierre Drive and runs an article on it. Everyones going, Yay, warp drives! until some party-pooping physicist points out that to build one youd need matter with negative mass, and what does that even mean?

The rebuttal to the party-pooper is pretty much the same: They said (breaking the sound barrier|heavier-than-air flight|going to the moon|some other really hard thing) was impossible. This may be rooted in intuition, but it grows in a different direction: a world with warp drives is cooler than one without, and I want to live in that world.

Donald Trumps entire Presidential campaign this year has been a mixture of reality-show oh snap moments and wishful thinking. His plan, for example, to stop illegal immigration by building a wall across the Mexican border ignores the technical challenges, the economic challenges, the ecological consequences, or the reality that walls can be bypassed in a number of ways. The obstacles or impracticality are ignored in favor of a, wouldnt it be cool if… feeling.

In the John Oliver clip, a recurring theme he touches upon is the, if we put a man on the moon, I dont see why its so hard to make encryption that the government can spy on! Theres a lot of wishes in this: a wish for a world where good guys can read anybodys mail, but bad guys never can, and also a world where the government is always a good guy. Thats arguably a better world than the one we live in, but the statement blows across real-world impossibility of their demands.

Now, at this point, it is both easy and tempting to allow this article to pivot into a full taxonomy of logical fallacies and cognitive blindspots. The thing is, I dont care as much about the ways in which people are wrong, as much as I do why they reach these wrong conclusions. And Im not concerned about being exhaustive. Instead, I want to talk about one more cause- and one that we are often complicit in when we talk to non-technical people.

The Argument from Analogy

Have you ever found yourself trying to explain something to your boss by saying, Well, its like waiting in line at the bank- instead of having a separate queue for each teller, its faster if they have one queue for all of the worker threads. Thats an analogy, and its a powerful way to explain complicated concepts.

Scientists use this all the time. Most of you have probably seen a demonstration or visualization like this one which uses a rubber mat to show how gravity warps spacetime. And of course, Schr"odingers rather famous cat has been alive and dead so many times.

Of course, both of those analogies actually do a really bad job of actually explaining the phenomenon. Theyre simplistic and obscure a lot of details in the name of getting the point across- in technical terms, theyre leaking abstractions.

And these kinds of leaky abstractions are built right into our technical terms. Like, for example, oh… I dont know… keys? An encryption key is analogous to a real key, but Ive never signed something with my house key. Yet, in John Olivers segment, we hear a police officer that since theres no door or safe that they couldnt break open, encryption should be the same way.

How many times have we heard of encryption described in terms of locks and safes?

Analogies are powerful, but with great power comes great responsibility. Analogies provide an illusion of knowledge- by mapping a complex and difficult to understand problem domain on a realistic(ish) and easy to grasp analog, people can feel like they understand something complicated, even though they dont.

What Can We Do?

At this point, I feel a little like Im standing in the corner, looking at a freshly painted floor. Ive laid out a challenge that cant be resolved by just a little essay on an IT humor site. How do we fight technical ignorance in our co-workers, our friends and family, and our elected officials?

Its not just a matter of educating people. You can re-run the original Carl Sagan Cosmos as much as you like, but there will still be people who deny evolution and the scale of the universe. Statistics have never convinced a single anti-vaxxer they were wrong. Conspiracy theorists are never swayed by little things like evidence.

I think, though, that theres a common thread that connects my three points above. Intuition, wishful thinking, and analogies are all involve setting and then confirming our expectations. So, if nothing else, breaking those expectations is something thats helpful. Comedy is always useful for being surprising.

More generally, taking peoples assumptions and showing the situations where they fail is a great way to try and get them to learn things. The challenge is this requires us to understand their assumptions. Its often very hard for an expert in one area to forget what they know and approach a situation with a beginners mind. It also requires some skills that the IT field generally doesnt prioritize: empathy and active listening.

When I see things like this battle of encryption, I think that its less important to educate people about the correct details, and more important to break their incorrect preconceptions.

Im curious to hear from our readers on this, so click the comments link or shoot us a message via email. A future edition of my hand-drawn videos will likely tackle the specific issue of encryption, and Id love to hear some ideas about that.

[Advertisement] High availability, Load-balanced or Basic – design your own Universal Package Manager, allow the enterprise to scale as you grow. Download and see for yourself!

http://thedailywtf.com/articles/encryption-by-analogy


Метки:  

CodeSOD: Code Changes Over Time

Понедельник, 14 Марта 2016 г. 13:00 + в цитатник

Code changes over time. Most of what developers do is manage changes to code. Dana inherited some pretty awful PHP, and decided to take some time to improve performance and make sure any errors thrown by the PHP were actually displayed nicely for the user.

While looking at the file-upload module, Dana found this:

//$sze = 1024 * 1024 * 5; // 2Mb
[...]
$size = $_FILES['userfile']['size'];
[...]
//if ($_FILES['userfile']['size'] > $sze) {
if ($_FILES['userfile']['size'] > $size) {
    return 'Error';
}

This is code thats been changed. This is the sort of code that sits at the end of the bar, not making eye contact with anyone, and drinking shots of rotgut until it doesnt remember why its there in the first place. Theres a seedy story written in every line of this code block.

[Advertisement] Release! is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!

http://thedailywtf.com/articles/code-changes-over-time


Метки:  

Error'd: In Soviet Russia, Birthday Translates You!

Пятница, 11 Марта 2016 г. 14:00 + в цитатник

"Chrome translator apparently has issue with the numbers 11 and 30 when translating mail.ru to English," wrote Marc B., "Interestingly, the Russian version of the site displays the numbers properly, so WTF Chrome?"

"Well, apparently according to Wikipedia's article on 'Shades of brown', purple is the new brown," writes Naram Q.

"I'll show them and give different answers for both questions," Jay wrote.

"Wow! 7 bytes isn't even enough to spell 'database'," Sam B. wrote.

Gareth H. writes, "Looking to state what's important for me when thinking about cyber threats, I felt that I was being steered towards "Detection" as an option."

"Somehow I thought that the device driver for a baggage carousel would be prepared for infinite loops," writes Florian.

"Okay! I get it! I unsubscribed," Malhar S. wrote, "Or did I?"

Steve writes, "I was trying to search for VMWare Player's free edition because their website was trying to push the Pro trial, and well, it looks like their SEO could use some work."

[Advertisement] Otter, ProGet, BuildMaster – robust, powerful, scalable, and reliable additions to your existing DevOps toolchain.

http://thedailywtf.com/articles/in-soviet-russia-birthday-translates-you


Метки:  

CodeSOD: The Self Test

Четверг, 10 Марта 2016 г. 14:30 + в цитатник

I consider code cleanup to be important, almost as important as actually writing code, especially since I spend a lot of time doing maintenance and support. During idle time, I enjoy digging through existing code to find overcomplicated algorithms and dead code and see what I can simplify or even delete. While there may not be an immediate benefit, it makes future debugging far easier if you trim out dead code and shorten 3,000 line C files to 500 line ones. And quite often, subtle and difficult-to-diagnose bugs simply go away.

While doing this on one of our products, I found a very old public API that appears to have never been completed. At least I hope so, because theres no way any of it does anything remotely useful.

Here are a couple representative functions. No, I dont know what theyre supposed to do.

    unsigned long error_query(HardwareHandle handle, long* errorCode, char errorMessage[])
    {
        *errorCode = 0;
        strcpy(errorMessage, "error_query not Implemented");
        return API_SUCCESS;
    }

    unsigned long revision_query(HardwareHandle handle, char revision[])
    {
        strcpy(revision, "Unknown");
        return API_SUCCESS;
    }

There are quite a few more functions just like this, but you get the point.

And then theres this beauty. To provide some background, we manufacture PCI devices for our industry. They have an FPGA loaded with firmware to do some useful stuff and a C API to communicate with it. One of the firmware functions is an internal self-test which is useful for verifying that new firmware versions function or that hardware isnt physically damaged. The API can poke a register to trigger the test and then monitor another register to see when it finishes and get the result. But heres how this APIs version of self-test isand always has beenimplemented:

    void self_test(HardwareHandle handle, int* testResult, char result[])
    {
        HardwareDevice* device = (HardwareDevice*)handle;
        unsigned long retval = API_SUCCESS;
        *testResult = 0;
        // retval = device->doSelfTest();
        if (retval)
        {
            strcpy(result, "Self Test Successful");
        }
    }

How embarrassing.

[Advertisement] Otter allows you to easily create and configure 1,000's of servers, all while maintaining ease-of-use, and granular visibility down to a single server. Find out more and download today!

http://thedailywtf.com/articles/the-self-test


Метки:  

It Can't Be Done

Среда, 09 Марта 2016 г. 14:30 + в цитатник

Decades ago I had several clients who insisted upon having two PCs on their desk. One would boot up into the word processor and the other would boot up into a spreadsheet program. No amount of instruction could teach these people that a computer can not only run multiple programs, but it can run them at the same time. To this day, these folks are still my clients, and happily paying me to support this arrangement.

Some people simply can not be trained.

Due to space constraints, John happened to sit near his in-house software development team. The primary business of their company was not software development, and the software folks catered only to the in-house needs of the company.

Scotty from Star Trek being very drunk

The application in question is a small web query which allows the user to look up a person by some fraction of their first or last name and/or their phone number. Simple enough, really: do a case-insensitive wild card search of whatever they enter on both database fields, and display the results.

One day, an Admin guy walked in to discuss the prospects of updating the application. Since people have moved a lot around here, our phone directory database has become outdated. How can we update it?.

John suggested that they could provide a link in the same application so that each user could edit their phone number. However this was immediately rejected because everyone there thought it would be futile to ask employees to update their phone numbers.

Instead, the manager of the software folks decided to run an internal company-wide survey and mandate that everyone provide their phone number.

In the next 10 days, everyone at the company was forced to submit their internal extension number via the survey. It took all of 2 days to discover that this caused another problem. The company had 4 different facilities and all they collected via the survey was the extension numbers and not the facility to which they corresponded.

By dumb luck, a week prior to this survey, there had been another survey requesting the facility in which each user was stationed. The software folks assured everyone that it was just a matter of using the other table to get the facility names too.

Two days later, John just happened to bump into the same admin guy and asked him about his weekend plans. He said he was going to be in the office as the updates to the phone lookup application needed to happen. John started getting curious as to why the update should warrant weekend work, especially given that they had all the data they needed. He said Yes, the data is available, but it needs to be entered into the system.

It later turned out that the software team exported an Excel dump of the two surveys from their SQL-Server database and had asked this poor guy to manually key in one entry after another in the entry form provided by them so that it could be stored in another database table.

John told the admin to ask the software manager once again to check if there was a possibility to move the data directly from one table to another, rather than doing manual re-entry. John witnessed the resulting conversation:

   Admin: it is very difficult, error prone and time consuming to key in the details 
          of nearly 4,000 employees one by one; is it possible to do a back end upload?
   Devs:  No: it can't be done because the table of the phone lookup database and the 
          table of the facility database are structurally different and hence it would 
          not be possible to update the records on the back end; they must be 
          re-entered manually!

Just in case you're curious, the query application has 2 boxes to enter search data (name and extension). You search by either one, and it will list all matching entries in a grid that looks like this:

    Employee_Name     Phone_No
    -------------     ------------------------------------------------------------
    Spider Man        Facility-1: 3159 ; Facility-2: ; Facility-3: ; Facility-4: ;
    Harry Potter      Facility-1: ; Facility-2: 2849 ; Facility-3: ; Facility-4: ;
    Bruce Wayne       Facility-1: ; Facility-2: ; Facility-3: 7235 ; Facility-4: ;
    Captain America   Facility-1: ; Facility-2: ; Facility-3: ; Facility-4: 1923 ;

So you know to call Harry Potter in Facility-2 at x2849.

I've always thought that requiring license certifications to be a software developer was a ridiculous idea, but lately...

[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!

http://thedailywtf.com/articles/it-can-t-be-done


Метки:  

CodeSOD: JavaScript Obfuscation

Вторник, 08 Марта 2016 г. 14:30 + в цитатник

We have to be careful about the articles we publish on TDWTF. We have a responsibility to our submitters, to protect their identity and anonymize the details of their stories. We have a responsibility to our readers- mostly to be entertaining.

Last weeks JSFk story failed one of our readers. Poor Blazej didnt find it entertaining- it gave him upsetting flashbacks to his own experience with a similar event.

You see, Blazej was pitching in on a file uploading site, specifically meant to share videos. While he did some backend work, the front-end developers wanted to make sure that it was impossible to ever learn the actual URL of a video, to prevent people from downloading it. They wrote some JavaScript to obfuscate that URL, but that introduced a new problem: somebody could just read their JavaScript!

Using the same principles as JSFk, but coupled with JavaScripts unicode support, they produced this:

http://thedailywtf.com/articles/javascript-obfuscation


Метки:  

The Swing of Things

Понедельник, 07 Марта 2016 г. 14:30 + в цитатник

While studying Java in college, Eugene had the great misfortune of being hired by a company that specialized in Java Swing applications. (For those of you who dont know, Swing is a cross-platform framework for desktop GUI applications.) He was quickly swept aboard a new project: taking a new clients poorly-implemented, buggy, and unstable PHP website and upgrading it to a new, clean, Java-based version.

The team quickly stumbled into a major roadblock. This has to be a web application? questioned Rob, the team lead. You cant do web with Swing. Why dont we just write them a Swing application?

a swingset

They want a website, not a desktop application, was the response from the salesman.

And so the team set out on a quest to learn web development&

AjaxSwing

Rob soon found a workaround for their dilemma. I found something that will make web development easy for us! he announced to the team. Its called AjaxSwing, and it converts Swing programs into web applications! We dont have to learn web development after all!

Eugene was a fairly green developer but even he knew this was a terrible idea. But as the newbie student programmer, he had no say in the matter, and soon found himself thrust into the horrid bowels of a wretched new beast. One that abused a tool designed to quickly shove legacy applications onto the web, instead using it as a core framework on a brand-new application. One that launched a separate, headless JVM process for each user. One that did terrible, unspeakable things with Reflection to replace Javas internal Swing classes with ones that convert them to remote HTML/JavaScript entities in a web browser somewhere else.

The new application was a monster. It had complex features and requirements and the team was continuously bumping into limitations of AjaxSwing. Eugene, being a mere student with the lowest pay, often got selected to work long hours dealing with these issues. He spent a fair amount of time handling customer reports, debugging, and forwarding bug reports on to the AjaxSwing team. To their credit, they worked with him to solve these.

Finally, the application was completed and delivered to the client.

Random Crashes

Shortly after deployment, the customer began complaining about random crashes in the application. Something occasionally happened that disconnected everyone from the application. They soon figured out that having the hosting company reboot the server would bring the application back, but eventually it would die again, sometimes after a few hours, sometimes after a few days. Meanwhile, Eugenes team started adding performance logging and tracing to try to narrow down the cause.

After a couple weeks of monitoring, Eugene came into one of their emergency customer support meetings slightly late but armed with a new bit of knowledge. I found something in the server logs. Someone is actually terminating all the JVM processes used by the site.

Rob frowned. Why would someone do that? Call the customer and tell them not to do that anymore!

And he did. The customer claimed they never did anything directly with the server, so maybe it was the hosting providers fault? But the hosting company claimed that no, they dont randomly log into customer servers and kill processes.

This continued for months. Everyone got used to the status quo and simply learned to live with it. Eugene continued monitoring and logging, but got no additional details. Someone somewhere was killing the JVM process and refusing to admit to it.

The Cause

Months later, he received an enlightening email from the hosting provider.

Eugene,

We've finally found out what's killing the JVM processes on [redacted]'s web server. The remote desktop software we use for maintenance kills all processes belonging to the user when he logs out. Your application is configured to run as the admin user, so when an admin does server maintenance and updates and logs out, the JVM gets killed.

I suggest you work with with the customer to run the application with a non-privileged user account.

Thanks,
[redacted]  

Eugene and the customer attempted to fix this, but the application did Very Bad Things™ and refused to run unless it was using the admin account. The hosting company agreed to quit using their remote desktop solution on this particular server, and instead use the stock Windows RDP client. Meanwhile, Eugene graduated college and decided to move on.

The Fix

Eugene soon found himself employed full-time at a web development company, one that specialized in building JavaServer Faces (JSF) web applications. Shortly after starting, he was quickly swept aboard a new project: taking a new clients poorly-implemented, buggy, and unstable AjaxSwing web application and upgrading it to a new, clean, JSF-based version&

[Advertisement] Application Release Automation for DevOps – integrating with best of breed development tools. Free for teams with up to 5 users. Download and learn more today!

http://thedailywtf.com/articles/the-swing-of-things


Метки:  

Error'd: An Error is Worth 10 Words

Пятница, 04 Марта 2016 г. 14:00 + в цитатник

"This was a screenshot I took of an error message I got many years ago (when Win95 was fairly new) after opening one too many instances of Word," Andrew H. wrote.

"I don't mind that Google likes to beta test everything, but I think I'll pass on this," Mike S. wrote, "I'd hate to be there if it crashes."

"Facebook finally admits watching videos on it has no value," writes Kevin M.

"It's good to know that Windows will only wait six and a half years before making another attempt to synchronize its clock," wrote Matthew.

"Maybe I've stumbled on the Rosetta Stone for Business Process Architects? Nah, just another deployment WTF," writes Quentin G.

"I wanted to find the latest drivers for my MSI laptop, but I just couldn't find what I needed," writes Joe R.

"I have this feeling that you're trying to upsell me, ycharts.com," Jeff C. wrote.

Ado B. writes, "Cards Against Humanity goes a step further by turning against charity as well."

[Advertisement] Otter, ProGet, BuildMaster – robust, powerful, scalable, and reliable additions to your existing DevOps toolchain.

http://thedailywtf.com/articles/an-error-is-worth-10-words


Метки:  

CodeSOD: Widgety Gadgety Boo

Четверг, 03 Марта 2016 г. 14:30 + в цитатник

“The road of life twists and turns and no two directions are ever the same. Yet our lessons come from the journey, not the destination.” - Don Williams, Jr. (4719290483)

Ancient Coder submits for our review the following migraine-inducer:

This was a bug report about a very minor issue, a little warning box was not popping up. Simple, I thought, and I estimated it would take an hour to fix. Little did I know that someone had already poked at this issue and made this amazing log entry. I spent about half an hour trying to understand this code before I backed away, slowly.

Are you ready for this one, guys? I mean, really ready? OK, here we go:

This problem is caused by BUGREP-92726, but it is more complex problem. Actually it is caused by this part of code:

ForgivingSuper.java:1435
int lastWidget = WebThread.getWidgetHistoryMgr().getPreviousWidgetId();
// BUGREP-53139 03/24/2014 gmp - check whether previous ErrorGadget is 337, if it is do not put up ErrorGadget 32
ErrorGadgetWidget prevErrorGadget = WebThread.getPartialWidgetMgr()!=null?WebThread.getPartialWidgetMgr().getPreviousErrorGadget():null;
if((lastWidget == IWidgetIds.PROGRAM_INFO_Widget && WebThread.getErrorGadgetManager().getErrorGadget32OverrideStatus()) || 
    (((currentErrorGadget != null && currentErrorGadget.getErrorGadgetNumber() == ErrorGadget337) || 
    (prevErrorGadget != null && prevErrorGadget.getErrorGadgetNumber() == ErrorGadget337))))
{
    // WebThread.getErrorGadgetManager().removeErrorGadget(ErrorGadget32);
    ErrorGadgetContext = new ErrorGadgetContext();
    ErrorGadgetContext.put(ErrorGadget337_DATA_SERVICE_EVENT, se);
    ErrorGadgetContext.put(ErrorGadget337_Defeat_OPTIONS, prevErrorGadget.getContext().get(ErrorGadget337_Defeat_OPTIONS));
    WebThread.getErrorGadgetManager().showErrorGadget(ErrorGadget337, ErrorGadgetContext);
    WebThread.getErrorGadgetManager().setErrorGadget32OverrideStatus(false);
} else {
    // BUGREP-64543 03/24/2014 gmp - show ErrorGadget 32 since it is not overridden by ErrorGadget 337
    ErrorGadgetContext.put(ErrorGadget32_DATA_SERVICE_EVENT, se);
    ErrorGadgetContext.put(ErrorGadget32_IS_BOOKED, WebThread.getSharedAlgorithms().isScheduledToShow(se));
    curErrorGadgetManager.showErrorGadget(ErrorGadget32, ErrorGadgetContext);
}

This part of code is patch applied for BUGREP-92726 and it solves problem describe there, but only partially. As it creates another problems:
1. When above patch code is applied and we steps of reproduce BUGREP-92726 + go to report from used in steps of reproduce of BUGREP-92726, then we still see ErrorGadget337 despite that we expect ErrorGadget32 (as we swapped to other DataEvent).
It is because we go into following condition of above code snippet:

(prevErrorGadget != null && prevErrorGadget.getErrorGadgetNumber() == ErrorGadget337)

2. This can cause another similar problems every time when prevErrorGadget was ErrorGadget337. I think that, the if statement from the above snippet should be as simple as:

if(WebThread.getErrorGadgetManager().getErrorGadget32OverrideStatus())
{
	.....
} else {
   .....
}

However in such situation we have another problems to solve:
1. WebThread.getErrorGadgetManager().getErrorGadget32OverrideStatus() is not properly set throughout the code. It should improved.
2. prevErrorGadget can be null => following issue will return NullPointerException(): ErrorGadgetContext.put(ErrorGadget337_Defeat_OPTIONS, prevErrorGadget.getContext().get(ErrorGadget337_Defeat_OPTIONS));
3. Even if prevErrorGadget is not null, there are situations where prevErrorGadget.getContext().get(ErrorGadget337_Defeat_OPTIONS) returns Boolean object instead of DefeatOption object.

It is when we reproducing this issue (BUGREP-47765). Then following exception is caught:

|Oct 22 11:22:04  java.lang.IllegalArgumentException: Failed to build ErrorGadget337: com.parent.mw.ca.dat.DefeatOption object is expected.
 Refer to the javadoc for ErrorGadgetConstants.ErrorGadget337_XXX for details. Object received: java.lang.Boolean       
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetTextBuilder.getObject (Unknown Source, bco=79)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetTextBuilder.buildErrorGadgetText (Unknown Source, bco=16486)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetBuilder.buildTextBlock (Unknown Source, bco=9)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetBuilder.buildErrorGadget (Unknown Source, bco=112)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetManager.buildErrorGadget (Unknown Source, bco=201)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.ErrorGadget.ErrorGadgetManager.showErrorGadget (Unknown Source, bco=15)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.SystemEventMgr.handleViewingProblems (Unknown Source, bco=3327)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.SystemEventMgr.handleViewingProblems (Unknown Source, bco=6)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.SystemEventMgr$MyServiceEventListener$1.run (Unknown Source, bco=16)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.EventManager.invokeAndWait (Unknown Source, bco=41)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.EventManager$2.run (Unknown Source, bco=8)
|Oct 22 11:22:04      at com.parent.finagler.nestedobsoletestructure.EventManager$TaskWrapper.run (Unknown Source, bco=53)
|Oct 22 11:22:04      at ceej.util.ThreadPoolEntry.run (Unknown Source, bco=55)
[Advertisement] BuildMaster integrates with an ever-growing list of tools to automate and facilitate everything from continuous integration to database change scripts to production deployments. Interested? Learn more about BuildMaster!

http://thedailywtf.com/articles/widgety-gadgety-boo


Метки:  

The Swamp Cooler

Среда, 02 Марта 2016 г. 14:30 + в цитатник

Joe took a job as a programmer at a small shop. It was a huge pay cut, but his current employer was locked in a death-spiral of declining revenue, declining collections, and declining sales. It was time to get out, and his local market didnt have a lot of options.

Were a small shop, so well need you to help out with general IT stuff, Joes boss, Jimmy, said. By help out, what Jimmy actually meant was be the helpdesk tech, server tech, and if you have time, write some code. On an average day, Joed be running from user desktop to user desktop, installing Excel or removing malware, before hustling to the server room to manually reboot a locked up box, then on his way out the door, hed push some changes to the companys website and pray nothing was wrong.

Evaporative or 'swamp' cooler

That server room was a bit of a problem, and you already know the details. It was a repurposed janitors closet, complete with the large sink, which constantly dripped just a little bit, water pipes running along the ceiling, and a smelly French drain in the floor. There were no windows. There was no ventilation. There was no air-conditioning.

In April, Joe knocked on Jimmys door. Hey, Im a little worried about the server room. Theres no ventilation in there- its already up over 80oF (27oC) today. Come summer, its going to be brutal in there.

Whaaat? Jimmy said. We just bought a half dozen more efficient computers for in there. Its gonna be fine.

I really dont think it will. Even this is too warm for safety. I had to prop the door open to get it cool enough.

Jimmy sighed. Lordy, Ill put it on the list, and maybe well get something before summer comes round. But I dont want you proppin that door open! Thats expensive equipment, and I dont want anything taking a walk!

Summer came around. Jimmy didnt buy an AC unit. It was a warm summer- one day in August it crested 100oF (37aC) outside. Inside the server room, it was literally an oven. Joe kept the door open, despite Jimmys concerns, but it wasnt enough. Their primary application server died. It hosted pretty much everything important at the company, from accounting data to their mail server. It crashed and crashed hard, and whatever was wrong, it was definitely a hardware problem.

Joe wasnt surprised that there was no budget to replace the dead server. He had to spread its functions around to a few other boxes in the closet. Jimmy, he said, Im pretty sure this was caused by heat. We need to get an AC unit.

Darnit, Jimmy said, for that little tiny closet? A whole AC unit seems like a waste, and wed have to cut a big hole in the wall, and I just think youre making something out of nothing. But, heres what I can do. Ive got a portable cooler I use when Im workin in my garage. Ill bring that in from home, and well cut a small hole for the exhaust fan.

The portable cooler was a tiny thing, and it couldnt keep up with the furnace of the server room. A week later, another server succumbed to heat-related trauma and died.

At this point, Joe was downright angry. Jimmy! We need to get an air conditioner for the server closet.

Durnit, the whole building doesnt even have an AC. We use a swamp cooler. Im not buying an AC for just one room! Well just turn the swamp cooler colder.

And colder it was. Jimmy cranked it as high as it would go, which meant regardless of the temperature outside, the building was 55oF (13oC). Several of the employees brought winter coats from home and left them at their desks to try and keep warm during the day. With the entire building that cold, with the portable cooler, and with a fan, Joe was able to get the server room down to a reasonable temperature.

Joe was pretty surprised when another server died. He rushed to the server room, and found that it wasnt beastly hot- it was actually a reasonable temperature. He was ready to write it off as lingering damage from the heat, until he pulled the server from the rack.

Jimmy, as promised, turned the buildings cooling system- its swamp cooler up. A swamp cooler is a very efficient cooling system suitable for drier climates. Unlike an air-conditioner, which uses refrigerant and a compressor to create cold temperatures, a swamp cooler simply pulls dry air across water. The water evaporates, removing some of the heat from the air, while simultaneously adding humidity to the air.

That cold, moist air was blowing into the server room, which was a disused closet with exposed water pipes cutting across its ceiling. The pipes were much cooler than the server rooms air, so that moisture condensed on the pipes, then dripped.

Joe was not pleased to find the server was wet. Fortunately, it was only the power supply that was actually damaged, and through some miracle, the short didnt damage anything else. He replaced it with one of the overheating victims power supplies and got the server back in service- but not before moving the rack away from where the pipes were dripping.

Joe didnt stick around much longer. He left a few weeks later, and despite his warnings, Jimmy never did buy an AC. As far as Joe knows, every employee still wears coats in the summer.

[Advertisement] Release! is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!

http://thedailywtf.com/articles/the-swamp-cooler


Метки:  

CodeSOD: The Monthly Report

Вторник, 01 Марта 2016 г. 14:30 + в цитатник

Karen, you need to run the monthly report while Ivan is on vacation, Bruno asked.

Wait, isnt that just a scheduled job?

No. Its old code, and we dont trust the scheduling systems, and if anything goes wrong how do we know and…

Well, I guess I can run it, then, Karen said.

Great, youll need to restore the financials database from backup onto your local instance, then run the reporting tool in local configuration-

Wait… why?

Why? Its too heavy a job for our production server!

Karen followed the instructions. She spent a few hours waiting for the database to restore to her local developer instance. She fired off the job and waited another few hours while it ground away doing whatever it was doing. Finally, it quit, leaving behind a 40MB CSV file as its monthly report.

At this point, Karen wondered- why did that take so long?. Curious, she extracted all the SQL queries and profiled them. They ran in seconds, and unless there was a poorly designed loop she hadnt noticed, it wasnt the queries that were making it slow. Her next guess was that it was the file IO that was slow- but how could that be? How hard was it to write a string of text to a file?

    Private Sub writetopath(ByVal inputstring As String, ByVal myfilepath As String)
        Try
            Dim myStreamWriter2 As System.IO.StreamWriter
            myStreamWriter = System.IO.File.CreateText(logfilename2)
            myStreamWriter2 = System.IO.File.AppendText(myfilepath)
            myStreamWriter2.WriteLine(inputstring)
            myStreamWriter2.Flush()
            myStreamWriter2.Dispose()

        Catch ex As Exception
            Label5.Text = "Problem while writting to file: " & ex.Message
            Label5.BackColor = System.Drawing.ColorTranslator.FromHtml("#ff3c3c")
            writetofulllog("Error at sub writetopath. " & Label5.Text)
            'MessageBox.Show(Label5.Text)
        End Try

    End Sub ' Sub writetopath

The original developer had obviously taken the advice close your file handles to heart, because this function was called for every line the program output. That means for every line in the 40MB file (each line about 40 characters long) it had to construct a StreamWriter instance, write a line to its buffer, flush its buffer, and dispose of the instance.

Karen spent five minutes to refactor the program. Afterwards, it ran in less than a minute. She still couldnt convince Bruno to let her schedule it, but at least she didnt need to restore the entire database before running it.

[Advertisement] Application Release Automation for DevOps – integrating with best of breed development tools. Free for teams with up to 5 users. Download and learn more today!

http://thedailywtf.com/articles/the-monthly-report


Метки:  

Bidding on Security

Понедельник, 29 Февраля 2016 г. 14:30 + в цитатник

Let's talk about Javascript.

Like just about every modern language, Javascript is based on C-syntax. That means when you look at a piece of Javascript, it should look pretty familiar: braces to denote block scope, semicolons to terminate lines, square brackets for arrays and dot notation for objects. The usual stuff.

Javascript, however, is a scripting language. Like most scripting languages, it's weakly typed. Extremely weakly typed. Thanks to late-night Comedy Central, the Javascript community has come up with two words to replace the usual concept of true and false: truthy and falsy. A non-empty string is truthy, while an empty one is falsey. A defined variable is truthy, while an undefined variable is falsey. Pretty straightforward stuff. You can check for yourself; pressing F12 should provide you with a Console (or, as Rubyists would call it, a REPL) where you can follow along.

But that's not all. Not only can you evaluate anything as a boolean, you can evaluate any expression as any type at all with a few handy tricks. Pop quiz: What is the value of [] as an integer?

...wat?
...no seriously... wat?
E_NOTVALID
NaN
Segfault
0

That's right, dear readers, it's 0. You see, [] is truthy, and true is 1, so therefore-- no, sorry, wrong proof. [] is empty, and empty arrays are vaguely similar to the empty string, and the empty string has a length of 0, therefore, [] == 0, and +[] === 0 (because the unary plus forces it to be interpreted as an integer). Now, since [] is truthy, you can convert it to false by negating it: ![]. And you can convert it to true by double-negating it: !![]. True is equal to 1, therefore, +!![] === 1. With 0 and 1, you now have Binary, the beginnings of a programming language.

But maybe you want to dream big. Maybe you want the number 42. Well, that's easy enough. (+!![])+(+!![]) gets you two, so naturally, (+!![])+(+!![])+(+!![])+(+!![]) gets you four. And, thus it follows that ((+!![])+(+!![])+(+!![])+(+!![])+[])+((+!![])+(+!![])+[]) gets you 42. Simple mathematics at this point.

Still with me? Good. Let's talk about JsF**k.

JsF**k is an esoteric programming language that runs on any Javascript interpreter using only six symbols: (, ), [, ], +, and !. We've trivially shown how you can get any number you want. But how can you get letters? Well, that's easy. In the case of Objects, Javascript does what you may have expected: casting {} to an integer gets you NaN. As you may have noticed in my previous case study, adding +[] forces anything to be interpreted as a string, so +{}+[] results in the string "NaN", and (+{}+[])[+!![]] results in the string "a". How to get b? The string representation of an object, which just happens to be "[Object object]" (as though Javascript had types). So b is represented as ({}+[])[+!![]+(+!![])], and c is ({}+[])[+!![]+(+!![])+(+!![])+(+!![])+(+!![])] (JsF**k is hardly a succinct language).

From the values true,false,undefined,NaN, and [Object object], we obtain the letters "a", "b", "c", "d", "e", "f", "i", "j", "l", "n", "N", "o", "O", "r", "s", "t", and "u". This is enough to put togther the string "1e1000", which, when parsed as a number and cast back to a string, overflows into the string "Infinity", giving us "y" and "I". The string "1e100" isn't quite enough to overflow, but parses back into the almost-identical string "1e+100", which gives us "+" in our toolbox as a string.

We're almost there, but not quite. The next few tricks depend on the script running in a browser. In the browser, we have access to the precious window global object, complete with the "unescape" function which would take any hex sequence and turn it into a character. But how to get unescape without a "p"? From "http", of course, obtained via Function("return location")() and sliced up. Granted, if this is being served via the file prefix, we won't get our precious p, but who does that anyway, right? We can now call escape("[") to get a %, and we're in business. Any character, encoded with our base six characters.

Let's talk about Ebay.

Ebay thought they were secure, you see. They thought they'd done everything right. Sure, their regex only matched alphanumeric characters inside script tags, but really, who writes javascript without using letters or numbers? How much harm could possibly be done? Nobody in their right mind would, say, create an anonymous array, call methods using associate array syntax and a long string of braces that somehow evaulates to the name of the method, and replace one of them with a call to "eval" that then evaluates arbitrary strings, right?

Have you ever discovered a fun exploit like this one? Submit your stories!

[Advertisement] Universal Package Manager - ProGet easily integrates with your favorite Continuous Integration and Build Tools, acting as the central hub to all your essential components. Learn more today!

http://thedailywtf.com/articles/bidding-on-security


Метки:  

Error'd: Getting More than you Bargained for

Пятница, 26 Февраля 2016 г. 14:00 + в цитатник

Ygor L. wrote "Awesome! Git found three more files than I thought that I needed."

Neil S. writes, "I wanted to find the latest drivers for my MSI laptop, but I just couldn't find what I needed."

"The entrance poll analysis is in-depth and HIGHLY technical by the looks of it," writes Ray.

"Yum! I can't wait to have one of those concat('F:','Hershey's," Tom S. wrote.

Eric G. writes, "In a strange twist, Ubisoft's Rocksmith seems to include some legally binding CSS."

"It's comforting to know my tax preparation software is capable of performing basic arithmetic," writes Rob O.

"I'm glad the directory could tell me how to get to the ," Josh O. wrote.

"Saw this on the marquee of at the local theater," Tom wrote, "I don't think I've heard of this movie, but I'm pretty sure that I've read the book."

[Advertisement] High availability, Load-balanced or Basic – design your own Universal Package Manager, allow the enterprise to scale as you grow. Download and see for yourself!

http://thedailywtf.com/articles/getting-more-than-you-bargained-for


Метки:  

Tales from the Interview: The Triple Threat

Четверг, 25 Февраля 2016 г. 14:30 + в цитатник

Interviews are bidirectional in that you are supposed to be culling as much information about the prospective team, co-workers and management as possible, in the same way that they are trying to size you up.

There are all sorts of interviewing styles; the reasonable back-and-forth conversation that actually allows you to learn about each other, the written test to see if you can do a ten line program that you had as a homework assignment back in CS102, the keep-guessing-until-you-come-up-with-the-solution-I'm-thinking-of torture test, and so on. However, this tale centers on an interviewer trying so hard to come up with the perfect question, that not only was unanswerable, but there was no way for the interviewer to judge if any answer given was correct.

WWII pamphlet warning soldiers against Tamaro, Mosquitos and Japanese Soldiers

Adam had an interview for a developer position with a cable and networking company a while back. It was a fairly standard interview; three guys asking various questions ranging from past experience and schooling to technical questions. They did however seem to have a problem with his degree. You see, Adam had a Bachelors of Science with three majors. Yes, three majors; Math, CS, and English. Normally people are either surprised or impressed, but never before nor since has he actually been questioned about it so thoroughly.

It seems that none of the three people that interviewed him believed that he had three majors. They seemed to think that he had a major and two minors, or a major with two focuses. They grilled him a little about how many and which classes he had to take to get these "majors". So he was really a math guy that took a few programming and English classes right? Every few questions, the topic circled back to his majors.

Although he was able to answer their technical questions, it should have been clear that having a CS major qualified him for the job, but they seemed obsessed to make sure that he had really had three majors.

Finally, one of the guys dropped what has come to be known as "the bomb" on him. It was by far the single most ridiculous and impossible question anyone has ever been asked at an interview. They had received his resume a few days before, and apparently liked it. The interviewer told Adam that it took him a few days to come up with a question to really find out if he really did have three majors, and then let fly with his ultimate creation:


Any person who got a Math major should be familiar with the concepts of 
integration and differentiation, right? Any Computer Science Major should 
be familiar with the concepts of black box and white box testing, right? 
And you should be experienced as an English major with doing comparisons,
usually of literary works, but your own ideas, right? Okay, great, then
what I want you to do for me is to compare the concepts of integration
and differentiation to the concepts of black box and white box testing
in your own words.

Was he serious? He told Adam that he was indeed, serious. After a minute, Adam gave some kind of BS answer, but it really didn't matter.

Many years later, Adam was still not even remotely sure how he could have "properly" answered that question, and if he did, how the interviewer, who did not have those three majors, could possibly have evaluated the value of the answer.

It goes without saying that Adam didn't get the job, but after a question like that from a potential employer, Adam doubted that he would have wanted to work there anyway.

http://thedailywtf.com/articles/the-triple-threat


Метки:  

Поиск сообщений в rss_thedaily_wtf
Страницы: 124 ... 35 34 [33] 32 31 ..
.. 1 Календарь