February 2007

As a former Visual Basic/ASP classic developer, I live with a lot of guilt. I’m haunted by memories of sloppy designs and even sloppier implementations. The only mitigating factor is that it’s unlikely I will ever see any of that code again. Fortunately, that geek-guilt provides me plenty of motivation as a C# developer to get better at what I do.

The single greatest challenge I faced in the transition to .NET was learning Object Oriented Programming techniques. VB had rudimentary support for some OO features but nothing I ever worked on utilized that aspect of the language. For me, .NET was starting from scratch.

I have to admit that at first glance OOP appeared to be an exercise in academic counterproductivity on a grand scale. Where I could concisely write some functionality using a few methods, OOP would demand several classes, interfaces, and supporting infrastructure. All this overhead, it seemed, just reduces performance and makes the flow of control harder to trace. With tight deadlines and an established 2:1 ratio or greater of debugging time to coding time, who in his right mind would spend extra time adding code bloat that makes the application less performant? This went against everything I knew as a developer.

Fast forward a few years, and now I’m a faithful OO convert. What I didn’t realize back then was that OOP obliterates my 2:1 rule altogether. By working with well-factored systems I came to realize that debugging time is not a static, unavoidable side effect of coding. Maintaining clear separation of responsibilities among classes allows you to reuse code that you already know works well. Automated unit testing ensures that any breaking changes you make to existing code are identified quickly before they become obscured under layers of new development.

I wish Jeremy Miller had been mailing out post-it notes (or whatever it was people used to communicate before blogs) when I was going through my OO transition. In this post on orthogonal code, Jeremy leverages a real-life experience he had to demonstrate the power and value of refactoring to a better design. If you’re new to OO and still struggling to put the pieces together (and keep them there), bookmark that post and reread it once a week.


McDonald's Trash CansA TotalFark thread led me to this little gem this morning. It looked like a great candidate for an animated avatar so I went hunting for a way to save YouTube videos locally. This post clued me in to the Greasemonkey extension for Firefox. Custom scripts are available for Google Video and YouTube which add a bright red bar across the top of the page. When clicked the Flash file (.flv) will be saved to your default Firefox save location.

Of all the house-related things that broke this winter, by far the most alarming was the 36″ RCA in the living room.  As my wife is fond of pointing out it was replaced first despite 15 feet of fallen fence and an inoperable oven.  I know where my priorities lie and I’m OK with that.  Anyway, I replaced Big Grey with a Sony Bravia 46″ LCD and soon discovered that DirecTV’s signal looks horrible on it – much worse than with the old TV.  Some research confirmed that DirecTV and most cableco’s compress the video signal an ungodly amount, and it only appears acceptable on CRT sets because their native resolution is so low.

What, then, is a technophile with misplaced priorities to do?  My answer turned out to be Verizon’s FiOS service – fiber to the premises.  Not only can they send uncompressed video down the pipe, they also have crazy fast 15 megabit internet access.  All for the same amount I was paying to DirecTV and Time Warner.

It’s been about 2 months now and I still love FiOS.  The only problem I’ve had is, strangely enough, the same problem I had with satellite – airplanes.  I live a few miles north of one of DFW airport’s busiest runways.  When the wind is out of the south airliners pass right over the house at about 4000 feet.  The fraction of a second that they cut off the satellite signal was enough to cause a 2 or 3 second jitter in the signal. Nothing tragic, but annoying.  And now I’m finding the same problem to a lesser degree with FiOS.  About 1 or 2 seconds after a jet flies over, the signal degrades momentarily.

The only explanation I can think of is that Verizon’s satellite facility must be somewhere nearby and is also in line with the runway.  I called about it once and I’m pretty sure the guy thought I was crazy.  He said they haven’t had any other complaints about it, so either it’s localized to me alone or I’m just the only one to have made the airplane connection so far.

What got me thinking about FiOS in the first place was this article about FiOS customers getting access to Revver clips.   TV and the internet have been eyeing each other for years, but to me this is a big step towards fulfilling the prediction that they’ll eventually merge.

If you work with ASP.NET the information in this article on the ASP.NET Page lifecycle is invaluable. The author covers the HTTP protocol, IIS, how ASP.NET parses and processes a page, and finally the 8 events that span a page’s lifecycle.

Microsoft SQL Server 2005 Service Pack 2 was released today. Why do you care? Well, if you’re using the Enterprise version, you now have a new data type – vardecimal. It’s the same concept as varchars and it can save a lot of disk space if you’re storing low-precision numbers in high-precision columns. There’s even a new system proc that will estimate the space you’d save if you switched to the new type!

This article on drive-by pharming and default router passwords brought back painful memories of bygone events.

A few years ago I was an active moderator for the Fark.com message boards. To save some time I created a bookmark to link directly to a particular bit of functionality. The moderation pages are password-protected, but as with many sites I found that the page wasn’t particular about how the authentication info got there – POST or GET. I included my username and password in the query string of the bookmark and voila! One-click access.

This worked great for about a week until I received an email from Mike, the technical guru that makes sure the vast array of hamster wheels that power the Fark.com servers remain properly greased. It turns out I had used my shortcut enough that it appeared in the most popular links on the stats page… username, password, and all. For a brief time, everyone that looked at the stats page had instant access to a moderator login for the site.

Looking back it was an incredibly stupid thing to do. I single-handedly created a massive hole in the security system of one of the net’s most-trafficked sites! All to save a few keystrokes. This is the importance of remaining vigilant about your passwords. It’s easy to get lazy, and that laziness is what hackers like to exploit.

If you have a wireless router at home and you haven’t already done so, CHANGE THE DEFAULT PASSWORD NOW!

Yesterday I ran headlong into a bug in Visual Studio 2005 – most of my keyboard shortcuts quit working. It wasn’t just an annoyance; it stopped me in my tracks. No editing, no saving, no anything. I know that ReSharper takes over most of the VS keyboard mappings so I uninstalled it, with no luck. Some googling led me to a pretty simple workaround: run devenv.exe from the command prompt with the /resetuserdata switch. It’s not a fix but it’s good enough for now. Apparently this problem has been around for some time, so I guess I’ve just been lucky until yesterday.

Next Page »