понедельник, 4 мая 2009 г.

Не могу пройти мимо…

…или до чего может дойти пропаганда :)

Ярые проповедники функционального программирования иногда поражают своей верой в чудеса. Вот совсем свежий пример. В блоге известного на RSDN хаскелиста Сергея Зефирова приведена цитата:

The financial markets have crashed. One important reason seems to be the trading in financial derivatives. These derivatives can be so complex that it’s very hard to estimate their value. Now if only there was a domain specific language for describing and evaluating such financial contracts...

A few weeks ago, GMail had a major outage. Edwin Brady pointed out a press release by Google that blamed ‘unexpected side effects of some new code’ – now if only there was some way to ensure code doesn’t have side effects...

This leads me to believe that Haskell is currently solving problems that will affect society in ten years or so. I predict there’s a major telecom blackout because Erlang fails to do parallel garbage collection. Maybe major bank systems will crash because of a mistake in taking the wrong locks during transactions. Or perhaps an epic fail of Amazon’s databases after an incorrect type cast.

(сама цитата взята отсюда, выделение жирным Сергея Зефирова).

Теперь мне кажется, что агитация за функциональный подход вообще, и за языки типа Haskell в частности, недостаточно глобальна и фундаментальна. Если уж люди верят в способность Haskell-я предотвращать финансовые кризисы, то нужно еще объявить его самым лучшим средством по борьбе с парниковым эффектом. Нет… Это тоже мелко. Путь будет лучше средство от облысения! Вот! А еще лучше – эликсиром молодости! Да, вот это глобально и надежно! :)

Кстати, вот что говорит о проблемах с GMail некто Acacio Cruz, Gmail Site Reliability Manager:

Lots of folks are asking what happened, so we thought you'd like an explanation. This morning, there was a routine maintenance event in one of our European data centers. This typically causes no disruption because accounts are simply served out of another data center.

Unexpected side effects of some new code that tries to keep data geographically close to its owner caused another data center in Europe to become overloaded, and that caused cascading problems from one data center to another. It took us about an hour to get it all back under control.

В Интернете так же можно найти официальный отчет о произошедшем от Google: Gmail Incident Report.

2 комментария:

Анонимный комментирует...

А где-то уже видел этот цитируемый материал, по диагонали прочитал, подумал что кто-то прикалывается. Если нет, то действительно бред.

eao197 комментирует...

Думаю, что не прикалывается. Преувеличивает -- это да, но не прикалывается. А преувеличивает потому, что сам очень верит в то, что "правильный" инструмент является ключем к успеху.