Friday, May 15, 2009

Learning from mistakes and test cases

Pawel was questioning the usefulness of test cases in one of his blog posts. I dislike useless documentation as much as any sane developer, but I see a strong reason for having test cases, besides outsourcing the tests, as one of the readers pointed out in the comments. My reason is regression testing.

Every time you test a new build of the software, you find bugs. Some are easy to reproduce and appear in daily usage scenarios. You want them fixed, otherwise they will get noticed by the users and most probably you don't want that.

In future builds, you would also like to stay free from the previously discovered bugs. Therefore you make notes about the context and the steps that led to the bug appearance. Surely, not every problem you find is worth keeping track of in a test case. A crash when accessing a web page with valid parameters doesn't usually need a test case, as you'll probably notice it anyway if it will come back.

At a certain point the build becomes stable and free of any obvious problems, which are easily accessible and reproducible. You find less bugs, but more subtle. The contexts in which they appear are not straightforward. Who would've thought to hit the Back and Forward buttons in a wizard 4 times in a row? Still, it's a malfunction and, if it doesn't happen only with Konqueror running on SuSE 6, you would probably want to fix it.

You make a note to check this bug in the next build as well. Throughout time, the list of notes is growing. You need to detail the context and the steps as much as needed, not necessarily as much as possible, because recalling all details in a few months doesn't really work.

Without noticing it, if you didn't want to acknowledge this from the beginning, you have a list of test cases.

In the future, if you think some of the test cases are not worth checking anymore, being obsolete or so, just delete them. Or better yet, mark them obsolete, to be able to revive them with some adjustments.

There is of course, automation, having the computer run a suite of tests for regression, instead of going through a list of test cases yourself. But this comes to show the same thing once again. These automatic tests are, in fact, test cases in a machine readable form.

Wednesday, April 8, 2009

The Catch-22 of functional specifications

Running away from writing functional specifications is a common thing. We prefer to talk about them. When someone joins the team, people from various areas of the project are asked to have a chat with the newcomer and provide her some insights.

However, these discussions have a tendency to repeat themselves in time and also change in a few ways, leading to chaos.

Writing functional specifications helps. Joel Spolsky shows how in a 4-part series, which may look daunting to read due to the length, but it's basically a 30 minutes lecture and it's fun and useful.

Why don't people write specifications, even for a small tool they built, that can be reused and that can clearly state what's going on? The invoked reason is always the same: no time!

This is the Catch-22 of functional specifications: people don't have time to write/maintain specifications, because they have to spend time explaining to their colleagues how things work. And they do this, because there are no up to date specifications.

Thursday, April 2, 2009

IE6 - to support or not to support

Yesterday I was reading this post from the Pingdom blog. I forgot it was the 1st of April, so I thought they went mad.

I realized it's a joke when I saw the first testimonial on the SaveIE6 website mentioned in the post, testimonial written by a certain Steve B. Bangal, Inventor of spaghetti code.

Image by hashmil

First time I read about this call to action by Robert Nyman here. Robert is trying to convince web developers to stop writing special code for Internet Explorer 6. And when you want your web pages to look decent in IE6, you need to write special code. People call it hacks.

We didn't discuss yet if we're going to stop supporting Internet Explorer 6 in Teamness. It's very tempting to do it, given all the frustrations we've been through.

So far, we had 18% of the visits on the public website and 6.5% on the private one coming from IE6. The numbers are small, so I believe we can start the countdown for casting out the hacks.

Sunday, March 29, 2009

Recommended reading with Twitter

"Twitter is a waste of time", some of my friends are saying. "Why do I need to know what others are doing?"

I guess most of the reluctant guys take Twitter's incentive, "What are you doing?", too literally. Surely, this is not interesting in most of the cases. I couldn't care less when others wake up, if their coffee tastes good or if it's raining in London. Except if I'm going to London, of course. But in that case there are 100 websites to check the weather.

Twitter is a flexible platform. There are probably a ton of articles out there explaining the benefits of Twitter and the way one may use it. I guess one of Twitter's strong points resides in its mass usage. You can see what's hot. For instance, just search for "Earth hour" updates to get an idea.

A few days ago I was reading an article, probably this one, and I realized that amongst the things I read on the web, some of them I would like to keep track of, as in the case of the books. And I also want to share them.

I could use Delicious for this, as I do with all my bookmarks, but I wanted something like a stream of articles that are sent to more than my network of people on Delicious.

Twitter to the rescue.

However, I needed something more than just: "Hey, I found this nice piece of work - link", more specifically I wanted to be able to differentiate between other updates and the ones referring to articles.

Therefore I prefixed the update with the string #RR, as an acronym for Recommended Reading. The hash sign "#" is there to indicate some sort of a label for that update.

Ok, now I have the procedure in place, but how do I make these updates stand out from the crowd?

Chris Heilmann had a neat idea on how to dig through his series of updates on Twitter after certain ones. Here he describes how he used Yahoo Pipes to drill after tweets ending in a "§", the character he appends to each update he considers useful. Then he processed the last 5 tweets with Javascript to display them in a panel on his blog.

I shamelessly cloned Chris' pipe and changed it a bit to match my needs. I wanted a feed with the recommended reading updates, which is easy to get by changing a parameter in the pipe URL that tells the pipe what to render as result.

Here is the RSS feed with the recommended reading from Teamness. Please feel free to subscribe to it.

I also kept the Twitter id in the pipe configurable, so if you mark some of your updates in the same way, prefixed with #RR, you may use the same pipe by changing only the id below:

http://pipes.yahoo.com/pipes/pipe.run?_id=839250028c8c36570145554b0bcd190c&_render=rss&id=15095949

Tuesday, March 24, 2009

Trace the sheep

Here is an idea on how to make the customers feel better about the products they're buying.

Last weekend I purchased a garment from New Zealand merino wool clothing company Icebreaker.

On the tag of the shirt there is a nine-digit code called baacode which may be used to trace the garment back to the sheep stations where the merino fibre was grown. One can watch through photos and videos the living conditions of the animals and follow the process of manufacturing the garments.

Here are the ones for my baacode 013E3230F:

Wednesday, March 18, 2009

3 websites to keep track of books

I just finished The cult of the amateur, a book which I mentioned here, referring to time as a precious resource.

And what I realized is that I forgot most of the books I've read. Not that I'm reading that much, but for instance I cannot remember what books I finished 6 years ago. Therefore, I needed a method to keep track and to do this, I looked at 3 websites designed for this purpose.

LibraryThing

As they state: "LibraryThing gets all the right data from Amazon.com and over 690 libraries around the world, including the Library of Congress."

LibraryThing provides tags, a lot of attributes for each book and Zeitgeist - statistics about your activity. The interface is a bit clumsy, but the application is fast and has a lot of features.

They offer another neat thing called Local, which acts like a gateway to local bookstores, libraries and book festivals. This allows me to find a place nearby where I can get a certain book.


GoodReads

GoodReads is also fast, they offer a few basic features of book management, insisting more on social interaction with other fellow readers. The website works around bookshelves, which you may manage in various ways.


Shelfari

Shelfari is the handsome of the group, with a neat look of the site, but at the same time it seems to be the slowest. It has predefined lists for what I plan to read, I'm reading, I've read, Favorites, Own and Wish list.


All the above services offer social interaction. You can see reviews by other people, connect with them and share the books, but I'm not really interested in such features. At least not for now.

In any case, since all these services support importing and exporting the list of books, it's quite easy to switch between them. Actually, for this review I added the books to LibraryThing, then I exported the list and imported it in the other two services.

This worked with a few interventions. After importing from LibraryThing to GoodReads, I found "Harry Potter and the Sorcerer's Stone" in the list. It's true I don't remember all the books that I've read, but I know I didn't read this one. The import from LibraryThing to Shelfari worked like a charm, even though it missed most of my ratings and the tags for the books it didn't find by the ISBN.

In the end, it was a bit difficult to choose between LibraryThing and Shelfari. The latter feels good when using the website and as I said, looks pretty neat, but since I'm mainly using the service for storing information, I opted for the flexibility LibraryThing offers.

Saturday, March 14, 2009

5 more tips and tricks with Teamness

Here are five more tips and tricks with Teamness for your delight. Please also checkout the previous five.

1. Project customizations

When the current opened project is one that you own, a link called "Settings" appear in the main menu that points you to a page where you may choose a logo for your project or set which tabs you would like to be displayed from Tasks, Milestones, Messages, Whiteboards, Files.

2. RSS feeds

In each of the following pages: Dashboard, Tasks, Milestones, Messages, Whiteboards and Files there is a RSS icon in the lower right side of the sidebar. You may use the link for that icon to feed it to any RSS aggregator of your preference. You may also subscribe to data from all the projects you're working on or your own created projects.

3. Email notifications

In the Subscriptions page you may check or uncheck the "Receive email notifications" check-box to switch between receiving or stopping email notifications for tasks, milestones, invitations or any other case.

4. Flag whiteboard version

You may flag as many versions of a whiteboard as you want. This is an easy way to remember that some are special. After you flag a version, a small sign will appear in the list of the versions for that specific one.

5. Export your data

In the Account page you are given the option to pack all the data from your projects as an XML file.

For performance reasons, the export can be performed only once a day. An email with download information will be sent to you as soon as the export is ready.