Alex Bosworth's Weblog

developing software, living the expat life in beijing, other fun stuff!

previous projects: alchemy, swik, open source stuff, now adylitica.

Switching to Node.js

Although it’s still very new, I’m confident now that Node.js represents a changing point in web application development and the line blurs between front end and backend development. 

I’ve been porting my http://tweetbe.at/ code over to run on Node, and it’s not seamless as Node.js is still a different environment, but my end goal is to merge the two worlds and write client code and server code at the same time.

Node still has many flaws, but they are the kind of flaws that the developer in me likes to see: problems that require interesting work to solve, and the realization that this is the future and eventually the problems will give way to an overall better solution.

I’ve started work on various pieces of code to bridge the gaps in node’s still nascent libraries. One thing I’ve been working on is a port of jQuery to Node.js. The idea here is that if you do $.getJSON() in a function on your client, you should be able to do that in your Node code as well.

The issue though is that Node has no XMLHTTPRequest (obviously, since it can just make normal HTTPRequests), so I have had to clone XMLHTTPRequest. There are many other issues and I am not done yet, but my goal is to be able to do var $ = require(‘node-jquery’) and have all the same jQuery functionality I depend on in web javascript.

If you are interested you can see the code on github here: http://bit.ly/node-jquery

Another thing that keeps me interested and loving JavaScript is that the basic language is so abstract, there are a lot of different ways to do things, and no clear answer on what is the best. Generally what I hope to see out of the node.js community is the practicality of jQuery come through, a balance of ‘optimize for the most common tasks’ with ‘dont push the language too crazily far’.

Another piece of code I’ve been working on is a simple Amazon S3 library for node. I use S3 a lot instead of going to disk, because it’s reliable, affordable, scalable, and I never want to rely on a single machine. I have had my issues with Amazon SimpleDb, but I want to go back to it and I may do a node.js library for it.

If you want to check out how my amazon s3 project is coming by the way, the code is on github here: http://bit.ly/amazon-s3  

Comments (View)
Our App: Do It (Tomorrow) has reached 265,000 downloads and we are trying to figure out what lessons to take away on what factors are important to reaching the iPhone App market.
The biggest lesson is that you must, must get to be listed in Apple’s various lists to drive downloads, in order of importance:
Top Overall - the biggest driver by far, 10x as big as category.
New and Notable - luckily for new app developers this is a very big driver
What’s Hot - after new and notable fades, you can wind up here, which is about 1/2 as big a driver.
Category Top - very hard to stay there without the other lists
Staff favorite - unknown, we didn’t end up here.
Surprisingly to us, it required zero marketing to reach 260k downloads. We followed a naive plan of build it, write a description, publish, done. 
The big thing we did focus on is keeping it small and focusing on design. The actual code was not the major part of the project, the big time sinks were the icon and the overall design polish. 
Now that we are out of Apple’s New and Notable section and only in What’s Hot, we can see the end of the road for the App. Getting out of that list knocked us from #1 productivity app in 38 countries to #1 in only 16 countries, overnight - but we had a nice run.

Our App: Do It (Tomorrow) has reached 265,000 downloads and we are trying to figure out what lessons to take away on what factors are important to reaching the iPhone App market.

The biggest lesson is that you must, must get to be listed in Apple’s various lists to drive downloads, in order of importance:

  1. Top Overall - the biggest driver by far, 10x as big as category.
  2. New and Notable - luckily for new app developers this is a very big driver
  3. What’s Hot - after new and notable fades, you can wind up here, which is about 1/2 as big a driver.
  4. Category Top - very hard to stay there without the other lists
  5. Staff favorite - unknown, we didn’t end up here.

Surprisingly to us, it required zero marketing to reach 260k downloads. We followed a naive plan of build it, write a description, publish, done. 

The big thing we did focus on is keeping it small and focusing on design. The actual code was not the major part of the project, the big time sinks were the icon and the overall design polish. 

Now that we are out of Apple’s New and Notable section and only in What’s Hot, we can see the end of the road for the App. Getting out of that list knocked us from #1 productivity app in 38 countries to #1 in only 16 countries, overnight - but we had a nice run.

Comments (View)

Working with Javascript Worker Threads

When the Web Workers feature was announced for the good browsers (safari/chrome/firefox), it seemed to me like something fairly cool but mostly useless. How often do you really need to calculate a Fibonacci sequence in the browser, as Mozilla suggests?

Well I finally found a legit use for it in TweetBe.at, in calculating follow back percentages - which is a major new feature for the site.

Currently other Twitter apps show you a twitter users’ follow back percentage by comparing the total follower total to the total following total. But that ignores the fact that followers and followings may be completely different sets.

Enter Worker Threads. To calculate the intersection between hundreds of thousands of followers and following in id matrices, even Chrome on my Macbook Pro was having a tough time and stalling the UI. 

The Documentation for Web Workers is terrible, but it’s actually a straightforward feature, although unfortunately you must have a separate javascript file for your workers, something I feel is a mistake.

To show you how easy it is here is my main JS file code:

var intersections = new Worker('intersections.js');
  intersections.onmessage = function(event) {
  showIntersections(event.data);
};

OK and now the worker code

self.onmessage = function(event) {
  var results = findIntersections(event.data);
  return postMessage(results);
}

Easy as pie, and very useful in a pinch.

Comments (View)
Our Todo App has been doing great. 60,000+ iPhone downloads in our first week, from a simple problem that we wanted to solve for ourselves turning out to be a problem many people want a solution for.
The idea is that being too disciplined and organized saps zest, creativity and fun from life - but it pays to be at least a little organized. We wanted a Todo app that looks good, but is simple enough that you don’t feel overwhelmed. 
It sounds a little weird doing a productivity app that is more about having fun than being maximally productive, but can’t argue with downloads.

Our Todo App has been doing great. 60,000+ iPhone downloads in our first week, from a simple problem that we wanted to solve for ourselves turning out to be a problem many people want a solution for.

The idea is that being too disciplined and organized saps zest, creativity and fun from life - but it pays to be at least a little organized. We wanted a Todo app that looks good, but is simple enough that you don’t feel overwhelmed. 

It sounds a little weird doing a productivity app that is more about having fun than being maximally productive, but can’t argue with downloads.

Comments (View)

App Store Bad Karma

Having experienced getting Electron Zero through to the App Store was good, but now I can feel the other side of the equation - of the last 6 apps we submitted to Apple, 3 were approved - our awesome Beijing, Formula 1, and Stock Trading apps all got through!

You can search Adylitica on the app store to check them out btw.

Also if you want a free copy of one comment or email me (alexbosworth on the gmail)

It’s definitely kind of a bummer to put work into Apps and then Apple shuts you down - hopefully we can appeal and get two through, but for the World Cup one it’s too late.

Comments (View)
Comments (View)
Comments (View)

Learning to Love the iPad

I have to admit I’ve always been a bit skeptical of Apple product releases. The removal of the mouse button on the MacBook, the iPhone with a terrible camera and weird lockdown environment, and most recently the iPad. These and more are things that have made me view new product releases thinking that Steve Jobs has finally lost it and is going to release a giant dud, a useless product. 

But I’ve eventually changed my mind in all these circumstances and found that the compromises that appear as glaring drawbacks are in fact necessary steps to make leaps ahead in product design.

The iPad is one where it has taken me a little time to adjust to the leap forward. There are a lot of problems with the iPad. It has no camera, the sound is not the best, the resolution is fairly poor, pixel doubling is a joke, safari mobile is not at the desktop level, the battery replacement is $100, typing on it is a challenge, it’s locked down like the iPhone, it doesn’t have a way to deal with files between apps, it’s not the lightest, it’s a smudgy mess after a single use, you have to prop it up to use it, I could go on a long time.

But these problems miss the point. The point of the iPad is that it offers the same greatness of the iPhone, for times when you are a bit less on the move. It’s a new way to think about computing - if laptops are the portable evolution of the desktop computer, the iPad is the desktop evolution of the portable phone. 

The steps to loving an iPad are as follows:
- think about the hassle the experience of having a laptop in cafes and around the house or really is: power, heat, size, weight, internet connectivity are all significant issues.
- think, can you use your laptop while you are driving to someplace to find directions? Can you use it in the supermarket to remember what to buy? There are a ton of things only a truly from the ground up mobile device makes painless.
- get unlimited 3g for the iPad, stop worrying about wifi passwords and hotspots
- get apps that complement the iPad, not ports of iphone apps. Ex: crossword puzzles and scrabble, iBooks and kindle, air video to remote play videos over your network, epicurious and cookbooks, games made for iPad only. Spend money, the iPad market is too new for great freebies.
- forget about your battery life anxiety. 10% = at least 1 hour, an overnight charge lasts the whole day easily.
- get Apple’s black iPad case that can prop up the iPad if you are typing or want it to stand up by itself.
- get the biggest storage available so you don’t have to think about it
- rethink the tasks you do, reorganize the way you work to fit your mobile friendly tasks into time that you are mobile.

It’s a huge shift, no doubt, and somewhat worrying considering the stranglehold monopoly Apple seems to have now on the future of computing, but ignore the iPad at your loss.    

Comments (View)

I just pushed an overhaul of tweetbe.at buzzlists, which is a project I’ve been working on: trending topics for specific domains.

The idea is to show trending topics from experts in various fields. From wine aficionados to forex traders - buzzlists distills their trends: a miniaturized, scoped and more relevant version of the twitter trending topics.

I now have lists for a large variety of topics, which work to varying degrees. One issue I’ve been working through is that my sets of topic experts are not always posting enough to make any trends. I’ve now added an invitation to readers to help with the list of experts, which is managed through twitter lists.

I’ve started running the service against more lists now:

Calculating these trends can be computationally non-trivial and I hand pick the domain experts, so I have be slow to add domains - but my hope is to grow the list by an order of magnitude and even potentially allow any tweetbe.at user to create their own trends page for their own custom list of people.

Comments (View)
I’ve become a big fan of notifo recently - which is essentially an iPhone app that serves as a central ‘ping’ location for developers to send notifications without resorting to email.
It’s kind of similar to Amazon’s new Simple Notifications Service - but so far to me a lot more practically useful, and certainly a much better API
I made a small service for notifo called ‘Converto’ - basically whenever you get a ‘conversion’ via a link, you can be notified on your iPhone. Currently I use this service whenever someone starts using tweetbe.at, I get a ping on my iPhone.
Notifo is also very useful to me for letting me know when someone mentions @alexbosworth on Twitter, or when someone responds to my comment on hackernews

I’ve become a big fan of notifo recently - which is essentially an iPhone app that serves as a central ‘ping’ location for developers to send notifications without resorting to email.

It’s kind of similar to Amazon’s new Simple Notifications Service - but so far to me a lot more practically useful, and certainly a much better API

I made a small service for notifo called ‘Converto’ - basically whenever you get a ‘conversion’ via a link, you can be notified on your iPhone. Currently I use this service whenever someone starts using tweetbe.at, I get a ping on my iPhone.

Notifo is also very useful to me for letting me know when someone mentions @alexbosworth on Twitter, or when someone responds to my comment on hackernews

Comments (View)