Thursday, June 28, 2007

I was browsing around a few days ago and came across a link to a blog post on the SAPIEN website about searching live.com from PowerShell. Sounds cool, I think, so I download it to try it out only to be thwarted by the proxy at work.

There are a lot of scripts out there that use the System.Net.WebClient and the vast majority don't take proxies into account. To get around this issue, here's a simple script that I wrote to help out:

function Get-ProxyWebClient {
    $webclient = New-Object System.Net.WebClient
    $proxy = New-Object System.Net.WebProxy($global:ProxyUrl, $global:ProxyPort)
    $proxy.Credentials = (Get-Credential).GetNetworkCredential()
    $webclient.Proxy = $proxy
    return $webclient
}

This script makes the assumption that you've already predefined the $global.ProxyUrl and $global.ProxyPort variables in your profile. It is also nice for me because it prompts me for my credentials instead of having them hard-coded in the script or in my profile.

Now I can also check the weather from PowerShell using the Show-Weather script that the guys at SAPIEN provided in their über-prompt post.

posted on Thursday, June 28, 2007 11:39:11 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, June 21, 2007

I have so many books I need to read right now, it isn't even funny. In my office at home, I've got about 8+ books which I need to read, and the majority haven't even been started yet.

One of them is Martin Fowler's Refactoring, which I'm really looking forward to. I've started ASP.NET MVP Hacks, which is pretty good. I'm only up to chapter 3 or 4, but I've already seen a decent overview of the provider model that ASP.NET uses.

At work, John Robbins' Debugging Microsoft .NET 2.0 Applications and Bruce Payette's Windows PowerShell in Action are sitting on my desk. I haven't yet started the PowerShell book yet, but I've gotten a little ways into the debugging book.

I just read a funny story that John Robbins provides in his debugging book about having what-if sessions during the project planning phase. He notes that in his prior job as a member of the Green Berets, they would have what-if sessions to plan for any and all contingencies. They're lives were on the line after all. 

He pointed out that, after moving to software development, he could get his development team really uncomfortable by asking what-if questions like, "what if Bob dies before we get through the requirements phase." I'll have to remember to ask some "what-if-death" questions at my next team meeting...

posted on Thursday, June 21, 2007 7:19:01 AM (Central Standard Time, UTC-06:00)  #    Comments [0]

/n software has a promotion going right now where you can get a free Powershell sticker from them. I haven't been so excited about stickers since elementary school!

Now to figure out where  to put it...

posted on Thursday, June 21, 2007 7:03:26 AM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Tuesday, June 19, 2007

I just completed the Classic Mistakes survey from Construx. Thanks to Jeff Atwood for pointing this one out.

The survey itself didn't seem particularly helpful, but the questions it poses do help in enumerating many of the problems I've experienced by actually putting them into words.

It also is beneficial to me because some of these mistakes stem from the developers instead of the management. I've been guilty of developer gold-plating and the silver-bullet syndrome many times, which is likely a result of being a beta junkie. We're in the process of moving to .NET 2.0 (no, not even .NET 3.0 or 3.5 yet) and I'm already jumping to move to Visual Studio 2008 (formerly Orcas). I mean, surely WPF, Linq, and WCF would solve all of our problems wouldn't they? Or, if we suddenly went 100% with Test Driven Development, all of our problems would disappear! Wouldn't they?

Sam Gentile's comments on writing maintainable code are very relevant to silver-bullet syndrome. He points out that the XP methodology revolves around 12 practices and not TDD by itself. TDD isn't a silver bullet but instead is a tool to help document and protect your codebase. You also have to work at refactoring your code and keep it clean and simple.

I haven't ever worked in an XP/Agile environment before, but I do like the goals that it strives for. I'm really pushing my team to learn more about architecture, design, and unit testing because I really do see the value. We really have to just start using these tools. Otherwise, we'll keep talking about them and never actually do anything.

Thank goodness for all these tech blogs. I've learned more from reading these in the past couple of years than I have from just about anything else. It's almost like I'm being mentored by all of the more experienced developers.

posted on Tuesday, June 19, 2007 8:52:51 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, June 12, 2007

Last night, I installed the Orcas Beta 1 release. Aside from just a couple of issues, the whole process went quite smoothly. One of the issues I had already seen before involving finding the rmt9x.mst file and mounting ISOs. My other issue was with the install speed, but that is when I realized I had mounted the ISO from one drive just to install to another. As a result, I was completely missing out on some of the performance that my 10,000 RPM Raptor drive could provide. To rectify the issue, I mounted the ISO on the drive I was installing to and everything else was great after that.

I haven't really coded in it yet, but the application itself sure seems snappier. I'm talking about toolbar menus and the general responsiveness, which is very nice. Has anyone else noticed an increase in speed for Orcas from 2005?

posted on Tuesday, June 12, 2007 6:54:57 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, June 11, 2007

In case you haven't heard, Apple has released a public beta of Safari, which is their web browser.

The surprising news is that it supports Windows.

David Mohundro

I have to admit that this is a really good move for Apple. Their software has been intriguing me quite a bit lately, and watching John Lam demo Silverlight on a Mac certainly doesn't make me not want to try it out for myself. My only experience with Mac OS X is via tech support while I was in college. We had an iMac desktop in the office for the rare occasion when a Mac user would call in asking for help getting their LAN connection set up (note, the rarity had more to do with the lack of Macs on the network than the lack of problems). The system ran quite slowly because it didn't have enough RAM and it didn't have any software on it. The dock was pretty cool, but it didn't seem to add much value at the time.

Things seem to have changed, though. I would really, really, REALLY like to try out Quicksilver. The Parallels software looks really cool, too. I like Windows too much to switch, but the capability to run both Windows and OS X side by side is very attractive. Everybody seems to like TextMate a lot, too. I do wonder sometimes if I just want Windows ports of these programs or if it really is OS X that seems so nice.

For the time being, I'll probably still stick with Windows Vista. I just like using custom hardware too much to lock myself into Apple hardware right now (that, and I hate not being able to resize windows from the top). If they ever come out with a virtualization option to run OS X on Windows, I would probably give that a try. I would encourage you to check out HardOCP's 30 Days with Mac OS X article if you've been curious what running OS X might be like.

posted on Monday, June 11, 2007 1:55:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, June 06, 2007

For the past month or so, my internet connection at home has been dropping constantly. There hasn't really seemed to be any rhyme or reason to it either. What's interesting is that one of my neighbors with a similar network setup was experiencing similar behavior.

I decided to take this as an opportunity try out some new firmware for my router (a Linksys WRT54G). I first decided to check for updated official firmware. Luckily enough, there was some updated firmware, though it wasn't what I would call current (i.e. 2005).

Taking a failure to update as a bad sign, I instead took Scott Hanselman's advice and decided to try some alternate firmware. So far, it is working with flying colors and my router suddenly has all sorts of new functionality. It is a little frustrating that the hardware could support this out of the box, but the firmware wouldn't allow it.

Here's what the web administration tool looks like with the DD-WRT firmware installed:

DD-WRT - Setup - Mozilla Firefox

Much snazzier than the "official" firmware.

If you're interested in trying out DD-WRT, look no further than http://www.dd-wrt.com/. I was able to find plenty of resources online for getting DD-WRT working, too. Hopefully, this will fix some of the connection issues I've been having.

UPDATE - Interestingly enough, Lifehacker named DD-WRT their number two network utility of their top 10 network utilities.

posted on Wednesday, June 06, 2007 8:48:04 PM (Central Standard Time, UTC-06:00)  #    Comments [0]