Zi’s Blog


Text-xml

Posted in Tips n Tricks by zimakki on the July 24th, 2008

Just stumbled on this cool PowerShell method. Below is are a couple of examples of how I see myself using it:

73> ni -type file -value “<crap></xml>” -name “crap.xml”

    Directory: Microsoft.PowerShell.Core\FileSystem::C:\projects\depot\Test

Mode           LastWriteTime       Length Name
—-           ————-       —— —-
-a—    24/07/2008    19:36           12 crap.xml

74> test-xml .\crap.xml
False
75> ni -type file -value “<hello></hello>” -name “valid.xml”

    Directory: Microsoft.PowerShell.Core\FileSystem::C:\projects\depot\Test

Mode           LastWriteTime       Length Name
—-           ————-       —— —-
-a—    24/07/2008    19:37           15 valid.xml

76> test-xml .\valid.xml
True
77> test-xml .\crap.xml -ErrorVariable
Test-Xml : Missing an argument for parameter ‘ErrorVariable’. Specify a parameter of type ‘System.String’ and try again.
At line:1 char:35

+ test-xml .\crap.xml -ErrorVariable <<<<

 

This will help me out when I fiddling around with all the nAnt build scripts I seem to be playing with these days!

 

Technorati Tags:

25th June 08 - London .Net User Group Event

Posted in London .Net User Group by zimakki on the June 25th, 2008

Where

Conchango
36 Southwark Bridge Road,
London,
SE1 9EU

 

When

25th June 2008 @6.30

 

What

We are going to have two speakers, Ian Cooper and Ben Lamb. Ian is going to be talking about CRC cards. Below is a description of what Ben is going to be talkin about.

How to Write Crap Code in C# - Anti-Patterns for Performance
Most developers want the best possible performance from their code. Inspired by the idea of “proof by contradiction” this talk looks at how to write slow code and how the .NET platform, Windows and the processor will try and sabotage your efforts. A variety of techniques for inefficient coding will be covered including:
Flow control with Exceptions
Abusing Threads
Misuse of the Heap

It’s one man against some of the brightest minds in Redmond, seeking an answer to the question “How Slow Can It Go?”

London .Net Event - 23rd April

Posted in London .Net User Group by zimakki on the April 22nd, 2008

DDD UK - Nov 22nd!

Posted in Developer Day, DDD4 by zimakki on the April 22nd, 2008

We have a date!!! Put it in your diaries!

Technorati Tags: ,


12th March - DevWeek Dinner

Posted in Geek Dinners by zimakki on the March 11th, 2008

I am at DevWeek this week and will be organising a dinner on Wednesday 12th March. Microsoft is going to be giving me lots of free licenses of Visual Studio 2008 to give away or install on the night!

Everyone is welcome. Please log onto the wiki for more details and to sign up.

Let me know if you have any problems.