JavaScript on the Server, and conversations at TXJS

We’ve seen various attempts at using JavaScript on the server over the last decade. Mozilla’s Rhino (Java) engine fueled most of it. However, with the release of Google’s V8 (C++) engine (and the networking performance example set by Node.js), the conversation is gaining traction.

The motivation for a 100% JavaScript stack, per conversations at Texas JavaScript Conference (TXJS) last weekend, is the desire to use a single programming language when developing web applications, rather than the mix of technologies we use today. It’s not so much that JavaScript is the best language for application development (contrary to the JS fanboys), but since it’s what we’re stuck with on the client-side, it’s worth considering on the server-side. With a single language, business logic can be reused on the client and the server (think form validation), and you avoid bugs caused by frequent language switching (i.e., using, or forgetting semi-colons, putting commas after the last item in an array, using the wrong comment delimiter, etc.)

The wrinkle in the 100% JavaScript argument, is whether JavaScript is actually the language you want to write your back-end in. The language lacks package management standards (though CommonJS is working to change that); It lacks the standard libraries and tools that the incumbents offer (i.e., no batteries included); Maybe people who use it don’t actually know the language very well; And it suffers from the multitude of bad examples and advice freely available online.

There have been some interesting Node-based applications developed already (i.e., Hummingbird), and the JavaScript on App Engine efforts (i.e., AppEngineJS) will be interesting to watch as well. (I expect both to foster more mature development patterns for large applications written in JavaScript.) However, in the near term, the 100% JavaScript stack will likely remain as niche as the Erlang, Haskel, Lisp, etc. web frameworks (as interesting as they may be.)

The question for you (Mr./Mrs. web developer/web-savvy business person), is whether JavaScript on the back-end offers a competitive advantage. Can you execute on an idea faster/better/cheaper than your competition because of your technology stack?

Sketching interaction stories with markers and iPhones

I recently posted about Bill Buxton’s book, “Sketching User Experiences, so I thought I’d share an example on using these kinds of techniques on a recent project.

The problem at hand involved concepting a number of new features for an existing website, and sharing these concepts with a remote team. (When you can’t get everyone in the same room, it’s key that the team can quickly share ideas.)

For this session, we used:

  • Whiteboards
  • Paper
  • Markers, scissors, and tape
  • iPhones
  • Keynote

The goals were to:

  • Tell a story
  • Leave room for creative thinking
  • Validate concepts
  • Align thinking

After open brainstorming and traditional white-boarding, a number of concepts were quickly sketched on paper (generally one sheet per screen.) These screen sketches were taped to a whiteboard, allowing quick note-taking and annotations:

photo of whiteboard working session

After walking through the concepts (and iterating) with a number of local victims, the screens were captured with an iPhone camera and pulled-into Keynote to create the storyboards. With each screen as a slide, a story can be told within the presentation format:

bringing images into Keyboard

Using this approach, stories can be shared globally, and changed in minutes. The hand-drawn images ensure that no-one gets hung-up on colors or copy writing, and they require a little creativity on the part of the reader, which gets the gears turning and leads to fantastic questions.

Ubiquity command to expand hyperlinks

Another simple Ubiquity command for the morning… This one, called ‘expandlinks’, finds all links on the current page and adds the link’s URL (as a hyperlink itself) next to each existing link label. This is particularly handy if you’re going to print an HTML page for later reference.

  name: "expandlinks",
  homepage: "",
  author: { name: "Erik Smartt"},
  license: "MPL",
  preview: "Expands all hyperlinks, showing link locations.",
  execute: function() {
    var doc =  Application.activeWindow.activeTab.document;
    jQuery(doc.body).find("a").each(function(i) {
        jQuery(this).after(" &lt;<a href='" + this.href + "'>" + this.href + "</a>&gt;");

And yes, it will be much easier to subscribe to these commands once I gather them into a JS file for Ubiquity. For now, you can copy/paste into the command editor if you’re interested in trying it out.

“FORTUNE: How I Work”

FORTUNE: How I Work” isn’t a new piece, but I’ve gone back to it a few times, so I thought I’d share the link and a some thoughts on it.

The article interviews twelve successful, industry leaders on how they work and what they do to manage their workload. The common themes are that they all tend to work 12+ hour days (and generally weekends); They cut out the noise and distractions; Focus on what’s important; leverage their staff; and spend a large amount of their time emailing or calling people. That’s a pretty good reflection of what Peter Drucker describes in the book, “The Effective Executive“, which is perhaps why it’s so interesting to hear first-hand.

I pulled a few quotes, but left off the names so you’ll have to read the article to find out who said these:

On working hours:

  • “I get up about 4:30 A.M. and check out the markets. “
  • “I get up between 5 and 5:30”
  • “I wake up somewhere between 5 and 6 A.M.”
  • “My day starts around 9 A.M. and meetings finish up around 8 P.M. After that I stay in the office to do action items and e-mail. I can get by on four to six hours of sleep.”
  • “I try to get home by 7:30 P.M.”
  • “…head off to work about 5:45 A.M.”
  • “I do marathon e-mail catch-up sessions, sometimes on a Saturday or Sunday. I’ll just sit down and do e-mail for ten to 14 hours straight.”
  • “I usually go home after lunch and then spend the rest of the afternoon and evening, except for dinner, up till about 11:30 p.m., working.”
  • “If I don’t do six hours of sleep I’m in bad shape, but I’m usually up by six.”
  • “I typically don’t sign off e-mail until midnight.”
  • “My day usually ends in the office at about six o’clock, but then I go to two or three parties a night… Then, no matter when I get home at night — and it’s usually late — I do at least an hour or two of e-mail.”
  • “I’m asleep at 10. I’m up at 5:30 and try to work out four or five times a week.”

On allocating time:

  • “For meetings on a single topic that aren’t regular operational meetings, I’m very strict. The maximum is one hour and 30 minutes. Fifty percent of the time is for the presentation, 50 percent is for discussion.”
  • “If I have a business dinner, people know that it should start at 6:30 and be over by 8:30. “

On leveraging staff:

  • “I have two assistants now. I have an assistant from 7 in the morning till 4 in the afternoon, and then an assistant from 4 to midnight.”
  • “I rely on staff to take care of things that I know they can.”

On focus and resetting oneself:

  • “Every day at 8:30 A.M., I get up from my desk and walk to a health club across the street. I do yoga and work out for probably an hour and a half…”
  • “Some of my best ideas literally come from standing on my head doing yoga. I’m away from the office, away from the noise…”
  • “I don’t have a cellphone, I don’t have a Black-Berry.”
  • “It is also important to take a distance from the problem. I do not bring my work home.”
  • “I find that meditating for five, ten, or 15 minutes in a hotel room at night can be as good as a workout”
  • “I still work weekends, though not the killer hours I used to.”

Finished reading “The Simplicity Survival Handbook”

The Simplicity Survival Handbook: 32 Ways To Do Less And Accomplish More

Not a GTD book — this is about cutting past the typical B.S. you find in a corporate environment. Fewer meetings, quicker communication, more transparency, focusing on what matters. Similar to “Cut to the Chase: and 99 Other Rules to Liberate Yourself and Gain Back the Gift of Time, but with a bit more emphasis on working corporate politics.

The main themes:

  • You have only 1440 minutes per day. Use them wisely, and respect other’s 1440.
  • Cut out everything that wastes your (or other’s) time.
  • “Do Less” by focusing only on what matters.
  • Identify the real problems (ie., what keeps your boss up at night) and solve them. That’s your best path to career advancement, approved budgets, etc.
  • Don’t tolerate a work environment that wastes your time.

Even simpler then my last Ubiquity examp…

Even simpler then my last Ubiquity example, this one came about from an actual project need to verify a custom character-length based text truncation filter. Select the text in the browser, invoke Ubiquity, and type: charcount

  name: "charcount",
  takes: {"text to count chars in": noun_arb_text},
  preview: function( pblock, argText ) {
    pblock.innerHTML = argText.text.length;

Update: See comments below for Ubiquity 0.5 compatibility updates