January 2007 - Posts
PowerShell puts the fun back in scripting and it's horrfying but every now and again I'm forced to write a good old batch script. Batch is good enough to get most jobs done it's just not as "fun" as PowerShell. Recently it came up in an internal alias
Read More...
Writing a proper serialization mechanism is ofter very difficult. The problem is most people don't realize this because it just works in their application and .Net makes it very easy to do. A lot of the problem is not understanding what factors you need
Read More...
Web Application projects are a new project type in Visual Studio 2005 SP1. It almost all of the niceties of the web projects with the semantics of being contained within a class library project. I like the feel of them and do all of my web app development
Read More...
An item I try to avoid in any API I create are methods which ... Take more than one parameter One of the parameters is a boolean Typically this pattern indicates a True/False option on an operation type. This boolean value turns on or off some type of
Read More...
Here's a handy PowerShell function I used to determine if I'm currently running as an Administrator in PowerShell # Determine if I am running as an Admin function AmIAdmin() { $ident = [Security.Principal.WindowsIdentity]::GetCurrent() foreach ( $groupIdent
Read More...
Scripts often need to dynamically find out what directory they are executed from. In CMD scripts this is done by %~dp0. For powershell the following will do the trick. split-path -parent $MyInvocation.MyCommand.Definition When this is run anywhere in
Read More...
When developing an ASP.Net page I tend to pass a lot of data between pages. A lot of it comes from being fairly OO natured and wanting to have a page that displays a particular type of content. There are lots of articles detailing how to pass data between
Read More...
When deveploping windows forms app, it's important to understand the event lifecycle of a form. That way you know what code to put where to ensure it's loaded at the appropriate time. That being said I wrote a small app to detail the events in a basic
Read More...