Friday, March 9, 2012

Why Should I INVEST in User Stories?

INVEST is a another great acronym from the Computer Sciences industry, Department of Agile (yes, DOA, and I’m well aware – thank you very much); It stands for Independent, Negotiable, Valuable, Estimable, Sized (or Small), and Testable. Those are indeed valuable attributes of User Stories, of any kind of requirements at all, and the acronym itself implies some effort on behalf of the creator of user stories (i.e. the Product Owner), with a potential return on investment.

But that isn’t good enough. A catchy name may be enough for most developers to try something new (seriously, when does a developer ever need a reason to try something new?), but not so for management. To many managers, however, this can sound like Impossible, Not-gonna-deliver, Vague, Everything-is, So-what, and Test-the-whole-goddamn-project!

In this post, inspired by a twitter-conversation I had a while ago, I hope to explain what this INVESTing in user stories really means, and why it is worth doing.

I is for INDEPENDENT

imageIn my opinion, writing independent user stories will be your single greatest return on investment (no pun intended – this time). In one of my recent posts, I described how work items (stories, tasks, features, etc.) are far more likely to complete later rather than earlier if they more than one dependency, while having just a single dependency (i.e. starting the new item is simply dependent on completing the previous one) will  increase the likelihood that it will complete on time.

Of course, most of the work in writing good user stories is in this part as well. You are required to reimagine how you think of your work. You need to do away with layered one-shot thinking that is probably necessary in every industry except software. Since the actual construction of the software is for all intents and purposes near-instantaneous, you can (and should) think about vertical increments of value, when you come up with your requirements. Each such story should be worded so as to be independent of any previous (or forthcoming) stories.

In some cases, you may find it impossible to break a story’s dependencies, no matter how you try. In those cases, try to look at the story with its dependencies as a single story. Find the commonality of them and reimagine it.

To summarize – Independence in your stories will translate directly into increased probability of delivering on time!

N is for NEGOTIABLE

imageLet’s get one thing clear: This attribute is not a copout for developers! A story’s negotiability does not give developers the right to decide not to do it. The developers do not decide what the story will be, what its scope is, when it will be delivered, and what is required to make it complete. Oh, the developers can and should discuss the story and its impact with the PO, and the PO may decide to change the story based on developer input, but it is ultimately the PO’s right (and responsibility) to make any changes to the story.

The full meaning of negotiability, is that the contents of the story (i.e. scope, priority, requirements) can be changed at any time, from the moment they are introduced, and up until the the developers commit to it (i.e. the beginning of its sprint).

This is perhaps both the easiest attribute to add to your user stories, and the hardest. It is easy, because it requires no extra work from the PO or team. It is hard, because it may require you to let go of any preconceptions you may have of the story (i.e. those you had when you first wrote it). It requires you to allow people to move your cheese.

The return on this investment is quite valuable, however; Your stories will be rejuvenated, and will be more valuable to the customers and user, because they have been recently revalued, evaluated and updated. This attribute is particularly synergetic with the next one:

V is for VALUABLE

Standish GroupYou’d think that given the high premium on the time of developers, and the fact that most projects are running late, as it is, it would go without saying that everything we develop is valuable. Unfortunately that is not the case. According to the CHAOS Report, by the Standish Group, fully 64% of developed functionality is rarely or never used!

All of these features have something in common: They were added without any consideration of their value or necessity to the users or the customers!

The valuable attribute of user stories helps reduce these numbers, by making sure that anything and everything the team develops has value to the users. When the PO comes up with a story, and cannot find a way to describe its value, it is possible that there is no value. Our tendency to add these valueless stories to the product comes from the traditional idea that you have to define everything upfront, or it won’t be in the project. Thanks to negotiability, it is possible to focus only on what is valuable.

This attribute also protects the system from developers’ desires to build a framework (we all love developing frameworks – it’s a conditioning or something), or do any work that doesn’t translate into value to the customer. If some technical work is required for some story, add the work as a task to that story, not as a technical story; this will more clearly radiate to management what is required to complete a story, and will give the PO the ability to consider this extra work and its impact when evaluating the story.

E is for ESTIMABLE

imageThere is a lot of good literature out there on how to estimate properly. While there are several, equally viable techniques out there for estimating, everyone pretty much agrees that relative estimates are easier than absolute ones, and smaller items are easier than larger ones. For more info on how to estimate properly, you can read my previous post on the subject, here.

There is more to it, though, than just the techniques. The story should be clearly scoped. There should be a beginning and an end.

Imagine a story such as “As a user, I want a text editor, so that I can take notes”. How much will it take to develop that? I have no idea. If the user only needs a multi-line textbox with persistence capabilities, then I can probably have it done in a few hours (yes – a few hours, because nothing ever takes just 5 minutes!). If the user is expecting RTF capabilities with copy and paste, it’ll take longer, and if he’s looking to give MS Word some serious competition, it’ll probably take a few man-years (just guessing here; It’s too big for me to give a good estimate).

I see estimability as the culmination and grounding of the next two attributes, Size and Testability (see below).

S is for Size

image“Sized Appropriately”, or “Small”, as some call it means that the story is small enough to estimate. In Scrum, and other time-boxed methodologies it is expected that the story will be scoped in a way that makes it possible for the team to complete a few of them in one sprint – at the very least, they should be able to complete one story.

This attribute requires the PO to define in detail what it is that he wants the team to deliver. In many cases, the actual user stories that the team works on are the elaboration of the broad scopes defined in the “Epics” or “over-stories” or “super-stories”.

What the PO gains is the ability to release early and often. The team get the ability to create less complex solutions, because the problems are smaller.

Remember, the story should be defined in terms of their business value, not the implementation details! The details are to be left to the developer tasks, and are of no interest to the users or customers.

T is for Testable

imageTestability basically means that it is possible to test the product to see if it fulfills the requirements of the user story. A testable user story has a finite and measurable set of acceptance criteria, by which it is possible to prove the validity of the product.

This last, but most certainly not least of attributes serves everybody who has a stake in the product:

  • By defining the story’s acceptance criteria, the PO has the opportunity to define more specific demands of the story, than what appear simply in the “title” (“As a… I want… so that…).
  • Both the Developers and the QA gain an understanding of what the scope of the story is and what it is not, thus reducing a great source of contention about whether something is a bug, or a new feature (if I had a penny…)
  • Stakeholders gain an understanding of what they are going to receive by the release.

The acceptance criteria, like the rest of the story, should be worded in the product’s domain language, which means that they should be defined in the users’ terms, rather than the developer / QA terms.

The return on your INVESTment here should be obvious: The PO gains a tighter control of what will be produced, without unnecessarily elaborating on the technical solution, while the developers and QA have a better understanding of what they are required to do.

In conclusion

I think that every part of the INVEST model has value. Stories that you have invested in will be:

  • More likely to complete on time
  • Current and updated
  • Valuable to the customer and / or the users, with less unnecessary technical fluff
  • Clearer, with less dissonance between POs, developers and testers
  • Less complex to develop, easier to test, and quicker to get feedback as well as quicker to deploy
  • Easier to prove and validate and quicker to gain acceptance by the customer / user

That’s all. I think it’s a worthy goal, well worth the cost. What say you?

Sunday, March 4, 2012

Reviewing Windows 8 Consumer Preview – One Week Later

Windows 8 New LogoOn Wednesday, February 29th, like (apparently) 1,000,000 other people, I was hitting the refresh button of my browser waiting for the consumer preview to be made available, and the Windows Store to finally open. I say finally, because I’m one of the 5,000 (lucky) ones to receive a Windows 8 Developer tablet at Build, last September. I say finally, because now it finally works like Windows 8, not Windows 7 with a (slightly) different skin.

In this post I will share my experiences with the newest version of Windows.

Installing Windows 8 Consumer Preview

imageAfter putting my kids to sleep, I fired up the tablet and went to the download page. If for some reason you haven’t downloaded it yet, and would like to try it out (you can run it on a VM, with no problems), you can use the web installer here, or prepare an ISO (especially if you want to run it on a VM), which you can download here. I decided to simply go with the upgrade option. There were two reasons for that decision:

 

  1. I wanted to see how well the upgrade path works from the Developer Preview. I can always re-format with the ISO. If I eventually do go down that path, I can lift and preserve all of my Metro UI apps, and all of my data; that is a new feature in Windows 8.
  2. It’s faster than futzing with creating a bootable USB thumb-drive. I was really itching to try it out.

The result, after roughly 30 minutes of smooth sailing, was a smoothly working Windows 8 (Consumer Preview) tablet, with quite a few metro apps. I was, needless to say, very happy with the result.

the installer, unlike what we’ve been previously used to in Windows 7 or before, was a real treat. It simply installed everything, and then asked a few questions that it needed for security, especially about whether I want to have a local account, or a Windows Live driven account.

New in Windows 8: The Microsoft Account

imageUnless you really are trying to see how poor an experience you can have with Win8, don’t even think about creating a local account (as you would in all previous versions). The Microsoft Account requires you to have (or create) a Windows Live ID, which incidentally does not mean you have to create a @live.com email – mine uses a @gmail.com account. In return you gain the following capabilities:

  • Download apps from Windows Store – Unless you are a corporate user, who will run Win8 mostly in desktop mode, there’s really no way you’ll want to give up this goodness. For a consumer, the Windows Store might be the primary (if not single) reason you’ll want to use Win8.
  • imageAccess Files and Photos Anywhere – Forget everything you know about accessing your files. With the new file-picker, you can select files from Flickr, SkyDrive, Facebook, or pretty much anywhere else, as easily as you would from your local drive.
  • Sync (and backup) Settings Online – Are you using multiple PCs? I’ve got a laptop I do some of my work on, a desktop workstation at the office that I use during the day, and the Build Tablet that I use for pretty much everything else – mostly information consumption (reading eBooks, browsing, and the occasional  blog-post writing, when I want to travel light). With this option, I can make the Metro UI part of the machine look the same across all of my machines, as well as keeping my settings (e.g. browser history, favorites, etc.) in-sync.

I certainly hope that when Windows 8 RTMs, it will be possible to have a domain account tie access the store. I would really like to open my workstation to an information radiator, to catch up, at a glance, with everything important.

Live Tiles: the Information Radiator

Okay. By now, you probably know me well enough to know that I am an Agilest, through and through. One of the key points about agile software development is that visibility is King. You  want to know everything important at a glance.

Enter the Windows 8 Live Tiles.

imageOut of the box, your Metro UI environment is set up with a few apps, such as your Calendar, Mail, Photos, Music, etc. Each one of these, and many others have Live Tiles. A live tile is like an icon of old, except that in addition to serving as a shortcut to an application, it also updates dynamically to show you pertinent information that relates to the app. Your mail app, for example, will show you how many unread email messages you have, as well as flip through your recent unread ones. The calendar will show you your next appointment and the date. Music will show you the “Now Playing” song, displaying an icon, the song’s title and possibly the album cover art.

Now, imagine a tile with a list of the latest bugs, or newly assigned tasks assigned to you, or a slideshow of the burn-down charts of your teams’ products (if you’re a group manager).

What I did is to bring all of the apps that have live tiles to the left-most area of the metro-desktop, so that I can see what my calendar looks like, my mail, and the weather.

In one moment I can easily tell where I need to put my attention next.

The Apps

imageThis is Windows 8, and apparently the year (or two) of the App. Everything is an App, as Microsoft learned from Apple and the rest of the mobile world. This is what I was waiting for. First thing I did once my Win8 PC was configured, was to hit the Store for some Window shopping (pun intended).

Since I installed it on a tablet, which is decidedly an information consumption device (as opposed to a data producer), the two most frequently used apps for me were Internet Explorer 10, and Windows Reader, Microsoft’s new PDF and XPS reading app.

Internet Explorer 10 is fast, snappy, with no frills; just the kind of browser Chrome was when I decided to start working with it. Working with it is a joy. Of course, this being the Metro side of Windows 8, there is now in-browser support for plugins – i.e. no flash or Silverlight. For the most part, that’s no big deal, though some YouTube videos don’t have an HTML5 version yet.

BTW – In case you don’t know, you can set your browser to use HTML5 with YouTube, rather than Flash, by going to http://www.youtube.com/html5 and clicking Join the HTML5 trial.

Of course, if you’re stuck with a site that requires a plugin (e.g. Flash), you can always open it in the desktop version of IE10.

The reader is also pure and simple. Just select a file – from anywhere, thanks to the file-picker – open it and read. Turn pages with your keyboard, mouse or swipe horizontally with your finger (if you have a touch device). It works as you’d expect.

I set my tablet to show one page, I tilt it to portrait mode, and use the swiping gesture for turning pages. This is the feature that I use more than anything else.

I downloaded a bunch of other apps, including EverNote, news and weather apps and some games, but the reader and browser account for most of my time.

I must say that I’m a bit surprised at how few apps made it to the store. Honestly, I expected (and hoped) for more. A dedicated Facebook and Twitter app wouldn’t go amiss, either.

People

This app is a bit weird. It actually covers three subjects:

  • Managing your contacts (under “All”)
  • Keeping up with your friends’ feeds (under “What’s new”)
  • Aggregates your latest posts to social networks, and notifications from the same networks, as well as displaying your contact information (under “Me”)

It’s an interesting combination – a social application simply named “People”. It takes a bit of getting used to, but there are some advantages to it. Just getting the heartbeat of your network, with none of the environmental “fluff” (for lack of a dignified term that better describes it), such as the ads on Facebook.

Of course, the name of the app is a bit misleading, and in my opinion, it’s just asking for trouble. Try to share something from the app, using the Share charm. You get an amusing anecdote, such as this:

image 

The Interface

Since I have a tablet to install it on, I have tested four different UIs: Touch, Stylus, Keyboard and Mouse. Let me tell you this much: In my book, Microsoft nailed it! The touch interface is fluid and intuitive, semantic zoom is a treat, and the on-screen-keyboard is sufficiently easy to use, for me to use regularly to type in URLs, search terms, and even write a fully literate comment on a blog.

The stylus is really easy to use, and even the handwriting works fairly well. A friend of mine, who also has this tablet, said that he’s been using it for the past six months to annotate his University class-books (which he gets in PDF format. How cool is that?).

The mouse, I must admit, confused me a bit at first. The Metro mouse-interface in the Developer’s preview version behaved the same as the touch-interface, which means that swiping in from the top or bottom brought up the context menu, swiping from the left switched the active app, and on the right you had the “taskbar” (if you can still call it that) with the charms, the “Windows” icon, and the settings.

Not so in the Consumer preview:

  • Clicking in the top row “pulls” the current window, to allow you to reduce the screen to a “partial” display.
  • Right-clicking opens the menu bar(s).
  • Instead of swiping from the left for the window-swap, you hover at the top-left, and click on the corner, in order to switch to the previous task, or move down to get a column showing the open windows, and click on any to open them.
  • Also, hovering on the bottom-left corner will bring up the metro-desktop, for you. Think of this as a replacement for your missing Start Button.
  • Likewise, in order to get to the charm-bar, you hover at the top-right corner, instead of swiping from the right.

Anyway, while it took me some time to figure it out (clicking on the sides like an idiot, I might add), it took me absolutely no time at all to get used to it. I think I like it.

The keyboard is something else. I’m kind of a keyboard jockey, and I love using Windows 8 with a keyboard. Remember that moment when you realized that in Windows 7, you could hit the Win key and just start typing the name of the application you want and pick it? Guess what: In Windows 8, you don’t need to press the Window key, if you’re already in the Metro desktop. Just start typing, and the search list will narrow down to your app, once you’ve typed enough letters. Pure win, for me.

image

Stability

All in all, the system is quite stable – at least when compared to, say, my Samsung Galaxy S phone, running Android 2.3. The tablet did hang on me once or twice – particularly when I turn off the tablet. I think this might be related to the hardware (BTW – it’s a Samsung 7 series tablet. Hmm…), and a few of the apps occasionally ceased to work, and had to be restarted. No big deal, especially given that this is a beta version, after all. ‘Sides, I’m not sure that how much of it is Windows’ “fault” and how much is the app builders’.

All in all, this is far more stable than anything Microsoft developed prior to Windows 7. It’s by no means ready for the market, but for a public beta? Definitely!

In conclusion

I’m really happy with the Win8 consumer preview. I actually spend most of my time in the Metro side, and don’t have to go into “Legacy” mode except for using Live Writer (which I do for blogging), and for the occasional Flash / Silverlight enabled (or should I say – inflicted?) web site.

Give it a try, let me know what you think, write it in a comment.

Thanks,

Assaf.

Written on my Windows 8 PC