Thursday, July 16, 2009

Learning to Love Jetpack, Part 1

I've been having a torrid on-again/off-again love affair with Mozilla Jetpack for the past several weeks, and I have to say, it's been a bit exhausting at times. But try as I may to walk away, I keep coming back for more. I guess fools rush in where less impetuous web developers fear to tread.

It should be said up front that Jetpack is quite immature at this point (having been announced only a couple months ago) and there's a new release almost every week. Putting it through its paces feels a bit like driving a concept car. It's fun, it's exciting, it'll amaze your friends. But is it ready for production?

The basic concept is compelling: Make it possible to develop JavaScript-based Firefox extensions that have special security privileges (the ability to do cross-site AJAX, for example) combined with the ability to vulture page objects at load time, a la Greasemonkey. The goal is to let mere mortals write Firefox add-ons without having to get mired in the XPCOM morass. (If you've ever tried to write a Firefox extension, you know what I'm hinting at. If not, you can get a good whiff here.)

What can you do with Jetpack? Right now, not a lot, other than peek and poke the DOM as a page loads. True, the MozLabs crew recently added audio-recording support, and there's a persistence API that doesn't rely on cookies. Plus you can iterate through tabs, put stuff in the status bar, and create toaster popup notifications. (Woo hoo.) But still, not a lot. You can do most of this kind of stuff with Greasemonkey.

That'll all change soon, though, as Jetpack's APIs expose more and more XPCOM internals. Be clear, a year from now, no one will be mentioning Greasemonkey and Jetpack in the same breath.

Even now, though, Greasemonkey and Jetpack are pretty far apart, under the covers. One difference is the runtime scope. Jetpack runs "above" all open tabs. This is quite handy, because it means you can easily enumerate and manipulate all open tabs (I'll provide some source code for this in a later post), something that's all but impossible to do in Greasemonkey.

Another nice thing about Jetpack is that it comes preloaded with jQuery. You don't have to do anything special to access jQuery methods; just start using them.

There's some built-in support (convenience methods) for the Twitter API, which is kind of interesting.

And you get an integrated development environment with Bespin, which is pretty nice. That, combined with instant-on loading of scripts (no need to restart Firefox), makes for a rapid dev/test cycle, greatly reducing Rolaids consumption. I'll lead you through the dev workflow in my next post so you can get an idea of what it's like to develop Jetpack scripts.

There are a couple of issues (one of them quite serious) to be aware of, though. First, you can't install and use a Jetpack script without installing Jetpack. In other words you can't just give a script to a friend and say "Here, install this, it's cool." Instead it's "Go to the Mozilla Labs download page, install this week's alpha build of Jetpack, along with Firebug 1.4, and pray God my script still works on your machine next week."

The MozLabs guys say that eventually, Firefox may come with embedded Jetpack support so that no one need proactively do a Jetpack install before being able to use Jetpack scripts. That would be a Very Good Thing, except for one potentially nasty issue.

The nastiness has to do with the way Jetpack facilitates memory leakage. Simply put, it's extraordinarily easy to write scripts that eventually cause Firefox to hang. One can argue that adhering to best practices will prevent this (which is true), but I think that if the Jetpack agenda truly does revolve around getting mere mortals (people with modest JavaScript skills) to participate en masse in creating Firefox extensions, the potential exists for disaster. You're inevitably going to have large numbers of amateur programmers getting into trouble with memory leakage, and that's not going to do anything good to Firefox's already poor reputation for memory leakage nor to Jetpack's reputation.

As I see it, the problem is really twofold. Fold Number One has to do with the way XPConnect works. (XPConnect is the bridging technology that allows JavaScript to interoperate with XPCOM objects written in C++.) Without going into gory detail, C++ and JavaScript have different memory management models. One is a world of reference counting, the other is a mark-and-sweep world similar to Java. When you wrap a C++ object in such a way that it's usable from JavaScript, you're entering a whole new universe of memleak possibilities. This is the domain where Jetpack lives.

The second aspect of the problem is that the kinds of capabilities that attract programmers to something like Greasemonkey or Jetpack tend to draw on programming patterns that are inherently dangerous from a memleak point of view, chief among them the Observer pattern. Sometimes I think the Observer pattern is actually better termed The Cyclic Reference Memleak pattern, because you're basically creating objects and/or wrappers that maintain references to each other. It's a great way to generate memory leaks.

Again, any competent developer (myself not included) will understand the importance of best practices here, and staying out of trouble is not rocket science. But to expect the average script kiddie to know or care about memleak mitigation is like expecting the average McDonalds customer to know how to make a roux.

In any case, Jetpack is an interesting beast and I continue to be fascinated by (and infatuated with) it -- enough so, that I intend to devote at least a couple more blog posts to it. Check back here in a day or two. We'll have some fun.

Friday, July 10, 2009

JavaScript Expression Closures and Why They Rock

JavaScript expression closures (new for JS 1.7 but syntactically even cleaner in 1.8) are one of those things that seem very so-what the first time you hear about it, but leaves you slapping your forehead and saying "OMG this is so darn freakin' cool" repeatedly after you start using it. Why? Because OMG. It's so darn freakin' cool.

The basic notion is that instead of writing short utility functions (which I have a million of) as, for example
function square( x ) {
return x * x;
}
you just write
function square( x ) x * x
which (yes yes, I know) looks very so-what, but bear with me for a moment. The short syntax starts to become more compelling when you begin using it in anonymous functions, particularly callback functions (which, as you know, tend to be anonymous a great deal of the time). For example, suppose you have a custom comparator for the sort() method of Array:

function descending( a,b) {
return b > a;
}

[5,1,3,2,4].sort(descending); // [5,4,3,2,1]

You can instead write it as:
[5,1,3,2,4].sort( function(a,b) b > a );
Another fairly trivial example: Suppose you want a function that will constrain strings to a certain length. You can do something like:
function limit(s, n) s.length > n ? s.substring(0,n): s
As a more elaborate example, suppose you have the following code, designed to convert a "camelCase" string to underscore_format.
function underscore( str ) {

function toUnderscore( s ) {
return '_' + s.toLowerCase();
}

return str.replace(/[A-Z]/g, toUnderscore );
}

// underscore( "aName") --> "a_name"

With the new closure syntax, you can do:
function underscore( str )
str.replace( /[A-Z]/g,
function(s) '_' + s.toLowerCase() );
Here I've converted not only the outer function, but also the callback to replace(), to expression-closure form. (I split it into 3 lines for readability, but it will still execute correctly as a 3-liner. You don't have to write these things as one-liners.)

Still not convinced? Try using this syntax (supported in Firefox 3+, and anywhere else JS 1.7 or 1.8 are implemented) in some functions yourself, and see if your code doesn't become easier to write, shorter, and (in most cases) more readable. It may be only a small improvement on the more verbose older syntax, but an improvement is an improvement. I'll take it.

Thursday, July 09, 2009

Why Google Chrome OS is a nonstarter

As the entire world knows by now, Google recently announced its intention to muscle its way into the operating-system space (supposedly) by way of something called Google Chrome Operating System.

But is it really an operating system? By Google's own account, it's actually an instant-on windowing system sitting atop a Linux kernel, and it will run on certain netbooks only, using certain chipsets only. Google is reportedly working with Acer, Adobe, ASUS, Freescale, Hewlett-Packard, Lenovo, Qualcomm, Texas Instruments, and Toshiba to "deliver an extraordinary end user experience." I take it that means Flash will be supported, since Adobe is on the partner list.

But where are the value-adds in this picture? What, exactly, does Chrome OS bring to the table that you can't already get elsewhere?

Not much, it turns out.

"Speed, simplicity and security are the key aspects of Google Chrome OS," acccording to Google. Speed, in this case, means instant-on. Turn your netbook on, it lights up, you have e-mail and browsing. Of course, you might have to wait a few seconds while the netbook (re)acquires a wi-fi connection, but at least you don't sit there for two minutes waiting for Godot.

This sounds like a great technological advance until you realize that the same instant-on capabilities promised by Chrome OS are already available via HyperSpace from BIOS vendor Phoenix Technologies Ltd., Splashtop from DeviceVM Inc. and Cloud from Good OS, as well as (more recently) Presto from Xandros Inc. In addition, Dell is putting special instant-on features in its Latitude laptops, and oh by the way, I can put my last-year's-model Dell laptop to sleep any time I want and wake it up later in the day, right now.

Bottom line, instant-on is not new, and it'll be even less new when netbooks running Google Chrome OS become available for consumers in the second half of 2010 (according to Google).

Simplicity is another supposed value-add. What this really seems to mean is that you can only run web apps, and you have only one UI to learn (Chrome's). Which is fine. I spend most of my day in a browser already, thank you.

Security is the third main value add, according to Google. Security expert Bruce Schneier has already derided this claim, however, calling it "idiotic." Far be it for me to disagree with such a distinguished expert.

What are we left with? In terms of new technology, not much, really. There's nothing here you can't already get elsewhere. The only hope Google has of differentiating itself in this market is to offer a jaw-dropping user experience, something so compelling that nothing else even compares. In other words, they have to out-Apple Apple. I have yet to see Google do that -- with anything. Maybe this time they'll pull off a miracle. But somehow I doubt it.

Tuesday, July 07, 2009

An exercise in riddle-solving

1 2 3 4 5 = 1
5 4 3 2 1 = 2
1 1 1 1 1 = 5
2 2 2 2 2 = 1
3 3 3 3 3 = 6
4 4 4 4 4 = 2
5 5 5 5 5 = 7
6 6 6 6 6 = 3
1 1 2 2 2 = 6
3 3 4 4 4 = 7
1 1 1 1 2 = 1
1 1 1 1 3 = 6
1 1 1 1 4 = 2
1 1 1 1 5 = 7
2 2 2 2 6 = 3
2 2 2 2 5 = 7
2 2 2 2 4 = 2
2 2 2 2 3 = 6
2 2 2 2 2 = 1
6 1 1 1 1 = 2
5 1 1 1 1 = 8
4 1 1 1 1 = 5
3 1 1 1 1 = 2
2 1 1 1 1 = 8

3 1 4 1 5 = ?


This puzzle comes by way of a terrific blog post by James Marcus Bach, who in turn got the puzzle from Trey Klein. Bach candidly reports: "I found it difficult to solve. Took me a couple of hours."

As a rule, I hate puzzles of the recreational (purposeless, do-nothing) sort -- colloquially known as brain-teasers -- simply because they accomplish nothing except to waste time and make me feel stupid. I either already know "the trick," or when I find out what the trick is, it turns out not to be useful for anything other than solving the puzzle in question. Then I feel cheated and stupid.

But I'm inherently a masochist, so naturally, when I saw the above puzzle, I just had to try it. ;)

I resolved not to spend more than two or three minutes on it, though.

It turns out, I got the puzzle right, and it took me only a minute or so. You might want to stare at the numbers yourself for a couple minutes now, before reading the next paragraph.

The supposed "answer" and its reasoning (involving a somewhat painful-looking formula with modulo arithmetic) is given here. I took a far more pragmatic approach. I looked only at occurrences of "5 =" and saw that in 3 out of 4 cases, a 7 appeared on the right-hand side of the equals sign. If this is some kind of casino game and I'm betting real money, and I see "5 =" come up again, I'm betting on 7 being the answer.

I decided to reverse every line of the problem and try it again. I looked at each occurrence of "7 =". And again, 3 out of 4 times, "7 =" ends up paired with 5.

That's it, I decided. The answer must be 7.

It turns out 7 is the correct answer.

"But you just guessed!" someone will say. "You didn't prove that the answer is 7."

My retort is that neither did the person who wrote the explanation given here prove that the inevitable answer is 7, because he or she didn't prove that the given explanation is the only explanation that will work; he merely gave an explanation that is consistent with 7 being the answer.

I'm 100% sure if I had 3 hours, I could come up with at least a couple of formulas that, given the input data shown above, will be consistent with an answer of 7. I can also come up with a couple of formulas that are consistent with an answer of 1. So which formula (out of these several formulae) is "correct"? Is any one formula provably the only possible correct one? That's the question. I'd argue it's not even possible to know if that question can be answered.

Still, is it reasonable to attack a problem like this heuristically, and "bet" on an answer that seems (statistically) likely to be correct? Is it better to spend 3 hours arriving at a formula that's consistent with a given answer (but that could be "shot down" by a different formula later)? What kind of approach do you take if you're in an out-of-control spacecraft and you need an answer within 3 minutes or you'll burn up on re-entry? What if you're in the Titanic and have a full 24 hours' notice of icebergs ahead and need to decide on the correct heading to take? Do you "bet the farm" on a heuristic method -- or on a formula that seems right (and has the appearance of being rigorous, because it's so formulaic) but isn't provably correct?

I think the approach you take depends on the situation, but it also depends on your personal working style. In the absence of a reason not to, I tend to take a heuristic approach. My style is not to waste time, even when I have time to waste. What's yours?

Wednesday, July 01, 2009

Taking microURLs to the next level

If you've been following my Tweets lately, you may have noticed that I've begun using 3.ly ("threely") as my URL-shortener of choice. Before that, it was bit.ly, and before bit.ly I used TinyURL.

Like many Twitter users, I moved from TinyURL to bit.ly for the simple reason that bit.ly produces tinier URLs. Threely gives even smaller URLs. But that's not why I'm moving from bit.ly to 3.ly.

Threely has an ambitious goal: to take micro-URL rewriting to the next level. The Threely folks haven't yet said what their list of services will include. But already, they offer an interesting glimpse of what they might be up to. All you have to do is append a hyphen to any 3.ly URL in order to activate a hit counter. If you surf to the hyphenated URL, you come to a preview page that displays the hit count and one or more continuation links. (To see what I mean, try http://3.ly/ymZ-, which links to one of my previous blog posts but first takes you to the hit-counter page.)

One can imagine a range of services that Threely could offer based on short query strings. For example, what if, by appending "-1" to a 3.ly URL, you could have Threely not only track hit-counts but send you a daily or weekly report of traffic on that URL via e-mail. Suppose "-2" means the same thing, except your e-mail contains verbose results instead of cursory results. The verbose results might include the HTTP headers from each visitor's GET request, the date/time of each request, etc.

There isn't a Threely API yet, but one can imagine that Threely's API could offer various takes on "URL-rewriting-as-a-service" (URaaS? oh dear God please not another acronym...). Or should we just call it micro-analytics?

As I say, exactly what the Threely folks have in mind, I don't know. But I'll be watching their home page closely, and signing up as a registered user as soon as they make sign-ups available. I have a feeling this could get interesting.

Monday, June 29, 2009

Making music with Apple IIgs technology


Over the weekend I found myself using floppy disks for the first time in I-don't-know-how-many Moore epochs. It was a brain-bending reminder of how much great technology was built atop operating systems that fit into a few K of memory and Mylar storage media.

Back in the mid-1980s, Bob Yannes, the guy responsible for the MOS Technology SID (Sound Interface Device) chip in the Commodore 64 and the Ensoniq Digital Oscillator Chip (Ensoniq ES5503 DOC) that powered the Apple IIGS computer's audio system, introduced the first low-cost digital sound-sampling keyboard, the Ensoniq Mirage. At $2000 (in 1985 dollars!), it might not seem low-cost, but you have to realize that the Mirage's main competition at the time was the Fairlight CMI Series II, which, at ~£27,000, only very successful musicians could afford.

The Mirage was an incredibly versatile (and for its day, quite impressive-sounding) MIDI keyboard, with a 333-note sequencer (big stuff back then!), velocity-sensitive keys, and of course, the ability to use sampled sound. It loaded sound samples from 128K single-sided double-density floppy disks. Each disk held six 32-note "voices" plus a copy of the operating system.

In my case, I couldn't afford a Mirage keyboard ($2000 was too steep for me), but around 1987 Ensoniq came out with a rack-mount (keyboardless) version of the Mirage that was much cheaper (~$1300). Once it became "last year's model," I picked one up, new, at Sam Ash for $1000. The rack-mount unit (exactly the same as what I have) is pictured above.

My Mirage box had collected so much dust in the basement that I had to spend 5 minutes just cleaning the chassis exterior. I was very worried, of course, that the accompanying floppy disks (without which the device is useless), now 20 years old, would be so corrupted with flipped bits that I wouldn't even be able to boot the machine. Cheap floppies always seemed to go bad on me in two or three years. Could these still be good after 20 years?

Yes. Amazingly, I was able to boot the Mirage and load sound samples from disk. And just as amazingly, everything else worked -- MIDI in/out/thru, all the front panel buttons, etc. What had me challenged was the fact that I couldn't find the user's manual -- and this was a complex box to operate. Not really complex, just a poor user interface. Many buttons, many numeric inputs, no text messages whatsoever. It's a matter of knowing which buttons to push in which order.

I looked online for a user's manual, assuming there would be one. There wasn't. Instead, it turns out there's a lively aftermarket in Mirage user manuals, which often sell for more than used Mirage boxes themselves! But I did finally find a "cheat sheet" showing all the parameter codes. From there, I figured out the button-combos myself.

I wired the MIDI-in port to my Yamaha DX-7's MIDI-out, and lo! There was sound coming out the Mirage's mono output jack. And the layered sound (Mirage over DX-7) was actually quite marvelous, especially when piped through Cakewalk's digital effects (running on my Compaq Presario).

I often wonder if we really need the 120 gigabyte drives and 2GHz CPUs and mega-ginormous "operating systems" (so-called) on which we so slavishly rely today. Do we need to live in such digital squalor, really?

I look at the Mirage and think: "Not."

Friday, June 26, 2009

Google Voice: Cloud Meets Cell

Yesterday, to surprisingly little fanfare, Google started fulfilling invites to its new Google Voice service, which was announced back in March. This is essentially the culmination of Google's GrandCentral acquisition of 2007, but have no doubt, it's not the end of the story. It's the beginning of one.

It's hard to sound-bite Gvox. Ostensibly, it's a way to sign up for a single vanity phone number that lets you do voicemail and SMS text retrieval using VoIP from any device. According to Google:
[ Google Voice ] improves the way you use your phone. You can get transcripts of your voicemail and archive and search all of the SMS text messages you send and receive. You can also use the service to make low-priced international calls and easily access Goog-411 directory assistance.
If that sounds boring, it's because it is. But I think it may be a handful of frost scraped off the tip of a big icy thing floating in the ocean. If all Gvox did were to offer superior service to Verizon's Visual Voicemail, it would be a significant advance. But there's the potential for more. Much more.

Even before the GrandCentral acquisition, Google had big plans in the VoIP and mobile domains. You have to look no farther than United States Patent Application 20080232574 to get a hint of what I mean.

But use your imagination. If your cell phone becomes a gateway to Android cloud apps, you've essentially got the power to retool your phone with a virtualized OS, and obtain access to web apps galore. In fact, with a little sleight-of-hand, Gvox can give the appearance of completely reskinning your phone and offering a whole new menu system. Want to store your address book in the Gvox cloud? Done. Get auto-complete as you enter phone numbers? Do Google white-pages 411 lookups? Do reverse phone lookups? Record a podcast (and store it in the cloud)? Upload a cell-phone video to YouTube in a single speed-dial click? You get the idea. Let your imagination (ahem...) roam.

One thing I wish Gvox would do that I don't think it does (yet) is full many-to-many mappings of phone numbers. Right now you just get a one-to-many mapping of a vanity number to all your other numbers, which is handy enough because it means people can always reach you with just a single phone number, but I think it would be cool (especially if you're a marketer) to have the ability to map many phone-number aliases to a single target number and get advanced analytics for the resultant traffic. Who called from which number? Which ad or blog placement or campaign was the number associated with? Etc. etc.

We'll probably get all that -- and more. As I say, right now, on the surface, Google Voice doesn't sound all that exciting. But under the surface, there's a whole new world waiting. The Internet is your new dial tone.

Thursday, June 25, 2009

Java app server popularity wanes, except for one



Java app server popularity is on the decline -- if Google search volume is any indication. The above graphic (from Google Trends) shows five years of data representing search volume (upper portion) and news-citation volume (lower) for keywords "apache tomcat","websphere","jboss," and (just for fun) "weblogic." The trend lines are pretty convincing, it seems to me. Only Tomcat (which of course lacks full-blown app server status and is the orange in this apples-to-apples comparison) has a relatively steady trend line. The trajectory for all others is about the same as that of the U.S. Airways jet that landed in the Hudson.

In recent years, some of the lack of app-server-targeted new development has shifted to development that targets runtime frameworks like Spring. But it appears even interest in Spring has peaked.



The news for Java runtime containers is not all bad, however. One open-source application server -- namely Glassfish -- has been coming on strong.



What's interesting about Glassfish, of course (aside from the fact that it has a microkernel based on OSGi), is that it's a Sun Microsystems-backed project, with Sun providing commercial support for the enterprise version of the server. That means the future of the enterprise version rests with Oracle. One wonders what, if anything, Oracle will do with it.

Sunday, June 21, 2009

I thunk, therefore I am

Every once in a while I'm humbled to find that there's a word, in computer science, for something fairly common, that I've never heard of before. Today's word? Thunk.

According to Wikipedia, "thunk" may refer to:
  • a piece of code to perform a delayed computation (similar to a closure)
  • a feature of some virtual function table implementations (similar to a wrapper function)
  • a mapping of machine data from one system-specific form to another, usually for compatibility reasons
The original paper on thunks was P.Z. Ingerman's somewhat inscrutable (to me, at least) piece in Communications of the ACM, Vol. 4, No. 1 (1961).

I am, as I say, humbled to find that I did not know the term thunk. All this time, I thought it was the past tense of think.

Wednesday, June 17, 2009

How do you get 10K Twitter-followers legitimately?

NOTE: This post is obsolete. You want this one instead.

I explained yesterday why it's important, professionally, for me to have a large number of Twitter followers, and I pointed out that having quality followers is important: What good is it to have 10K followers if they're all trying to sell you a MLM scam?

I also promised that today, I'd tell you how I got to the 10K Twitter-follower mark legitimately, without sacrificing quality, which is to say without resorting to the sleazy list-juicing tricks that so many "marketing experts" seem to use on Twitter to gain followers.

Here is what worked for me.

I'm in the analyst business. My company doesn't compete directly with Gartner or Forrester or any of the other big analyst firms, but some of Gartner's (and Forrester's, etc.) customers do have an interest in some of the areas we cover. Thus it stands to reason that if someone (a given Twitter user) is following the Twitterstream of a particular analyst working for XYZ Group, that person might very well be interested in following my stream.

So imagine this scenario. Joe Twitter-user works in IT for a big company. He has decided to follow Analyst Linda Lou's Twitterstream because she covers content technology at XYG Group.

I decide to follow Joe Twitter-user on Twitter -- and Joe notices that someone named @kasthomas has decided to follow him. He says: "Hmm, who is this @kasthomas character? I better go check him out." Joe arrives at my Twitter page and sees from my Bio that I'm a content-technology analyst. He scratches his chin, shrugs, and says "Okay, maybe I'll follow this guy and compare what he has to say with what Linda Lou has to say."

The nice thing about Twitter is that people's follower lists are public. I can get the Twitter usernames of all of, say, Forrester's list of 18K+ followers. I can inspect that list by going directly to http://twitter.com/forrester/followers, or I can harvest the list programmatically by using the Twitter API and a little Javascript.

I have written various scripts (most of which run in the Firebug console; some are Greasemonkey scripts) that do things like harvest a given account's followers, do a diff between my follower list and another list, and batch-follow a given group of IDs. I also have scripts for finding out who I'm following that is not following me back, and purging those people from my Following list. I've blogged before about some of these scripting techniques, which (as I say) often involve only a few lines of code that can be run in the Firefox/Firebug console.

Bottom line, it's not rocket science. You follow people with common interests. They follow you back. Or not.

Now as to how you can meaningfully follow and process incoming tweets from thousands of followees, that's another story. And another blog, for another day.

For more on this, see my 99-cent e-book.

Tuesday, June 16, 2009

Opera unveils just what I said they would

A few days ago, I predicted (based on no inside information whatsoever; strictly an educated guess) that Opera would today unveil just exactly what it today unveiled: http://unite.opera.com/.

What can I say? Once in a while you get lucky.

Monday, June 15, 2009

What does it mean to have 10K Twitter followers?

NOTE: This post, about how I do Twitter, is obsolete now, in that I currently have well over 300,000 followers, not 10K, and I've learned a lot about Twitter in the four years since this post was written. See this 2013 post for more up-to-date info. 

NOTE: If you came here wanting to know what "+K" means in a tweet, it refers to Klout.com kred points. If you came here to learn what the 'K' means in 10K, it means thousand. Lots of people Google it, apparently.

Somebody on Twitter asked me over the weekend what it means to have 10K Twitter followers. Since most people learn in grade school that 'K' used in a numeric context means "thousand," I have to assume that the person's question was rhetorical in nature rather than numerical. Either that, or he failed 5th grade.

Still, let me make it perfectly clear. Having 10K Twitter followers means just one thing. It means you have ten times more than 1K Twitter followers.

It's important for me to have an audience, because by profession I'm a person who transfers knowledge and influences opinion. If I have a larger audience, I'm more effective at what I do. That's fundamentally why I went about the six-month-long task of trying to attract and keep ten thousand Twitter followers, a goal I reached on Sunday.

Of course, it doesn't help to have followers if they are all robots, nut cases, and mouthbreathers. Quality counts. Unfortunately, Twitter attracts its share of hucksters, scammers, lamers, and marketing hangers-on, and many of them spend their days and nights trying to follow people in hopes of a pingback of some kind. I have some of those people in my 10K, but not so many as to make the remainder not worth having. In fact, I count the quality of my follower list to be extremely high, and I'll explain why I think that -- and just how I got to the 10K mark, incidentally -- tomorrow.

For more on this subject, see my 99-cent e-book.

Saturday, June 13, 2009

Here's what Opera is about to unveil

I love a good mystery as much as the next guy, but many people (myself included) are finding Opera's latest mysterious claim a bit over-the-top. In case you haven't been following this story, the Opera folks are saying that on June 16 they will unveil something that will "reinvent the Web."

Many people have speculated as to what it could be (I will tell you what I think it is in a moment). Some have said, based on a tantalizing tweet by Hicksdesign, that Opera has found a way to put the Internet on a USB stick. However, that's (yawn) been done.

Others have suggested that the new Opera will offer a seamless (don't you hate that word now?) way to sync everything to everything, so that all your contact info, e-mail archives, cached web pages, notes-to-self, car keys, and loose pocket change are synchronized across all your devices, including your refrigerators, all the time.

That's been done too. More or less.

Folks, let me tell you what's going to happen. I have a pretty strong hunch (but no inside info, I assure you) on this one. This is something I've thought about for years -- it has needed to happen for years -- and I'll be thrilled if Opera pulls it off, although whether people will flock to adopt it is another question.

The answer is that Opera is going to embed a web server in itself.

When you fire up Opera, you'll be operating a secure server and you will be able to serve all kinds of content (whatever you want, basically: bookmarks, contacts, cached content, arbitrary files from a roped-off area of your local storage, web pages of your own) to other Opera users, at the very least, and maybe all browser users, at the very most. The security aspects will be interesting, but presumably they've got a solution there, too.

Such a trick would solve the sync-anything problem trivially, as a side benefit. The more interesting question is what kind of two-way AJAX apps and mashups people will be able to write when they can use each other's browser as a web server. The Web goes from being a bunch of big public servers plugged into a common backbone, to a confederation of micro-servers distributed across individual devices running Opera -- a Web within a Web, the peer-to-peer Web. Except instead of running a P2P protocol, you'll be running good old HTTP.

The embedded-server browser (possibly with embedded Derby or other database) is what I see coming on the 16th. Or something like it.

Anyone got a better guess?

Wednesday, June 10, 2009

What has become of the old-fashioned Encyclopædia?

Answer:

Photo courtesy http://www.rob-matthews.com

This bound version of Wikipedia contains only the featured articles from Wikipedia. It obviously does not encompass all of Wikipedia. If it did, it would stand as tall as . . .well, a tree.

Monday, June 08, 2009

CMIS, or DMIS?

It occurred to me the other day that CMIS (Content Management Interoperability Services, the proposed OASIS "common protocol" for Enterprise Content Management) is actually a Document Management standard, not a Content Management standard. Its name should therefore be DMIS.

For proof, one need look no further than the data model. "Document" and "Folder" are the principal first-class objects in the CMIS model. Thus, "content" (the 'C' in 'CMIS') is assumed, by the authors of the standard, to mean "document."

The CMIS data model is also RDBMS-centric and SQL-friendly (as it is in all good DM systems). It follows the tried-and-true relational model of every respected legacy DM system.

I might add that the authors of the standard have basically declared WCM to be out of scope.

Basically, anything that doesn't fit the "everything is a document or a folder" model is either out of scope or will be extremely difficult to force-fit into the CMIS mold. At least, that's how it's starting to look to me.

I can't see WCM or DAM fitting easily into the CMIS worldview (which is a 1999 worldview, in terms of content being nothing more than documents and folders). What do you do with XMP in a CMIS world? Indeed, what do you do with unstructured content, in general? CMIS looks for content that's structured. That's not today's world. Sorry.

So CMIS is, for all practical purposes, a document-management standard -- a way to let DM systems (mostly legacy DM systems) talk to each other. There's nothing at all wrong with that. DM is still a critical piece of the ECM puzzle. But it's important not to mistake CMIS for what it is not and can never be: a universal content management API.

Sunday, June 07, 2009

WCM and ECM vendor home-page loadability: a quick followup

Back in April, you may recall, I ran a quick performance test on the home pages of various WCM and ECM software vendors using the popular YSlow tool. I blogged the results and compiled the test data into a 121-page PDF ("A Comparison of Home Page Loadability Scores for Major WCM and ECM Vendors") that can be downloaded (free) here.

I checked the download page's stats today and was surprised to find that the report has been seen by 360 visitors since I posted it on April 23. I don't know how many downloads it has had, but it doesn't really matter since the download page has a PDF viewer built in, and you can just peruse the document online.

For such an obscure, technical, narrowly conceived document, I think 360 views is pretty remarkable. I had expected about 40 views (corresponding to the number of vendors tested).

What will be interesting is to run the same battery of tests again in a month or two, to see who has tried to restructure their pages to improve their YSlow rankings.

Note-to-Self: Run YSlow on all the big-WCM/ECM-vendor web sites again soon. And this time, add a few more vendors.

Thursday, June 04, 2009

StreamGraphs are neat


Twitter StreamGraph for the last 1000 occurrences of 'CMS'.

As an unrepentent eye-candyholic, I love to stumble across things like the Twitter StreamGraphs from Neoformix. What the graph plots is the instantaneous volume, over time, of the most recent 1000 occurrences a given keyword or hashtag in the twitstream. There's nothing special about plotting the data in abscissa-symmetric fashion; it just looks neat and is cognitively "easy."

The plot shown above (click on it to enlarge it) shows the last 1000 occurrences of "CMS" in the twitstream. If you go to the link shown given earlier, you can generate your own StreamGraph for any keyword of your choice.

I might add that the Neoformix site itself is a great place to learn about novel data-visualization techniques (and new twists on existing techniques). Lots of eye-candy to be had there. I say drop what you're doing and go there now. You deserve a snack.

Sunday, May 31, 2009

Fractal Imaging


The other day, a friend of mine made me very happy. He returned my only copy of my favorite book, Fractal Imaging, by Ning Lu. This book has long been my favorite technical book, bar none, but I am beginning to think it might just be my favorite book of any kind.

"Virtue, like a river, flows soundlessly in the deepest place." You don't expect to encounter this sort of statement in an übergeek tome of this magnitude, and yet Lu scatters such proverbs (as well as quotations from Nietzsche, Joseph Conrad, Ansel Adams, Shakespeare, Jim Morrison, and others) throughout the text. This alone, of course, makes it quite an unusual computer-science book.

But the best part may be Lu's ability to blend the oft-times-sophisticated concepts of measure theory (and the math behind iterated function systems) with beautiful graphs, line drawings, transformed images (some in color; many downright spectacular), and the occasional page or two of C code. The overall effect is mesmerizing. Potentially intimidating math is made tractable (fortunately) through Lu's clear, often inspiring elucidations of difficult concepts. Ultimately, the patient reader is rewarded with numerous "Aha!" moments, culminating, at last, in an understanding for (and appreciation of) the surpassing beauty of fractal image transformation theory.

What is fractal imaging? Well, it's more than just the algorithmic generation of ferns (like the generated image above) from non-linear equation systems. It's a way of looking at ordinary (bitmap) images of all kinds. The hypothesis is that any given image (of any kind) is the end-result of iterating on some particular (unknown) system of non-linear equations, and that if one only knew what those equations are, one could regenerate the image algorithmically (from a set of equations) on demand. The implications are far-reaching. This means:

1. Instead of storing a bitmap of the image, you can just store the equations from which it can be generated. (This is often a 100-to-1 storage reduction.)
2. The image is now scale-free. That is, you can generate it at any scale -- enlarge it as much as you wish -- without losing fidelity. (Imagine being able to blow up an image onscreen without it becoming all blocky and pixelated.)

Georgia Tech professor Michael Barnsley originated the theory of fractal decomposition of images in the 1980s. He eventually formed a company, Iterated Systems (of which Ning Lu was Principal Scientist), to monetize the technology, and for a while it looked very much as if the small Georgia company would become the quadruple-platinum tech startup of the Eighties. Despite much excitement over the technology, however, it failed to draw much commercial interest -- in part because of its computationally intensive nature. Decompression was fast, but compressing an image was extremely slow (especially with computers of the era), for reasons that are quite apparent when you read Ning Lu's book.

Iterated Systems eventually became a company called MediaBin, Inc., which was ultimately acquired by Interwoven (which, in turn, was recently acquired by Autonomy). The fractal imaging technology is still used in Autonomy's MediaBin Digital Asset Management product, as (for example) part of the "similarity search" feature, where you specify (through the DAM client's GUI) a source image and tell the system to find all assets in the system that look like the source image. Images in the system have already been decomposed into their fractal primitives. When the source image's primitives (which, remember, are scale-free) are known, they can be compared against sets of fractal shards in the system. When the similarity between shard-sets is good enough, an "alike" image is presumed to have been found.

It's a fascinating technology and one of the great computer-imaging developments of the 20th century, IMHO. If you're into digital imaging you might want to track down Ning Lu's book. A 40-page sample of it is online here. I say drop what you're doing and check it out.