header image

Archive for October, 2009

Hamming Distance

Posted by: | October 14, 2009 | No Comment |

Catching up on my reading I came across this post – http://blogs.msdn.com/powershell/archive/2009/09/20/what-s-up-with-command-prefixes.aspx which is a good explanation for why we should use command prefixes when creating cmdlets.  There is a reference to prefixes increasing the Hamming Distance of noun names. Not knowing what a Hamming Distance is I followed the link to http://en.wikipedia.org/wiki/Hamming_distance and found […]

under: Uncategorized

Date and Time

Posted by: | October 12, 2009 | No Comment |

I recently came across a script that used date and time information in this manner 001 002 003 004 005 006 $stuff =  "Stuff" $monthday = Get-Date -Format "ddMMM" $year = Get-Date -Format yyyy $time = Get-Date -Format "HH:mm:ss" $data = "$monthday" + "," + "$year" + "," + "$time" + "," + "$stuff" $data   This gives a result of 12Oct,2009,15:20:32,Stuff I didn’t like the way get-date was used three times – its messy .  In most cases it won’t make […]

under: PowerShell original

Categories