Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×

Comment: Re:Just a second, here... (Score 4, Insightful) 1055 1055

I work 40 hours, an hour lunch break included, and do .NET development work at a major company. This isn't to say that there aren't deadlines where you might work longer, but they're pretty rare. I find that I get more done with the 7 hour workday than I do with a 10 hour day. I'm more focused and not pissed about all the time I'm wasting at work.

Comment: Re:You know..... (Score 0) 224 224

You probably won't read this since its later in the day, but here goes. I just wrote an xml validator in linq today. This xml has multiple nested nodes. In less than 100 lines of code, I wrote a class that validates that my schema (which is arcane), that all of the numbers match up (100 in the results tag means I actually have 100 results), and counting the number of results. I did this by counting the number of semicolons. Now, you can count the number of semicolons by a loop over the character array, or int semi = myhugestring.tochararray().where(p => p == ';').count() You might be able to do this in less code with regular expressions, but it wouldn't be so readable. In addition, say instead of a string, I had a var of xml elements. That var would not be populated until I execute my count code. And then, it iterates over the in memory collection and gets me exactly what I want. It does not build a separate list and do a search. If your xml is huge (as mine is), this greatly reduces the memory footprint. Finally, LINQ provides a well defined expression tree. This means that future version of the framework will be able to determine what is parallelizable and then do it. Currently, C# doesn't really offer parallel constructs (in release), and its really hard to write parallel code anyway. This will take the load off of the programmer. Hope this helps.

Memory fault - where am I?

Working...