by Mark Shiffer
27. October 2008 15:33
Microsoft recently announced a new initiative called Dev Labs. It appears to be essentially equivalent in concept to Google Labs. They post projects they've been working on and claim no responsibility for current or future outcomes (ain't life grand when you can just wash your hands of responsibility?).
Anyway, one of the inaugural projects is called Pex, and it looks like it could be a helpful utility. I haven't had a chance to use it yet, but would like to give it a try. The requirements look undoable at the moment though as I don't know how to get my hands on Visual Studio 2010 Team. Here's a description of the program:
Pex (Program EXploration) produces a traditional unit test suite with high code coverage. A parameterized unit test is simply a method that takes parameters, calls the code under test, and states assertions. Given a parameterized unit test written in a .NET language, Pex automatically produces a small unit test suite with high code and assertion coverage. To do so, Pex performs a systematic white box program analysis.
Pex learns the program behavior by monitoring execution traces, and uses a constraint solver to produce new test cases with different behavior. At Microsoft, this technique has proven highly effective in testing even an extremely well-tested component.
by Mark Shiffer
24. October 2008 22:43
I am currently reading "More Effective C#: 50 Specific Ways to Improve Your C#" by Bill Wagner and came across an interesting piece of syntax that I have not seen before. Below is an excerpt from the book.
Notice how the cast is used in the using statement. The neat thing here is that even if T doesn't support IDisposable, the code will still work, but if it does the object gets properly disposed off. That's nice!
[Begin Excerpt]
public void GetThingsDone()
{
T driver = new T();
using (driver as IDisposable)
{
driver.DoWork();
}
}
This may look a bit confusing if you've never seen that sort of cast in a using statement, but it works. The compiler creates a hidden local variable that stores a reference to the driver cast as an IDisposable. If T does not implement IDisposable, then the value of this local variable is null. In those cases, the compiler does not call Dispose(), because it checks against null before doing this extra work. However, in all cases where T implements IDisposable, the compiler generates a call to the Dispose() method upon exiting the using block.
[End Excerpt]
by Mark Shiffer
10. October 2008 18:34
Ran across this site that may come in handy for filler photos and such when creating web sites. It offers a great number of stock photos. The search engine is a bit slow, but for free stock photos it my be worth it.
PicApp is the name.
by Mark Shiffer
10. October 2008 18:22
Ran across this site and thought it was an interesting concept. Throw what you have in the kitchen at it, and it will suggest some recipes that you can make with what you have.
LoveFoodHateWaste
eb39b5ac-4d3f-4805-a368-d516091c4ed1|0|.0
Tags:
by Mark Shiffer
10. October 2008 15:38
Ran across a couple of tools to help with finding hotspots. I use these when I know I'll be traveling so that I can catch up while I'm on the go.
JiWire
and
AnchorFree
e7962fc0-4f4d-43f2-89e0-063a177b8238|0|.0
Tags:
Websites
by Mark Shiffer
7. October 2008 18:47
Republished here (from Channel 10) to remind me later:
You know what’s really annoying? When you go to print out something from the web but the site has no “print” button to reformat the website for the printed page. What you usually end up with (if you’re not careful about configuring the options after doing a thorough “print preview”) is a bunch of wasted paper as excess content like ads and page footers end up on separate pages. There should be a better way, don’t you think? Well, there is. A site called PrintWhatYouLike.com lets you simply plugin a URL and then click the parts of the page you want to print. You can also choose to get rid of things like the site’s background, images, or other hand-selected content you choose. In absence of a real print reformatting engine, this is the next best thing.