Пятничное, для software developers...

топ 100 блогов torontoru21.11.2014 Вот такой веселый комментарий я обнаружил сегодня в коде. как говорится it made my day...

/**
* This method uses the following algorithm: 1. Retrieve a list (paged)
* of unique user Id's corresponding with those whom the object
* has been shared with. 2. For each user Id, put the following into the
* result map: - specific projected user fields into the end result map.
* - retrieve and merge permissions that the user has to the case by
* querying the different sharing types.
*/

/**
* FIXME: To the developer who wrote the below code: what you've written
* below is one of the most insanely idiotic things I have ever seen. At
* no point in this completely assinine piece of code were you even
* close to anything that could be considered a rational thought.
* Everyone in our company is now dumber for having seen this. I award
* you a shitcanning, and may God have mercy on your soul.
*
* To anyone else, this method actually runs 7 queries per user id. 7.
* SEVEN. Per user.
*
* This is an example of how to write code if you want to get on my bad
* side. Please feel free to try to unhump this enormous pile of goat
* turds. Optimally, one or two queries per page of results. In the
* interim, points for reducing the number of queries per row.
*
*/

Оставить комментарий

Архив записей в блогах:
Фриденсрайх Хундертвассер – прямая линия погубит человечество Или зачем строить дом с разными окнами и кривыми полами Автор: Екатерина Новгородова Больше всего Хундертвассер любил волнистые линии и спирали. Любовь эта была настолько серьезной, что однажды он устроил в Гамбурге ...
Читать далее ...
Пилоты "Уральских авиалиний" верны традициям и снова сажают самолёты в полях. Этим утром в поле спланировал А320, следовавший из Сочи в Омск. Как сообщают авиационные Телеграм-каналы, в пути у самолёта отказала гидравлика (а што случилось, почему, у нас ведь безопасно летать?), и ...
Сергей Булгаков, Дневник 1923г. "Узнал по дороге, что Константинопольский патриарх признал англиканскую иерархию и фактически установил Interkommunion, столь же произвольно, сколь еретично и неканонично, и это, кажется, подтвердили «восточные патриархи», эти вечные статисты. В ...
Bryan Marvin P. Sola ...