Fat homes

Matt from 37signals recently posted some excerpts from “The Eight Step Home Cure”. They are well worth a read.

This one especially jumped out at me:

But when we take something new into our home, we rarely let go of something else. This is how our home gains weight, grows unhealthy, and begins to nag at us…Most of us aren’t in need of more organizing; we need to manage our consumption, let go of our stuff, and learn how to restore life to our homes.

As a reformed hoarder, I love the analogy of a house slowly getting fat as you fill it with more and more stuff.

As an aside, I actually think that hoarding might be a genetic condition. The good news is that it isn’t necessarily terminal. I recently got my parents hooked on Trade Me (hey, it only took 7 years!) They are now enthusiastically selling off lots of their junk stuff and are well on the way to a full recovery. :-)

Fat software

If you can think of your home as a “living organism” which needs a healthy diet and regular exercise then software is surely the same.

Applications that have been around for a while and through a number of versions are typically obese with features.

A classic example is Microsoft Office. When the team planning the most recent version asked people what features they would like to have added many of the things people suggested were actually already in the product. The problem was not too few features but the opposite – there were so many features that people were struggling to find them and use them effectively.

To solve this they came up with their new ribbon UI.

As more and more functionality is added to Trade Me we have started to run into the same sort of problems. We recently added a Seller Acceleration Centre to our help to make it easier for big sellers to find the existing features they can use to make their lives easier.

In addition we haven’t been scared to take the “liposuction” approach and remove functionality altogether when it isn’t used enough to justify its place in the UI. For example, a few months back we removed Trust Webs, which allowed us to give extra prominence to a members Blacklist.

So, next time you adding a feature to your application ask yourself what you can remove to keep things in balance.

Like somebody who holds on to every nick-nack that is choking their house on the assumption that it might be useful one day, it is harder to do than it sounds.

1x Yellow Pages = 3.2x Trade Me

The big business news this week is the sale of Telecom’s Yellow Pages directories business for $2.24 billion.

That’s a big number!

Some simple maths: 1x Yellow Pages = 3.2x Trade Me.

The buyers are a consortium of CCMP Capital (a private equity firm) and the investment arm of the Ontario Teachers Pension Plan.

The multiples involved are not outrageous. According to ValueCruncher their earnings last year were $250m and are expected to be $300m this year. So the sale price is just under 9x current earnings and 6.4x projected earnings. The equivalent numbers for Trade Me at the time of the sale to Fairfax were 27x current earnings and 15.5x projected earnings.

People have been critical of the sale. According to Telecom they are getting out now because they believe the future of directories is online. I think that’s right. The question is whether that’s online with Yellow Pages or with Google. In either case it doesn’t say much for Telecom’s confidence in their own ability to convert online opportunities (Ferrit? YahooXtra?)

I think Yellow Pages itself is now in a strong position. It’s their game to lose. They have a very strong brand which is very well known and well trusted. And they have an existing billing relationship with more-or-less every business in the country, all of whom expect to pay to appear in the directory (and presumably see some return which is in proportion to that cost?)

They also have a website which is rubbish. They could easily make it 10x better. Applying some of the improvements recently made to the White Pages site would be a good start.

If they get this right it will be pretty difficult for anybody (even a Google) to displace them. And it will allow the teachers of Ontario to be that much more comfortable in their retirement.

It will be interesting to watch and see what happens.

What do you think?

A big couple of days

It’s been a big traffic week at Trade Me.

Last Monday we set a new daily record with 35 million page impressions.

Then this Sunday just been we knocked that out of the park with 38 million page impressions *

(And, when I say we I actually mean you, of course!)

Either way, that’s a lot of pages!

Obviously there are internal things that influence these fluctuations – site design, speed, etc. But, it’s also interesting to consider some of the external factors.

One is television. There does seem to be a long term correlation between more and more crappy (but cheap to produce) reality television and more and more traffic on Trade Me, although I’m not sure which is the chicken and which is the egg. ;-)

Big sporting events can have an influence too. The night Hamish Carter won his gold medal traffic was noticeably down. Likewise during the Lions tests in 2005. We should probably plan for a quiet September and October this year during the Rugby World Cup.

Another factor is the weather. People who are outside making the most of the sunny weather are not inside browsing the web.

In this particular case I wonder if daylight saving played a part. All of a sudden it’s darker outside and you need to find something different to fill the evenings. On top of that Sunday had 25 hours in the day, which doesn’t happen very often!

Any other ideas?

* numbers from Neilsen//NetRatings.

The internet didn’t change my life at all

I was sorry to miss the recent Webstock Mini event in Wellington a couple of weeks back.

But, the good news is that the presentations are now all available online:

http://www.webstock.org.nz/recordings.php

If you didn’t get along, make sure you check out the 10×2 sessions.

This is the quote that grabbed my attention:

“The internet didn’t change my life at all.
I can’t remember life without the internet”.
Josephine Hall

Ouch! That would have stung for some of the older people in the audience.

She is now 18 and talked about using the internet in 1996, while still at school, to research a science project.

I graduated in 1996. It was also around then that I read an excellent book called Growing Up Digital by Don Tapscott, about “N-Gen”, or the net generation. They (we, although I only just qualify!) are the echo of the baby boom, who have grown up surrounded by interactive technology.

From the book:

Technology is only technology to people born before it was invented
Alan Kay

That’s why we don’t argue anymore about whether the piano is corrupting music with technology
Seymore Papert

So, if you’re the sort of person who still marvels at the promise of the internet, take a look over your shoulder and see people, like Josephine, who are already taking it for granted and asking what they can actually do with it.

Every now and then take a look back and get vertigo

Here’s an excellent piece of advice from Warren Buffet. It comes from his latest letter to shareholders of Berkshire Hathaway:

“There is much to be said for just putting one foot in front of the other every day”

(Thanks to Lance for the link.)

PS The title for this post is another quote, from the founder of Fark.com in a panel discussion recently posted on Guy Kawasaki’s blog. Enjoy!

PlanHQ has launched

I’m a couple of days late with this, but …

PlanHQ has launched

Congratulations to the team (Tim, Natalie, Koz, Ben, Oliver + Nik).

You have a great v1 product. Now the real fun begins!

Here is a good quote:

“If you ship your product and you’re not a little ashamed of it, you shipped too late”
– Reid Hoffman, LinkedIn

From: http://blog.guykawasaki.com/2006/08/startup_success.html

If you haven’t heard of PlanHQ yet, it’s a tool designed to transform your business plan into a living online document which can be viewed and maintained by your whole team. This makes it much easier to keep your plan up-to-date as you go. It’s also great if you’re just starting out on the process of creating a plan, as it guides you thorough the various sections you should include. Take a tour.

I like this description:

“[It's] a system as flexible as a wiki with focus on business plan development.”

From: A roundup for developers developers developers

Enjoy!

Don’t click here

A really simple thing, but a really common mistake:

Make hyperlinks contextual.

A like like this makes me think:

Click here to register

When I look at this my eye is drawn to the bit that is blue and underlined (your links are all blue and underlined … right?) But that part doesn’t give me the context of the link.

If a user is quickly scanning a page trying to find something useful to click on, which is how people typically read web pages, then using this sort of design will slow them down considerably.

Even the most novice web users quickly learns that links are clickable, you don’t need to tell them where to click – unless, of course, you’re obfuscating your links by not underlining them and/or making them a colour that isn’t blue.

So, put the context in the link.

This is much better:

Register now

Once you know this rule you will find hundreds of pages which could be so much better if it was used.

Broadband usage still under 50%

Whenever I present to a group of technical people I always ask for a show of hands and ask these questions:

  • Who is using Internet Explorer
  • Who is using a monitor with a resolution of 800×600?
  • Who uses a dial-up connection at home?

There are usually a handful of IE users, but never any 800×600 users or dial-up users.

I do this to point out how poorly most technical people relate to “normal” users.

Meanwhile out in the real world …

According to the latest Trade Me server stats about 83% of people use one of the variants of Internet Explorer (including 1.2% on IE5.x – who are these people and don’t they know somebody, ANYBODY, who can help them to upgrade)

On the screen resolution front, there are still about 14% of people out there using an 800×600 monitor. I assume many of these people have hardware which is capable of more, but they just don’t know how to make the change, or don’t care to?

And, according to statistics reported last week over 50% of people in NZ are still on dial-up.

It depressing! But, let’s not pretend that the audience is something that it’s not.

Sam speaks at TED

Sam spent last week in Monterey California at the TED Conference.

Last night he sent this link to some pictures of some of the speakers. See if you can spot the Kiwi in his Ice Breaker:

http://ted2007.vox.com/speakers/

I can’t believe he got to share the stage with Beaker and Dr. Bunsen Honeydew! ;-)

As you can see, this conference attracts an incredible audience including many of the best speakers in the world. Sam was talking about some of the charity work he has got involved in over the last 12 months.

We’ll look forward to hearing some of his stories from what sounds like an amazing week.

P.S. TED is an invite-only conference. You need to apply to attend. If you want to apply to go next year … too late, it’s already sold out!

Hamish Carter

“If God invented marathons to keep people from doing anything more stupid, the triathlon must have taken Him completely by surprise”
P.Z. Pearce

Hamish Carter has decided to pull the plug on his legendary triathlon career.

Here is what he had to say in the NZ Herald about winning at the Athens Olympics in ’04:

“It was one of those experiences so massive and powerful that every time I think about it, it gives me goosebumps.”

Mate, thinking about that race gives me goosebumps, and I was just watching from the other side of the world, so I can only imagine how inspirational that memory is for you.

It’s exciting to see you joining Rod and the guys at Xero (which is starting to emerge from the shadows this week). Good luck with Act II.

UPDATE: Rod has more details.

Questions from Tim Haines, Part I

This is Part I in a two-part series. Part II covers the Trade Me development process and tools.

It’s been a while since we got geeky here, so …

After my recent post about our migration to ASP.NET I got sent a bunch of questions from Tim Haines. I thought I’d try and pick these off over a couple of posts.

To start with, a few questions about our application architecture:

Q: What’s the underlying architecture of Trade Me – presentation layer / business logic / data layer / stored procedures? All isolated on their own servers?

Q: Are there any patterns you find incredibly useful?

Q: Do you use an O/R mapper or code generator, or is all DB interaction highly tuned?

Q: What third party libraries do you use for the GUI? I see you have Dustin’s addEvent. Follow any particular philosophy or library for AJAX?

Here is a basic diagram I use to represent this application architecture we use on all of our sites at Trade Me (click for a larger view):

Application Architecture Diagram

We’ve worked hard to keep this application architecture simple.

There are two layers within the ASP.NET code + one in the database (the stored procedures). I’ll start at the bottom of the diagram above and work up.

Data Layer

All database interaction is via stored procedures. This makes it easier to secure the database to threats like SQL injection. And it also makes it easier to monitor/trace the performance of the SQL code and identify where tuning is required.

Within the application we manage all access to the database via the Data Access Layer (DAL).

All of the classes within the DAL inherit from a common base class, which is a custom class library we’ve created (based loosely on the Microsoft Data Access Application Block). This base class provides all of the standard plumbing required to interact with the database – managing connections, executing stored procedures and processing the results.

The methods within the DAL classes themselves specify the details of the database logic – specifying which stored procedure to call, managing parameters, validating inputs and processing outputs.

So, for example, to process a new bid we might implement this DAL method:

Public Sub ProcessBid(ByVal auctionId as Integer, ByVal bidAmount as Decimal)
	ExecuteNonQuery("spb_process_bid", _
		New SqlParameter("@auction_id", auctionId), _
		New SqlParameter("@bid_amount", bidAmount))
End Sub

A couple of things to note here:

  • All of our code is VB.NET, so that’s what I’ll use in these examples. Apologies to those of you who prefer curly brackets. Perhaps, try this VB.NET to C# converter ;-)
  • Obviously (hopefully!) this is not actual Trade Me code – just an example to demonstrate the ideas.

When we need to return data from the DAL we use Model classes. These are thin container classes which provide an abstraction from the data model used within the database and mean we don’t need to hold a database connection open while we process the data.

A simplistic Model class might look like this:

Public Class MemberSummary
	Public MemberId as Integer
	Public Name as String
End Class

Some Model classes use properties rather than exposing public member variables directly, and a few include functions and behaviours, but most are just a simple collection of public member variables.

Model classes are always instantiated within the DAL, never within the Web layer. We don’t pass Model objects as parameters (if you look closely at the diagram above you’ll notice the lines through the Model layer only goes upwards). This gives us an explicit interface into our DAL methods.

So, to get a list of members from the database we might implement this DAL method:

Public Function GetMemberSummaries() As IList(Of Model.MemberSummary)

	Dim list As New Generic.List(Of Model.MemberSummary)
	Dim dr As SqlDataReader = Nothing
	Try
		dr = ExecuteDataReader("spt_get_member_summary")
		While dr.Read()
			Dim item as New Model.MemberSummary
			item.MemberId = GetInteger(dr, "member_id")
			item.Name = GetString(dr, "name")
			list.Add(item)
		End While
	Finally
		If Not dr Is Nothing AndAlso Not dr.IsClosed Then
			dr.Close()
		End If
	End Try
	Return list
End Function

DAL methods are grouped into classes based on common functionality. This is an arbitrary split – in theory we only need 6 DAL classes (one class per connection string variation), but in practice we currently have 47.

The two examples above show the patterns that make up the vast majority of DAL methods.

While we don’t use an O/R mapper, we have created a simple tool, which we call DALCodeGen. Using this we can simply specify which proc to call and the tool generates the DAL method and, if appropriate, Model class. This code can then be pasted into the project and tweaked/tuned as required.

Web Layer

All the remaining application code sits in the Web layer. This is a mixture of business and presentation logic, which in part is a reflection of our ASP heritage.

During the migration we created controls to implement our standard page layout, such as the tabs and sidebar which appear on every Trade Me page. These were previously ASP #include files. We’ve also implemented controls for common display elements such as the list and gallery view used when displaying a list of items on the site.

We have a base page class structure. These classes implement a bunch of common methods – for example, security and session management (login etc), URL re-writing, common display methods, etc.

Most of the page specific display code is currently located in methods which sit in the code behind rather than in controls.

We don’t use the built-in post-back model – in fact ViewState is disabled in our web.config file and only enabled on a case-by-case basis as required (typically only on internal admin pages).

With the exception of addEvent we also don’t currently use any third-party AJAX or JavaScript libraries. To date none of the AJAX functionality we’ve implemented has required the complex behaviours included in these libraries, so we’ve been able to get away with rolling our own simple asynchronous post/call-back logic.

Layers vs. Tiers

Each of the yellow boxes in the diagram above is a project within the .NET solution, so is compiled into a separate .NET assembly. All three assemblies are deployed to the web servers and the stored procedures, obviously, live on the database servers. So, there are only two physical “tiers” within this architecture.

Inspirations

There is no such thing as an original idea.

Most of this design was inspired by the PetShop examples created by Microsoft as a means of comparing .NET to J2EE. These were pretty controversial – there was a lot of debate at the time about the fairness of the comparison. Putting the religious debate to one side, I thought the .NET implementation was a good example of an application designed with performance in mind, which was obviously important to us.

Another reference I found really useful when I first started thinking about this was ‘Application Architecture for .NET, Designing Applications & Services‘ which was published by the Patterns & Practices Group at Microsoft. This is still available, although likely now out of date with the release of ASP.NET 2.0. It’s also important to realise that this book is intended to describe all of the various aspects that you might include in your architecture. Don’t treat it as a shopping list – just pick out the bits that apply to your situation.

Disclaimer

I’m a little reluctant to write in detail about how we do things. I’d hate to end up in the middle of a debate about the “right way” to design or architect an application.

Should you follow our lead? Possibly. Possibly not.

I can say this: if somebody has sent you a link to this saying “look, this is how Trade Me does it … it must be right” they are most likely wrong. You should at least make sure they have other supporting reasons for the approach they are proposing.

A lot of our design decisions are driven by performance considerations, given our size and traffic levels. These constraints probably won’t apply to you.

In other cases we choose our approach based on the needs of the dev team. We currently have 8 developers and ensuring that they can work quickly without getting in each others way too much is important. Smaller or larger teams may choose a different approach.

Also, a lot of our code still reflects the fact that it was recently migrated from an ASP code base. If you’re creating an application from scratch you might choose to take advantage of some of the newer language features which we don’t use.

More?

I hope some of that is useful? If you have any other questions send them through – my email address is in the sidebar to the right.

NZs finest 12th hole

The trip to Ironman this weekend just been was the fourth time I’ve driven SH1 from Wellington to Taupo in as many months.

It’s an okay drive – lots of varied scenery to keep things interesting – but doing it that regularly is perhaps stretching my enthusiasm levels a bit.

Despite this, there is always one thing to make me smile, just north of Taihape:

NZs finest 12th hole? Really? It seems like an unverifiable claim to fame. And, surely if it were true they’d be able to charge more than $15 for the privilege?

One day I’ll stop and check out this 12th hole and see what all the fuss is about!

Putting on the monkey suit

The hardest thing I’ve ever done in my life is a Half Ironman, at Blue Lake just out of Rotorua in December last year.

A Half Ironman is a triathlon consisting of a 2km swim, a 90km cycle and a half marathon (21.2km?) to finish. My time was 6hours 23minutes 21seconds. Running down the finish chute was a great feeling!

I was pretty broken mentally and physically from about two-thirds of the way through the run. But, somehow, I found a way to keep going. I’m not sure if I can explain how or why.

I did a heap of training in the lead up to the race, including one famous “lighthouse swim” from Freyburg beach in Oriental Bay around the lighthouse and back. I think it’s about 2.4kms (imagine crawling on your stomach 6 laps around and athletics track, and you’ll get some idea). I can pretty confidentially say that will be the longest swim I’ll ever do in my life.

From the outside the amount of training required and the distances all seem quite ridiculous. I was lucky to have a good bunch of people to train with, who quickly became good friends. But, hanging out all the time with people like that does create this funny dynamic where the crazy starts to seem normal. The majority of the group were training for a full Ironman, which made the distances I was covering seem totally sane in comparison – “I’m only riding for 4 hours today, not like that head case doing 6 hours!” There is always somebody prepared to go a little bit further and work a little bit harder. When we got to the point where it was just a step too far we called it “putting on the monkey suit”.

I like this quote from The ultra-marathon man, Dean Karnazes:

“This training made the extreme seem ordinary and made the impossible seem the next logical step. “

From Wired Magazine, 15.01

This weekend I’m heading up to Taupo to support some friends racing in Ironman New Zealand. Good luck to them and to everybody else competing, mostly against themselves, I expect. You have my complete admiration and awe. What an amazing story you’ll have to tell once you’ve finished!