Monday, November 2, 2009

Doing the Wave

I’m sure this isn’t the first blog post about Google Wave with that title, but it helps illustrate the potential ubiquity of the system. Besides the obvious and oft-mentioned nod to Firefly, “wave” itself carries several connotations matching up with its intent. Most electronic communication manifests itself as a wave at some point or another. The act of waving is itself a method of communication. You can ride the wave while surfing the web. But this post isn’t about the name. It’s about aspects of Wave many reviewers seem to have missed entirely.

Have Revolution — Will Wave

Wave will revolutionize communication. There, I said it. I drank the Kool-Aid and placed my bets. This is something I can get behind and evangelize, and I am. In fact, it’s exactly what I’ve been waiting for on so many levels…

But communicating the advantages of Wave to a wider audience than the geek crowd has been challenging at best. Every piece of “mainstream” coverage I’ve seen so far (CNN, Fox, MSNBC, etc.), has either completely missed the point or has contained blatant falsehoods. I don’t hold it against them, however. From my point of view, the blame falls squarely on the shoulders of the tech-savvy reviewers, through whom mainstream media receives their filtered information.

The problem is a fundamental disconnect between the way the two crowds conceive of the changes Wave brings. Most of my geeky friends understood immediately what manner of things you could accomplish with Wave. The possibilities are endless. And there’s the real rub… Rather than trying to explain how Wave will immediately benefit “normal” people, we’ve tried to extol the vast and plentiful virtues of the future of internet communication ZOMG!!!11one.

Gogo Google — Away, that is

Besides the basic failure to demonstrate the benefits of Wave, we have also failed to separate the Google from the Wave. Much fuss has been made about Wave as implemented by the big G. All that fancy AJAX, and “shiny” chrome are simply the bling-bling of Wave world (part of me can’t believe I just wrote that).

If we truly want this to be the next wave in internet communication, we need to direct attention towards the Google-less components of the system: the Wave architecture and the federation protocol.* The saddest part of this story is that the Wave team emphasized this throughout the 1:20 long demo. But “architecture” and “protocol” are about as catchy as a genetic disorder (newb note: you can’t catch those).

The simple fact is that many people will be (and have been) turned off by the very things the media has been emphasizing. Occasionally they remind us that it’s only a developer preview, but first impressions are the most precious. After my few hours toying with Wave today, I can probably name the members of my family who would be turned off immediately.

My greatest AHA! moment during the presentation was when they brought up the Initech Wave client. Wait, what? Did I just suggest a console client will help invite the masses to the party? In a sense, yes. This is where wave really shines. (No, really!) All of the chrome and UI magic is utterly meaningless in the scheme of things.

Imagine if Microsoft had developed Outlook and then opened up the Exchange protocol to standardization. Would we not still have Thunderbirds, and Evolutions, and Eudoras, and pines? Google’s wave interface is nothing more than a single interpretation of what it means to wave (yes, I’m making it a lower-case verb). It’s a damn shame to lose a sizeable audience by scaring them away.

Something of practical value

In a break from my usual rants, I’d like to propose some concrete approaches for people to employ when trying to convince others.

  1. Make more clients! I know it’s a bit early to be making this demand, but we really need to show what else is possible with wave. To get the most bang for our klocs, we should begin by exploring simpler interfaces that put the emphasis on the mechanics of the conversation model.
  2. Re-target your conversations to put emphasis on the mechanics of the conversation model (bah… “mechanics,” “model,” maybe we should start searching for new language too). Extensions? meh. Bots? meh. Being able to follow who said what when? Oooh… (this may even help with marital spats). Eliminating header crap, re-re-re-formatting issues, attachment corruption, forgotten “reply-all”s, and other present-day annoyances? BIG OOOOOHHHH. Spontaneously switching from “I’m writing an e-mail” to “I’m chatting with someone”? Well, maybe that’ll take a bit more effort, but you get the idea.
  3. Remind people explicitly and often that “Google Wave” and “Wave” are not synonymous. What you’re seeing now is essentially the first version Hotmail cum Wave. When you look at how many differences there are between Hotmail and other e-mail clients out there (and even previous versions of Hotmail), it will be much easier to grasp just how nascent this technology is.

With all that out of the way, I’ll follow up at some point with my impressions of Google Wave. :)


* I say they’re Google-less because as open standards they will be under essentially public control.

At about 1:08:00 in the long demo.

Saturday, October 3, 2009

From Frivolity, Functionality Follows

Custom operator library for C++

Several months ago a friend of mine came up with a way to make valid C++ out of ^_^. Using the code in that link, foo ^_^ bar is equivalent to assert(foo != bar) (as long as foo & bar are implicitly convertible to ints, of course).

The topic came up again the day before yesterday, and I decided to try implementing it myself (having entirely forgotten what the original code looked like). My version used a template so that the operator could be applied to any type. When I tested it using an assertion instead of an exception, I stumbled upon my compiler’s ability to optimize the entire operation away when compiled in release mode.

After playing around with the template design trying to implement other operators, I realized the overall design was highly susceptible to generalization. So began a 48-hour mission to put together an easy-to-use library for creating custom operators. The result?

IdOp*, short for Identifier Operator, provides a few simple macros (at least on the front-end) to generate all the necessary templates for a wide variety of operator configurations. Here’s a small sample to whet your appetite. Further details are available in the source code.

// SIMPLE
//   x ^__- y <=> x / y
IDOP_CREATE_RIGHT_HANDED(^, __, -, Examples::Quotient)

// COMPLEX
IDOP_CREATE( _ ,
    IDOP_LEFT_HANDED( - ,
        // x -_^ y <=> x + y
        IDOP_OPERATION(^, Examples::Sum)
    )
    IDOP_LEFT_HANDED( > ,
        // x >_> y <=> abs(x - y)
        IDOP_OPERATION(>, Examples::Difference) 
        // x >_< y <=> if (x != y) throw
        IDOP_OPERATION_RET(<, Examples::ThrowNotEqual, void)
    )
    IDOP_RIGHT_HANDED( - ,
        //  x ^_- y <=> assert(x != y)
        IDOP_OPERATION_RET(^, Examples::AssertNotEqual, void)
        //  x |_- y <=> x * y
        IDOP_OPERATION(|, Examples::Product)
    )
)

The only feature I feel it’s missing is the ability to modify one or both of the operands. When I was originally designing the templates, I threw const around like crazy to make sure I didn’t miss out on any static evaluation. Now that I have the code generation architecture finished, it should be a breeze to add in mutable operands.

Then come the joys of documentation…


* I've been pronouncing it EYE-dee-ahp (sounds sort of like giddyup) or EYE-dahp

Wednesday, September 9, 2009

Live Writer – First Impression

Well, for GG Hubble! I decided to give Microsoft’s Live Writer a swing. So as first impressions go, this really is quite first (I probably will never go into any depth because I don’t blog enough to do anything deep ;) ). Oh, and expect me to be excited about things that you might find mundane.

After telling the software that I already had a blog and entering my login info, it immediately downloaded various resources from the website and presented me with an editor:

Live Writer

As you can see, it determined the styles in use on my blog and formatted the editor to match. There’s a preview tab which, unlike Blogger’s preview, actually shows your new post as it will appear on the main blog page. As far as I can tell, everything else is pretty much self-explanatory.

I’m a bit surprised that it doesn’t use a ribbon, but I think the toolbar layout is something familiar to most web users. It reminds me of the various JavaScript WYSIWYG editors you see all over the web. The rest of the UI has sort of a Visual Studio meets Windows Explorer look about it which I find appealing.

I do wish that the source editor did syntax highlighting, but I don’t anticipate using the source editor much. Oh what’s this? “Add a plug-in…” I’ll have to check that out later.

Speaking of source, the code it outputs is fairly clean, semantic XHTML. It does get a tad defensive with some inline styles (only on the image so far), but there may be options or plugins to change that. I could edit it to use a custom class from the template if I wanted to.

So far I haven’t had to “fix” anything. With the blogger editor, I couldn’t get paragraphs to interact correctly, and constantly had to make minor source code adjustments. Oftentimes I’d simply give up and just write the HTML in another editor. Not anymore (so far)!

I always try to use proper Unicode code points for things like ellipses (… vs ... – three periods), quotes* (“angled” vs. "straight"), and apostrophes (don’t vs. don't). (Yes, I’ve got the windows ALT-# shortcuts for all these memorized.) Live writer does it for me!

Just before posting, I discovered the categories feature. It pulled all the tags I’ve used from blogger and included them with checkboxes.

So yeah, I’ll be using this for a while until something about it starts bugging me…


* I’ve often wished that early typewriter/computer character sets included angled quotes, if only for the sake of people who write programming/scripting language parsers.

GG Hubble!

I’ve been waiting with bated breath ever since the recent repair mission completed, and now we have pictures!

Thursday, August 13, 2009

Exceptional Logic

I’ve always felt that using exception handling for “normal” programming logic is a bit…dirty. Take the Access database I inherited at work for example. There are several UI modules in separate MDB files for various tasks like running reports, entering customers, sending mass mailings, etc. When one module needs to activate another module, the most straightforward method would be to check if the new module already open, then either open it or switch to the already open window. Instead, it blindly attempts to switch to the window and if there’s an error, it launches the module.

This is especially bothersome in VBA (Access’ scripting language) due to the way Basic handles errors. When you set an error handler (really just a glorified goto), all errors end up at the same point in your code, usually at the end of the function. This means that the code which launches a new window isn’t anywhere near the code that tries to switch to an existing window. I nearly gouged my eyes out when I first came across this.

And then there’s debugging… The Visual Basic debugger allows you to break on all exceptions whether handled or not. This comes in handy if you have a generic error handler which doesn’t provide enough information to track down the cause. By breaking on all exceptions you can find out exactly where the exception occurs and inspect the surrounding code. But if you are trying to debug code that activates another module, you’ll never be able to get past the initial exception when the module isn’t open.

That being said…

Here’s a really simple way to validate an e-mail address in .NET—no Regular Expressions or manual string parsing required:

try
{
  var test = System.Net.Mail.MailAddress(emailAddress);
}
catch (Exception)
{
  // email is invalid
}

Monday, August 10, 2009

This insanity has got to stop

If I posted links to every interesting article, video, etc. that I come across on a daily basis, this would be a much livelier place. However, something about it makes me feel a bit cheap. And usually the really good stuff is already so well cross-posted that I'd just be spamming your RSS feeds (as if anyone subscribes to my blog).

That being said... I can't adequately describe how much this story gets under my skin. Luckily PZ Myers can!

Monday, July 6, 2009

Dark Matter/Energy, Resolution of Spacetime, etc.

Warning: This is wild speculation from someone who probably doesn't know what he's talking about. Please link me to any resources that would set me straight. :)
Cliffs Notes: Could the possibility of a fundamental resolution to the universe explain dark matter/energy?
Something about the search for the nature of dark matter/energy has always bugged me. Every time I've seen the topic explored (and I admit I haven't done any really advanced reading on it), they've taken for granted that the dark matter is a real substance that we can potentially interact with, and that the dark energy is an actual force being exerted on normal matter. In some ways it reminds me of the search for the luminiferous aether. Has anyone seriously explored the possibility that it's an effect of some (simpler) underlying cause?
In my time playing around with computer graphics, I became quite familiar with various aliasing effects. These range from "jaggies" and Moiré patterns in the spatial realm, to strobe effects like reversed wheel rotation in the temporal realm. These artifacts are distracting to viewers, so we use antialiasing techniques to alleviate the problem. Jagged edges are smoothed by what essentially amounts to blurring. Moiré patterns succumb to anisotropic filtering. Temporal antialiasing, aka motion blur, is more explicit about its goal. There is a fundamental limit to the amount of information an image can store at a particular resolution. Antialiasing removes a bit of certainty about the original source in exchange for a boost in perceived resolution.
What if there's a similar story going on "under the hood" of the cosmos? The first time I considered this was when I learned about Planck <measurement>. To my compsci-biased mind, this struck me as a fundamental resolution and bit-width/dynamic range for the universe. The first thing I noticed was that the blurring effect of antialiasing is roughly analogous to the uncertainty principle, which deals with effects on the Planck scale.
Obviously this is a retcon for me. I was simply trying to put the realities of QM into terms I could easily understand. But to my surprise, there are a few ideas being seriously advanced that are along the same lines:
The holographic and cellular automata explanations would certainly vindicate my resolution idea, and the fractal universe is at least compatible. When I heard about the holographic universe on The Skeptic's Guide to the Universe (#183), it made me think a bit (har) more about the bit-width or dynamic range analogy. They discussed how gravity wave detectors weren't seeing gravity waves but were getting a fairly consistent noise they weren't expecting (reminded me--and the cast--of the CMBR's discovery). This could easily be explained as a bottoming out of the dynamic range of the gravity field. Since gravity gets weaker as you get further from the source, the ideas above suggest that it would effectively disappear at some point.
Now dark energy attempts to explain why the universe's expansion is accelerating in defiance of gravity. What if there is basically no gravity at the massive distances between galaxies? That would at least explain gravity's impotence. Perhaps the extra oomph comes from quantum fluctuations (rounding error?) in this gravitational dead zone.
Dark matter tries to explain the opposite effect. Galaxies should be flying apart given the amount of matter we can detect inside them. What's holding them together? I haven't explored this idea in as much depth, but it seems like the resolution/dynamic range ideas could help explain this extra cohesiveness. Perhaps some of the resolution errors at the small scale create significant effects at the large scale. Maybe the dark energy effect is also "pushing" inwards over a large scale that isn't noticeable in the small scale.
Again, this is all wild speculation on my part. It's a fun exercise for my gray matter, but if it's all in vain, I'd rather turn my attention elsewhere. Let me know what you think.