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

/**
* 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.
*
*/
|
</> |