comments suggest edit

Chivas vs Osasuna soccer game

Went to watch a friendly between Chivas USA and Osasuna of La Liga (Spanish premier league) at the Home Depot Center Saturday night. Thanks to a soccer buddy Ed (who happens to work for Fox Sports World), Akumi and I were sitting in some pretty nice seats. Near the end of the rather unexciting game, we were invited by Ed’s friend to see the luxury suite. And when he said “THE” luxury suite, he wasn’t kidding. It was the stadium owner’s double sized suite right on the 50. Very nice.

code comments suggest edit

Saw this post on Consult Utah’s Weblog

Is anyone else getting tired of writting:

private bool _autoAccept;
public bool AutoAccept 
  get {return _autoAccept;} 
  set {_autoAccept = value;} 

I’ve pretty much decided that it is just preferable in these cases to just make the member variable public.  I’m am being bad?  ;-) 

My answer? I think he should be publicly flogged, smeared with tar and feather, and paraded around town in a pink tutu.

Ok, that might be a bit extreme. I don’t really believe that.

I think using a public field is fine in some cases. If the interface is unlikely to change. If you’re not writing library code. etc… If you can easily refactor it later if necessary. I’m not a complete and total purist about this.

Now before you OO purists get on my case, I’d like to point out that I always use full properties because I HATE FxCop warnings in my code. ;) Also, I have a nice little code expansion template in Resharper. I simply type


and I get a full expansion of the property, allowing me to fill in the type and private member name. You can see a description here.

Resharper also has an ALT+INSERT shortcut for generating code snippets, but I find my little expansion to be faster for me.

Although I’m not an OO purist nazi, I do think that the encapsulation benefits of properties are worth the trouble, especially when they aren’t much trouble.

comments suggest edit

A while ago I introduced you to Twiggy, our skittish Italian Greyhound. Well she’s no longer the skittish type. Skittish was so five minutes ago she tells us. Now she’s acting more like her full sized Greyhound cousins by being a total couch potato.

Especially now that I work from home and she’s free from her exercise pen during the day. Her main agenda item for the day is making sure to find a nice sunbeam to lay in as evidenced in this photo taken today.

Twiggy Finds Her Beam

She works very hard to stay in the sunbeam as evidenced by this photo taken two days ago.

Twiggy struggles for the beam

I’m trying to get her to pull her own weight around the house. She eats, sleeps, pees, and poos but doesn’t give anything back. So I tried to get her to write some code for me while I went to get a drink, figuring I could give the client a discount for work she does, but this is how I found her when I got back. Lazy dog.

Twiggy Sleeps On The Job

comments suggest edit

Firehose So now that you’ve subscribed to your 4000 feeds, how do you keep on top of the flood of incoming items? Dare talks about this, “the attention problem”, that faces power users of RSS (and ATOM) aggregators such as RSS Bandit.

Ideally a user should be able to tell a client, “Here are the sites I’m interested in, here are the topics I’m interested in, and now only show me stuff I’d find interesting or important”. This is the next frontier of features for RSS/ATOM aggregators and an area I plan to invest a significant amount of time in for the next version of RSS Bandit.

One way to think of it is that there’s a cacophony of content out there. You want an automated system to filter out the noise and allow through the music.

There are several difficulties inherent in any automated system designed to filter content based on your tastes and preferences. Often times, you don’t really know what you like till you see it. So how does the automated filter know if you’re going to like something or not? Well, you can train it by rating items. You can perhaps incorporate ratings of others. You can build rules about which content you like and dislike.

All of these methods run into the problem that your likes and dislikes tend to evolve and change over time as a product of your life’s experience and automated filters tend to narrow the items they allow through. If you set up hard rules for filtering data, you need to make sure to change them over time. A constant task of tweaking. If you’re using a system that requires you to train it based on an initial set of sample data, you have to make sure the training set is not to small or narrow. Otherwise the filter will only bring in items that meet some narrow facet of your personality. Collaborative filters are particularly prone to this problem. Think of how drab a lot of music on your mega-radio stations are today, a result of a gigantic collaborative filter. I doubt I could train a human to filter items for myself, much less an automated system.

This is not to say that filters can’t do a half-way decent job of being a personal editor. They can. The point here is that a really good filter has to allow a bit of noise through. My favorite radio station right now is KCRW, especially the show Metropolis. I don’t necessarily like everything Jason Bently spins, but I’m constantly being introduced to music that I’ve never heard of that I end up really enjoying. I believe that’s a result of a filtering system (human DJ) that allows some bit of noise through in order to expose listeners to new items.

Some noise is essential to a good content filtration system.

In any case, the effort to add filtration to RSS Bandit is of particular interest to me. Having studied Bayes theorem and read up a small amount on autonomous agent systems, I’m really excited about the potential for intelligent filtering in RSS Bandit. In particular, one method of filtering I like is creating de-facto editors via assignment. For example, like Dare, I read everything by Don Box. So I might assign a rule that always includes items by Don. But I might also go a step further and think that anything Don links to will probably be of interest to me, so I might state that everything he links to should be subscribed to automatically (perhaps based on my filtering rules based on how much I trust Don). Effectively, Don becomes an editor for my aggregator (without even knowing so). He becomes a content DJ.

comments suggest edit

In part 1, I bored you with excrutiating detail about how we keyboard shortcuts are implemented in RSS Bandit. In this second more exciting part, I’ll outline how to use a tool I wrote for editing shortcut settings. You can consider it sort of an unofficial RSS Bandit Power Toy. When we really nail down a nice UI for editing shortcuts, we’ll possibly add this as a configuration dialog within RSS Bandit. But for now, this is an experimental utility, use at your own risk.

To get started with the utility, download a debug version here.

First Time Usage\ Figure 1 shows a screenshot of the editor as it looks when you first run it (assuming you don’t already have a ShortcutSettings.xml file in your application data path). When you launch the editor, it automatically checks the default application data folder for a file named ShortcutSettings.xml. In this case, none was found so everything is blank.

Shortcut Editor - First Time \ Figure 1: Shortcuts Editor, no file specified.

Create a ShortcutSettings File\ The next step is quite simple, click on the Create button to specify a location to save a copy of the default settings file. The Save File dialog opens in the application data directory (see figure 2). This is where you’ll want to save the settings file unless you’ve modified your RSSBandit.exe.config file and specified a different location for RSS Bandit’s application data by adding an appSetting entry for “AppDataFolder” (generally not recommended).

Shortcut Editor Save Settings
Dialog \ Figure 2: Shortcut Editor Save Settings Dialog.

Modify Settings\ Once you click the “Save” button, you’ll see that the “Menu Shortcuts” and “Filter Shortcuts” are populated. Setting a menu shortcut is as simple as selecting the command you want to change in the “Command” droppdown and selecting a new value in the “Shortcut” dropdown and then clicking the “Set” button.

Setting Filter Shortcuts (PreFilterMessage method) works a bit differently. Next to the “Command” dropdown you’ll see a list of “Keys”. Each entry in this list corresponds to a <keyCombination> entry in the config file (as discussed in part 1). To add a new entry, click on the “Add” button which brings up a Shortcut Entry Form as in figure 3.

Shortcut Editor Entry
Form \ Figure 3: Shortcut Editor Entry Form.

This little form implements IMessageFilter itself, so when you click in the text area, it interprets your keystrokes and displays the keys you’ve pressed. You can specify a key combination by pressing the individual keys one at a time. For example, if you wanted a command to be invoked by pressing ALT+F4+F5 all at the same time, you’d type ALT followed by F4 followed by F5.

When you are satisfied with your key combination, click “OK”. This will result in a new key combination being mapped to the command as shown in the closeup in Figure 4.

Shortcut Editor Detail With New Filter
Entry \ Figure 4: Shortcut Editor Detail With New Filter Entry.

Saving Your Settings\ Finally, don’t forget to click the “Save” button to save your new settings. This will bring up a dialog (like the Create button did) allowing you to specify where to save the file. Feel free to save multiple versions of these settings files and share them with friends and family.

If for some odd reason, a change you make causes RSS Bandit to crash a horrible flaming death, merely delete the ShortcutSettings file or Create a new one and start from scratch.

Conclusion\ If you’re a keyboard control maniac, I hope this temporarily satisfies your thirst for being able to configure keyboard settings within RSS Bandit. As this is an ongoing project, there will be improvements and your suggestions will be taken into consideration.

comments suggest edit

Keyboard You might not know this, but RSS Bandit supports customizing keyboard shortcuts via an XML configuration file. The reason you might not know this is because it is an undocumented feature. Since I implemented adding customizability to keyboard shortcuts, I thought I might as well document how it works as of version

First, I’m going to delve a bit into how Keyboard shortcuts are implemented in RSS Bandit before I highlight a tool I wrote for modifying the settings without having to dink around with the XML. As you read this discussion, imagine that I’ve placed a

using System.Windows.Forms;

at the top of this article. (Or for you VB.NET lovers out there, an Imports System.Windows.Forms).

Methods of Handling Keyboard Events\ There are two methods for handling keyboards shortcuts in RSS Bandit. The first is by simply setting a Shortcut property of a MenuItem instance to a proper Shortcut enum value. Perhaps a very simple example will make it clear.

MenuItem item = new MenuItem();

item.Shortcut = Shortcut.AltF4;

In the above example, the key combination of Alt and F4 is mapped to a menu item. When the user presses the key combination of ALT + F4, that is equivalent to the user clicking on that menu item.

The second method is by implementing the PreFilterMessage method of the IMessageFilter interface on the main form.

This method allows us to intercept Windows messages (specifically keystrokes) before they are dispatched to a control or the main form. Here’s a snippet of the implementation of the PreFilterMessage method:

public virtual bool PreFilterMessage(ref Message m) {

    bool processed = false;

    const int WM_KEYDOWN = 0x100;

    const int WM_SYSKEYDOWN = 0x104;


    try {

        if (m.Msg == WM_KEYDOWN   m.Msg == WM_SYSKEYDOWN) {


            Keys msgKey = ((Keys)(int)m.WParam & Keys.KeyCode); … SNIP …

At the end of this snippet, you’ll notice there’s a variable named msgKey of type Keys. This is a bitmask of the pressed keys that we’ll use to determine which shortcut is being invoked. Make note of it as we’ll mention it again later.

Associating Settings to a Command\ Ok, so now that we have a rudimentary understanding of how the code can handle a keyboard event, let’s look at how we configure the settings. As you might guess, we have two ways to configure a keyboard shortcut based on whether it falls under method 1 or method 2. In both cases, a keyboard shortcut is associated with a command name. For example, the “cmdCloseExit” command closes and exits RSS Bandit. Since there’s a menu item associated with this command, we simply associate a Shortcut enum value to it.

For the command “GiveFocusToUrlTextBox”, however, we need to use the PreFilterMessage approach. So we specify a comma separated list of Keys enum values. In this case, we have two different key combinations mapped to that command - F11 or Alt + D.

App Data Path\ These settings are configured in a file named ShortcutSettings.xml. In a default installation of RSS Bandit, that file is compiled into the executable as a resource. However, you can override the default settings by placing a file named “ShortcutSettings.xml” (in the correct format) in the User Application Data folder for RSS Bandit. On my system the path is

C:\Documents and Settings\Phil\Application Data\RssBandit\

This file is a bit fragile, so be careful if you modify it by hand. It requires that every shortcut command have a definition. Below is an example that shows the structure of the shortcut settings file. You’ll notice that under the root <shortcut> node, there are two main nodes: <menu> and <keyboardCombinations>

<?xml version="1.0" encoding="utf-8" ?> 
        <shortcut display="true">
        ... more shortcuts ...
        ... more shortcuts ...

Now we get to the reason for that whole discussion of the two types of shortcuts. In order to configure a shortcut correctly, you need to know which type it is, which is easily done by looking at the existing ShortcutSettings.xml file.

Configuring a Menu Shortcut\ Configuring a “menu” shortcut is very easy. Just specify a valid Shortcut enumeration value in the <shortcutEnumValue> node.

Configuring a Keyboard Combination Shortcut\ Configuring a shortcut that’s invoked via PreMessageFilter’s a little more complex. First of all, it’s possible to have more than one key combination map to a single command. Hence the multiple <keyCombination> elements. For each <keyCombination> you can specify a comma separated list of valid Keys enumeration values.

One thing to note with the keyboard combination shortcuts is that it is possible (in some cases) to have the same key combination mapped to two different commands. This is because some commands are dependent on which control has focus. Unfortunately, the dependency of a shortcut on a control is not clearly mapped via the configuration file. That is definitely something worth looking into for a future release. The potential drawback to adding a controlname to the settings schema is the performance penalty of using reflection to determine if a control has focus. The potential benefit is that it may enable the code to be cleaner in the PreFilterMessage method.

Invoking a Command\ So now you’re ready to press a key on your keyboard, what happens next? Well in the case of a menu shortcut, that’s handled by the operating system. For the nitty gritty, check out this blog post. The menu items are assigned their shortcut value via the ShortcutHandler class I wrote. This class reads in the configuration file and a menu item is mapped to its Shortcut enum value by simply calling

public Shortcut GetShortcut(string command)

In the case of a keyboard combination shortcut (i.e. PreMessageFilter), things are a little more tricky. We have a big chain of if else statements that run through the commands and checks each command to see if it was invoked and if the control associated with that command has focus (see snippet below).

if (this.listFeedItems.Focused && _shortcutHandler.IsCommandInvoked(“CollapseListViewItem”, m.WParam))

The IsCommandInvoked method first extracts a Keys enum bitmask from the m.WParam value passed in, which represents the keys that the user has pressed and is equivalent to the msgKey variable described earlier (I told you I’d get back to it). Afterwards, it iterates through each <keyCombination> value associated to the command being checked and combines the comma separated values into a Keys enumeration bitmask. This bitmask is compared to the extracted bitmask. As soon as a match is found, it returns true, otherwise it returns false. In this manner, we can determine which command is being invoked by a key combination.

Ok, So How Do I Configure Keyboard Settings Without Mucking Around With XML?\ Well now that I’ve given you this background, which probably contains more than you’ll ever want to know about how keyboard shortcuts are implemented in RSS Bandit, I must defer to part 2 of this series where I describe a simple utility I wrote for setting up shortcuts.

comments suggest edit

Forgive me for not doing a thorough search for prior art, but I noticed this post by Oleg Tkachenko in which he’s in need of a decent server-side aggregation code base.

The reason it caught my attention is that “server-side” is my specialty. That’s where I’ve spent the great majority of my time in my various day jobs. But doing server-side work is like living underground. Every once in a while, you need to get cleaned up, shave, and poke your head aboveground and let humanity see your face. That was partly my motivation in haacking on RSS Bandit. I wanted to get more exposure to working on a “client-side” product. (The other part is that it was such a kick-ass product, I had to get involved.)

Taking the core RSS Bandit “NewsComponents.dll” and slapping it on a server for simple server-side aggregation probably wouldn’t take much work at all. What’s would be more interesting (and a lot more work) is taking it a step further and building a full-featured web-based aggregator.

Using so called “Ajax” techniques (which is really just a repackaging of existing technologies, including Microsoft’s proprietary XMLHttpRequest object and should be called POXSCRIPT for Plain Old Xml and Scripting), I can envision a web-based RSS Bandit that looks and functions quite similarly to the rich client. We could call it “RSS Bandit Web Access” as a nod to “Outlook Web Access”.

Now, the need for such an undertaking is dampened by the fact that RSS Bandit has a very nice synchronization mechanism so that using it from multiple computers isn’t a huge pain. Necessity being the mother of invention, this feature makes it so that I personally don’t see a web-based version as a huge necessity.

The other dampener is that I do have to pay my bills via billable work now. This would be the type of project I’d love to dive into and work on full time. The temptation would probably be too great and I’d neglect so many responsibilities to do so, becoming that underground mole I mentioned earlier. ;)

Anyways, this is just food for thought. How popular would such a package be? How many people have a web-server to install it on?

[Listening to: Intec Jimpy / Talkin (Terrantella Vs Redanka Remix) - Sasha - Global Underground Ibiza CD 1 (7:03)]

comments suggest edit

In case you were wondering, I thought I’d tell y’all how it’s going. First of all, I’ve somehow picked up a southern accent as evidenced by my use of “y’all”.

Health Insurance: I thought about limiting our insurance to taking vitamins and being VERY careful, but apparently that isn’t perceived as being very responsible nor wise. So with that option being, how shall I put it, stupid, Akumi and I researched the various options out there and settled on two individual PPO plans with Blue Shield. Getting two individual plans is cheaper than the cheapest family plan which was overkill for us. Since we don’t have kids and are both relatively young and relatively healthy, this is a good option for us.

Errors & Ommisions Insurance: I’ve read that this is important for independent contractors, but as I never make mistakes, I couldn’t imagine that it would apply to me. Even so, I am looking into it. In the meantime, I had my lawyer buddy Walter give me some wording for my contract to cap my liability at the amount of the contract. That was an idea that Jeanine, my former boss at Solien gave me when I had lunch with her recently. Right now, none of my contracts require E&O coverage. Do you need E&O coverage?

The Contract: Immediately after quitting my job, the start date for the bulk of the development work got pushed back to June. This kinda came out of left field, but that’s the risk I took by going independent. As it stands, it is actually working out nicely as I’m getting a much needed break. Tomorrow we’re getting started on some billable architecture work. We’ll definitely have some work to do, just nothing full time till June I think. In the meanwhile, I’m pursuing a couple leads on some short term work to fill in the time in between in case I need to do so.

open source comments suggest edit

RSS Bandit Logo After much hard work by Dare and Torsten (and a little bit of hard work by yours truly), the Wolverine edition of RSS Bandit has been released to the public.

If you’re still using a 1.2.* version, I think you’ll really like the extra polish and speed of this latest version.

Some highlights to note:\

  • Newspaper Styles - Compatible with FeedDemon.
  • Column Chooser - Specify the columns to display in the list view.
  • Item Deletion - A hotly demanded feature.
  • and more…

For the full release notes, visit here.

Also be sure to check out the updated docs for more details on these new features.

Run, don’t walk, and download it here!

comments suggest edit

Korean Food I’ve been told that for the best Korean food in the world, you need look no further than Los Angeles. The rationale is that you have a vibrant Korean community in Koreatown (affectionately known as K-Town) with access to better quality meat and vegetables than exists in the homeland.

I’m not ready to start an international food fight by saying whether or not I agree with that remark, but I will tell you about some of my favorite places for Korean food in Los Angeles. This is the short list.

Soot Bull Jeep - Korean Bar-B-Q 3136 W. Eighth St., (213) 387-3865. Be careful as your clothes and hair will smell like smoke leaving this place. Instead of your usual gas grills, they use coals to cook the meat at your table.

Beverly Soon Tofu (“BehVuhLee Soon Dubu” in Korean) ph: 213.380.11132 717 West Olympic Boulevard #108 Los Angeles, California 90006-2642 Northwest Corner of Olympic and Vermont This place has the BEST soon dubu. HIGHLY RECOMMENDED. The interior is small, but decorated such that it looks like you’re between two straw thatched houses in rural Korea. The Bi-Bim-Bap is very excellent as well.

Mandarin House 3074 W. Eighth St., (213) 386-8976. This is in a strip mall just west of Vermont. Don’t let the name fool you, this place has the best Cha Jang Mein around. To refresh your memory, that’s the thick noodles with the dark brownish black sauce made from black beans, onions, and meat.

Chosun Galbi 3330 W. Olympic Blvd., (323) 734-3330. Just west of Western and Olympic. This is a more conservative choice for Korean Bar-B-Q than Soot Bull Jeep, as you won’t stink. It’s more authentic than Woo Lae Oak.

Hodori 1001 S. Vermont Ave., No. 102, (213) 383-3554. 24 hour Korean restaurant for those late night Korean cravings.

BCD Tofu House (SoonDubu) 3575 Wilshire BlvdLos Angeles, CA 90010 (There’s actually a couple of locations in L.A. (213) 382-6677 This place is nowhere near as good as Beverly Soon Tofu, but it’s open 24 hours so it works as a fine backup for those late night munchies. In the late hours (after 2 AM), expect hungry bar-hoppers and club-goers. Watch out for projectile vomit. I’ve had my own bad experience there which involved a bowl of Mandu Soon Dubu and a few hard drinks prior.

comments suggest edit

My last project involved writing a lot of HttpHandlers to respond to HTTP requests originating from a cell phone. To simplify my life, I created an abstract base handler that handled a lot of the repetitive tasks in writing an HTTP handler.

So today, I read Scott Hanselman’s post about the boilerplate HttpHandler he uses. He says one day he’ll get more organized and make an abstract base class to handle this kind of boilerplate stuff.

I’ve got your back Scott.

I went ahead and took my base class and quickly (about 10 minutes) incorporated some of the things he has in his boilerplate and voila! An abstract base class! Enjoy.

/// <summary>
/// An abstract base Http Handler for all your
/// <see cref="IHttpHandler"/> needs.
/// </summary>
/// <remarks>
/// <p>
/// For the most part, classes that inherit from this
/// class do not need to override <see cref="ProcessRequest"/>.
/// Instead implement the abstract methods and
/// properties and put the main business logic
/// in the <see cref="HandleRequest"/>.
/// </p>
/// <p>
/// HandleRequest should respond with a StatusCode of
/// 200 if everything goes well, otherwise use one of
/// the various "Respond" methods to generate an appropriate
/// response code.  Or use the HttpStatusCode enumeration
/// if none of these apply.
/// </p>
/// </remarks>
public abstract class BaseHttpHandler : IHttpHandler
    /// <summary>
    /// Creates a new <see cref="BaseHttpHandler"/> instance.
    /// </summary>
    public BaseHttpHandler() {}
    /// <summary>
    /// Processs the incoming HTTP request.
    /// </summary>
    /// <param name="context">Context.</param>
    public void ProcessRequest(HttpContext context)
            && !context.User.Identity.IsAuthenticated)
        context.Response.ContentType = ContentMimeType;
    /// <summary>
    /// Indicates whether or not this handler can be
    /// reused between successive requests.
    /// </summary>
    /// <remarks>
    /// Return true if this handler does not maintain
    /// any state (generally a good practice).  Otherwise
    /// returns false.
    /// </remarks>
    public bool IsReusable
            return true;
    /// <summary>
    /// Handles the request.  This is where you put your
    /// business logic.
    /// </summary>
    /// <remarks>
    /// <p>This method should result in a call to one 
    /// (or more) of the following methods:</p>
    /// <p><code>context.Response.BinaryWrite();</code></p>
    /// <p><code>context.Response.Write();</code></p>
    /// <p><code>context.Response.WriteFile();</code></p>
    /// <p>
    /// <code>
    /// someStream.Save(context.Response.OutputStream);
    /// </code>
    /// </p>
    /// <p>etc...</p>
    /// <p>
    /// If you want a download box to show up with a 
    /// pre-populated filename, add this call here 
    /// (supplying a real filename).
    /// </p>
    /// <p>
    /// </p>
    /// <code>Response.AddHeader("Content-Disposition"
    /// , "attachment; filename=\"" + Filename + "\"");</code>
    /// </p>
    /// </remarks>
    /// <param name="context">Context.</param>
    public abstract void HandleRequest(HttpContext context);
    /// <summary>
    /// Validates the parameters.  Inheriting classes must
    /// implement this and return true if the parameters are
    /// valid, otherwise false.
    /// </summary>
    /// <param name="context">Context.</param>
    /// <returns><c>true</c> if the parameters are valid,
    /// otherwise <c>false</c></returns>
    public abstract bool ValidateParameters(HttpContext context);
    /// <summary>
    /// Gets a value indicating whether this handler
    /// requires users to be authenticated.
    /// </summary>
    /// <value>
    ///    <c>true</c> if authentication is required
    ///    otherwise, <c>false</c>.
    /// </value>
    public abstract bool RequiresAuthentication {get;}
    /// <summary>
    /// Gets the content MIME type.
    /// </summary>
    /// <value></value>
    public abstract string ContentMimeType {get;}
    /// <summary>
    /// Sets the cache policy.  Unless a handler overrides
    /// this method, handlers will not allow a respons to be
    /// cached.
    /// </summary>
    /// <param name="cache">Cache.</param>
    public virtual void SetResponseCachePolicy
        (HttpCachePolicy cache)
    /// <summary>
    /// Helper method used to Respond to the request
    /// that the file was not found.
    /// </summary>
    /// <param name="context">Context.</param>
    protected void RespondFileNotFound(HttpContext context)
            = (int)HttpStatusCode.NotFound;
    /// <summary>
    /// Helper method used to Respond to the request
    /// that an error occurred in processing the request.
    /// </summary>
    /// <param name="context">Context.</param>
    protected void RespondInternalError(HttpContext context)
        // It's really too bad that StatusCode property
        // is not of type HttpStatusCode.
        context.Response.StatusCode =
    /// <summary>
    /// Helper method used to Respond to the request
    /// that the request in attempting to access a resource
    /// that the user does not have access to.
    /// </summary>
    /// <param name="context">Context.</param>
    protected void RespondForbidden(HttpContext context)
            = (int)HttpStatusCode.Forbidden;

You can also download the file from

comments suggest edit

Crook Apparently someone went on an online shopping spree with our credit card number. Fortunately the Bank of America protection kicked in before they could do too much damage and we will not be charged for the fraudelent activity. It’s mind bogglingly easy for someone to fraudelently use your credit card. Think about that the next time you hand your credit card to the waiter at the local dive.

In any case, there are a couple of options at your disposal. My friend Walter writes about placing a fraud alert on your credit file as well as the California Credit Freeze option. I highly recommend taking a look at this whether or not you’ve been a victim of credit card fraud.

Walt also writes about Internet Fraud in this post.

comments suggest edit

World of Warcraft On my drive home today (being my last day at work. I’m now fully independent.), I was listening to the show “All Things Considered” on NPR. Much to my surprise there was a reviewer named Robert Holt who was describing his experience with World of Warcraft, a massively multiplayer online role playing game.

If you’re not in the know (and I assume most of my readers are), an MMORPG is basically Dungeons & Dragons, but online in full color 3-D with surround sound. Holt describes an adventure in which he and four other real people are deep within the bowels of a thieves den, looking to nab the leader.

What struck me about this review is hearing it on NPR. As a kid, Dungeons & Dragons (or D&D for short) was a guilty pleasure. Guilty because I knew how stigmatizing it would be for people in some of the circles I ran with to find out I played. This was during the years where I was a bit of a closet geek.

It didn’t help when you heard from church types that playing the game would cause you to worship Satan, drink goats blood, and give you a “Go Straight To Hell, Do Not Pass Go” card.

Strangely enough, I’ve never killed anyone as a human sacrifice as a result of dabbling in the game. In fact, I felt that I learned good planning skills, improved my vocabulary, and learned how to tell a story as a result.

So now that RPGs have gone mainstream, I guess I can dust off my old D&D books, my oddly shaped dice, my back issues of Dungeon magazine, and display such items proudly. Until my wife gets tired of the clutter it would cause and kindly asks me to place them elsewhere. :)

comments suggest edit

Looks like Google is responding to some critics who say Google takes all and doesn’t give back to the open source community. They’ve just launched Google Code, Google’s place for Open Source software.

From their FAQ:

What is\ is our site for external developers interested in Google-related development. Its where well publish free source code and lists of our API services. \ \ Who are the people behind\ A lot of people worked together to both prepare source code for release and prepare for launch and ongoing maintenance. We really care about free and open source software (F/OSS) at Google, and this site is one aspect of that affection.

Via Google Blog - Live.

comments suggest edit

Tiny Charms No, this post will make no mention of Paris Hilton. Promise. (Fully realizing that if I had mentioned her, it would attract an undesirable crowd via Google).

I don’t personally have a T-Mobile, but a former coworker of mine recently had a game he developed published on the T-Mobile stack. The royalties he receives from just one game is an eye opener. He can’t retire (nor quit his day job) just yet, but it sure is a nice source of extra income. His entire lineup so far can be seen at his site.

It’s almost enough to get me more involved in programming for mobile devices. It’s like the early days of programming on my Commodore. On many phones, you have roughly the same constraints. I wouldn’t be surprised to see a Commodor 64 emulator on a cell phone.

Apart from my limited contribution to RSS Bandit, I tend to be a server-side developer. My last project was to expose my company’s platform to mobile devices over HTTP. I didn’t spend much time in the client end of it at all.

humor blogging meta-blogging comments suggest edit

In the 1998 movie, The Big Hit, the protagonists kidnap the daughter of an extremely wealthy Japanese businessman. When they call to deliver the ransom notice, they turn to Gump who employs a brand name Trace Buster to prevent police from tracing the call.

Unbeknownst to Gump, the father has a Trace-Buster-Buster at his disposal. This in turn triggers Gump to use his Trace-Buster-Buster-Buster in an ever escalating battle to evade detection.

I just love that scene.

But I’m not here to talk about movies. I’ve recently noticed a post or two critical of the practice of blogging about blogging i.e. Metablogging.

I couldn’t help but to think of the Trace-Buster-Buster-Buster… The irony of dismissing blogging about blogging is that in doing so, you’re blogging about blogging about blogging. And in highlighting this, I’m blogging about blogging about blogging about … well you get the picture. I’ve become a Meta-Meta-Meta-Meta blogger.

Not that I’m taking sides here. If you find blogging about blogging boring, so be it. It is quite easy to avoid it. But I doubt it will simply die off. Unless of course blogging itself dies off.

I recently walked through the hallowed shelves of the local Borders book store in Santa Monica with my wife and noticed an entire shelf of books on writing. The thought that we might see the end of writing about writing never occured to me.

comments suggest edit

TRS 80 My first couple computers (TRS 80 and Commodore 128) led very solitairy lives. Though they had the constant company of a human companion, they lacked the familiar company of their own kind. I wonder if they longed for a form of communication that didn’t require a fur-less primate jabbing his fingers at a keyboard.

Commodore 128 To foster computer to computer community, I purchased my first Modem for my third computer, an Amiga 500. Not content to slap on just any modem, I shelled out the big bucks (in 1 dollar bills from tips bagging groceries) for a 1200 baud modem. That’s a full four times faster than the laggard 300 baud modem my loser friends were using at the time.

Amiga 500 It didn’t take long before I was a member of every bulletin board on the island (Guam). Then again, it doesn’t take long to join two or three boards. Surprisingly, Guam actually had more BBS systems running out of people’s homes than you’d think. I was a co-sysop of one board for a short while.

When signing up for a BBS (Bulletin Board System) membership, it was essential to choose a good handle. Now you might mistakenly associate a handle and a login as the same thing. But you’d be way off base. Way off base. A handle was much more significant than a measly login. It was your identity in the interconnected ASCII based world of the BBS. A well chosen handle was a reflection of your personality, or lack thereof.

Maverick Think Top Gun. He didn’t go by the moniker “TomC1962” he was freakin’ Maverick! How lame would a trucker feel if she was known as Ellie32. No way man. For those long lonely rides on the freeway, a trucker needs a handle with character and panache. Something that generates r-e-s-p-e-c-t. When you get on the CB, you’re talking to “Storm Chaser” and “Rusty Nail”, not some lame ass “JohnD” or “JaneD” (no disrespect if that really is your handle).

F-16 So back in those days I went by the handle “Dragon”, assuming it was available. I felt it was a good reflection of my east-meets-west heritage and love for LOTR. Of course every geek boy with a modem was after that handle, so I started going by “Falcon”, in reference to my favorite fighter jet, the F-16. I couldn’t be content with the handle “Dragon_Int64.MaxValue”

Nowadays, this concept of the “blogosphere” evokes some of the same feelings that the early days of the BBS craze (if you could call it that) did. Part of that feeling is rooted in the use of handles by some bloggers I know. For example, you might say Dare’s handle is “Carnage4Life”. Eric Porter dons a cape and parse tree and becomes the Human Compiler. Robert Scoble sprinkles his link juice (rel=”please do follow”) across the blogosphere because he is… (cue dramatic music) The Scobleizer.

And my handle? Well it should be obvious that it is “Haacked”. It’s basically a play on my last name, “Haack” (pronounced “hack”). So if I post as Haacked in your blog’s comments, it’s not to hide my identity. It’s merely a nod to a bygone era in online history. Just a small way to add a little flavor to an otherwise boring world of bits and bytes. It’s not my goal to hide the fact that my real name is … *transmission ended*

log4net logging aspnet comments suggest edit

UPDATE: I wrote a post with notes on getting this to work with ASP.NET 2.0.

Looking around, I noticed a lot of people struggling with getting Log4Net to work with their web applications (ASP.NET 1.1). I’m not going to spend a lot of time digging into Log4Net here, as you can do a Google search for that. But I will give you a quick and dirty guide to quickly getting it set up for a website. Bar of soap not included.

Using a Separate Config File

Although you can put your Log4Net configuration settings within the web.config file, I prefer to use a separate configuration file. Log4Net is a bit of an elitist. It won’t dare put a FileSystemWatcher on web.config nor App.config. However, if you tell it to use its own config file, it will gladly monitor that log file and update its settings on the fly when the file changes.

Specifying the Log4Net Config File

If you use a separate config file, a quick and easy (and dirty) way to have your application find it is to place the config file in the webroot and add the following attribute to your AssemblyInfo.cs file.

[assembly: log4net.Config.XmlConfigurator( 
ConfigFile="Log4Net.config",Watch=true )]

Declaring the Logger {.clear}

At the top of each class that I plan to use logging in, I declare a logger like so:

private static readonly ILog Log = LogManager.GetLogger( 

The reason I place a logger in each class is to scope it to that class. If you read the log4Net docs, you’ll see what I mean by this.

Using the Logger

Once you’ve declared the logger, you can call one its logging methods. Each method is named for the logging level. For example:

Log.Debug("This is a DEBUG level message.  
Typically your most VERBOSE level.");

Now whether that message shows up in your logs depends on how you’ve configured your appenders and the logging level you’ve set. Don’t understand what that means? Read the Log4Net introduction.

Sample Web Solution

In order to make all this discussion very concrete, I’ve gone ahead and did all your homework for you by creating a simple ASP.NET 1.1 web solution ( ) using Visual Studio.NET 2003. After unzipping this solution, you should be able to build it and then view the default.aspx web page. This page will log a few very interesting messages of varying levels to three appenders.

Of special note is the use of the RollingFileAppender as seen in this snippet.

<appender name="RollingLogFileAppender"    

    <file value="..\Logs\\CurrentLog" />
    <appendToFile value="true" />
    <datePattern value="yyyyMMdd" />

    <rollingStyle value="Date" />
    <filter type="log4net.Filter.LevelRangeFilter">
        <acceptOnMatch value="true" />

        <levelMin value="INFO" />
        <levelMax value="FATAL" />

    <layout type="log4net.Layout.PatternLayout">
        value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />


Note that the file value (with backslashes escaped) points to ..\Logs\CurrentLog. This specifies that Log4Net will log to a file in a directory named Logs parallel to the webroot. You need to give the ASPNET user write permission to this directory, which is why it is generally a good idea to leave it out of the webroot. Not to mention the potential for an IIS misconfiguration that allows the average Joe to snoop through your logs.