Archive for the ‘Product Development’ Category

Creating Gmail-like anchor-based navigation

Monday, August 24th, 2009

A while back I discussed JavaScript-rich web applications, with the entire client side working completely out of the browser.  Applications like Remember The Milk utilize this type of user interface to create a better experience, which is in my opinion the way web applications really should be like.

One of the issues that troubled me back then was how to overcome JavaScript single-page navigation while having to cope with traditional browser navigation.  After looking into it, I found what I was looking for; but first, I’ll elaborate on the subject:

All-in-one-page web applications

It’s really cool having a web application that does not require a refresh each time you touch something.  Most websites work in the old fashioned way – you click a link and navigate to another page.  What really happens is your action sends a request to the server to fetch another page, sometimes with specific parameters passed to it.  The server then creates that page for you, send it back, and the browser displays it.  What you as a user see  after clicking the link is a blank page, you wait for the page to load, and then you can move forward.  Even though this type of behavior is common among websites, it could be very uncomfortable for the user.  Come to think of it – none of us are used to this type of behavior with our desktop apps, are we?

Some web applications, like the Google app suite, Remember The Milk, and others utilize a different technique: when you click a link, like navigating to the Sent mailbox on Gmail, the page does not disappear and then reloads again.  What you do see is a “Loading” message at the top, and then the new mailbox just appears at its right place.  This type of user experience is what we should all hope for in heavy-duty web applications.

How does it work?

Anyone who knows JavaScript can figure out a way of doing this, but here’s the basic plot:

The page that you initially get from the server actually contains more than one page – it contains several, while only the one that is currently in focus is shown, while the other ones are hidden.  When clicking a link that should lead you to a new page, like the Sent Items box on your Gmail, the browser simply hides the current page (say, your inbox), and shows the sent items page instead.  This is done instantly, so you get the feeling that there were no reloads.

Furthermore, when the sent items page is displayed, it fetches all of the sent items data from the server, and simply dumps them into the empty page it already has.  This way, you enjoy the best of both worlds – you get a smooth user experience, while the actual data is always updated (since it reached you directly from the server in real time).

So what’s the problem?

The problem, as in many subjects, lies in history.  We are so used to this “page-mode” way of using websites and webapps, that we’ve learned some pretty nasty habits.  One of those is using Back and Forward buttons for navigation.

In a world where all of the websites use full page loads, back and forward makes sense.  When you navigate to a new page, the browser remembers the location of the previous one and will do what it’s supposed to do when the Back button is pressed – go back to the previous page.  However, when new applications are utilizing the “all-in-one-page” approach – then we have a problem: the back and forward buttons become useless.

Imagine this: I’m using a simple all-in-one-page web application to manage my emails.  I have an inbox and sent items box.  I navigate back and forth between them using my on-screen menu links.  What happens under the hood is simple – I never actually leave the page I got in the first place.  All the browser does is hide and show different parts of it, while fetching data from the server and updating it to the respective page section.

Oh no – I clicked the Back button!  I was in my sent items page, and hoped to get back to the inbox (where I was before) but no!  I’m out of the app altogether!

The browser’s history, that should contain all of my navigation track record, never actually recorded my inner-page navigation, since I never really left the page…  This is why classical browser navigation can sometimes cause huge usability problems when using an all-in-one-page web application.

Using anchors

Many apps have found a clever way to resolve this, by using anchors.  You remember anchors – these inner-page links that are used in tables-of-content, like in Wikipedia or a FAQ page.  These links that, once you click them, send you down to different location on the same page.  Well – instead of doing that, anchors might just be the way to solve all of our problems.

If we utilize anchors as part of our app’s navigation, we get exactly what we need: we change the browser’s location, which in turn records that location into its history, without actually leaving the same page…  This allows us to do what we always did – use the Back and Forward buttons, while still remaining in the same page!

Under the hood

After researching it a bit, a few ideas came into light.  The major issue that one should face here is the fact that browsers do not really notify you when you click the back-forward buttons.  You can use the “unload” event, but that doesn’t really cut it – you want to know where you are, not where you’re leaving.

So, basically, the way that this can be accomplished, at least according to what I’ve seen, is by creating a polling mechanism – something that periodically checks the current anchor that you’re in.  All you need to do is set up some sort of a timed interval, check the anchor, and act accordingly.

What you need to do is extremely simple:

All of the links that are used to navigate inside the same page should be anchored, like this:

<a href="#inbox">Inbox</a>
<a href="#sent">Sent items</a>

Then, there should be a JavaScript checker – something that periodically checks to see where the current page anchor is at, and then call a function that shows the page section shat should be shown:

window.onload = function()
{
     setInterval("check_anchor()", 100);
}
 
var current_anchor = null;
 
function check_anchor()
{
     if (current_anchor != document.location.hash)
     {
          current_anchor = document.location.hash;
 
          if (current_anchor == "#inbox")
          {
               // Show your inbox section.
          }
 
          else if (current_anchor == "#sent")
          {
               // Show your sent items section.
          }
     }
}

And that’s all there is to it.  The interval calls a function that checks the anchor, and according to that anchor’s value it directs it to the relevant piece of code.

This is obviously very basic; it does not take care of additional parameter (like “#inbox&q=33526″) and so forth – but you get the general idea.

Really Simple History

One of the better solutions that I’ve found out there is an elegant, lightweight, and free JavaScript library called Really Simple History.  You can add it to your code, initialize it, and direct the history event to a callback function of your choosing.

It really is a magnificent library – try it out!

This, for me, closes the loop for this issue.  Hope this helps – I’m going to use it!

10 Rules for MRDs and Focal Points

Sunday, August 9th, 2009
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/lorena-david/3241019376/"><a rel="cc:attributionURL" href=

http://www.flickr.com/photos/lorena-david/ / CC BY-NC-SA 2.0

Lately, I find myself writing MRDs for companies I work with.  It’s always a great challenge to construct a good MRDs, but these recent experiences have really been wonderful: I’ve had the rare opportunity to create the company’s very first MRD.

This, naturally, has its pros and cons.  On the up side, you get your hands into something which is pure, raw, and full of vision, instead of delving into a well-formed (or a not-so-well-formed) product with a well-thought-of (or not-so-well-thought-of) business model and a well-constructed (you get the idea) marketing strategy, and trying to make your way through all the constraints and legacy issues that involve a mature product process.

However, the risk in handling an MRD in such an immature stage usually involves the company having a clear enough vision but not a clear enough focus, which tends to make the requirement gathering process rather shaky.  There’s often a great deal of uncertainty, lack of confidence and no real clear-cut objectives.

This is not necessarily something that should receive a reprimand – it’s quite natural.  However, while the rest of the management, often the business and marketing ends, can throw ideas around the room and stare far into the horizon, there should be at least one designated driver among the lot with her feet planted deep in the ground.  This is usually the job of the product marketing person.

Obviously, there are many “how-to”s out there on how to write the best MRD – this is not a post like that; I do, however, wish to convey a few techniques for getting the other people committed and focused on the task at hand.  This, later, can be translated to a document using a template of your choosing.

  1. Get the CEO involved.  Make sure the CEO is part of the process.  This is important for two reasons: first, there are certain answers you will only get from the CEO that are crucial for laying the groundwork for the MRD; second – with the CEO in the room, the rest of the group will feel more committed to the task.
  2. Just the facts.  It is our job to get the facts straight, at any cost.  Ideas and visions are perfect for brainstorming sessions, and I’m sure each and every one of us can daydream with the rest and the best of them, but this is a luxury we can’t afford right now.  You need to put your foot down and demand straight answers, backed up by logical explanations and as many facts as you can.
  3. Start from the top.  The best place to start when constructing a good MRD, which is basically the company’s upcoming product strategy plan, is to begin with the most highly strategic aspect – business goals.  Ask questions like: when’s the next fund raising round?  How much will it be?  How long do we have with the current funding?  When would it be best to present the product?  To whom would it be best to present it to?  What kind of a business goal would that milestone aim to accomplish?  These questions and others like them will help you position your future plans in the overall business roadmap of the company.
  4. Work your way down.  After you understand the major milestones that are expected from the company, start drilling down and do your best to make the product roll-out serve these goals.  Start by creating major product milestones that will go along with the business milestones, allowing yourself an ample margin of error.  Then, map out the major features for each milestone, making sure that only the most important ones are addressed, and that they all aim to serve the business end.
  5. Don’t go too low.  Try to avoid the implementation pitfalls.  Do not start developing actual features, or try to see how different use cases affect certain aspects of the system – if you do that, you’ll never go out of the conference room.  That’s what PRDs are for.
  6. Lay out an architectural plan.  Try to get engineering to draw out the product’s architecture in the most abstract way possible, yet taking into account elements such as deployment, distribution, scale, privacy, security, databases, etc.  I find this process to be extremely helpful in discovering new directions, coming up with exciting capabilities and mega features, and finding out major issues that should be addressed at this stage.  There’s something very evocative in seeing a diagram in a vision-driven meeting.  But remember rule no. 5 – don’t delve too deep!
  7. Resources, resources, resources.  Always keep resources in mind.  Make the CEO commit to providing you and engineering with the resources you’d need.  The MRD should point out this information, sure, but the meeting should make everyone aware of how much the project would cost, in general terms, of course.  In other words – when the document comes out, the bottom line should not come as a surprise, or you’d find yourself going through the same meeting all over again, even more than once.
  8. Be constructive.  Try too look at things from different angles – try to extrapolate a single element in the system to any actor or use case you can think of.  It’s amazing how many cool ideas come out of that.
  9. Discourage destructiveness.  It is clear that MRD meetings are not easy to manage, since this is where vision and practicality meet.  Such encounters are hard on everyone, and sometimes people tend to get discouraged, especially when they’re told to stop dreaming and get real.  Try to notice defensiveness and entrenchment in people and do your best to open them up again, yet always making sure that their focus is well grounded.  Oh – and that goes for you too.
  10. Set a time limit.  Make sure that both the meeting and the creation of the MRD are set to a limited time.  This further assists in maintaining focus, driving people to action and decision, and making sure everyone is on the same page.  Remember – an MRD is a map, and a very rough one at that; but it sets the tone for everyone during the upcoming product development period.  The better limits you have – the more focused your MRD will be.  And that is a blessing, no matter what they say.

reCAPTCHA Recycles Human Effort

Friday, January 9th, 2009

The American astronauts were rumored to be using a special Space Pen, which was developed specifically to work in zero-gravity conditions. It used a pressurized ink cartridge, enabling it to write upside down (Seinfeld fans should smile by now) and, of course, be used in space. It is believed that NASA spent a total amount of $11 million dollars to develop that pen.

The Russians gave their Cosmonauts a pencil.

Whether this story is accurate or not, it brings out a common product development truth – all things being equal, the simplest solution tends to be the right one. Hence the abbreviation K.I.S.S. – Keep It Simple, Stupid! And reCAPTCHA certainly did achieve a simple solution to several problems at once.

reCAPTCHA is a special captcha form component for identifying humans and rejecting spam and bots.  It is done through the traditional means of displaying distorted words for the users to type and verify. However, instead of generating a random word, reCAPTCHA displays words that were scanned from real text books, thus helping in the global effort of digitizing old texts.

I ran into reCAPTCHA a few months ago and was impressed by the concept of “recycling” human actions – taking something we do so commonly, almost without thinking, like verifying our humanity with forms through captchas, and harnessing it to both combat evil (spam and bots) and do good (digitize texts).

Name: reCAPTCHA
Website: recaptcha.net
Type: Captcha component
reCAPTCHA is a system that uses captcha to help digitize the text of books while protecting websites from bots attempting to access restricted areas.
reCAPTCHA

Value

Let’s take a second to ponder over a very disturbing fact: if we didn’t have spam or bots that were driving our websites off the wall – we wouldn’t have had reCAPTCHA, and as a result, many textbooks wouldn’t have been digitized as part of a universal effort.

When thinking of it that way, reCAPTCHA’s value starts to get a whole new meaning. It becomes very much like modern medicine – it wouldn’t have been discovered had we not gotten ill; I suppose we owe plenty of our discoveries to urgent needs or even accidents, such as the genome project, antibiotics, Champagne, and so forth. It’s strange to vocalize it, but many people around the world will be exposed to important texts digitally thanks to the plague called spam and bots.

That being said, lets examine reCAPTCHA’s value in two aspects: intrinsic value and global contribution.

Intrinsic value

reCAPTCHA has a very granular offering – it provides your product with a solution to something you’ll probably need as part of your registration form, or any other form that requires user authentication. You need to sort out the humans from the bots that attack your site.

Your R&D will most likely tell you that developing such a component is very simple, and there are plenty of open-source solutions out there that you can use. And they’ll be right to say so. Basically, all you need is a tiny utility that generates a random word, and displays it in a funny way. You can add colored squiggly lines if you’re overly creative. And that’s about that.

But reCAPTCHA’s solution has two main advantages:

  1. It’s off the shelf. You just cut and paste a little piece of code, and you get all of the intrinsic functionality already contained within it; also, the processing is done on the reCAPTCHA servers, which might free your own servers slightly, but on the other hand relies on a server-farm that is out of your control latency-wise. However, if Twitter and Facebook use it, then I guess it’s all right.
  2. It’s fully loaded. Two paragraphs ago, it sounded quite simple to make a workable captcha. However, to make it right, you need to consider people who might not be able to read your distorted image. Sometimes, the text is illegible, and needs to be changed. Again – implementing something like this is not like inventing the space pen, but why bother when this elegant component already exists?

Unreadable

(I’m not sure my dad would be able to read this one…)

Global contribution

I love recycling; not only in my trash habits at home, but also as a goal to live a greener life. Don’t worry – I don’t spend my spare time hugging trees, but I definitely believe that there’s a practical approach to recycling, which can ultimately be applied to business.

“I think there is a world market for maybe five computers,” according to Thomas J. Watson Sr., formerly the president of IBM. I’m afraid Mr. Watson may have missed the mark slightly. Our collective processing power today is gargantuan, and some applications make use of it very effectively.

File sharing, legal or not, is a perfect example for recycling processing power, as well as the wonderful SETI@Home project at Berkeley, which is currently the largest distributed computing effort around the world, utilizing over 3 million computers worldwide in order to analyze data from radio telescopes in search for extra-terrestrial intelligence. reCAPTCHA goes along those lines, but instead of recycling wasted processing time, they’re recycling wasted human effort.

Call me an idealist, but as a product junkie I think that part of making the world a better place revolves around reducing waste and channeling effort. Most of us share their hosing with others, use platforms developed by the online community, incorporate maps drawn by other companies, and make it an effort to make sure we reduce our costs and increase the productivity of our company.

With reCAPTCHA we have a double benefit – we get a ready-to-use component, and join a world effort to bring knowledge to the masses. That alone is a value in itself.

Value summary: Provides an off-the-shelf component that answers a specific requirement, while helping in a global effort to digitize texts.

Usability

reCAPTCHA

One thing to consider when creating such a generic and simple component is not to overdo it. I’m sure product development people would have loved to sink their teeth into this product and design their heart out with plenty of cool features, like changing the image size, making it full-screen, creating a hovering magnify-glass to make the letters bigger, etc. But that would have turned this component into a monster.

When dealing with a component so basic in its functionality, the product developer needs to constantly take a step back and look at the big picture. It’s terribly easy to look at your product under the microscope and be so caught up with its tiny world – I’m sure many of us have been there and realized our overzealousness.

One has to remember that this type of granular component lives inside the context of a foreign web page, which contains a form in it. It’s mostly the last, and least favorite, field the user needs to fill in. So it’s better to keep it as simple and as non-intrusive as possible. We’ve already agreed that forms are a pain – let’s not make them any worse.

reCAPTCHA managed to keep it simple. That’s their first great achievement.

Other than that – the usability is quite basic; after all, this is merely a form field. You can change the text with a new set of words, in case the image that’s presented to you is too hard to read, or you can change the text into an audio challenge taken from an old time radio show (therefore also transcribing old recorded shows).

That’s it; in terms of usability, the product fits the requirements.

Usability summary: Simple and complete.

Layout and design

Once again – such a simple widget doesn’t have much room for an elaborate layout and design schemes. However, one thing that I would like to see is customizable display: my website and forms are usually of a specific design, and I would have liked to make this field look and feel as a native field to my site. I have no problem with sharing credit or double branding, but reCAPTCHA’s choice of Bordeaux colors does not necessarily fit my overall website design.

Layout and design summary: Simple, though cannot be customized.

Under the hood

When I initially heard of reCAPTCHA, the first question that popped into my mind was “how does it work?” If the words that are shown to me are the ones that are used to digitize book, then how does the captcha verify my input as correct? Or else – if the captcha engine already knows the meaning of the word, then what part am I playing here exactly?

And here is where reCAPTCHA came up with the pencil solution.

After the texts are scanned, they go through an OCR process to interpret it. However, OCR is never perfect, and many words remain unresolved. Yet the OCR mechanism is clever enough to at least indicate which words were not interpreted correctly.

So reCAPTCHA came up with a very simple, yet ingenious solution: each user is presented with two words, not one. One word is a word that was successfully acquired by the OCR, while the other one was not. After typing these words, reCAPTCHA verifies the known word with your input; if the match is correct, it assumes that the second, unknown word is also correct.

This user-interpreted word is then given to a few other users for recapturing, and then, after cross verification, the word is declared as properly interpreted.

Why was I so impressed? Because, as a former engineer, I would definitely have overcomplicated something this simple. Can’t help but to doff your cap – well done!

Bottom line

When creating your online forms, it is great to be able to take part in a worldwide effort, and harness the power of the masses to a global endeavor. When your website joins the ranks of websites like Facebook, TicketMaster, Twitter, StumbleUpon and Craigslist, who already use reCAPTCHA, you know that you’re with good company.

Formalizers and Search Engines

Thursday, January 8th, 2009

Google search

Search engines are possibly the most commonly used, and perhaps the oldest type of formalizers out there, which many of us take for granted.

A search form has one major formalizer field, which requires a search query. The user can be quite expressive when filling in this field, while the formalizer field takes care of certain types of input which is expected. Google have been true pioneers in this sense of formalizer usage.

Surely, we all know that there is a specific format for search – we use quotation marks (“”) to group words together, we use logical operators such as OR and AND, or sometimes even use the plus (+) and minus signs (-), especially if you’re an advanced user. However, there are a few things popular search engines have taken care of:

  • Stop words. Also known as noise words in some circles, they are words that are filtered out of search queries, usually since they’re too common and appear far too many times in searchable documents. These words, like “is”, “are”, “the”, “you”, “me”, and many others, are omitted from search queries automatically by the search engine, in order to provide a more relevant search result list.
  • Spelling. Google really made a difference here, both by finding spelling mistakes in your search query and suggesting a correction for you in the search results, and providing the means for other applications to utilize their spelling mechanism with their SOAP search API.
  • Contextual search. When typing a specific search phrase that requires a specific type of data, Google makes sure they provide you with this data as quickly as they can, with the tools that they have. You can get stock quotes, airline schedules and word definitions simply by asking for them. This saves a lot of time and hassle by simply thinking like people do, so a simple phrase like “kilometer in mile” typed into the Google search box will make the simple conversion for us, and display it at the top of the page.

What can we learn from Google?

Many applications, especially web applications, provide search capabilities to their users. With search being such a common use-case, not to mention a perfect way to learn of your users’ habits, product development managers need to make their search engines as usable and formalizer-friendly as they possibly can.

Here’s a short checklist:

  1. Auto-suggest. When users start typing search queries, try to assist them with suggestions based on common search queries.
  2. Spelling. As mentioned before, there are services for checking the spelling of search queries out there, like the one Google offers us. Therefore, there’s no need to develop it in-house, and you can literally use the best tool out there. This way, users won’t get frustrated when a misspelled query gets sent back with no results.
  3. Natural language. This is probably the most specific, and therefore most complicated aspect of formalizer-friendly search engine. It requires you to define a way for the user to communicate with your application’s search engine in a natural language. Try to find common search phrases and to identify patterns that occur the most, and you’ll be able to see how you can go towards your users and help them by understanding their queries better.

Combining these three elements together creates a powerful search user experience, and positions you immediately above your competitors in terms of usability and barrier of entry.

For example: say you have a dating website, and your search box allows users to look for possible people to meet. You could provide a boring form that would require an “advanced search” option to be clicked (possibly the worst use-case a search engine could have, but more on that in a later post).

On the other hand, you can define a few search patterns that upgrades your search field into a formalizer. Such fields are not search-boxes in their classical sense, and are usually preceded with a question, such as “what kind of date are you looking for?” to which the user can answer “middle-aged men in the greater LA area.”

And now, the hard work begins: your language processor should be able to understand this sentence and extract meaningful information out of it.  It should understand that “middle-aged” means a certain age group, and that “the greater LA area” is a geographic region. Again – not the easiest of tasks, but once implemented, it goes a very long way in terms of usability.

This, combined with a spelling service and an auto-suggest utility, makes sure the user types the words correctly, or at least minimizes the number of mistakes the user makes. This allows your formalizer mechanism to be right more times than wrong and ultimately makes your users happier. And happy users will return again tomorrow, no doubt.