3 ms·
This times a million. The amount of shit I have to deal with where people have used it in criminal ways is unreal. Fine examples: .ToList() materialization mu
by meaty 14y ago
This times a million. The amount of shit I have to deal with where people have used it in criminal ways is unreal.
Fine examples:
.ToList() materialization multiple times in a call graph. Ok so the thread is eating 200mb of ram?!?!?!
Generic method hell.
complete lack of understanding regarding IEnumerable, ICollection, IList etc.
O(log N) that doesn't go bang until you stick a production dataset in it.
The specification pattern - bottled rape is the only way I can quantify this. Sounds great until you have 2500 specifications and are stacking them 20 deep and your ORM decides it has had enough of clauses (EF4 bug).
My favourite: junior developer turns up and says "I wrote this awesome linq query - come and look!". Get there: all of the above.
- taumeson 14y agoThese are great concrete examples that are very Linq specific. I cringed reading a few of them. The .ToList() materialization can easily be avoided by using a little skill, but the realities of late binding that don't show up until you hit production -- this can catch anybody.