Mitch Etter’s Weblog

March 2, 2009

I’m a father!

Filed under: Uncategorized — mitchetter @ 1:22 pm

On Saturday, Februrary 28, 2009 at 6:28 AM my wife Anna gave birth to Jacob Cole Etter. He came out weighing 7lb 5oz and 20 1/2 inches long. He’s very healthy. My wife is doing ok. They might be released from the hospital today.

baby Jacob

January 29, 2009

Coat Killed by Nerf

Filed under: Fun — mitchetter @ 9:55 pm

It was a tragic day today at the office when we found Tim’s coat lying on the floor dead. He appeared to be killed by a nerf arrow, but the coroner is still to release the offcial cause of death. We had little idea how troubled Coat was. He was clenching an empty shot glass, and a bottle of perscription medicine was close by. It is truly a sad day.

Coat Scene

Coat Scene

December 11, 2008

File Locking

Filed under: .NET, Programming — mitchetter @ 5:46 pm

I’ve been recently working on a web site that has a service to update data on a web site. The service watches an FTP directory for changes and processes any files that come up. Then after it’s done processing, it cleans out the directory, but when it would do that, there would be issues with locks on files sometimes. At first, I suspected that the IIS FTP service was locking the files for caching purposes. I disabled the caching in IIS to see if that would be the solution (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/f0cd5c87-fbc9-4ba0-9c2b-633c776b05d5.mspx?mfr=true). Nothing.

I finally figured out that one of the classes I was using to process the data was locking files. I was using the System.Drawing.Image class to resize images, and as it turns out, the class puts a lock on the image files its using. The locking issue would only come up every now and again depending on how fast the garbage collection would work. Luckily, the Image class implements IDisposable. Wrapping all my uses of the Image class in a using statements took care of the problem. It also reduced the memory that the process uses.

November 26, 2008

REST-ful CINNUG

Filed under: .NET — mitchetter @ 2:47 pm

Last night was the monthly Cincinnati .NET User Group (CINNUG) meeting. I really enjoyed it. Dan Rigsby gave an excellent presentation on using REST in WCF. It was the perfect blend of practice and theory. He even touched on URI rewriting and RSS/Atom feeds. Then, there was a separate presentation at the end about MS AZURE which sounded cool. At the very end, they gave away lots of cool stuff like software and an X-Box. I walked away with an MSDN subscription.

November 6, 2008

Baking

Filed under: Uncategorized — mitchetter @ 2:10 pm

For those who haven’t heard yet, my wife Anna and I are expecting our first child. The baby is due March 11th and has been in the oven about 5 months. We recently had the sonogram. It’s amazing what you can see. It showed him sucking his thumb and toe, yawning, and kicking mommy’s bladder. It also showed how proud he was being a boy.

November 5, 2008

Working with the query string in .NET

Filed under: .NET — mitchetter @ 8:31 pm

I often find myself having to build/parse a URL query string outside of the HttpRequest instance. In many cases in the past, I’ve written custom code each time I want to do this (using the string.Join and string.Split methods). I recently stumbled on a quick and easy way to do this without custom code. It all revolves around the System.Web.HttpUtility.ParseQueryString method. The parsing part is pretty obvious.

Building the query string is not so obvious. Under the sheets, .NET uses the HttpValueCollection class to deal with the query string parameters. It has methods to add and remove parameters, and the ToString method on this class builds the formatted query string. The class is internal (annoying, I know), so you can’t just call the constructor. The ParseQueryString method actually returns an instance of HttpValueCollection as a NameValueCollection. To get an empty instance of the HttpValueCollection, just call HttpUtility.ParseQueryString(string.Empty). You can then add your parameters and call ToString to get the resultant query string.

August 22, 2008

Being a Coverage Nazi

Filed under: Programming, Testing — mitchetter @ 9:11 pm

Lately, I’ve been trying to promote automated unit tests at my company. The reception hasn’t been warm to the idea. It seems like I’m the only one that understand its importance. I’m planning to do a formalized lunch-and-learn to further convey this importance. But in the mean time, I noticed that you can configure CruiseControl.NET to fail builds if the code coverage falls below a certain percentage. I wrote some initial tests, configure cc and set the required coverage percentage right below the coverage generated by my tests. I hope this gets developers to start writing tests.

April 22, 2008

Bit of humor

Filed under: Uncategorized — mitchetter @ 4:13 pm

Here’s a bit of humor:

http://artlung.com/smorgasborg/how_to_tick_people_off.shtml

I can honestly admit that I’ve done several of these

March 20, 2008

Six Degrees

Filed under: Uncategorized — mitchetter @ 1:44 pm

I’ve started a profile on LinkedIn.com. This reminds me of the old adage that there are only six degrees of separation between any two people. Wikipedia can elaborate more. It’s very interesting seeing who is linked to whom. If not anything else, it’s a fun experiment.

March 19, 2008

Sexy Extensibility Patterns

Filed under: .NET, Programming — mitchetter @ 7:13 pm

Last Wednesday, Miguel Castro came and talked at the Cincinnati .NET User Group about “Sexy Extensibility Patterns”. The “sexy” part is there to emphasize the coolness of what’s being accomplished. It was very interesting. He talked about three methods to extending current applications without extensive code changes: providers, plug-ins, and modules. I use providers heavily to swap out data access code to isolate business logic for testing. I’m not sure where I can use plug-ins and modules (other than IHttpModule) yet.

Older Posts »

Blog at WordPress.com.