Congratulations Mono team!

Posted in Creating, Programming on January 21st, 2009

Having spent an undue amount of time in compiler-land over the last four months, I have nothing but respect for a team that acknowledges the shortcomings of their architecture, and so REWRITES IT.

Congratulations on the new release, mono team!

http://tirania.org/blog/archive/2009/Jan-20-1.html

Powershell Powers, Activate!

Posted in Living, Office, Programming on January 16th, 2009

Yesterday, I had a problem to solve. I didn’t want to stay at work until 9pm, waiting for another team’s process to publish a file. (Grossly simplified, but you get the idea). I also didn’t want to log in from home at 9pm in order to wait for it to happen (I did that the night before).

So I used Powershell! Could I have used a batch file? Of course! However, I know with Powershell I can just chain commands together via a semi-colon.
I searched for “Powershell sleep”, and saw immediately that there was, in fact, a Powershell sleep command: start-sleep.

My final commandline:
start-sleep -s 7000 ; GetFileCommand ; msbuild /t:clean,build

And I could just walk away, knowing it would be waiting for me when I got into today.

(That didn’t happen, but it was unrelated to the Powershell issue.)

However, that wasn’t my only use of Powershell yesterday. The MSBuild Project system defines a build through a series of linked .XML files. I uncovered an issue where a particular task wasn’t being completed as I expected. I could, through the wonders of “Find”, locate where I EXPECTED the work to be taking place, but in a 10,000+ line XML file, scrolling upward to find the parent is not entirely pleasant.

So I used code.

I read the XML into an XML object, then found the tag I was looking for. I then got an XML Navigator object for where I was in the document, and walked back up the tree until I found something identifiable (it turned out I was screwed). All told, it took me less time to puzzle out (via get-member) how to do so under Powershell than it would have taken for me to write a real program, or to find it by hand.

Here’s the entirety of what I wrote:
$xmldoc = [xml] [string]::join(“`n”, (gc -read 10kb Native.Build.targets))
$xmldoc | get-member
$xmldoc.GetElementsByTagName(‘Internal_LinkOutputFile’)
$xmldoc.GetElementsByTagName(‘Internal_LinkOutputFile’) | get-member
$xmldoc.GetElementsByTagName(‘Internal_LinkOutputFile’).Item(0)
$xmldoc.GetElementsByTagName(‘Internal_LinkOutputFile’).Item(0) | get-member
$nav = $xmldoc.GetElementsByTagName(‘Internal_LinkOutputFile’).Item(0).CreateNavigator()
$nav
$nav | get-member
$nav.MoveToParent()
$nav
$nav.MoveToParent()
$nav

There was an awful lot of get-member calls, but I didn’t need to know ANYTHING else.

Yay Powershell!

Was I too mean? (long, rambly, and techy)

Posted in Blog, Creating, Programming, Website on November 5th, 2008

I recently transitioned my blog from a LAMP stack at 1and1.com (who I was happy with) to a Windows/IIS7 stack at GoDaddy.com (which was cheaper, and more importantly, Windows-based). At both locations I had multiple domains registered with the same account.
Read the rest of this entry »

What do you want your Server do?

Posted in Creating, Office, Programming on August 23rd, 2008

Partially as a learning exercise, and partially because I’m a money grubbing greedy bastard, I’m trying to come up with a clever extension to Microsoft Windows Home Server.

Unfortunately, I already had pretty much everything I needed on the base installation; I had originally installed it purely to have a system I could hook up my parallel printer to. It already supports remote desktop to systems within your local network, as well as remote access to files on the server via secured login. Heck, it even provides dynamic DNS service, complete with chained certificates for secured access. Nice, huh?

I figure most people out there do NOT have WHS installed. Probably have no need for it. So, why don’t you let me know what would make you want a Windows Home Server? If you have one, what feature do you wish it had? If you could have your own personal secured web server, what do you really wish you could do on it?

REQ: Help from the programming types

Posted in Programming on August 28th, 2007

I could post this to a programming discussion list. However, I’d rather not look like an idiot to anyone who doesn’t already know me to be one, at least at first.

Read the rest of this entry »