comments suggest edit

I have to hand it to Microsoft, they really do listen to their customers. And I don’t mean in that head nodding “I hear you but I don’t know what you’re saying” kind of way so common with people who really want you to think they’re listening, but have no time for you. I posted my question about device support on Don Box’s Wiki and here’s his response:

There are several small XML parsers (expat being the most well-known) that should make it exceedingly straightforward to implement basic SOAP functionality on your device (you will have to write some code, as the tool support is zip when using this approach). The challenge going forward is getting XML DSIG and Encryption, both of which require a real investment if your platform doesn’t include support for them. How long it takes Sun to bring these technologies to J2ME is out of our control. If it’s any consolation, we don’t have them on .NET Compact Framework yet either. For the near-to-mid-term future, if you want reach, transport-level security is your best option for getting messages out of the device.

Now, I know this may be out of Don’s control, but I think its pertinent and I might as well ask. The way I see it, a huge source of consumers for SOA will be mobile devices running on other platforms connecting to these services. Although J2ME (and BREW etc…) is out of Microsoft’s control, now that Sun and Microsoft are good buddies, can we expect to see some more collaboration and perhaps even a bit of friendly pressure on Sun to provide toolkit support for WSE 2.0 now and Indigo near the time Indigo is released? At the very least Microsoft should be (and I imagine are) concurrently building Indigo support into the .NET Compact Framework. Out of curiosity, is that the case? Microsoft says they’ve run out of things to buy, but perhaps they should buy or start some spinoff companies to build toolkits for platforms that do not have decent support for Web Services. What better way to complete the chicken-egg problem than to make both?

code comments suggest edit

SoapIn this post, Tim Ewald talks about using Doc/Literal/Bare for your web service. There are several benefits he ticks off, but one seems to be the aesthetic effect of cleaning up the format of the XML within your SOAP message. In SOAP, the XML sent back and forth is just the wire format. As a typical developer, why should you care what the wire format is? In general, you shouldn’t. If you have the tools to generate WSDL and generate a proxy off of a WSDL to call a web service, you’re all set.

Unfortunately for me, it’s not that easy. My job right now is to expose my company’s platform to clients running cell-phones, set-top boxes, etc… These platforms are running J2ME, BREW, C, etc… Potential future clients are interested in SOAP, but our first client is dead set against it because they say it’s too verbose for their tiny devices and there is scant tool support for them.

So I went and took some sand-paper to our SOAP services and shaved off every bit I could, smoothing out the edges, shortening the namespaces I have control over, making everything so “Doc/Literal/Bare” you’d blush just looking at it. Still, no go. They weren’t having it. They have their own proprietary XML format they want to send to us over HTTP with a roll-our-own authentication scheme. I was hoping to take advantage of all the plumbing VS.NET and the .NET Web Services provide.

I recently watched a video in which Don Box and Doug Purdy discuss Indigo and SOA. They hope that most developers will not have to become plumbers and understand how it all works under the hood. You just use Indigo and it automagically takes care of it for you. You just focus on your business rules.

The problem I see arising is that as Microsoft takes web services and SOA to the next level, not everybody is keeping up. How will I get these people on mobile devices to interoperate with my service if they are lacking the tools to even generate simple SOAP messages? These guys didn’t want to use XML until I showed them their format required very little change to make it XML compliant. As much as I don’t want to know what’s going on under the hood, I’m afraid I am forced to hike my pants down a bit and expose some butt crack to become a plumber.

In my next post, I’ll talk about my solution to this problem and a problem I ran into.

comments suggest edit

Dare asks the question whether or not we should change the browser used by RSS Bandit. He was greeted by over 30 comments, mostly in favor of the switch. This is purely anecdotal, but I get the sense alot of people are upset by recent vulnerabilities in IE. I also get the sense that a lot of people feel that upstart browsers are toeing the line of innovation while IE has sat on its fat ass and done nothing lately.

Whether that’s true or not, as Dare points out, integrating another browser into RSS Bandit is a bit of work and could open a whole can of worms. I’d like to point out that there’s something you can do now with RSS Bandit as a stop-gap. It may not appease the die-hard Firefox or Gecko users, but hopefully it will help you feel more secure using RSS Bandit.

A little while ago I wrote up some documentation called Changing The Web Browser Security Settings which can be found on the RSS Bandit documentation site. There are two important features the document discusses. One is that you can have HTML links within RSS Bandit opened by an executable of your choice. This may not integrate with the nice Tabs within RSS Bandit, but at least you’re using the browser of your choice.

If you decide to stick with IE, I suggest configuring the Security, Restrictions options. You can deactivate ActiveX controls (the source of most vulnerabilities) and browse in relative safety. The documentation describes the risk of checking each option.

The Reading Pane (or “Item Detail Pane”) is not affected by these settings. It never allows any script or ActiveX controls. While we debate removing IE, you can read your feeds with more security. Happy RSS Reading.

comments suggest edit

Soap In my last post I discussed a client who requires that we build a web service using a proprietary XML format (lets call it MyXML) so his mobile devices can interact with our platform.

Naturally, I didn’t want to limit ourselves to one client, but looked at the big picture and decided I should build a standard Web Service using SOAP, but provide some sort of facade that would translate his MyXML requests to SOAP and translate the SOAP responses back to MyXML.

My first attempt was to write a Soap Extension. I was planning to do something like this (some code ommitted):

using System;
using System.IO;
using System.Web;
using System.Web.Services.Protocols;

/// <summary>
/// Soap Extension that transforms incoming MyXml to 
/// SOAP and outgoing SOAP to MyXml.
public class MyXmlToSoapExtension : SoapExtension
    Stream _soapStream;
    Stream _tempStream;

    /// <summary>
    /// Transforms incoming MyXml to SOAP and outgoing SOAP to 
    /// MyXml
    /// <param name="message">
    public override void ProcessMessage(SoapMessage message)
        switch (message.Stage)
            case SoapMessageStage.BeforeDeserialize:
                // Code to transform incoming _soapStream
                // into the chained _tempStream via XSLT.

            case SoapMessageStage.AfterSerialize:
                // Code to transform chained 
                // _tempStream and write result to 
                // the outgoing _soapStream via XSLT

    /// <summary>
    /// When overridden in a derived class, allows a 
    /// SOAP extension access to the memory buffer 
    /// containing the SOAP request or response.
    /// <param name="stream">
    /// <returns>
    public override Stream ChainStream(Stream stream)
        // by overriding ChainStream we can
        // cause the ASP.NET system to use
        // our stream for buffering SOAP messages
        // rather than the default stream.
        // we will store off the original stream
        // so we can pass the data back down to the 
        // ASP.NET system in original stream that 
        // it created.
        _soapStream = stream;
        _tempStream = new MemoryStream();
        return _tempStream;

And man, it was working like a charm in my unit tests. I was converting straight up garbage into SOAP. The beauty of this scheme was that SOAP requests and MyXML requests were happily going to the exact same URL. Everybody was getting along. All I had to do was examine the request. If it was a SOAP request, I didn’t change anything. If it was a MyXML request, I ran my transformations. For a moment, I was daydreaming about the articles I would write about how brilliant a solution I had created (not realizing there were other problems as well such as maintaining the transformations between MyXML and SOAP) until I noticed that my unit test was cheating a bit. When making the HTTP request, the test did the following sneaky thing:

HttpWebRequest request 
    = (HttpWebRequest)HttpWebRequest.Create("http://localhost/Svc.asmx");
//...Code Omitted...
request.Headers.Add("SOAPAction", "http://mynamespace/MethodName"); 

You see, a SOAP request is more than just the contents of the SOAP envelope (especially when using doc/literal/bare), there’s also crucial information in the HTTP headers. So I removed that line in my test, and tried to add that line within my Soap Extension like so:

HttpRequest request = HttpContext.Current.Request;
request.Headers.Add("SOAPAction", "http://mynamespace/MethodName"); 

Not going to happen, my tests failed. By the time the HTTP headers reach my web server, they are READ ONLY. They won’t let me get my grubby hands in there and change them. I might be able to convince my client to add this header to his clients for kicks, but I don’t think he’d go for it. Why would he? He doesn’t want anything to do with SOAP.

Now, unless someone comes along and shows me how to modify incoming HTTP headers from an ASP.NET service, I am going to resort to plan B. I will write an HttpHandler that takes in the MyXML, does the authentication etc…, figures out which method to call, and then call the appropriate Web Service method. I’ve put the code that implements my web service in another assembly like so:

<%@ WebService Language="c#" Class="Svc,MyAssembly" %>

That way my HttpHandler doesn’t have to make a second HTTP request to the Web Service, but just use the underlying logic (assuming my methods don’t access such things as the SoapContext etc…). I was hoping to avoid this type of duplication of efforts, but oh well.

UPDATE: As my friend Ben points out, I can modify the HTTP headers with an ISAPI filter, but that’s a lot more work and I prefer to work within the ASP.NET model and not have to deal with ISAPI.

comments suggest edit

First Kyle, then Micah. I’ve bugged him, cajoled him, annoyed him, till finally he caved and installed RSS Bandit. Took about five minutes before he became a full fledged addict. I have a feeling he’ll be up really late tonight. Next step is to get him set up with a .TEXT blog. I’m so eeeeevil.

comments suggest edit

VacationI’m taking all of next week off of work. Wohoo! Well actually, I’m only on vacation from my day job. Monday and Tuesday I’ll be working on some contracts I’ve got going on the side. Then on Wednesday, the little lady and I are heading out to Seattle to visit her best friend. Hopefully I’ll have some time to work on RSS Bandit too.

Tonight I’ll be going out for a few drinks with my buddy Micah. He quit his job and went independent. He’s poised to take over the world soon, while I’m jockeying to position myself to ride his coattails. ;) He’s got a lot of great ideas on how to make IT a value proposition and not a cost.

Saturday night, I have a big soccer game. Sunday I have an acupuncture appointment and we’re going to the Hollywood Bowl concert. Whew! We’re pretty busy this weekend.

comments suggest edit

Scientists will soon rip open the door to real Quantum computing. Will it be a peek into alternate universes? Or will it fizzle with a whimper?

Physicists have succeeded in entangling five photons for the first time. Although four photons have been entangled before, five is the minimum number needed for universal error correction in quantum computation. Moreover, the same team has demonstrated a process called “open-destination teleportation” for the first time (Z Zhao et al. 2004 Nature 430 54). The results represent a major breakthrough in efforts to exploit the laws of quantum mechanics in quantum information processing.

[Via Physics Web]

comments suggest edit

Via this article in Newsweek, I found an interesting blog geared towards the professional philosopher but open to others with an interest.

Although some posts such as Are Deontology, Consequentialism, and Pluralism the only viable theories of ethics? will give you a headache just trying to decipher the title, many of the posts (the aforementioned included) ask very thought provoking questions such as “Who Would Suffer the Greater Misfortune?. It may not help you track down that elusive threading bug, but it may help you deal with it philosophically.

One of the contributors is a professor at my alma mater, Occidental college.

comments suggest edit

Let’s Make a Deal Ian Griffiths blogs about the Monty Hall problem.

The problem, named after the host of a game show on which it sometimes appeared, is as follows:

There are three doors, behind one of which is a valuable prize, but you don’t know which door. Choose a door. You are not told straight away whether you’ve made the right choice. Instead, the host of the game will then open one of the doors you did not pick, showing you that there is no prize behind it. You are now offered the chance to change your mind. This effectively narrows down your choice - the prize is behind one of two doors, either the one you picked, or the door that neither you nor the host picked.

What should you do to maximize the probability of winning the prize? Should you stick with your first choice, or switch to the other door? Or does it not matter?

Monty Hall Problem I love this problem as an example of a very straightforward but non-intuitive result. I once presented this problem to a group of young kids who were in a summer math and science enrichment program. They were floored by the result. I demonstrated the proof to the kids via both the logical proof (as Ian does) as well as by running a Monte Carlo simulation. I had two teams play the game over and over, one choosing to switch every time, and one choosing to stay. Like mathematical magic, over a series of 20 or so trials it becomes quite clear that always switching is indeed the better strategy. Argue with me as they did, they could not argue with their own eyes.

Now, lest you think that this is only difficult for non mathematical types to grasp, I used to frequent the sci.math newsgroups and with a bemused grin read the long rants of Ph.Ds in mathematics argue over this problem when I now knew a group of 13 and 14 year olds who could demonstrate the result to them.

I’d like to point out that in the real game show, Monty didn’t always give you the option of switching. Sometimes he’d just open the door you chose. When you add that unpredictable human element, all bets are off.

burningman comments suggest edit

I promised a friend I’d show him some pictures of the time we went to burning man in 2002. So of course, I figured might as well make a blog entry about it. For you geeks out there, the Playa (A nearly level area at the bottom of an undrained desert basin, sometimes temporarily covered with water) has a wi-fi network available. Every year, Black Rock City, a temporary city, is formed in the midst of the desert near Gerlach. This city is the host of the Burning Man festival. It’s about a thirteen hour drive from Los Angeles and the closest city is Reno, Nevada which is about 4 hours away.

Let me introduce you to the gang of burners (people who attend Burning Man) that we camped with. Here we are demonstrating the preferred method of locomotion on the Playa. This assumes you’re sober enough to ride correctly, which isn’t as much an issue during the day as it is at night.

Took a right when we shoulda took a left on the Tour de France.

Although the heat is oppresive by day, there’s plenty to see. One of my favorite installations is a replica of the Terror Dome from Mad Max movies. That’s Akumi and myself climbing on it. At night, the dome is covered with people cheering on epic battles as two would-be gladiators strapped with bungie cords swing around whacking each other with foam padded sticks.

Two monkeys climb the extremely large jungle gym.

Can't you just feel the terror?

The primary danger on the playa is overheating and dehydration, so be sure to bring plenty of water. That’s not to say that there aren’t other unexpected hazards on the playa.

The author auditions for Jaws 5. Notice the temple in the distance to the right

Every year, Burning Man has a theme. The year we went the theme was “A floating world”. This explains the presence of dolphins.

The author in a dead heat with Flipper.

Some of the installations on the playa are truly magnificent, such as the Temple Of Joy. The prior year, the artist who built this temple had built the Temple Of Tears as he had tragically lost a family member (I think his daughter). But in having overcome the pain and sorrow, he built this temple to celebrate the joy he had with her.

Our friend Laura parks at the Outhouse Of Joy.

Amazing what you can do with some balsa wood, glue and a lot of time.

And then, of course, there’s the Man. At night, the Man is totally wired with bright blue neon lights. From any point in the camp, you can pretty much see him standing there as a beacon. Very useful if you happen to be trashed and have wandered off into the darkness of the playa. It’s nearly impossible to get truly lost out there, but people are resourceful and manage to find a way.

The one on the lighthouse, not with the shades.

There are the occasional dust storms that can be downright aggravating. We only had to endure one or two. Huddling in the shade shelter we built in the middle of our camp site, we battened down the hatches and munched on snacks. Afterwards, a dust storm will leave a really beautiful sky in its wake.

Still not worth the pound of dust in my eyes.

At night, as the temperature dives, the playa really comes alive. I unfortunately don’t have a lot of night pictures, but believe me when I tell you that anything and everything you’ve ever imagined in your sleep is crawling around. This place creates a bull market for the neon and glowstick industry. All the colored lights create a surreal nighttime wonderland. For example, as we walked about, we almost ran into this moving aquarium full of laughing people.

Nemo didn't sign up for this.

Every day on the playa is a build-up to the big day when they burn the Man. Preceding the burn is a parade of fire walkers, dancers, and mechanical fire-breathing dragons. It’s truly a pyromaniac’s wet dream. The intense heat of “The Burn” conjures up several dust devils with the appearance of sinister tornados dancing on the ashes of the Man. The following day, the Temple of Joy is burned, but we didn’t stay around to see that.

The man. The man. The man is on fire. We don't need no...

comments suggest edit

Bobby FischerWe can’t find Waldo, we can’t find Osama, but we found Bobby. Hooray!

paulydavis writes “Former world chess champion Bobby Fischer, wanted since 1992 for playing a tournament in Yugoslavia despite U.N. sanctions, was detained in Japan for an apparent passport violation and will be deported to the United States.”

[Via Slashdot]

comments suggest edit

Omer’s post (Hey, everyone! It’s the “Omer Asks For A Feature” time again!) reminds me that I have a feature request as well regarding references in Visual Studio .NET. I’d like to be able to reference an exe assembly. The C-Sharp compiler supports it, but VS.NET strangely does not.

The main reason I want this is it will help me keep my unit tests separate from the exe I’m testing as I talk about in this earlier post.

comments suggest edit

I like this idea found on Boing Boing:

Whole Lotta Nothing has sent out a lazyweb request for a blogging plug-in that would allow a blogger’s close friends to correct typos in his or her posts. I sure could use something like this.

This would be great for friends of mine like Koba who has a horrible spelling problem. ;) I’m constantly sending him emails of his typoz. Then again, I’d love to let him correct my typos, like the one at the end of the previous sentence.

comments suggest edit

Earlier I posted the factual backup from Michael Moore’s website concerning Fahrenheit 9/11.

In an effort to be balanced, I present here a list of 56 deceits in Fahrenheit 9/11 from a person who voted for Ralph Nader in 2000. I mention that to point out that this is not a list from a rabid Republican. It’s a bit long, but a worthwhile read to gain some perspective on the movie.

So when are we going to get a documentary that provides a more balanced view of what went down?

Thanks to Adam Kinney for sending me this.

code comments suggest edit

Google apparently is behind this mysterious billboard that presents a nice number theory problem. I love number theory!

Of course, I could have written a program to sift through the digits of e to find the answer to this question, but I’m a pragmatic soul and figure why not just use Google since it’s 3 AM and I’m tired (I know, it’s cheating, but how good Google fault you for using Google?) The answer to this problem is also a website (7427466391) which presents a more challenging problem.

Congratulations. You’ve made it to level 2. Go to and enter Bobsyouruncle as the login and the answer to this equation as the password.

    f(1)= 7182818284
    f(2)= 8182845904
    f(3)= 8747135266
    f(4)= 7427466391
    f(5)= __________

Keeping in theme with Google’s love affair for the number e, I soon realized (by looking at this site that displays the first 2 million digits of e) that each of these numbers are consecutive 10 digit sequences of e.

I’ll give you a hint, if you sum the digits of each number (something I typically do to see if the numbers are divisible by 3), youll find an interesting result (other than they arent divisible by 3). That should lead you to the final answer with a bit of coding.

The final answer takes you to a recruiting page. What an ingenious and clever way to recruit talent, though I suppose by giving away the answer, I’ve defeated the purpose. How naughty!

comments suggest edit

This stolen from Koba-san

Well, the jury is still out on the effects of the Internet on American community.  I thought the following clips from Putnam frame well the challenges that face those who wish to enhance social capital through the use of computer technology.

The absence of any correlation between Internet usage and civic engagement could mean that the Internet attracts reclusive nerds and energizes them, but it could also mean that the Net disproportionately attracts civic dynamos and sedates them.  In any event, it is much too early to assess the long-run social effects of the Internet empirically… neither the apocalyptic “gloom and doom” prognosticators nor utopian “brave new virtual community” advocates are probably on target. \  \ – Robert D. Putnam, Bowling Alone: The Collapse and Revival of American Community, p. 171

Some of the allegedly greater democracy in cyberspace is based more on hope and hype than on careful research.  The political culture of the Internet, at least in its early stages, is astringently libertarian, and in some respects cyberspace represents a Hobbesian state of nature, not a Lockean one.  As Peter Kollock and Marc Smith, two of the more thoughtful observers of community on the Internet, observe, “It is widely believed and hoped that the ease of communicating and interacting online will lead to a flourishing of democratic institutions, heralding a new and vital arena of public discourse.  But to date most online groups have the structure of either an anarchy [if unmoderated] or a dictatorship [if moderated].” \  \ – Ibid., p. 173

In a particularly striking parallel to the use of the telephone, a careful study by sociologist Barry Wellman and his colleagues of the use of computer-mediated communication by research scholars found that

Although the internet helps scholars to maintain ties over great distances, physical proximity still maters.  Those scholars who see each other often or work nearer to each other email each other more often.  Frequent contact on the Internet is a complement to frequent face-to-face contact, not a substitute for it.

\  \ – Ibid., p. 179

[Via LostYouth]

comments suggest edit

Michael from London and Dave from New York dropped in unexpectedly this week at the same time. We had a fun time driving around nearly all of L.A. yesterday.