jQuery Plugin: BetterGrow Your Words


Many things grow, but none grow better than when they BetterGrow.  Used by products such as Facebook and Basecamp, textareas that can adapt to user input, growing or shrinking their height to the demands of the text entered, provide an oft-desired minimalistic user experience of progressive enhancement – providing just what is needed by the consumer when it is needed.


Despite the widespread appeal of dynamic height textareas, I have been unable to find one such code snippet or JavaScript plugin that would meet all my needs; the most important of which was responsiveness.  Every dynamic textarea plugin that I found had some shortcoming, from delayed reaction to required grow/shrink event, to annoying visual flickers and blinks.  BetterGrow was designed to have none of these quirks, and simply grow (and shrink) better, based on the specified options and text content.

I wanted a dynamic and customizable textarea that kept up with me, that

didn’t wait until I was done typing to resize,
was much more ‘elastic’ than other similar plugins,
never obscured the entered text,
adapted both quickly and smoothly to the user.

So, I wrote the BetterGrow jQuery plugin and open-sourced it under both GPL and MIT License so that I, and everyone else, could benefit from a textarea that didn’t just grow, but grew better when it had BetterGrow. 😉



BetterGrow is a customizable jQuery plugin for enabling the improved, dynamic expansion of a textarea.

	<textarea id="area51">
$('#area51').BetterGrow({ / * OPTIONS * / });

When the text within the target textarea exceeds the initial textarea height the textarea increases its height sufficiently to accommodate the new text.

When the text within the target textarea decreases sufficiently to allow for a lesser height, and the height is greater than the minimum textarea height or initial textarea height, then the textarea height is reduced to the minimum height required to display the text within, while not obscuring the visibility or requiring a scrollbar to view any of the text

Important:  The textarea must reside within an encapsulating DIV.  And, to avoid problems in IE, you should explicitly set the textarea’s width.


When initialized, the textarea object and its parent DIV have their attributes adjusted.  The method implementation supports chaining and returns the jQuery object.

The DIV should add no size to the textarea object or region.  DIV height is automatically set to AUTO.

The textarea’s overflow is set to HIDDEN and the WIDTH is set to the current WIDTH. (FYI:  WIDTH of textarea must be defined to work in IE)

If the DIV is missing, the plugin will attempt to wrap the textarea in a new DIV.  It is recommended that all targeted textareas are wrapped in a DIV before calling BetterGrow to avoid unexpected behavior.

If the textarea already has text within it when BetterGrow is initialized, the textarea’s height is automatically adjusted to fit the text (if a height greater than the initial height is needed to present the text unobscured).


By default, the textarea’s initial empty height, aka minimum height, is set to 26px, with no special event handling enabled.  These and many other characteristics are fully customizable, and fully itemized and explained below.

To change these settings, they can either be accessed directly…

$.fn.BetterGrow.settings.initial_height = 100px;

… or at the time of initialization…

	initial_height:	50px,
	on_enter:		function() {
	do_not_enter:	false

The default settings data structure is…

$.fn.BetterGrow.settings = {
	initial_height:	26,                // specified in pixels
	on_enter:		null,         // callback function; if specified, this is called when enter is pressed
	do_not_enter:	true         // if true and on_enter is not null then enter event does not cascade / pass-through to textarea

The parameters are defined (and all can be overridden) thus…


  • minimum height in pixels for the textarea
  • if the textarea is EMPTY, this is the initial height


  • callback function that is called when ENTER is pressed within the target textarea(s)
  • by default, on_enter is DISABLED (set to NULL)


  • if on_enter is ENABLED (pointing to a callback function) and
    • if do_not_enter is TRUE,  then the ENTER event DOES NOT CASCADE / pass-through to the text area
    • if do_not_enter is FALSE, then the ENTER event will trigger the calling of the function referenced by on_enter and be reflected within the textarea
  • In other words, if TRUE then the content of the textarea will not change as a direct result of the user pressing ENTER.

Get It

You can download BetterGrow, dual licensed under GPL and MIT, from…

Public Clone URL: git://github.com/theproductguy/BetterGrow.git
GitHub: http://github.com/theproductguy/BetterGrow



If you find this useful, or have any questions, ideas, or issues, leave a comment.


Jeremy Horn
The Product Guy


From Intentionally Bad to MI’s Impact on Facebook

Every week I read thousands of blog posts. For your weekend enjoyment, here are some of those highlights.  What are you reading this weekend?


On Starting Up…

Overcome pricing challenges.


On Design & Product Experience…

The importance of designing badly.


On Modular Innovation…

The impact of Modular Innovation on Facebook’s pocketbook.


Have a great weekend!

Jeremy Horn
The Product Guy

Like, How Many Friends Does Facebook Need?

me-grayGuest post By Edo "Amin" Elan, Product Designer,  The Product Point-of-View blog

Facebook’s new, disruptive "like" feature may also be a pre-emptive solution to a looming problem: the anthropological boundaries of friend management

According to the official stats, the average Facebook member now has 130 friends. Is this too many Friends? Can you have too many friends? In fact, you can. 130 is dangerously close to 150, also known in anthropology and social media as the Dunbar number.

Robin Dunbar, a British anthropologist and evolutionary biologist, argued in 1998 that there is a cognitive limit to the number of relations that any one primate can maintain. Researching gossip, grooming and human history Dunbar How%20Many%20Friends%20...lr[1]formulated that people can only keep gossip with 150 people at any given time. According to Dunbar, “this limit is a direct function of relative neocortex size, and that this in turn limits group size … the limit imposed by neocortical processing capacity is simply on the number of individuals with whom a stable inter-personal relationship can be maintained.”

The Dunbar number is discussed in some length in Malcolm Gladwell’s "Tipping Point". Dunbar himself blames the Internet for simplifying his theories into a "Dunbar number", but the title of a recent (2010) anthology of his writings seems to wink to the Facebook generation: "How Many Friends Does One Person Need?" (see Dunbar speak here, mentioning Facebook).

It’s no surprise that the Dunbar number made its way to social media circles, and keeping within Dunbar number boundaries may already be one of the industry’s established "best practices". I first learned of the Dunbar number while reading a 2006 article by sociologist Danah Boyd, who researched Friendster and MySpace, among others. As Boyd noted back then, Friendser was acknowledging the Dunbar limit when it capped Friends at 150. With its current average at 130, Facebook might appear to some to be like a car running with steam shooting from under its hood.

To be fair to Boyd, she regarded Friendster’s practice as a misconception. In her 2006 "Friends, Friendsters, and MySpace Top 8" she pointed out that Friendsters were actually connecting to friends from the past with whom they are not currently engaging, so those past links should not be counted towards the 150 contact cognitive limit. That said, Boyd was far from suggesting complacency in the face of exploding friend numbers:

"Because social network sites do not provide physical walls for context, the context that users create is through their choice of Friends. They choose people that they know and other Friends that will support their perception of what public they are addressing through their presentation of self, bulletins, comments, and blog posts. This completely inverts the norms in early public social sites where interests or activities defined a group (Usenet, mailing list, chatroom, etc.) and people chose to participate based on their interest in the topic."

Escaping the Dunbar Curse

The recent Facebook "like" feature, released about two weeks ago, seems to be designed for creating precisely such contexts for social proximity. With a sufficient inventory of "like"s, Facebook should have plenty of options for contexts to differentiate between different kinds of friends. This should help to bail it out if 150 indeed turns out to be Dunbar’s Curse.

In her 2006 paper, Boyd says "While it was once possible to gather all cat lovers into one Usenet group, the size of this group would be beyond unbearable today". I couldn’t help but look into the couple-of-weeks-old Facebook "like" page for Cats– and found it had 53,544 people who "liked" it. Beyond unbearable? Sure, it’s difficult to carry any meaningful conversation in that size of community. But when I view the "Cats" page, all I see above the fold are posts that, indeed, include "Cats" but originate from my friends. So the "context", to use Boyd’s term, might have been created here – but its effect isn’t so much to generate conversation within the huge Cats group, as much as to enable the Cats context between me and my friends.

This correlates to my own experience as an interaction designer. Recently, when designing the interaction for an enterprise social network, I noticed that the more the social element was brought into the forefront, the less the total number count of participants in a "topic" mattered. What mattered was seeing that some "friends" are already participating in the topic. In fact, just a handful of friends interested in (or "liking") a  topic was sufficient to create significant peer pressure.

Simultaneously with launching "like", Facebook also continued quietly revising the news feed filters – another location sensitive to a growing contact book. In a previous post, from about a month ago, I noticed some interface confusion there. It’s now cleared.

Also note that friends lists have a prominent place in the "Account" menu in the current Facebook  layout. Editing those lists will become a more familiar, everyday activity as we learn to target our posts to "lists" (or in the future, "likes") instead of to all friends. My present Facebook policy is to accept any Facebook friend request arriving to my account, then to organize my hundreds of Facebook contacts in lists that look a lot like "Like"s.

Dunbar, by the way, did not provide a single number but a series. The first number was 5 (Bret Taylor, FriendFeed co-founder and Facebook Head of Platform Product, referred to this number as "the magic number" in the beginning of his F8 presentation).  But the next significant "friendship circle" beyond 150, Dunbar says, allows for a more shallow connection with up to 500 contacts. Last weekend, my Facebook friend count crossed that magic number. I’ll keep you posted.


Edo "Amin" Elan (LinkedIn.com/in/edoamin) is a Product Designer in San Francisco, CA. Elan has been following social media from its inception to its global spread. His most recent project was designing the interaction for an enterprise social platform. He also likes to draw comic strips.

Interested in being a Guest Blogger on The Product Guy? Contact me.

From Angels to Search of Mobile Design

Every week I read thousands of blog posts. For your weekend enjoyment, here are some of those highlights.  What are you reading this weekend?


On Starting Up…

Succeed with the help of angels.


On Design & Product Experience…

On search of mobile design.


On Modular Innovation…

Modular Innovation in the land of Facebook from the Open Graph.


Have a great weekend!

Jeremy Horn
The Product Guy

From the Preferred CEO to Facebook’s Latest UX Fail

Every week I read thousands of blog posts. For your weekend enjoyment, here are some of those highlights.  What are you reading this weekend?


On Starting Up…

Are you a preferred CEO?


On Design & Product Experience…

The Facebook #UX #FAIL of consumer privacy. Is it time to deactivate? delete?


On Modular Innovation…

Challenges facing the next generation of Modular Innovation.


Have a great weekend!

Jeremy Horn
The Product Guy

From Fabulous Freemium to Destroying Facebook with Salmon

Every week I read thousands of blog posts. Here, for your weekend enjoyment, are some highlights from my recent reading, for you.  Have a great weekend!


On Starting Up…

Case studies in the freemium business model.


On Design & Product Experience…

Survey the many tools used in crafting web design wireframes.


On Modular Innovation…

Destroying Facebook with Modular Innovation … Salmon.


What are you reading this weekend?

Jeremy Horn
The Product Guy

Facebook PDQ

image_thumb2544A company can have the best product around, but if the pages are too sluggish, if the product suffers recurring outages, if the user-product interaction is varied and inconsistent, the product’s overall Usability can, and does, suffer.

Quick-UX provides for the rapid, simple and quantifiable assessment of a product’s User Experience (UX). Among the various components that define a product’s Usability, as well as Quick-UX‘s, are Accessibility, Consistency, Recognition, Navigation, and Page Load Time.

In answering the question of Usability, "Can I use it?" the sub-category of Page Load plays an instrumental role. Page Load, often obfuscated or connected with other perceived causes of a product’s dissatisfaction, ultimately, either positively or negatively, presents an unquestionable influence on a product’s overall Usability.

Example: Prompt Load Time (value = 1.0)

When I recently twittered my followers asking for their opinion of a web product that best exemplified a Prompt Load Time, some of the most common responses were…

WordPress and

But, the product that received the most votes was Facebook.


Facebook is not only a good example of a product with a Quick-UX Usability Page Load Time variable value of 1.0, Prompt Load Time, but also a wonderful example of improvement along the same lines.

Amazingly, as recently as January 2008, Facebook was seen as one of the slowest, most inaccessible social networking products.


Now, Facebook, is one of the promptest, fastest web products, with 350 million active users, 50% of which log on every day, with the average user spending 55 minutes interacting with the product.

Whatever part of the product with which the user chooses to interact, the end result is always and consistently the same… quick reaction and responsiveness – from visiting and interacting with one’s Inbox…


… to participating in conversations in the News Feed.


Should Do

With all the positive efforts being taken, some ‘flourishes’ of the user interface continue to inject a sluggishness into an overall snappy Page Load Time and user experience that would best be redesigned or redeveloped inline with the rest of the product’s established Page Load Time expectations. An example of such an interface event, with sluggishness caused by either the method of display, and/or of content retrieval, is the user action of adding a friend.


If a recent interview with an anonymous Facebook employee is accurate, Facebook can be viewed as being very much on the right track to further improvement of their already Prompt Load Time.

On the continued optimization of downloaded file size and its client-side performance…

"…actually found out it increased the number of page views by 77%, essentially because we were reducing 77% of the page load, and therefore it was loading faster, and thus generating more clicks. We not only reduced our bandwidth, and how much we have to pay for our Internet, but we made the site faster and increased the clicks-per-minute, which is what we’re truly interested in."

On the optimization of server responsiveness…

"…this guy right now is single-handedly rewriting, essentially, the entire site. Our site is coded, I’d say, 90% in PHP. All the front end — everything you see — is generated via a language called PHP. He is creating HPHP, Hyper-PHP, which means he’s literally rewriting the entire language.

"We’re going to reduce our CPU usage on our servers by 80%, so practically, users will just see this as a faster site. Pages will load in one fifth of the time that they used to."


Over the course of this series we explored many real-world examples of Page Load Time values…

Poor Load Time (value 0) [Twitter, Twine]
Delayed Load Time (value 0.5) [Conversation Pieces]
Prompt Load Time (value 1) [Facebook]

Subscribe now (click here) to make sure you don’t miss any part of exploration of Quick-UX, the quick and easy method of generating quantifiable and comparable metrics representing the understanding of the overall User Experience of a product, as well as other insightful posts from The Product Guy.

Enjoy, Discuss & Tweet!

Jeremy Horn
The Product Guy

Add to Social Bookmarks: Stumbleupon Del.ico.us Furl Reddit Google Add to Mixx!

From Facebook MI to the Value of Product Management

Every week I read thousands of blog posts. Here, for your weekend enjoyment, are some highlights from my recent reading, for you.


On Starting Up…

In defense of independent invention (and against software patents).


On Design & Product Experience…

On the importance of your startup, and treating it right. Or, why you need a great product manager and designer more than anything / anyone else.


On Modular Innovation…

Facebook’s latest Modular Innovation, ‘reply by email.’


Have a great weekend!

Jeremy Horn
The Product Guy

Add to Social Bookmarks: Stumbleupon Del.ico.us Furl Reddit Google Add to Mixx!

The Future: Gmail, Social Media, and You

The Future: Gmail, Social Media, and You

gmail_logo_stylized_thumb35555It’s been many weeks since my conversion has been wholly complete, many months since it became my primary means of email communication, when I was converted by an Android, and years since I first started using…. Gmail.

Over the past many weeks I have explored, elaborated, and exhausted the exercising of my resistance. Now, with such resistance both worn down and overcome, drawn out through my conversion by an Android, let’s explore what improvements remain undone, those of the ‘Should Do’ variety that would directly facilitate the conversions of many, many more to the ways of Gmail.

what brought about this conversion, (1) (2)
why it took so long, and (3) (4) (5) (6) (7)
what should be done to encourage greater Gmail adoption. (8) (9)

Should Do

00_gmail-all Perhaps the greatest challenge to Gmail is Information Overload and the ability to zero in on both what is desired and what is most important.

  • Gmail can often feel like a very, very long list of information with few visual cues assisting in the efficient user parsing of the data. Many things can be done to assist in this readability challenge.
    • Support grouping of emails / discussion threads, by tags, from, to, substrings, age, size, frequency of receipt as well as frequency of reply (or even average delay before reply to), etc.
    • The introduction of the concepts of hierarchy would allow users to zoom in on what is important, becoming less dependent on knowing the precise search, becoming less likely to miss the ever critical email buried in a long list or discussion thread. Beyond the custom coloring of tags (a labs feature) tags should be able to be grouped as well as support hierarchical concepts, sub-tags. This would allow for a bridging of the folder and tag paradigms within the Gmail experience. Of course, having the choice to use tags, tag groups, and sub-tags and their groups, together with folders would provide for even more flexibility of these means of thinking and empower the users to choose the paths best suited for them. Most importantly, these concepts, when implemented, should facilitate finding information without knowing the exact details incumbent to initiate a search, i.e. browsing, possessing the characteristic of easy historical reference of read and unread content within an organizational superstructure that can cut through the overwhelming list of lists experience of today’s Gmail.
    • Sorting and filters, dynamic, inline, and customizable, as well as saved filter rules, another concept that Outlook implemented very well by way of their Search Folders (the name itself almost necessitates a Google equivalent), would also help cut through the clutter.
    • Provide the option to display either the total number (read + unread) or total unread tagged items alongside the tags. In turn, this would provide the ability to immediately archive communications, while maintaining a visual cue of their existence. In this approach, tags could function as more than mere labels, but become more action oriented keeping track of such things as to-do items or other rapidly evolving and critical communication (that would benefit from being separated from the clutter of the Inbox).
  • Discussion threads for tracking communication evidently work well for some people. For others, the thread is a sure fire way to misplace an important subset of the conversation.
    • Enable the ability to disable threads altogether, establish new threads and sub-threads, remove components / emails / sub-threads from a thread.
    • Allow for archiving of selective portions of a discussion thread.
    • Permit discussion threads that consist of multiple modes of communication; a single discussion thread could consist of Google Talk, Twitter, and Email communications centered around a single topic.

Google has many products that have official, open API’s and hooks for cross-product integration; lacking in the case of Gmail . Open source and APIs play very google_apisimportant roles at Google. They …

  • accelerate idea creation — inspire and build upon,
  • leverage the power of the community — improving and extending the product through community ideas, learning and need discovery,
  • facilitate testing (and bug fixing) on greater scale,
  • increase the stickiness of Google products,
  • .. among many other value-added benefits.

And, greater attention to Integration and Consistency within Gmail would also greatly benefit its current and potential users by…

  • Enabling better cross-linking between Google products (e.g. between Google Calendar and Gmail) as well as amongst external properties (e.g. Gmail and OneNote). For example, including the Gmail live discussion thread from which the Google Calendar event was created would be a step in the right direction. In addition, Gmail and Google Docs could be more tightly integrated, with document revisions coordinated and displayed and accessible, alongside the messages within the discussion thread making use of the underlying document(s). Even integrating, to various degrees, with Google Analytics can provide greater understanding of effective communications, best times to reach out to people, best ways to get desired responses, etc.
  • Creating an open Gmail Labs, or Gmail App Store, for third party development of plugins and enhancements for Gmail.
  • Increasing openness, modularity and portability of Gmail and its parts by establishing an Open Development Platform to provide for the rapid evolution of the features and ideas of Gmail; leverage the strategy that has proven so successful in other Google products.
  • Blending the social media stream, from Picasa, YouTube, Facebook, and Orkut to micro-blogging, blog posts, and comments, building upon the current integration of Google Talk and Google Voice to further become the centralized, single place for all an individuals web communication.
  • Supplying a framework for the robust flexibility and customization of the UX and UI. For example, let users create their own buttons, button containers, and both custom and common actions.
  • Integrating more easily and seamlessly with the OS. Microsoft Windows allows the user to right-click ‘send to mail recipient’ on files.’ When Gmail is the primary email client of choice, performing such action should direct the straight to a newly composing Gmail message.
  • Experience and information management should be consistent from one Google product to another, most especially products like Gmail (tag-based organization) and Google Calendar (calendar-based organization) and Google Docs (folder-based organization).


htc-hero-pictures-15 Now that I have switched to Gmail from Outlook, I couldn’t be happier that I was so coaxed into this long resisted position. But, the conversion could have been better facilitated, and more can be done to accelerate others still resisting. I only hope that this journey, together shared, was more than fun, but also illustrative and educational for those that use, may some day use, or are in positions of power and influence to improve the web-based email / communication platform, Gmail.

First converted to a fan of Android, the platform, then converted to a fan of Gmail, too. I resisted the Android, and succumbed. I, for much longer, both longed for and resisted the conversion to Gmail. Through all of this, despite the long path already journeyed, there remain many more steps to walk, specific steps that those overseers of Gmail can take to further enlighten the experience of ones as of now converted as well as those yet to be.

Remember & Share

Subscribe now (click here) to make sure you don’t miss out on other exciting product explorations and in-depth looks at the people and strategies behind them.

Enjoy & Tweet!

Jeremy Horn 
The Product Guy

Add to Social Bookmarks: Stumbleupon Del.ico.us Furl Reddit Google Add to Mixx!

From Another Facebook Facelift to IBM’s Bridging of Worlds through Modular Innovation

Every week I read thousands of blog posts. Here, for your weekend enjoyment, are some highlights from my recent reading, for you.


On Starting Up…

Series A fundraising and the 5 terms every founder should know.


On Design & Product Experience…

Facebook gets another facelift.


On Modular Innovation…

IBM’s bridging of online and offline worlds through Modular Innovation and human sensors.


Have a great weekend!

Jeremy Horn
The Product Guy

Add to Social Bookmarks: Stumbleupon Del.ico.us Furl Reddit Google Add to Mixx!