﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Eugene Burmako commented on Dense code</title><description>@Thilak
  
  
Debugging lazy LINQ-to-Objects queries is quite inconvenient in comparison with debugging regular collections. Yeh, you can still "enumerate the results", but it's an extra click/keystroke as opposed to watching a collection with a debug visualizer.
  
  
And, what's more important, you can't watch the result of partial application of a query, e.g. the result of lines 4 and 5, but not 6 on the screenshot above). The best what I can come with is to manually refactor subquery into a local variable, but this requires manual work tho R# can alleviate it significantly. Usually, one has to repeat this for a few times because it's rare to find a bug at the very first watch you perform.
</description><link>http://ayende.com/4268/dense-code#comment13</link><guid>http://ayende.com/4268/dense-code#comment13</guid><pubDate>Tue, 27 Oct 2009 10:29:45 GMT</pubDate></item><item><title>Ayende Rahien commented on Dense code</title><description>Rafal,
  
Yes
</description><link>http://ayende.com/4268/dense-code#comment12</link><guid>http://ayende.com/4268/dense-code#comment12</guid><pubDate>Mon, 26 Oct 2009 23:39:39 GMT</pubDate></item><item><title>anon commented on Dense code</title><description>Pls comment your code :)
</description><link>http://ayende.com/4268/dense-code#comment11</link><guid>http://ayende.com/4268/dense-code#comment11</guid><pubDate>Mon, 26 Oct 2009 18:37:20 GMT</pubDate></item><item><title>Rafal commented on Dense code</title><description>Is it Newtonsoft.Json?
</description><link>http://ayende.com/4268/dense-code#comment10</link><guid>http://ayende.com/4268/dense-code#comment10</guid><pubDate>Mon, 26 Oct 2009 16:29:23 GMT</pubDate></item><item><title>Thomas Skovsende commented on Dense code</title><description>Or let it pluralize "status" :)
</description><link>http://ayende.com/4268/dense-code#comment9</link><guid>http://ayende.com/4268/dense-code#comment9</guid><pubDate>Mon, 26 Oct 2009 15:50:31 GMT</pubDate></item><item><title>Ryan Roberts commented on Dense code</title><description>Andrew Peters has a port of inflector for .net 
[http://andrewpeters.net/inflectornet/](http://andrewpeters.net/inflectornet/).
  
  
</description><link>http://ayende.com/4268/dense-code#comment8</link><guid>http://ayende.com/4268/dense-code#comment8</guid><pubDate>Mon, 26 Oct 2009 13:34:42 GMT</pubDate></item><item><title>Thilak Nathen commented on Dense code</title><description>@Eugene
  
  
The code is perfectly debuggable. You realist the debugger allows you to step through linq statements even on vs 2008. 
</description><link>http://ayende.com/4268/dense-code#comment7</link><guid>http://ayende.com/4268/dense-code#comment7</guid><pubDate>Mon, 26 Oct 2009 12:32:43 GMT</pubDate></item><item><title>Jason Jarrett commented on Dense code</title><description>You might want to look at .ToList()ing the enumerabe variables, as leaving them as enumerable will cause "elements" and "attributes" variable to be re-evaluated each time you do anything with them (such as attributes.Count()) - this method may perform a little faster as well...
</description><link>http://ayende.com/4268/dense-code#comment6</link><guid>http://ayende.com/4268/dense-code#comment6</guid><pubDate>Mon, 26 Oct 2009 12:28:26 GMT</pubDate></item><item><title>Eugene Burmako commented on Dense code</title><description>Regarding pluralization. Some time ago I came across an article about pluralization for English: 
[www.csse.monash.edu.au/.../Plurals.html](http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html). Quite like it tbh.
</description><link>http://ayende.com/4268/dense-code#comment5</link><guid>http://ayende.com/4268/dense-code#comment5</guid><pubDate>Mon, 26 Oct 2009 11:49:49 GMT</pubDate></item><item><title>hitechnical commented on Dense code</title><description>Pluralize :) ... lol
</description><link>http://ayende.com/4268/dense-code#comment4</link><guid>http://ayende.com/4268/dense-code#comment4</guid><pubDate>Mon, 26 Oct 2009 11:47:31 GMT</pubDate></item><item><title>Rasmus Faber commented on Dense code</title><description>The Pluralize-method seems a bit naive. Try calling it with "boy" or "monkey".
</description><link>http://ayende.com/4268/dense-code#comment3</link><guid>http://ayende.com/4268/dense-code#comment3</guid><pubDate>Mon, 26 Oct 2009 11:39:48 GMT</pubDate></item><item><title>Eugene Burmako commented on Dense code</title><description>Yeah, quite scary, barely debuggable, but I vote for such style. Imho a drastic increase in the quality of both reading (conciseness = less to read, easier to understand) and writing (conciseness = less points to introduce an error) far supercedes these inconveniences. And after all most of the time it's only the signature that matters to this method's user.
</description><link>http://ayende.com/4268/dense-code#comment2</link><guid>http://ayende.com/4268/dense-code#comment2</guid><pubDate>Mon, 26 Oct 2009 11:30:20 GMT</pubDate></item><item><title>Tim Jones commented on Dense code</title><description>You could replace the "Count() == 0" conditions with "!Any()" for additional elegance :)
</description><link>http://ayende.com/4268/dense-code#comment1</link><guid>http://ayende.com/4268/dense-code#comment1</guid><pubDate>Mon, 26 Oct 2009 11:01:22 GMT</pubDate></item></channel></rss>