0 comments suggest edit

Unicef We finally have a moment to sit down and make a donation to the relief efforts under way in South Asia. With the death toll at 141,000 and rising, it’s impossible to grasp the amount of devastation caused by this disaster.

Although it’s easy to just not think about it, I hope you consider taking a small moment and making a small (or big) donation. We chose to contribute to the UNICEF relief effort. You can also contribute to the American Red Cross via Amazon.com which is convenient if you’re an Amazon user.

0 comments suggest edit

I read with interest Dare’s post on the quandary social software finds itself in today. In a nutshell, the current crop of social software tools are not very sociable once you step outside of the particular tool. It’s really like one big world wide cliquish high-school. Your orkuts won’t talk to the friendsters who won’t talk to the Amazons and so on…

As Dare points out, there’s really no business incentive for these companies to allow users to export their social networks. They probably contain teams of marketers who drool at the personal information they are gathering and the opportunities of marketing. Why share?

I’ve tried to flesh out some ideas before on how I see social software evolving, but it occurred to me that there’s two possible solutions. The first is to create a profit motive for sharing. Once you give Google an incentive to allow users networks to be exposed outside of Orkut, they’ll do it.

Ok, that’s obvious. The question is how? Well first, users have to demand more control over their own data. Unfortunately, users don’t have that much leverage right now. They can threaten to leave Orkut, but only to move to Friendster? That only trades one closed network for another. My answer is to not leave social software soley in the hands of profit driven businesses. I think as tools like DasBlog and .TEXT evolv, it’s possible to create a social network that is completely based on open standards.

Take a look at RSS Bandit. As an open source RSS aggregator, it has no incentive (nor capability) to keep its data private. Thus it supports exporting feeds as OPML as well as many other standards. Another example is the Jabber protocol. Although it’s not widely adopted, the jabber protocol for instant messaging is another step in the right direction as its communication format is an open standard. Anyone can make a client to the protocol. Contrast this to the IM wars seen between Trillian, MSN, AIM, and Yahoo.

If these tools can gain traction and users start to demand control over their data and leave the closed systems for these open systems, we may see a move by these companies to open their systems in order to maintain a piece of the action. Hopefully these companies will focus on providing the best tools for navigating the various open networks as their point of distinction, rather than holding users data hostage.

0 comments suggest edit

Code Complete 2 Back in the day when I was a wet behind the ears developer a coworker gave me some sage advice. He told me that if I wanted to become a good developer, I need to read the bible. He was of course referring to Code Complete, the bible of software construction. When I was promoted to manager, I made it required reading for developers. Several years later, I’m reading through the second edition savoring every page like a fine glass of sake.

This time around, I have a lot more experience to provide context to what I’m reading. Around page 270 (Chapter 11 end of section 2) I came across McConnel’s recommendations about the use of constants and it got me thinking about how appropriate that advice is in the world of .NET.

McConnel discusses good and bad names for constants. An example of a poor name for a constant is FIVE. If you needed to change it to another value, it wouldn’t make any sense (const int FIVE = 6;). Instead choose a name that represents the abstract entity the constant represents. For example, CYCLES_NEEDED.

Another bad example he presents is BAKERS_DOZEN which he states would be better named as DONUTS_MAX.

Although I agree with him in principle, his advice might need to be modified in light of how constants are handled in .NET. For example, CYCLES_NEEDED probably shouldn’t be a constant if you think you might change the value later. Secondly, BAKERS_DOZEN might be a fine constant since it’s a value that will never change.

This boils down to a semantic issue. What exactly is a constant? Is it simply a variable with a value set at compile time often used to consolidate a setting in one place? Or is it a variable that holds a value that never changes, not even from build to build?

Well the answer of course is “it depends”. When you look at .NET however, it seems to favor the latter behavior. Suppose you’re building a class library that contains a public constant like so:

public class Library
{
    public const int CYCLES_NEEDED = 5;
}

And you build an application that references this assembly and makes use of the constant like so.

class MyApp
{
    /// 
    /// The main entry point for the application.
    /// 
    [STAThread]
    static void Main(string[] args)
    {
        for(int i = 0; i < Library.CYCLES_NEEDED; i++)
        {
            //Do meaningful work...
            Console.WriteLine(i);
        }
    }
}

If you compile and run this simple program, the console will output the numbers 0 through 4 as you would expect. Yes, this is a complicated program. The result of many years of experience.

Now suppose it’s several weeks later and your boss storms into your office. The company is bleeding cash and he wants you to up the cycles to 6 to increase profit. “Why that’s simple” you say to yourself.

“I’ll just change the value of CYCLES_NEEDED, recompile my library assembly, and deploy the dll without touching the exe so that the downtime is minimized. I’m such a genius!”

So what happens when you do that? You get the same output as before.

Huh?

When one assembly references a constant in another assembly, the compiler will embed the value of that constant into the assembly. For example, using Reflector to decompile the sophisticated console app presented above, the Main method is compiled as:

[STAThread]
private static void Main(string[] args)
{
    for (int num1 = 0; num1 < 5; num1++)
    {
        Console.WriteLine(num1);
    }
}

So as you can see, in order to change the value of the constant, both the library and the consumer of the library have to be recompiled to reflect the change with the constant. If we anticipate that CYCLES_NEEDED might ever change, it would be better to make this a public static read only variable as such:

public class Library
{
    public static readonly int CYCLES_NEEDED = 5;
}

Now should you deploy a change to the value of CYCLES_NEEDED, the console application will pick up the change without needing to recompile it. This is especially important in cases where it’s much easier to deploy a dll rather than the entire application.

The only drawback to this approach is that the value needs to be obtained at run-time instead of having the value compiled into the app which is a slight performance hint. Well if you’re worried about this, I’d suggest that you’re suffering from a case of premature optimization and you need to go read Rico’s blog where he’ll tell you to measure measure measure. As McConnel states repeatedly in Code Complete, the greatest impediment to performance is most likely to be the overall architecture of your system and not minor code issues.

Of course, if you have full control over your libraries and clients of the libraries, this may not be as big an issue to you. However, if you have several production systems deployed, it’s nice to apply patches via deploying the least amount of code as possible.

personal 0 comments suggest edit

After a wonderful time with my family in Anchorage, we flew back to Los Angeles for a day, dropped Twiggy off at a doggy day care, and flew into Tokyo. Below is a picture of Anchorage from our airplane as we were leaving.

Anchorage at night from an airplane

The transition from 2004 to 2005 was quite uneventful this year. I think I was asleep when we crossed the international date line. Unfortunately we didn’t have a countdown or bubbly. Well there’s always next year. New Years Eve is a special day for my wife and I as that is the day we met in 2001/2002.

In any case, to my pleasant surprise, my mother-in-law’s building has been outfitted with wi-fi internet access! I was expecting a severe case of internet withdrawal, but my RSS Bandit installation is humming along nicely and I’m able to post a blog post or two while here.

But even nicer was the exquisite meal that awaited us when we arrived. Here’s a pic of a small plate of sashimi we had. Along with the sashimi we had some onigiri and tempura. Akumi’s mom is a phenomenal cook.

Sashimi

Well I better be off to bed and let the fight with jet lag begin. I wish you all a happy new year and hope we all can make some exciting things happen in 2005.

Technorati Tags: japan,tokyo

0 comments suggest edit

Ok, the title is a mouthful, but it addresses a concern with the new alpha version of RSS Bandit. As of the current build, the feature to view the raw XML before it is rendered by the stylesheet is no longer there.

However, here is an identity transformation you may use. Just copy this to the templates sub folder of your RSS Bandit installation. You can then go to the Display menu (via Tools | Options) and select the Identity.fdxsl for your stylesheet. Afterwards, view any feed and then view source to see the raw XML.

0 comments suggest edit

In case you’re wondering (and I know at least one of you is), my blog is hosted at WebHost4Life and is running .Text version 0.95 (or is it .96?). I chose it over DasBlog because of its SQL Server support, but I’m not sure that’s such a compelling reason given that configuration is such a pain. I’m hoping that Community Server will address many of the issues I have with .Text.

From reading the .Text newsgroups, it appears I’m one of 25 people on the planet to get it working. Ok, perhaps that is an exaggeration.

I created a custom skin for my blog a few months ago, but the logo was created by a talented coworker. I also use w.bloggar to post to my blog.

0 comments suggest edit

It’s been said that native Alaskans have 40 or so words for snow. Roughly translated, they all mean “Fuck! Get the shovel!”. It was a winter wonderland for my wife until I handed her a shovel and led her to the driveway.

Akumi Shoveling The Driveway \ The driveway’s full of snow and my husband is full of …

We both spent the next hour or so working on the driveway, making sure to take the occasional break.

Phil taking a break \ The only thing missing is a beer in my hand.

And in the end we could enjoy the satisfaction of a job well done.

A well shoveled driveway \ This is his idea of vacation?

Afterwards we decided to go moose hunting under a dramatic sky.

A dramatic sky \ You can shovel it yourself fool!

We decided to have a look in the woods near by.

A walk in the woods

Phil in the woods

This is my idea of a great Alaskan vacation. Shoveling snow and a walk through the woods jumping into snow drifts.

Akumi in the woods

0 comments suggest edit

This is the road out of Anchorage towards Turnagain arm. It’s around 10 AM and the sun is just about to rouse its lazy butt above the horizon.

The Drive To Alyeska

Turnagain arm provides spectacular scenery. During the summer, this inlet hosts some of the best wind surfing in the world along with Beluga whales.

Still Driving

It was too cold to take too many pictures, but here’s one from the top of the quad. In the background you can see Cook Inlet where we drove in from.

Akumi at the top of the Quad

0 comments suggest edit

We went snowboarding this morning after finally getting in and to bed at around 3 AM last night. At the top of the quad, it was -1 degrees Fahrenheit. This is the coldest weather my wife has ever snowboarded in. She’s such a trooper. We won’t be going outside the rest of this vacation. ;)

0 comments suggest edit

As with many blogs right now, my blog has been graced by the quiet sounds of tumbleweeds rolling by due to a long period of lack of use. The primary reason for my absence is an end of year push to get several projects completed before I head off to vacation.

For my day job, I’ve been working on exposing our platform to cell phones. I’ve built a series of ASP.NET controls that render a proprietary markup for a browser like app that will run on the phones.

On the side, I’ve been writing a Windows service (not as hyped as Web Services these days) to obtain market data via a socket server API. What I like about this project is that the API provided an XSD so I was able to generate objects to represent all the messages (Requests and Responses) and used XML Serialization to send the messages over the socket.

Also on the side, I’ve worked on an app to post data from a SQL database over to a perl script via XML over HTTP.

Finally, I updated the unit tests for RSS Bandit not to require Cassini.dll to be registered in the GAC. They are now truly self contained. At the same time I also checked in my changes to the Shortcut management. Torsten discovered some improvements I should make which I hope to get to in the new year.

In any case, Akumi and I are flying to Alaska tonight to stay with my family. It’ll be a balmy -2 degrees when we arrive, so wish us well.

0 comments suggest edit

‘Tis the time of year to find a new job for many. Among many pieces of advice I could give you, I leave you with this one. When you go to an interview, please please please bring several copies of your resume. For your own sake!

Out of every technical interview I’ve conducted this year, not one person brought a copy of their resume.

0 comments suggest edit

Not to just join the chorus, but I am blown away by Google Suggest. It’s a simple idea, but well executed - it guesses what you are searching for as you type it and presents the options as a list. If you’ve used the auto-complete feature in IE, you’ll get the picture.

\ Suuure… This is what you were *really* searching for.

So in the above screenshot, I’ve typed in “good clean f” and Google has presented it’s best guess in the text box as well as other options below.

0 comments suggest edit

My neighbor Chris blogs about the harrowing “commute” from the Baghdad airport to the Green Zone.

In just a few minutes, we clear the gate and our driver floors the accelerator. The convoy blows onto Route Irish at 70mph, bumper to bumper, with local Iraqi traffic parting like the Red Sea before us. You can see that the locals are used to these mini-tanks and dive to the side of the road. We seem to be making good progress when, to my shock and horror, I see cars driving the wrong way on a 4-lane expressway and coming straight towards us. The PSDs don’t seem to panic and, as I learn later, flow of traffic and lane right-of-ways do not really translate in this country. Apparently, it’s quite common to drive “kamikaze” against oncoming traffic if you’re side of the highway is blocked.

You should read the entire account.

0 comments suggest edit

Server on fire

In case you’re wondering how important those fans are inside your computer, we received an email from a tech at our data center informing us that smoke was coming from one of our web servers. And we’re not even serving porn.

We don’t need no water let the motherfucker burn! Burn Motherfucker. Burn!

0 comments suggest edit

Fox Sports World is undertaking strategic initiatives regarding the branding, on-air look, and marketing of the channels. As a soccer fan (and a friend of an FSW exec) I’ve been invited to participate in a focus group to evaluate their projects tonight. My main suggestion will be start a new channel devoted to soccer. FSS (Fox Sports Soccer).

UPDATE: Well my main suggestion was unnecessary. Fox is planning to change “Fox Sports World” to “Fox Soccer Channel”. We evaluated some logos and slogans and talked about the identity of Fox Sports World. Received some nice swag too including a pen that lights up like a blue glowstick. Great for taking notes at your next rave.