.Net Technical
Random NUnit Tip
Often when writing NUnit tests I find myself wanting to output some stuff to the Console in order to make sense of a failing test. But, you don’t want the console window filling up with rubbish when the test is passing, so instead of doing this…
public void DoesSomething()
{
string expected = “some expected result”;
object someObject = new SomeObject();
string actual = someObject.DoesSomething();
Console.WriteLine(expected);
Console.WriteLine(”—-”);
Console.WriteLine(actual);
AssertEquals(”SomeObject should do something”, expected, actual);
}
you can do this…
public void DoesSomething()
{
string expected = “some expected result”;
object someObject = new SomeObject();
string actual = someObject.DoesSomething();
try
{
AssertEquals(”SomeObject should do something”, expected, actual);
}
catch(AssertionException)
{
Console.WriteLine(expected);
Console.WriteLine(”—-”);
Console.WriteLine(actual);
throw;
}
}
Then the Console output only shows up when the test fails. Nice.
Excel…lent
Generating an Excel file from .Net should be easy right? MS have good reason to have you using their formats as the de-facto standard and make it easy, huh.
Nope. Not really.
It’s a bit trickier than you might think.
Jet Brains ReSharper
Another C# refactoring tool crossed my browser windows today…
JetBrains ReSharper The Jetbrains C# plugin for Visual Studio EAP program is open: http://www.jetbrains.net/resharper The username and password are both ‘eapuser’.
I haven’t tried it yet.
Building a simple CMS XML Placeholder
I’ve just been down to see some guys in the middle of nowhere… Beautiful little office on a deer park, with views over fields and so incredibly quiet. A company called Torchbox who are getting up-to-speed with MS CMS.
While I was there the big question was why one of their placeholders wasn’t working, which I think we figured, but I also put together a very basic XML Placeholder control to act as a base for them. I thought it would be worth dropping it up here for the record.
XP Toolset for .Net
We’ve started doing TDD and Continuous Integration a bit more formally and have brought together a toolset to support this on the .Net platform. For reference this is currently:
Visual Studio.Net – IDE
Visual SourceSafe – Configuration Management
nUnit – Unit Test Framework
CruiseControl.Net – Continuous Integration Process
nAnt – .Net Build Tool
FXCop – Coding Standards validator
DevPartner Profiler – Performance Analysis and Test Coverage
Morgan’s Images
Morgan Skinner’s written up some nice stuff on color quantization, mapping using both a palette based approach and an octree based algorithm which is also very nice.
This follows on from work I did with him back in 2002, and adds to it.
Dynamic Image Generation
The .Net Framework has, like many frameworks and class libraries before it, some natty little features for drawing images and for saving or streaming them in different formats.
As part of getting to grips with C# I decided to put together some image generation routines for web based buttons, but discovered that it was not all as simple as it should be.
.Net Reflector
Morgan Skinner put me onto a very nice little toy today called .Net Reflector.
Basically, it uses reflection to scan through assemblies and list the namespaces, classes, methods and properties therein. Incredibly useful for scanning through the framework classes and finding the bits you need.
Search
What I'm Doing...
- @moustaki, would you recommend an equivalent to music ontology for visual recordings? 1 day ago
- @chriskeene Does the uni have it's own local weather system? (http://twitter.com/chriskeene/status/10314171215 and go left) in reply to chriskeene 1 day ago
- @_philjohn should I expect a late arrival then? in reply to _philjohn 1 day ago
- More updates...
Recent Comments
- Patents are Property – Like it or Not « Chasing the Power Curve on When Patents Go Wrong…
- Arizona Joe on Fixing a plasma TV
- alex_turner11 on Ground roundup of new eReaders at CES on CNN
- negative_charge on Hacking Into Your Account is as Easy as 123456
- infopeep on Hacking Into Your Account is as Easy as 123456
- BenenhaleyBrian on The 18 Mistakes That Kill Startups
- Brian Benenhaley on The 18 Mistakes That Kill Startups
- infopeep on The 18 Mistakes That Kill Startups
- Rob Styles on Ruby Mock Web Server
- Jim on Fixing a plasma TV
Categories
- .Net Technical (8)
- Blog on Blog (6)
- commands I have issued (9)
- Enterprise Architecture (19)
- event (4)
- Fiction Book Review (2)
- Food (2)
- Intellectual Property (9)
- Interaction Design (27)
- Internet Social Impact (43)
- Internet Technical (16)
- IP Law (10)
- Library Tech (19)
- Music (2)
- New Toy (4)
- Non-Fiction Book Review (7)
- Ontologies (6)
- Open Data (7)
- Other Technical (20)
- Personal (36)
- Random Thought (16)
- Resourcing (4)
- Review (1)
- Security And Privacy (11)
- Semantic Web (30)
- Software Business (10)
- Software Engineering (37)
- Talis Technical (9)
- Uncategorized (44)
- Working at Talis (26)
- [grid::blogpaper] (8)
- [grid::fatherhood] (4)
Archives
- February 2010 (1)
- January 2010 (4)
- November 2009 (10)
- October 2009 (4)
- September 2009 (2)
- August 2009 (9)
- July 2009 (12)
- June 2009 (5)
- May 2009 (6)
- April 2009 (7)
- March 2009 (3)
- February 2009 (6)
- January 2009 (10)
- December 2008 (4)
- November 2008 (4)
- October 2008 (9)
- September 2008 (23)
- August 2008 (8)
- July 2008 (1)
- June 2008 (1)
- May 2008 (6)
- April 2008 (14)
- March 2008 (3)
- January 2008 (5)
- December 2007 (6)
- November 2007 (13)
- October 2007 (9)
- July 2007 (2)
- June 2007 (1)
- May 2007 (10)
- April 2007 (5)
- March 2007 (11)
- February 2007 (10)
- January 2007 (13)
- December 2006 (8)
- November 2006 (8)
- September 2006 (2)
- August 2006 (1)
- June 2006 (2)
- February 2006 (2)
- January 2006 (3)
- December 2005 (3)
- November 2005 (2)
- September 2005 (2)
- August 2005 (5)
- July 2005 (8)
- June 2005 (3)
- May 2005 (2)
- February 2005 (1)
- January 2005 (4)
- December 2004 (3)
- November 2004 (6)
- October 2004 (2)
- September 2004 (2)
- August 2004 (5)
- July 2004 (1)
- June 2004 (4)
- May 2004 (4)
- April 2004 (3)
- March 2004 (13)
- February 2004 (6)
- December 2003 (3)
- November 2003 (1)
- August 2003 (2)
- July 2003 (1)
- June 2003 (2)
- May 2003 (1)
- March 2003 (1)
- January 2003 (1)
- October 2002 (1)
- May 2002 (1)
- March 2002 (1)
- August 2001 (1)
- May 2001 (1)
- April 2001 (1)
- January 2001 (1)
- December 2000 (1)
- November 2000 (1)
- December 1999 (1)
- November 1999 (1)
- July 1999 (1)