Saturday 31 December 2011

Who is the real user here?

If a site is developed ostensibly for one purpose, but the monetization strategy is skewed in favour of some other purpose... what do you think is going to happen to the site over time? Whose interests are going to be prioritised?


Sure, the intentions are good, and you'll try your hardest to serve all your end-users, but if you have an actual, paying subscriber demanding a particular feature (or they'll take their money and leave) vs a feature that the non-paying community has been asking for... which one is more likely to make the cut?


I mentioned recently in my Sparkpeople vs fitocracy comparison, Sparkpeople have a number of UI problems, and I believe they stem from a slightly mis-matched customer-needs alignment. Ostensibly, the purpose of SP is to help people trying to lose weight. But the only money is coming in via advertising - the result? big flashy ads on every page, special "javascript-only" links that won't let you open other pages in new links (because that way you'll be busy reading the other tabs instead of watching the ads), very few new features that *actually help people lose weight* - instead concentrating on increasing user-generated-content.


Who is the real user here? Well - the sponsors...


I'd actually have paid to get a better service than this - to get them to finally (after three years) allow me to get graphs in the metric system or to not see the advertising. But the CEO is convinced that he's being generous by keeping the site ostensibly "free"... unfortunately - the site clearly isn't free. It's paid-for by customer attention.


But how did it get this way? I mean the owner is clearly a fanatic about trying to help people to lose weight, willing even to spend a very large amount of his own personal fortune to set up and maintain this site. So why did these anti-features appear in the first place?


It's simple common human nature that's to blame.


If the motive for a site does not align with the motive behind the money-flow, then you'll have two masters to try to serve - and it's obvious which one will win out. It's a much better idea to find a way to align these two.


A good example of alignment is in White Label Dating (a company I used to work for).


They are a company that allows people to set up their own, branded dating sites. For example, a women's magazine might decide they want a dating site. Rather than building one from scratch - with the near insurmountable chicken-and-egg problem (not to mention a strongly gender-skewed audience), they can come to WLD and quickly build a site that has all the functionality ready-made... along with access to a *huge* pre-existing database of daters... but also allows them to put their own branding on top. It's a "white label" dating site.


Now WLD's monetisation strategy is as awesome as it is simple: they revenue share. That means that for any individual dater that pays for a membership through the magazine's site - a percentage of the money goes to the magazine, and a percentage goes to WLD. The magazine is incentivised to use their brand and existing audience to promote the site -> getting more memberships, which gives them more money. But better yet, WLD are incentivised to make a good service for the end customers (the individual daters) because that way people will be satisfied by the service and continue with their membership.


The end result is a system that works for WLD, works for the magazine... but *also* works for the individual daters that sign up for the service.


That's how it should be.

Saturday 24 December 2011

Autocomplete with acts_as_taggable_on

Basic tagging sorted, I went looking for a way to add auto-complete - cos it's a nice UI improvement that's pretty common on teh intarwebs these days. I did a lot of searching, as most of the solutions seem to require switching to jquery, and for reasons of laziness (and legacy code), I don't wanna do that right now.


Luckily my searching dug up a tutorial by Michael Schuerig called: auto-completion for tag lists that works with acts_as_taggable_on and the auto_complete plugin.


It pretty much covers all the bases for tagging, so I won't repeat it all here. But I think it's awesome, because it will auto-complete on just that part of the field after the last comma - just what you need for a keyword-list.


Do read all the way to the bottom of the page, as his later updates can change the way it functions a bit.


I did make one addition myself. We have one form that lets you upload multiple items at once, with a "add a new form" link. It just repeatedly inserts a partial-template onto the end of the existing list, each time it's clicked... but because it's called *after* the "onLoad" event, the auto-complete wasn't getting added to it.


To work with that, we needed to add the installAutocompletion(); call to our addNewForm function, and also make sure that each "tags_list" field had a unique id.


I also needed to slightly update the controller code so that it could *either* take params[:my_widget][:tag_list] *or* take params[:my_widgets].first[:tag_list], because the multiple-forms-on-the-page form always sends through an array of widgets instead of just the one.


Then I realised that installAutocompletion would just keep adding autocompleters every time it was called... even to fields that already had one. So I updated the code by adding the following around everything after:


/* only add it if it doesn't already exist */
   if ($(completions.id) == null) {
       element.parentNode.insertBefore(completions, element.nextSibling);
       ... everything else after the above line too
   }

After that it was all gravy.

Monday 19 December 2011

"Our greatest asset"

I've just discovered 1.00 FTE. :)

Here's one to get you started:

Oh and, just like XKCD, there's always a rollover tidbit (not included here, go look at the site to see it).

Tuesday 13 December 2011

fitocracy vs sparkpeople

Update: Here's a fitocracy invite (if you want one)

I've been using sparkpeople for several years now, to track my workouts and weight progress. I heard about fitocracy a while back. It's gotten a fair bit of buzz in the geek crowd, and I've been hoping to play with that to see how they compare - but they never did get back to me with an invite... so I googled and grabbed one from a random fitness website :)

So now I can finally have a look at it and see what all the fuss it about, and find out which of the two I prefer. I've only been using fitocracy for a month, but here's my pros/cons so far.

Fitocracy

pros

  • Founded by fitness enthusiasts
  • Better centred around actual fitness scores (eg you can graph your reps or dumbell-weight, not just "number of times logged")
  • Better-designed interface (cleaner, better inter-page linkage, less cruft etc)
  • Can enter individual sets (rep/weight) all at once - which makes drop-sets and ladders much easier
  • Can save a "routine" full of sets (even from different exercise types) and copy it to a new day
  • Can actually can deal with the metric system! In every place where units are used (both entry and display and on graphs)
  • More motivating scoring system (at least I think), including fun quests etc
  • It tracks and notifies you if you've reached a new personal best (eg more reps, more weight, faster time etc)
  • Scoring system seem better weighted towards actually improving a person's exercise/fitness, rather than creating the user-generated content (or reading/viewing the sponsored content)
  • The developers are active in the forums, and actively work to change the system to meet the community's goals.
  • freemium - I like that they make a premium service available. That means they may not end up as advertising-supported site (which skews feature-design through the who is the real user here problem)

cons

  • *still* in beta, and you need an invite (you can get one yourself from my fitocracy invite code - I got mine from spartanwarrior's blogpost )
  • Some "growing pains" style bugs now and then (though I notice they disappear very quickly)
  • No run-distance tracker (you have to use another tool)
  • Smaller community (so far)
  • Still putting together a full set of data (eg exercises and advice), though it's sufficient for general use, and they take suggestions.
  • Can't go back and add your past workouts if you're, say, halfway through a multi-week challenge and just arrived on the site (4 days back only, even if you've *just arrived*)
  • Can't track goals you're working towards (eg goal weight/reps/distance ?) - though you can graph your current "personal best"
  • Not really set up at all for weight-loss tracking (you can enter your weight, but can't track it, and there are no quests or points for weight loss goals)

Sparkpeople

pros

  • Founded by weight loss enthusiasts
  • Has extensive food/calorie/nutrition-tracking
  • Larger range of options - eg tracking custom measurements/goals/activities etc
  • A huge library of fitness and health information already
  • Regular health-based news, recipe books and personal webpage (including blogging)
  • Can go back and add past workouts at any time in the past (good for migrating to a new site and not losing your past)
  • Nice widgets eg the "starting/current/goal weight" tracker.
  • Integrated distance-tracking tool (uses google, but then you can add your time and click "add to today's workout")
  • Can set/track long-term and per-week goals (eg long term goal of 60kg or "do 650 calories of cardio each week")

cons

  • It's actually very difficult to put in strength-training. They assume you do same-rep/weight sets so drop-sets or ladders have to be entered over and over again one at a time.
  • I think the points-system rewards strange things eg you get much more points for watching their advertising or for blogging, making recipes and taking polls/quizzes than actually doing exercise - this makes me feel that they are rewarding user-generated-content creation (which makes their site look better) rather than actual exercise/weight/loss (which rewards the actual person and is the stated purpose of the site)
  • Strength-training has bad graphing - you can't graph individual exercises whether by rep/weight or even number of times done (even though you can enter the info)... only by "number of training sets in total" (with all exercises mashed into one blob)
  • Excessive flashy/movey ads everywhere - which slow the site-load down and are also annoying. They are also prone to z-index problems (ie the menus sometimes appear *under* the ads)
  • They have some weird attempt to try to force you to only ever have the site open in one tab at a time. They do this through excessive use of javascript "load into this window" rather than normal links.It's quite likely an attempt to stop people from browsing elsewhere while the ads are showing, but really annoying if you're a multi-tab geek like me. To me this is one more piece of evidence that the "real users" of the site are the sponsors, not the people coming to lose weight.
  • Years later and they still don't have metric graphs. It seems like they've only made lip-service towards the metric system. I can enter my weight in kilos, but all distances are entered/tracked in miles.
  • General US-centric approach: I've noticed many, many polls/quizzes and articles that refer to US-only brands/traditions and culture.
  • No Premium Service option. The site is clearly suffering the problems of a free service: heavy ads, frakking around with links etc - I would have paid for it to actually work the way I want to (and get rid of those ads) but there's no option for that. Unfortunately, this is because the CEO/founder had publicly stated that SP will always be free. I'm sure that seemed a good idea to start with... but as their userbase rose dramatically, they've clearly had to fill the gap with advertising - thus leading to the change of "real users"

My personal conclusions

Sparkpeople has done me great service, and I can't really complain too much about a free service. Still, it's been around for a long time now - and they seem to have stopped improving the actual exercise/weight features and moved to mainly improving the information and social aspects. These aren't the bits that brought me to sparkpeople in the first place. I want a great tool for measuring my progress - not just another "generic health information" website (plus recipes!). sparkpeople is centred around building the sparkpeople community. That's fine... but I'm increasingly feeling that it's just not for me.

So - is fitocracy a good replacement? So far I think the answer is yes. It provides a better tool for the kinds of things that I want from an exercise logger. It also has added community features which, in this case, don't seem to be getting in the way. It's still unfinished, and yet it has a more professional "finish" to it than sparkpeople has ever managed. From what I can tell - the only advantages that sparkpeople has over fitocracy are the recipe/food-logging tools (which I never use anyway) and the vast back-catalogue of information provided by the sparkpeople community (both paid-for and free), which is something that will come to fitocracy with time.

For a little while longer I'm going to maintain both - mainly because I have three years' worth of past-data in sparkpeople (which is motivating for me). But if fitocracy ever gave me a way of importing that, I don't think I have any hesitation in switching permanently.


What do you think? have you used them both? Have I missed something important?

Wednesday 7 December 2011

Acts-as-taggable-on

Tagging is pretty popular these days, and it was time to add it to our site. Unfortunately, lots of the gems are old, and it's had to know if that means "good and has stuck around" or "buggy, obsolete and no longer supported".

The rubytoolbox page on rails tagging has several gems - most of which are marked as inactive now. The only one that looked like it had any recent activity is: acts-as-taggable-on. It's also the top-most-downloaded, so that looked good.

Best news: it is rails-3 compatible AND supports a recent build-version that is still Rails-2 compatible. As I've mentioned before, my current client is still on Rails-2 - because the upgrade pain is not currently outweighed by the new features.

The only annoyance is that the rdoc only has rails-3 post-install instructions rails generate acts_as_taggable_on:migration. These don't work for rails-2, and if you try just substituting "script/" for "rails ", it'll give you an error saying: Couldn't find 'acts_as_taggable_on:migration' generator

I had to hack about a bit to find the new migration name, but what you need is: script/generate acts_as_taggable_on_migration

After that I used this extremely good tutorial on tagging with acts-as-taggable-on.

I don't like the tag-cloud style of tag-selection, and instead prefer something much more like Stack Overflow. So I created my own tag-list as per the code below.

It lists all current tags for the class (assuming similar code setup to the tutorial above), and filter based on that keyword - incorporating any existing search or pagination conditions you already have. It will highlight the current keyword, and change that link to a "deselect if you click" link.


    # code in index page
    <% @tags.sort_by(&:count).reverse.each do |k| %>
      <% url_opts = {:action => "index", :controller => "posts"}
         link_name = "#{k.name} (#{k.count})"
      %>
      <% if @keyword == k.name %>
        <%= link_to link_name, url_opts.merge(:keyword => nil), :class => "tag current_tag", :title => "Click again to see all" %>
      <% else %>
        <%= link_to link_name,  url_opts.merge(:keyword => k.name), :class => "tag", :title => "Click to filter by #{k.name}" %>
      <% end %>
    <% end %>


   # code in controller
   options = {} # any search/pagination conditions go here
   @tags = Post.tag_counts_on(:keywords)
   klass = Post
   klass = klass.tagged_with(@keyword) if (@keyword = params[:keyword]).present?
   @posts = klass.paginate( options )




  /**** and associated tag-cloud styles ****/
  /* basic tag-box */
  .tag {
    background-color: #eee;
    border: 2px solid #ccc;
    color: orange;
    border-radius: 7px;
    -moz-border-radius: 7px;
    padding: 2px 15px;
    text-decoration: none;
  }
  .current_tag {
    background-color: #ddd;
    color: orange;
    border: 2px solid orange;
    border-radius: 7px;
    -moz-border-radius: 7px;
    font-weight: bold;
  }
  .tag:hover, .current_tag:hover {
    background-color: #bbb;
    color: red;
    border: 2px solid red;
    border-radius: 7px;
    -moz-border-radius: 7px;
  }

Next up is to figure out ye olde ajax auto-suggest when I add them.