December 2008 Entries

Your Developer Horoscope

Aries (March 21-April 19): Avoid committing yourself to the next project at work. It’s going to become a death march, and you know it. Save your skills and energy for some open source hacking. Taurus (April 20-May 20): You’ve been flirting with functional programming and now it’s time to take the plunge. Free your soul of side-effects and embrace a monad. It will make you feel good. Gemini (May 21-June 21): You are entering a period of introspection. For pair programming, it’s best to hook up with Cancer. Avoid Pisces, because you know you’ll bicker over inheritance...

Units of Work

The Unit of Work (let’s call it UoW) is another common design pattern found in persistence frameworks, but it’s new to many .NET developers who are just starting to use LINQ to SQL or the Entity Framework as the “new ADO.NET”. First, the obligatory P of EAA definition: A Unit of Work keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work. Please think of a “business conversation” if the phrase “business...

XM Radio Player Part III : Choices

WPF, AJAX, or Silverlight RIA?I gots more options than a block of Velveeta.XBAP? XCOPY? XAP files are just ZIPs!Let me run my bits on your silicon chips. When I started to think of what my XM Radio Player would look like, I could only picture two things: Rectangles with rounded corners. Gradient color fills. Given this detailed initial vision I knew I had to pick WPF. What about Silverlight? I considered Silverlight, but three factors kept me away. One issue would be the cross domain calls to the XM Radio domain. Although XM does put a...

Identity Maps

There are a couple of important patterns in play when you use a persistence framework. These patterns have been around for quite some time but are relatively new to .NET developers who are jumping into LINQ to SQL and the ADO.NET Entity Framework. The first of these patterns is the Identity Map pattern. There are various aliases for this pattern. Some frameworks call it the “identity cache” while others have an “entity uniqueing” implementation. Using examples as tests, we can describe its behavior with a passing test (the code is written with the Entity Framework, but you could substitute...

XM Radio Player Part II : Scraping

Just to make sure everything was as easy as it looked in Fiddler – I wrote a quick and dirty piece of throwaway code to see if I could programmatically  login to XM and play a stream of music with Windows Media Player. It was ugly, but …public void Can_Start_Media_Payer_With_Xm_Stream() { var cookies = new CookieContainer(); // step 1: get auth cookie HttpWebRequest request = WebRequest.Create("http://xmro.xmradio.com" ...

Leeroy Jenkins in Software Development

The Jenkins video always makes me laugh. It’s the short and sad tale of a man who doesn’t have the patience for planning, nor the stamina for statistical analysis. He’s a man who leaps into action without thought of consequence. To Leeroy, there are no 50,000 foot views, no discussions, and … no tomorrow. In the video you can watch as Leeroy’s guild is decimated by dragons who take advantage of the chaos provided by Leeroy’s thoughtless actions. You might be thinking I’m going to liken Leeroy to the developer who writes 200 lines of untested code inside...

XM Radio Player Part I : Fiddling

I’ve had an XM radio subscription for a couple years now but I’ve never been entirely happy with any of the options for XM Radio Online. XM’s online player has changed very little over the years, and it is missing many simple features you can find in other third party players and real radio hardware – like artist and song notifications. A couple days ago I started to think about just writing my own XM radio player for the heck of it. The first step was to see what goes on between the browser and the server when streaming...

Scott Allen
Posts - 869
Comments - 4493
Stories - 14