MelonJS, if you haven't heard of it, is a nice little HTML5 game engine that I've been playing around with a bit lately. I haven't delved too deep yet, but it looks like the most appealing of the free options in that space so far.

While the experience has been mostly good, I had a minor hiccup: I've grown fond of CoffeeScript's ternseness, but MelonJS (and every other game engine) is very much JavaScript focused. Not that there's anything wrong with that.

MelonJS uses John Resig's neat little class implementation to handle inheritance. I'm a fan of this approach, (I used it myself before making the CoffeeScript switch), but it doesn't work all that well with CoffeeScript's fat arrow function bindings.

What will happen is something like the following:


  init: (x, y, settings) ->
    @parent(x, y, settings)
    me.input.registerPointerEvent('mousemove',, @onHover)

  thinOnHover: (e) ->
    console.log '@ is the calling object. Doh'

  onHover: (e) =>
    console.log '@ is bound to window. Doh'

I ran in to the problem of not being able to use CoffeeCript's function bindings in these classes at all, which is a right pain. I don't mind not using CoffeeScript's classes in this case - the Resig style class implementation does much the same thing, so that's ok. But I'm spoiled, and not prepared to give up simple context bindings.

Not to worry, we can do something a little tricky to take advantage of CoffeeScript and still provide MelonJS with the right type of Objects. They can all get along.

All that's needed is to create CoffeeScript style classes and use them as a base for creating the MelonJS style ones:

class CustomerEntity

  constructor: (x, y, settings) ->
    @parent(x, y, settings)

  onHover: (e) =>
    console.log '@ is bound correctly, yay'

CustomerEntity.prototype.init = CustomerEntity
CustomerEntity = me.ObjectEntity.extend(CustomerEntity.prototype)

Here I'm creating a CoffeeScript class as normal, then copying the constructor method to its init. This way it has an init method with all the nice CoffeeScript method bindings in place.

The next step is to extend the MelonJS class with thi class prototype, and bam - everything's available, bound up nicely, and good to go.

I've made a total of two attempts at marketing my app so far. That's pretty poor, in case you were wondering.

I'm trying to think of the reasons for my lack of consistency. I went on a bit of a learning binge from October - December, devouring every piece of knowledge on how to start marketing mysef and my app (There's My Bus!).

I picked up quite a bit in this time. It's pretty amazing how Google has essentially forced people to create great content with their algorithm updates. The best way rank in Google these days to is to write or record stuff people want to consume.

A few of my faves:

I feel like I'm just about grokking how this whole online marketing thing works. But I've failed to implement very much of it. And when January rolled around I found my momentum trailing off. I went from 10-20 hours a week on TMB to around 3.

And the worst part? Aside from marketing, TMB is jut about done (!). For iPhone at least, Android has a few touch-even related things to figure out. All I need to do is package it up and get it to the app store.

But I stalled. Goddammit. I'm hoping that writing this will help to kick myself into gear.

I know what I should be doing. Workflowy (which is a task/list manager that kicks the crap out of everything else - if you haven't tried it, do so!) has a whoole bunch of stuff for me right there. Maybe that's contributing to it? I've been adding tasks faster than completing them lately. It's hard to get that warm fuzzy feeling of accomplishment when your tasks grow faster than you can manage.

I hear that's just the way of things when you're running a business. There's always more to do than hours in a day. But there hasn't been much written on how to deal with that when 10 hours of each weekday are unavailable. Perhaps because there isn't much to say - you just have to squeeze in the time whenever you can and perservere. I was doing alright at that for a while there though, I might write about that in the future.

I think the real cause, however, is a basic human flaw that has bitten me in the past. It has it's roots in the fact that, by and large, people tend to avoid doing things they don't want to do. That fact alone, of course, is obvious and not very interesting.

The interesting part comes when we start looking at this assumption: That I wanted to learn how to market then market my app so people buy it and everyone's happy.

It turns out that I don't actually want to do the marketing. Which is also not quite true, because I do want to do it. I want my app to be at least a little bit of a success. I don't mind writing blog posts or telling people about it or commenting on related sites or getting to know writers or any of that.

Or maybe I do. I can't say that I'm really passionate about marketing. It's interesting to learn, but doing? It's not the kind of stuff I like doing.

At least at the moment. Maybe this will change with some practice. One of the great things about getting good at something is that it makes you enjoy it more. Maybe I just need a few little wins to nudge me onwards.

You're pretty sure people want your product. You're pretty sure you've made a good product. You're finally at the point where you're pretty sure it's ready to be seen.

Now what?

Well, you have to show it to someone sometime. But it's scary! You've been pouring your energy in to your product for the past x months. Despite all you've done to make sure you're not going to be hated (or worse, ignored), your mind is screaming doubts at you. That's ok. It's normal.

Current wisdom in startup space says that you should be building your audience from day 1. This usually invloves an email signup on your frontpage, communities you've started engaging with. So by the time you're ready for a beta you should have an idea of who you're going to show. 

I didn't. I dived in to There's My Bus before I even started reading The Lean Startup. So.. oops. That's ok. It's ok to suck, that's how you learn.

I was clueless. As a long time bus catcher I was building the app I'd always wanted. TransLink's site isn't fun to use. There's no app. I was pretty sure others would (and, I hope, will) want what I'm making.

Over the last few months I've been scrambling to fill in the gaps in my knowledge. I'm a developer, I love making awesome stuff, but getting people to notice it? Marteting!? No way! At best I had a vague idea that a blog was a good thing to have. I didn't have one, because I could happily convince myself that I had coding to do. Which was true, but if I'm to be honest with myself I was chosing that because it kept me nice and cozy inside my comfort zone.

Building for your own pain is a great place to start... but not validating your market is very risky. Being "pretty sure" based on assumptions is often the precursor to wasted effort.

So, learning all this too late led me to have some reservations. I tried to make up for it somewhat by getting some feedback from family and friends, but they're not really the most likely to tell you if your product sucks. Most likely you'll get a bunch of vague "oh hey that's really cool" type messages and very little validation for your idea.

Anyway. I resolved to suck it up, get out the minimal set of features that would make TMB better than TransLink's NextBus, and post it to /r/Vancouver (where I've been enjoying a slew of amazing pics and transit related tales). I've been a redditer for a long long time so it was the perfect place to test the water.

I had some reservations - that's the first time anyone has seen There's My Bus outside of my small circles.

Leading up to the post I was half expecting to be slammed for any number of things. There was still a bunch of stuff I'd have loved to include beforehand, but I decided to keep the features as they were and spend my time polishing it up. The results of which were:

  • It worked well
  • I got it out there sooner

Those are more important than a few extra features. Bugginess would mean that noone would use it, and waiting any longer was not something I really wanted to do - I've had too little time to work on it as it is, more delays would have been awful.

And hey, I could tell myself that I had an MVP. It was a lie, because no MVP should, by definition, not take so damn long to make. But telling myself that eased some of my worries. I coud focus on my goals without being overwhelmed by the whole "launching" thing.

Speaking of which, my goals for that post were simple:

  • Make sure it works
  • Make sure people want it

So I posted it. And.... I love /r/Vancouver. Seriously! The response blew me away. People liked it (yay) and it worked (mostly).

I still have a stack of tasks to get it ready for app stores. An icon, some content on the There's My Bus site, social pages, app store copy... And that's before the features I'd really love to add (based on some great feedback) before launch. 

And how much time to I have to do this? Not much, sadly. I'm dreaming of being able to devote myself to my own stuff. But for now, I've a 9-5 job and contract work to attend to. Bacon must be brought in.. 

Those should be in quotes though. I "launched" (it's not finished, I consider this a beta) an "app" (it's a webapp at the moment, not quite a "thing I can install on my device").

It's called Theres My Bus!, and it's the result of around 5 months of off-and-on effort. It's a bus app. Precicely, it's the bus app I wanted to make years ago and couldn't, because Sydney didn't have bus GPS data available (Sydney Buses later installed GPS devices, made the data public, then pulled it a couple of weeks later - that was over a year ago, and there's still no data! Damn!).

However, I'm not in Sydney any more. I'm in Vancouver, and the transit company here, TransLink, do have bus data. And they've just created a public api for it. Nice! They have their share of transit troubles, but their attitude towards developers sure blows Sydney out of the water.

They also have a service, NextBus, which does much the same thing as my app. It lets you look up stops or routes by their number, and shows you times and buses on a map (I can't figure out if it's related to NextBus in the states or not, that's something I've been meaning to look in to).

It's not the nicest to use though, so I figured I'd go ahead with my own vision of making it super easy to get all the info you need. I wanted to be able to press a button while at my stop and have it all right there. No fumbling around in the cold trying to enter a jumble of digits to see what's coming to this stop.

I think it turned out pretty well. The response on reddit was nothing short of amazing. I'd expected to garner a handful of upvotes and comments, with about 50% asking why I'd bothered remaking NextBus. But people were nice, and liked it, and that made me one happy camper today. Praise is pretty awesome. And it feels good to have made something that'll make peoples lives a little better.

So, I'm making this webapp in to a "real" app for iPhone and Android shortly. Phonegap should make that pretty painless. I considered too, but Phonegap's pricing is a bit more suitable for me at the moment. I'll write more on that soon.

I'm going to charge for the app, but keep the webapp free. Hopefully this model will work out alright, as an app is much handier (you don't have to press allow location every time, there's no browser bar or scrolling to worry about, it'll run in the background, etc). If I see a huge amount of people sticking to the webapp I can try a few things to up the conversion rate. We'll see how that goes.

How that goes is actually what I'd like to write about for a while. I recently spent about a week reading every damn post on Patrick McKenzie's blog - it's absolutely enthralling. If you aren't aware of him, Patrick started a business making Bingo Card software, and a blog along with it. The blog goes in to the gritty details of the businesses finances and marketing strategy. You can watch him go from mostly clueless engineer to costs-bundles-of-money consultant over the years. It's like reading Bill Gate's diary. If you have an interest in anything resembling software, business or marketing - hit that link and start reading. You won't be let down.

Alright, that's enough fawning over my nerd idol. There's my inspiration - I'd like to do something similar with this blog about There's My Bus! and whatever other projects I feel drawn to. I'm not much of a writer, but with a bit of practice that should improve. In the mean time, hopefully some of you will find the story of my little app and I interesting enough to overlook my shortcomings.