You knew it was 'wrong' to define extension methods on object, didn't you...
http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx
Request for input from the Windows Workflow Foundation Team:
“The Windows Workflow Foundation (WF) team is looking for YOUR input to help us prioritize our efforts around designer re-hosting scenarios. If you're interested in helping us shape the future of this feature, tell us what you think by filling in this survey.
https://live.datstat.com/MSCSD-Collector/Survey.ashx?Name=WF_Rules_Designer_Rehosting_Blogs
The survey will close on Wednesday, March 19th 2008.”
I've become a believer in test-driven development, at least the part where you write the tests the code should pass _before_ you write the code itself. NUnit was a great tool for this -- and I loved seeing the green bar when all the tests pass.
Recently my team switched over to using VisualStudio Team System and converted our NUnit projects to VSTS test projects. As much as I like using NUnit, I like using VSTS even more:
- It's very easy to debug a test -- just set a breakpoint (no more Debug, Attach to Process…)
- It's easy to re-run only the failing tests
- Tests are run on multiple threads -- which sometimes speeds up the process considerably
We've also replaced NCover with the integrated code coverage; there's nothing like editing the highlighted code.
From the owners of both the BizTalk and Workflow Foundation rules engines:
Don McCrady now has a blog. He's the development lead for Windows Workflow Foundation's rules engine.
You might have tried writing a recursive Linq function and run into problems. For instance, the following doesn’t work because ‘factorial’ isn't defined when the right-hand side of the assignment is being evaluated:
//Error: Use of unassigned local variable 'factorial'
Func<int, int> factorial =
n => n < 2 ? 1 : n * factorial(n - 1);
However, because you’re writing a lambda expression with Linq, you can use the Y combinator, a function that takes your code and returns a recursive version. It’s a bit odd, requiring no little attention to understand, but it works well. For instance, using the Y combinator, you can write the following code:
Func<int, int> factorial =
Extensions.YCombinator<int, int>(
fact =>
n => n < 2 ? 1 : n * fact(n - 1));
And then you can call it as you expect, e.g., factorial(5) returns 120.
Intuitively, the Y combinator works by calling your function on itself. Its ideas are closely related to self-reproducing code. For details, I recommend either “The Why of Y” or “Fixed Point Combinator.” Though cool, the Y combinator isn’t a panacea for all recursion – as Arvind et al note: “While the existence of the Y combinator is mathematically fascinating, fixed points [like the Y combinator] do not provide a simple encapsulation of recursion. For example, we would like to be able to declare mutually recursive functions and data structures in such a way that their definitions are clear and readable; the need to re-shape such definitions as fixed points plays havoc with such an endeavor.”
Here is an implementation of the Y combinator for Linq that Mads Torgersen and I wrote, for both delegates and expressions. (The expression implementation will be a lot simpler when Linq provides an invocation syntax for expressions.)
BEA, CA, IBM, SAP, Sun, webMethods, and Microsoft have updated the WS-MetadataExchange (MEX) spec. It adds the ability to 'push' metadata along with an Endpoint Reference (of
eitherversion), and it replaces its locally-defined "Get" request-reply message pair with the one from
WS-Transfer.
From Why's (Poignant) Guide to Ruby:
"Think of it [the argument list] as an inner tube the method is pulling along, containing its extra instructions. The parentheses form the wet, round edges of the inner tube. The commas are the feet of each argument, sticking over the edge. The last argument has its feet tucked under so they don't show."
http://www.poignantguide.net/ruby/chapter-3.html
Demonstration of custom action types c/o my favorite rules PM.
Just in from one of the original BRE developers and my favorite rules PM: This sample shows the definition and use of a custom expression in the Windows Workflow Foundation rules engine. Custom expressions are used to model specific predicate types or functions and can be used directly in the rules object model and editors.