comments edit

My neighbor Chris is in Iraq as the #2 guy overseeing rebuilding projects as part of the Army Corp of Engineer. He’ll be over there for several months helping to rebuild the facilities necessary for providing clean drinking water and electricity.

Chris and his wife Susan are among the nicest people you will ever meet. Their dog Nelson was kind enough to show Twiggy the ropes as it comes to the best spots in the neighborhood for taking care of business. Susan is always offering to take Twiggy for a walk when we’re away at work.

In any case, with all the bad news coming from Iraq, it’s good to read about progress made in the rebuilding efforts. Here’s a snippet about his wild ride into Baghdad. Be glad your typical business trip doesn’t come with this sort of landing.

I’m safe in Baghdad….errr, well….I guess I’m just “in Baghdad.” The flight into Baghdad International Airport is one I will always remember, no matter how hard I drink to forget it. There’s 40 of us packed into a C-130, which was never intended as a passenger plane. There’s no “passenger area” in these planes, just the cargo hold with jump seats running down the sides and a row down the middle. Only two small port-style windows on either side. We’ve got a military dog on the plane with us, not real happy in his crate and letting the whole world know about it. It’s so noisy you have to wear earplugs and shout at each other to be heard. About 10 minutes outside of Bagdad, we begin our descent from 30,000 feet. That’s right, 30,000 feet in 10 minutes. Not to mention that the pilots fly a corkscrew pattern to avoid potential rockets (they haven’t had one yet, but nobody wants to be the first). Let’s just say, the dog wasn’t the only one howling on the way down. \ \ After a hard landing, they popped the hatches and we put our feet on Iraqi soil.

I’ve flown in a C-130 myself and can vouch for how uncomfortable a ride it is. However, I’ve never experienced a landing quite like his.

[Via Live from Baghdad]

His ATOM feed is here.

comments edit

A while ago I wrote about AmphetaRate, a blog recommendation engine that takes user ratings of blog entries and serves an RSS feed of recommended blog entries.

Later on I wrote an article about how to build an IBlogExtension plugin which was added the the RSS Bandit documentation site.

As a warmup to writing that article I wrote an AmphetaRate plugin to work through the kinks of writing a plugin for RSS Bandit. However I never released that plug-in as I wasn’t ever sure if it was working since all my recommendations were “training” recommendations.

This is a classic chicken and egg problem. If there aren’t enough users using AmphetaRate, the quality of recommendations are poor.

In any case, I noticed today that Dare updated the RSS Bandit roadmap and the version (code named Nightcrawler) after the next version may include a “Thumbs Up/Thumbs Down” rating system, perhaps intergrated with AmphetaRate. This would certainly help solve the “Chicken Egg” problem.

In the meantime, I am releasing my plug-in with no warranties. Just copy the AmphetaRatePlugin.dll to the “plugins” subfolder of the RSS Bandit installation (on my computer that’s at “C:\Program Files\RssBandit\plugins”). The VS.NET 2003 solution can be downloaded here.

Note that although this plug-in implements the IBlogExtension interface, the configuration form implements a feature specific to RSS Bandit. When you configure this plug-in, I wanted to provide an easy manner to subscribe to a user’s recommendation feed. So I added a LinkLabel that when clicked does just that.

However, I had to cheat a bit to do that. Since the IBlogExtension interface doesn’t define methods you may want to call on the calling application, I used Reflection to call a method to bring up a pre-populated “New Feeds” dialog. You can see the source for that call below.

private void lnkSubscribeURL_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)

{

    if(IsValidID(this.txtID.Text))

    {

        object banditApp = this.Owner.GetType().InvokeMember(“GuiOwner”, BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty, null, this.Owner, null);

        if(banditApp != null)

        {

            bool result = (bool)banditApp.GetType().InvokeMember(“CmdNewFeed”, BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, banditApp, new object[] {null, this.lnkSubscribeURL.Text, “Personalized AmphetaRate Feed”});

        }

    }

}

At some point, it’s possible this will become a fully supported feature of RSS Bandit. For now you’re stuck with this hack. If anyone’s interested, I’d love to discuss creating a new plug-in standard that’s a little more full featured than IBlogExtension. It works great for simple plug-ins, but doesn’t provide much support for a plug-in to interact with the application. I can think of several operations every aggregator pretty much supports that a plug-in might make use of such as “Subscribe To Feed”, “Mark Item As Read”, etc…

[Listening to: In da Club - 50 Cent - Get Rich or Die Tryin’ (3:13)]

comments edit

I think it’s about time to found a group devoted to helping blogging addicts deal with a new and pervasive addiction. This occurred to me the other day when my wife needed help putting away the dishes and I mumbled something about “Only 86 more entries to go in Scoble’s link blog.”

Let’s just say that she was not amused.

So to help others out there who may suffer from the same affliction, I offer some scientific indicators that you too might be a blogging addict.

  • You’re name is Robert Scoble
  • You subscribe to Scoble’s link blog
  • You’re reading this post and it’s still Thanksgiving.
  • You’re blogging about your addiction…on Thanksgiving
  • You try to regale your friends with interesting stories, but they’ve already read it on your blog.
  • These same friends only email you with interesting links hoping to make your blog.
  • In order to get you to take out the garbage, your wife posts a comment on your blog.

Take heed of these indicators and if you identify yourself to be a blogaholic, join in my new Blogaholics Anonymous group. We’ll be meeting in the comments section of this post. Oh, and go help your wife with the dishes.

comments edit

Today was my first day bringing the Tablet PC to work and I immediately put it to good use. I think that the paper pad metaphor that One Note uses may be implemented too well.

I was diagramming our existing site functionality and flow and had to erase some mistakes I made. So I took the stylus and rubbed the back of it on the screen to erase some of my scribblings.I then proceeded to take the side of my hand and brush the screen off.

Realizing what I had done, I started laughing out loud. It just occurred to me that I was instinctively going through the motion of wiping away the bits of eraser chunks that would normally be on a pad of paper after such intense erasing. The sort of chunks that aren’t created when you’re dealing with digital ink.

I better be careful before I start applying white-out to the screen.

comments edit

Dave claims that inhaling puts him out of the running for President.

My mom admitted she was standing up for Arnie because she also is a naturalized citizen. I of course am not, and could serve as President without an amendment. Of course I did inhale, so I’m probably out of the running just on that count, if not for all the others.

Not So fast there professor! Our current president managed to get elected twice and he’s a confirmed “snorter”. In all likelihood our very first president smoked a bowl or two in his day. Don’t let “inhaling’ be a showstopper.

Perhaps your campaign slogan might be “An RSS feed in every Pot!”

comments edit

From the Wintellect blog.

Today, I discovered that Microsoft was filing a patent for “an operator that returns true when two memory addresses are not equal”!   See http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50&s1=%2220040230959%22.PGNR.&OS=DN/20040230959&RS=DN/20040230959.   Surely, we can still come up with better ideas than this to patent, can’t we? Plus, I think there is a lot of prior art around this particular invention.

[Via Wintellog]

comments edit

Colin asks the question “How do you organize your code?” and then goes on to describe the system in use at his shop.

Basically I adhere closely to the guidelines in the Patterns & Practices guide: Team Development with Visual Studio .NET and Visual SourceSafe. Chapter 3 of this guide focuses on structuring projects and solutions.

The guide recommends a single solution model whenever possible which I generally put in use with a slight modification. Chapter 3 talks about composing your source control tree into Systems, Solutions, and projects. So typically a large system might consist of only one solution, but could consist of multiple solutions. Ideally each solution is isolated from other solutions in that there are no project references from one solution to another.

However I’ve added a separate system called CodeLibrarySystem which contains a CodeLibrarySolution. When I create a new solution for a new system, I’ll add in the necessary projects from the CodeLibrarySolution into the current system. So this breaks the “isolation” model of a Single Solution Model, but provides the benefit of code sharing. Also, by merely getting latest on my current solution, I can get all the latest changes in the code library (which really shouldn’t be changing all that often).

At home and at work, I am constantly trying to refactor code so that it can be dropped in the CodeLibrarySolution as opposed to having a bunch of non-reusable code sitting in various solutions. This has worked out pretty well for me as I’m starting to have a significant code library at home. Any time I find an interesting example online, I add it to the code library (with appropriate licensing information if any).

comments edit

The geeks are abuzz about Sergey Dmitriev’s article on Language oriented progamming and the Meta Programming system. It’s a worthwhile read and may be a harbringer of the future of software development.

What’s interesting to me is that the model he describes for viewing source code trees is very similar to this post by Wesner Moise.

comments edit

C64It was really just a side question of this post on Rory’s blog having nothing to do with the main topic (some blather about Jury duty bla bla bla). For 50 bonus points, the question was what game featured the quote “You have summoned an elemental”?

My winning answer was Archon, thus securing the 50 pts redeemable for fame, fortune, and street cred. Interestingly enough, the question summoned a swarm of geeks reminiscing about the good ol’ days of gaming on the Commodore 64 in the comments section.

For good reason, Archon was a joy to play. I loved that game back in the day. It was pure fun. Technically, I didn’t play it on a Commodore 64. I had a Commodore 128, which I know is the same thing really, but it was a larger number and it had some funky CP/M mode that did nothing for me. In any case, in the comments of that post, I found that there’s a remake effort for Archon. Awesome! It’s interesting to see that there’s a thriving C64 retro gaming community with a C64 emulator to support the cause.

As can be seen by such communities, the C64 inspired huge loyalty among its fans back in the day which is still going strong. Heck even I joined in the computer worship with my C64 formatter for Rss Bandit. Of course once I upgraded to the Amiga 500, my Commodore 128 turned into a large paperweight. At that point I was a slave to Speedball, Pirates!, and the Bard’s Tale. Not to mention the Ultima and Phantasie series.

Ah, I miss the good ol’ days of gaming. They weren’t the good ol’ days because the games were much better necessarily (though many were quite good). Rather, they were the good ol’ days because I had this thing called “time” to actually play them.

comments edit

So I was poking around the source code for how ASP.NET initiates session state etc… and noticed this method of the SessionId class. You gotta love the naming of this one. Steve McConnell (via Code Complete) would probably have recommended something like “IsValid” but he has no imagination nor flair.

internal static bool IsLegit(string s)
{
    bool flag1;

    if ((s == null) || (s.Length != 0x18))
    {
        return false;
    }

    try
    {
        int num1 = 0x18;
        while (--num1 >= 0)
        {
            char ch1 = s[num1];
            if (!SessionId.s_legalchars[ch1])
            {
                return false;
            }
        }
        flag1 = true;
    }
    catch (Exception)
    {
        flag1 = false;
    }
    return flag1;
}

MC Hammer would be proud!

comments edit

Yesterday I posted a little quiz with an example of an HttpHandler implemented as an ASHX file.

Brad Wilson obviously knew the answer, but only gave a hint for others to elaborate on. BigJimSlade (no link given) expanded on the answer. BigJim, I have a GMail account for you if you want one.

Calling HttpResponse.Redirect(string url) actually calls an overload HttpResponse.Redirect(string url, bool endResponse) with endResponse set to true. If endResponse is set to true, HttpResponse.Redirect will make a call to HttpResponse.End().

That method in turn calls Thread.CurrentThread.Abort(). Oh the depravity! Once again, Thread.Abort rears its ugly head.

So as you see, the code sample will ALWAYS redirect to /default.aspx because the HandleRedirect method throws a ThreadAbortException every time. To fix this, I merely need to change the HandleRedirect method to call ctx.Response.Redirect("/special.aspx", false);.

The fact that this week seems to be “Thread.Abort Week” isn’t why I posted this quiz. I ran into this problem the other day in my carelessness. It’s a result of my old ASP 3.0 habits resurfacing after years of suppressing them. It took me a few minutes to realize why my code never made it to special.aspx.

comments edit

This is a simplified version of a sneaky bug I ran into today (I’m fine thank you, but the bug is dead). The only prize I can offer is a GMail account if you want one.

Imagine that the method HandleRedirect actually does something interesting and if all the conditions pass, the user is redirected to special.aspx. This is the source code for an HttpHandler implemented as a .ashx file.

<%@ WebHandler Language="C#" Class="MyHandler" %>
using System;
using System.Web;
 
public class MyHandler : IHttpHandler
{
    /// <summary>
    /// Processs an incoming request.
    /// </summary>
    public void ProcessRequest(HttpContext ctx)
    {
        try
        {
            HandleRedirect(ctx);
        }
        catch(Exception)
        {
            ctx.Response.Redirect("/default.aspx");
        }
    }
 
    void HandleRedirect(HttpContext ctx)
    {
        ctx.Response.Redirect("/special.aspx");
    }
 
    public bool IsReusable
    {
        get { return true; }
    }
}

comments edit

I’ve resisted it, but I think I may change my primary email adress from Yahoo! to Gmail. You can probably guess what my Gmail email is…

comments edit

ATI Radeon I’m currently updating my device driver for my ATI Radeon 9700 at work (I now have a new 17” LCD monitor that supports portrait mode) and noticed that to install the CATALYST Control Center, .NET 1.1 is required. See for yourself.

It’s nice to see that .NET is starting to spread beyond internal business applications, ASP.NET sites, and web services.

comments edit

Recently my company (which was a division of Company X) was purchased by Company Y. Company Y is based outside of the country and we are a fully owned subsidiary and make up their U.S. presence.

A couple weeks ago or so we found out that my boss (our CTO) was promoted to CTO of the parent company. He has to spend 25% of his time at the parent company’s headquarters in Canada and 75% here, though it’s been more like 50/50. Some of my coworkers are starting to call me “See-Toe”. (Get it?).

In any case, I’m currently the lead on integration efforts to get our platform running on cell phones and set-top boxes. It’s one of the more interesting projects I’ve worked on, though I really can’t (or am not sure if I should) talk about it much here.

comments edit

MLS I watched DC United take on Kansas City today for the MLS Cup 2004. The great thing about soccer in the U.S. is that I can get tickets for the national championshipship the day before for a decent price. Unfortunately that’s also the problem with U.S. soccer. The quality of play is nowhere near a Premiership game or Bundesliga.

In other soccer news, several of the players I play pick-up with organized a game (with refs et all) with the league team I just recently joined. I played with the pick-up team and we were shelled 6 to 3. It would have been a lot worse had we not had the most phenomenal goalie on our side. For my part I had an assist and converted a penalty kick.