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

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

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

 

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

 -Статистика

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


CodeSOD: Never Bother the Customer

Четверг, 07 Сентября 2017 г. 13:30 + в цитатник

Matthew H was given a pretty basic task: save some data as a blob. This task was made more complicated by their bosss core philosophy, though.

Never. Bother. The. Customer..

Right, but if the operation fails and we cant continue?

Never. Bother. The. Customer.

Okay, sure, but what if they gave us bad input?

Never. Bother. The. Customer.

Okay, sure, but what if, by hitting okay, were going to format their entire hard drive?

Never. Bother. The. Customer.

As such, for every method that Matthew wrote, he was compelled to write a safe version, like this:

protected void SaveToBlobStorageSafe()
{
        try
        {
                 SaveToBlobStorage();
        }
        catch (Exception ex)
        {
        }
}

No errors, no matter what the cause, were ever to be allowed to be seen by the user.

[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!

https://thedailywtf.com/articles/never-bother-the-customer

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку