0 comments suggest edit

Stewie This is old news, but I am so glad that the Family Guy is “uncancelled”. It truly is of “The Simpsons” caliber of humor.

The irony of my statement is that we pretty much don’t watch TV any more. Instead I look forward to new seasons appearing on DVD (and thus in our Netflix queue). We watched a DVD of old Family Guy episodes last night and I nearly burst a vein from laughing. I’m a very physical laugher.

My favorite character (shown) is the diabolical baby Stewie. He’s also the source of my favorite quote in the show so far.

Damn you vile woman, you’ve impeded my work since the day I escaped your vile womb.

0 comments suggest edit

I’m feeling a little uninspired to write anything interesting because my hands are hurting from the keyboard pounding I’ve been doing. Instead, I thought I’d dig up this really simple (and hopefully useful) AddressInfo class for you. The code is extremely basic, but it might save you the hassle of typing all fifty states (and some territories and the District of Columbia) and their two letter postal codes into your own class because I did it for you! Free of charge!

If I save one hand out there, my work here is done. The basic premise is this, the U.S. isn’t adding states to the union very often, so it makes sense to have the list of states and state codes as an enumeration rather than a lookup table in the database. Makes it easier to re-use that information not to mention the speed. For example, here’s a snippet of one of the StateCode enum available in the class.

public enum StateCode


    /// <summary>Alabama</summary>


    /// <summary>Alaska</summary>


    /// <summary>American Samoa</summary>


    //,… Bunch of other states …,

    /// <summary>Wyoming</summary>



And here’s a snippet of the corresponding State enum.

public enum State


    /// <summary>AL</summary>


    /// <summary>AK (Home Sweet Home)</summary>


    /// <summary>AS</summary>



    ///,… Bunch of other states…,


    /// <summary>WY</summary>



The main AddressInfo class is used to hold an address, but isn’t all that useful nor interesting. The interesting methods are the static methods used to convert from state codes to states and vice versa. Here’s a couple examples of how you might use these methods:

// Get the state name based on the state code.

string stateName = AddressInfo.GetState(StateCode.AK);

Console.WriteLine(stateName); // Prints “Alaska”


// Get the state name based on the state code string

string stateCodeText = “CA”;

StateCode stateCode = AddressInfo.ParseStateCode(stateCodeText);

State state = AddressInfo.Convert(stateCode);

Console.WriteLine(state.ToString()); // Prints “California”

Let me know if you actually find this useful. The class itself can be downloaded here.

[Listening to: Psychedeliasmith / Give Me My Auger Back - Fat Boy Slim - On The Floor At The Boutique (4:21)]

personal, code 0 comments suggest edit

UPDATE: 2014/05/13 I lost it when I migrated it and honestly i don’t feel the need to have it up at the moment.

I put up an HTML version of my resume on my blog.

It has a slight bit more information than my Word resume which I think lends well to the online experience. For a moment I thought about using the Marquee and Blink tags all over and have animated dancing babies, but I don’t have the design skills to do that tastefully. I even forgoed adding Google and Amazon ads all over.

Since I’m now an independent consultant, I think it’s a good idea to have that sucker online, though I think my blog posts will give the potential client a better sense of my experience and abilities.

If you have suggestions for online resumes, let me know. I’ve thought about adding even more information in collapsible regions etc… in an effort to make it more “interactive” but I thought better of it. Maybe simplicity is best for now.

0 comments suggest edit

Brian had some sort of conference to attend, so I didn’t get to see much of him. But last Thursday he was at Venice Beach so I took a break from my work and drove out there. Soon enough, we got to doing that which all brothers must do when they haven’t seen each other in a while.

Brothers at the Beach

Yeah, real nice to see you too!

0 comments suggest edit

For some reason, I’ve always wanted to write a book. It started off as a desire to write the next Lord of the Rings classic, but has morphed into writing a reasonably useful technical book.

So after reading Mike Gunderloy’s 8 part “Advice for Writers” and Eric Gunnerson’s post “So You Want to Write a Computer Book”, I’ve come to the conclusion that it might be better for me to start off with a few print articles.

Ultimately I’d love to contribute an article to Wired (the best damn magazine on Earth…and beyond), but for now, I’m looking at various .NET technical journals and magazines. If you have experience writing for a magazine and have recommendations on publishers who were great to work with, please let me know.

0 comments suggest edit

So I spent a bit of time today to “refresh” the look of my site. On the face of it, it’s not a dramatic change, but under the hood, I tore out the table driven layout and replaced it with a CSS driven layout.

For you aggregator readers, take a look and let me know what you think?

And if it looks really wack, try a hard refresh (CTRL+F5) because the stylesheet may be cached on your computer. If it still looks wack, try drinking 6 beers in quick succession and let me know how it looks with beer goggles on.

I should also mention it looks better in FireFox than IE.

code 0 comments suggest edit

As part of my site’s redesign, I wanted to keep the drop shadow effect on the left and right borders of my main content area. No problem I naively thought, I’ll simply add two background elements to the main div. I named the div “background” like so:

<div id="background">

And in my style sheet, I tried the following:

    background: url(leftBorder.gif) repeat-y left;
    background: url(rightBorder.gif) repeat-y right;

Unfortunately this did not work as only one of the background images showed up. What I ended up resorting to was using two nested divs. The inner div would contain the main content and the right border while the outer div would display the left border.

<div id="backgroundLeft">
   <div id="background">

At this point, I needed the two divs to overlap each other just right. The inner div needed to align over the outer div’s right edge. On the left side, the inner div needed to expose the outer div’s left edge so that the background image would be displayed. Here’s the CSS I used.

    margin: 0px;
    background: url(leftBorder.gif) repeat-y left;
    width: 784px;

    background: url(rightBorder.gif) repeat-y right;
    margin-right: -11px;
    margin-left: 11px;
    position: relative;
    top: 0px;
    left: 0px;
    padding-top: 3px;
    width: 783px;

So my question to you CSS gurus out there (if any), is there a better way for me to accomplish this?

0 comments suggest edit

Ok, I’m in nerdvana. I got my 2 x 1GB PC 3200 DDR 400 cards today and my machine is noticeably snappier today. On a lark, I decided to open every application on my machine just for kicks. Ok, maybe not. But doing DotNetNuke development is no longer a pain for me.

0 comments suggest edit

I’m sure you’re constantly asking yourself this, because I certainly wake up every morning in a cold sweat wondering. When you add a new project in Visual Studio.NET 2003 (friends call her VS.NET), you get the following dialog

Add New Dialog \ The beginnings of another bug ridden coding section…

Now looking at that familiar dialog underneath the “Project Types:” section, you probably noticed the usual suspects are there: “Visual C# Projects”, “Visual Basic Projects”, etc… But did you also notice there’s a few other folders there such as “Visual C# Projects for DotNetNuke 3”?

Now for the million dollar question: How do you add your own folder there?

Reading through what I could find online, I understand how to use your .vsdir and .vsz files to create a new template, but I couldn’t find anything that described how to create your own project type grouping.

So I did a little digging through the registry and found the following registry location:


Just to make sure that adding keys to this location in the registry was sufficient, I brashly took Regedit (without even backing up my registry, an incredibly stupid thing to do), and created a new sub key, using SQL Query Analyzer and the newid() function to generate a new GUID for me. Under that key I added a sub key named “/1”. Under that key I set the following three values as seen in this screen shot.

Registry Settings \ Must this egotistical idiot use his last name in everything?

And here you can see the registry keys structure. The one I added is at bottom.

Registry Keys \ Ahh, “Haack” is nowhere to be seen. Forturnately it’s not a proper GUID.

So the next step is to create a VS.NET Setup and Deployment project to package my templates and add this registry setting automatically. Hope you can sleep peacefully now.

0 comments suggest edit

I will neither confirm nor deny that this is where I used to work before going independent. I’ll only say that they’ll be doing some interesting work with .NET and it’s worth checking out.

We are looking for Software Engineers. If you have a minimum of 3-5 software development experience - including at least 2 years of C#, ASP.NET and SQL Server and if you are interested in a position in Los Angeles (right near Miracle Mile) please post a comment.

[Via wagnerblog.com]

0 comments suggest edit

fire hose In my post entitled Drinking From an RSS Fire Hose I dealt with some of the issues surrounding the flood of incoming RSS entries within an RSS aggregator raised by Dare’s post “Nightcrawler Thoughts: Thums Up, Thumbs Down and Attention.xml”.

The Keep It Simple Stupid Solution\ Reading through some of the comments on both posts, I realize that for a great majority of users, a very simple system will satisfy their needs. One user mentioned that it’d be nice to be able to have items with specific keywords automatically marked as read. This is great if you’re tired of hearing about, say, Paris Hilton. Add the keyword “Paris Hilton” and no longer will you have to endure her name in your aggregator.

A Short Story\ I started to get a buttload of comment spam on this blog recently. I thought about using CAPTCHA, Bayesian Spam Filtering, etc… But in the end, I simply added a trigger modified from this one that simply blocks posts with a certain number of link. This resulted in a dramatic decrease in the number of posts about online poker and has been working quite well for me. At some point, I’ll probably need to employ more sophisticated tactics, but for the time being, this simple rule works.

Extensibily Model\ Personally, I think the initial solution isn’t a filter at all, but the extensibility model prototyped by Torsten.

Rules Engine\ On top of this, I’d probably build a simple rules engine plug-in similar to Outlook’s. For example, you might create a keyword rule associated with one of the following actions: Mark as Read, Flag For Review, Give Priority, etc… As my short story above illustrates (see, there was a point to it), a simple rules engine approach will often give you the 80% of the 80/20 rule.

The Goal\ The goal with this approach is to get something to the users quickly that will elicit feedback on what the pimped out “baysesian/collaborative/neural networked/throw dart at dartboard” filter should do. A collateral benefit is that users will inevitably create their own plug-ins (we hope) and we have the option to take the best ideas and integrate them as a first class feature.

[Listening to: So What’cha Want - Beastie Boys - Check Your Head (3:37)]

0 comments suggest edit

Did you read about the Chinese online gamer who stabbed a competitor after the competitor sold his borrowed virtual sword?

One phrase in the article caught my attention:

But other experts are calling for caution. “The ‘assets’ of one player could mean nothing to others as they are by nature just data created by game providers,” a lawyer for a Shanghai-based Internet game company was quoted as saying.

I don’t buy that argument as I told my friend Walter who wrote about this from a legal perspective. The argument that the “assets” of one player means nothing to others just because its virtual actually applies to all property, physical or otherwise.

If society in general decides that virtual assets are somehow inherently different than physical assets, then it behooves the gaming companies to create a microcosm of the real world within the virtual space. Think about it for a second. If I’m paying $20 to $40 a month (not to mention my time) to play some online game, I want to make sure that if someone swindles me of property that has real-world market value, I have some means for recompense.

Can you picture it? Using a portion of the online gaming fees, these gaming companies might neet do hire virtual police force where characters can resolve violations of the “law”. Likewise you might start a character to be a virtual lawyer to handle arbitration between characters. Heck, I’d probably create a character and provide consulting work within the virtual market

Look, your dragon slaying operations is suffering from bottlenecks at the weapons manafacturing plant. I’ve got some magic potions here that will integrate your Dwarven procurement system with an EERP (Elven ERP) system providing efficiencies in your supply chain. I can also build you a portal.

The problem with this of course is that a game world is not meant to be like the real world. For example most MMORPGs involve a lot of killing. Some even allow killing other characters. If my character were to kill your character and then take your stuff, should you be able to sue me for the real-world material value of your character’s possesions? That would certainly put a damper on the game.

I don’t think many game companies anticipated that virtual assets would command such real world market value and did not prepare for thes scenarios. It seems to me that they ought to require waivers from players indemnifying all other players and the company from any loss involving virtual assets. Either that, or put an in-game arbitration system in place and have players sign waivers stating they agree to resolve disputes via the in-game system first.

0 comments suggest edit

Forgive me, but I really need to rant about shitty customer service. I’ve been burned bad by misinformation from ignorant and/or misleading reps. This time however, it involves our credit card company, Bank of America.

We received one of those offers where we can take a $10,000 loan for 6 months with no APR. Since we needed a short term loan we thought, “Hey, we’ll take that, use part of it, put the rest in the bank, earn interest on it, then pay it back in 6 months.”

Does a six month interest free loan of $10K sound too good to be true? We thought so. So we called customer service and double checked. We ran through various scenarios including asking,

So if we take this loan, and say make $1000 in purchases using our credit card, at the end of the month, if we only pay $1000 towards our credit card bill, we won’t have to pay interest, right?

The reply?


So we don’t have to pay the entire balance each month which would include this $10K loan, right?

That’s correct.

It’s a good thing we double checked today. It turns out in the fine print, “which we read multiple times”, there was this opaque clause that now makes sense since I know what it means:

By making a balance transfer and/or using these checks, you understand that future payments will be applied to Promotional balances prior to any existing or new regular balances on the account.

So simply put, if we take the loan, and make $1000 in purchases, and then pay $1000 towards our bill, we’ll now have $9000 as an interest free loan and a $1000 balance generating tons of interest.

Now you might say that’s what you get for not reading the small print. Perhaps. But it bothers me that the amount of effort they put forth into making the message clear that this is a “0% Promotional APR for 6 months!!!” dwarfs the effort to make the big catch very clear.

It was obvious to me that they want consumers to take the loan and then not be able to pay it off at the end of 6 months because they want interest paying customers. But I figured we’d be safe if we paid it off in 6 months. Not so. What infuriates me is that we called customer service and they egregiously misinformed us (which is a pattern with some other financial institutions I’ve dealt with).

In any case, we’ve figured out an easy way to take advantage of this offer and get a $10,000 loan free for 6 months. Simply take the loan with no balance on the card and stop using that credit card for 6 months till you pay it back. Use another card. I think it’d be great if thousands, nay millions, of people did just that and sent a big “Fuck You” to B of A. But that’s just me being vindictive. Not to mention I’d have to get a Slashdot sized crowd to read this. ;)

Ok, rant over. Thank you for your patronage.

0 comments suggest edit

Jason Clark enlightens us on creating a stable application entry point at the wintellect blog. I highly recommend reading the whole discussion, but one of the key takeaways is…

A Stable Entry Method

Fortunately it doesn’t take too much effort to make your entry method stable. Here are some guidelines:

  1. Avoid type-loads of any kind in Main. Main should only call methods implemented in the same type definition.
  2. Do not implement a static constructor in the type that contains Main. (Avoiding static fields entirely is the safest way to go).
  3. Derive the type that contains Main from Object. This means that you need to hoist Main out of the type definition for your main form if you use Visual Studio .Net wizards to create your project.
  4. Keep the type that contains Main focused on getting your application started. Don’t think of it as the “Application” type that holds your application-level state.

[Via Wintellog]

0 comments suggest edit

I’ve been playing with DotNetNuke at home and after an hour or two, VS.NET 2003 is typically using up around 150 to 200 MB of RAM as well as 200 MB of virtual memory. Web development on VS.NET is a big memory hog when the project size gets large enough.

Since I’m running on a paltry 512 MB of RAM (since when did 512 MB of RAM become paltry? I spent $99 to upgrade my Amiga from 512 KB of RAM to 1MB, but I digress) I thought it’s about time to upgrade my system.

Looking at prices today, I found a nice deal on a 2GB Kingston kit (2x1GB) for $278.98. Not a bad price, eh? I’m wondering if 2GB is just plain overkill. Then again, if I run some virtual pc instances, I might want that extra memory.

Compare this to a Kingston 1GB kit (2x512MB) for $94.48. 1GB is a lot cheaper. I should mention that I have a 800 MHZ FSB so I’m looking at PC3200 DDR 400 memory cards.

Oh, and this post is my new personal record for number of acronyms in a post.

[Listening to: Sapphirecut - Free your mind - Danny Tenaglia - Back To Basics (CD2) (5:45)]

0 comments suggest edit

Good ideas get coopted. That’s what they do. For example, JUnit was coopted by the .NET community and ported into NUnit. However in NUnit 2.0, the .NET community innovated with the usage of attributes.

Now Java has caught up with TestNG (thanks to Kyle for pointing me to this). With the brand spanking new version of Java out there (JDK 5.0 aka Tiger), Java now has Annotations. This is pretty much equivalent to Attributes in .NET. TestNG takes advantage of Annotations and builds a unit testing framework around them that looks quite familiar if you regularly use NUnit 2.*.

And I’m certain both these platforms have borrowed ideas from even older platforms.