Archive for the ‘Development’ Category

Miscellany

Monday, March 10th, 2008

I used to have a lot more time for blogging. Now it’s all steam ahead with the actual paying work. I’ve actually had to turn down some projects recently.

My latest project is live and generating a lot of traffic. I built the promotional site for the latest Gillette product -  The Gillette Fusion Power Phantom. Very tight deadline, but I made it on time and under budget.

I’ve also been involved with some work on Hotel.com.au, which is actually old-school MS Access and Visual Basic. I am quite enjoying it. Sure beats the hell out of PHP.

Melbourne Facebook Developer Garage Presentation

Sunday, February 24th, 2008

On Friday I had the privilege of presenting at the Melbourne Facebook Developer Garage.

I’ve uploaded the slides for my Introduction to Facebook Development talk.  I had to leave early due to some client commitments, but the talks were excellent and I met some very interesting people working in the Facebook space.

There is also a Melbourne Facebook Developer Group - I am keen to get another event organised really soon.

Dear PHP and CakePHP

Friday, January 11th, 2008

I hate you.

That is all.

Facebook Page and App Launch: Gillette Venus Beach Vote

Thursday, January 10th, 2008

I’ve just completed development of another Facebook Application for a major promotional campaign for Gillette.

The Venus Beach Vote application manages a voting competition inside Facebook and  is tightly integrated with the Gillette Venus Beach Facebook Page. It was developed in CakePHP with PHP 5, MySQL 5 and uses FBML for the presentation layer.

The new Facebook Page functionality expands the possibilites for marketing inside Facebook considerably - brands can create a page and then allow applications to interact with both the page and user profiles.

Venus Beach Vote is my largest Facebook Development Project to date and developed in a very short time frame to hit a hard deadline. I am even going to take a day off this weekend, I think I’ve earned it.

Facebook How-To: scheduling profile updates

Monday, December 10th, 2007

Several of the Facebook Applications I have developed have required scheduling updates to Facebook User Profiles.

The process for scheduling updates is a little involved, but basically involves using a Session Key to push data to each User’s Profile.

  • Store the user’s Session Key.
  • Schedule an update with Cron
  • User the User ID and Session Key to create a Facebook Client Object make a Facebook API call.

The following samples are from a CakePHP project I recently completed and use the Facebook PHP Library. I’ve expanded the SQL so you have a better idea of what is happening behind the scenes.

Store the Session Key:

function beforeFilter() {
$this->facebook_user_id = $this->facebook->require_login();
$this->sessionKey = $this->facebook->api_client->session_key;
$this->Settings->query("UPDATE settings SET sessionKey = '{$this->sessionKey}' WHERE id = '{$this->facebook_user_id}'");
}

Each time the user hits the application I generally refresh the Session Key in my normal login/authentication process.

Make the API Call:

$data = $this->Settings->query("SELECT * FROM settings WHERE lastUpdated <= DATE_SUB( NOW(), INTERVAL 1 DAY) ORDER BY lastUpdated ASC LIMIT 1");
$id = $data[0]["settings"]["id"];
$sessionKey = $data[0]["settings"]["sessionKey"];
$this->facebook = new Facebook(FB_API_KEY, FB_SECRET);
$this->facebook->set_user($id, $sessionKey);
$this->facebook_user_id = $id;
$this->facebook->api_client->profile_setFBML($fbml);

This code grabs the first Faccbook User from the database who last updated a day ago and then creates a Facebook Client using the Facebook User Id and Session Key to make an API Call.

Note: When scheduling updates I generally use Cron to call a URL on my application with wget or Curl. Using this technique you can leverage the existing logic of your app and don’t have to write a standalone script.

RailsCamp 2.0

Wednesday, November 21st, 2007

RailsCamp is on this weekend. 40 uber-geeks gathered to immerse themselves in Ruby On Rails.
It should be pretty cool.

I haven’t prepared any materials, but might present something on Amazon Web Services - I did this for the Melbourne Ruby User Group a little while ago.

Converting a FaceBook App to use Amazon S3

Friday, November 16th, 2007

I’ve just completed work on another Facebook application: Songbook.

This was a relatively straight forward conversion of the existing application to use S3 for data storage. Songbook allows users to upload and display a song in their Facebook Profile. The original development stored the files on disk and hit limits really fast … hosting large numbers of files becomes very expensive very quickly, not to mention performance issues.

I converted the whole thing to S3 very quickly - it’s actually easier in some respects to handle storing files in S3 than to disk. The application now has essentially limitless and very cost-effective storage capacity.

S3 really is incredible.

New York, New York

Monday, November 12th, 2007

I’ve been living in Melbourne for 7 years now, and I have decidely itchy feet.

I moved to Melbourne for work just after the dot-com crash of 2000 and it was always meant to be a temporary stop on my way to New York, which I visited and fell in love with.

I think it’s time to get that dream moving again.

I am happy to work remotely to get a foot in the door, if that suits. Happy to sign up for a short-term contract if it gets me to your fair city.

So, if you’re in New York and need a developer with lots of experience, expert skills in Java, PHP and Ruby, and a penchant for user experience, drop me a line.

Software Federations - the philosophy of Web 2.0 can help solve issues in the Enterprise

Friday, October 26th, 2007

I’ve been pondering the recent spate of comments and discussions about the State of the Software Nation.

Enterprise Systems seem to be broken by design. As SvN declares: Enterprise Software Sucks because the buyers aren’t the users. Khoi Vin recently detailed some of the issues and Sig at Thingamy has been talking about the philosophy of contemporary business software for a couple of years, so none of this comes as much of a surprise.

However, the problem is much deeper and broader than the amorphous cloud of “Enterprise” applications. Lots of consumer-level software has real problems. Jeff at Coding Horror has been posting recently about the troubles with consumer software (Are Features the Enemy? and Why Does Software Spoil?) .
Small, Light, Vertical
———————————————————–

Web 2.0 is a terribly misused term, but the broad sweep of the “philosophy”, rather than the marketing hype is what I am referring to here.

The core ideas underpining Web 2.0 is that the web is a platform, driven by data and enabling systems and sites to be composed by pulling together features (http://en.wikipedia.org/wiki/Web_2).

At the moment we’re seeing the effects of this vision largely in social and personal applications - Flickr, Facebook, Twitter.

But

One of the most interesting recent developments is a slew of small, light, and tightly-focussed applications targeted toward very specific functions. One of the most well-known examples of such an application is the Basecamp Project Management tool.

Although most people seem to associate sites like Flickr and Facebook with Web 2.0, I think the real revolution is in these small vertical applications - common focussed on perfoming a single business function incredibly well. Coupled with elegant, sophistciated interfaces, most of this class of application also offer open access through an API.

Software Federations
———————————————————–

I propose thinking about your “enterprise” software as a loose federation of individual applications.

A Software Federation is  a set of small, light, vertical applications coupled together.

Software Federation

Data flows between your applications through the use of APIs and process flows can be ad-hoc and are focussed on being “good enough” rather than being perfect. Ideally, the Federation is constructed with lightweight frameworks rather than high-end “Enterprise Platforms”.

One of the important ramifications  of this type of thinking is on the role of the developer. Software Federations require developers who are capable of both understanding the business and creating the code that ties the pieces together. There are some and opportunities here for Domain Specific Languages to help drive developmt and the advances in the handling of REST in Rails 2.0 look like making much of this style of development simpler.

The Republic
———————————————————–

I’ve been thinking about what would be required to assist developing Software Federations. Consuming APIs is already pretty simple and parsing XML data is very definitely a solved problem. What seems to be missing is a lightweight system for managing process flows - something that would allow developers to easily define a flow through an series of applications, combining many small simple scripts to massage and process the data into a single Software Federation. Although “lightweight” and “workflow” don’t really seem to go together - the workflow system I have experienced are all in the category of “Enterprise Software Sucks”, it seems like it may be possible to create a framework that provides support to developers.

What do you think?

Timesheets - the secret to software estimation for Freelancers

Friday, October 26th, 2007

I realised when I started developing projects as a freelance contractor that the real trick was going to be estimation. Software estimation is incredibly difficult, and the only real way of doing it effectively is through an empirical approach:

  • Guess
  • Measure
  • Refine your guess
  • Repeat until you approach accuracy/reality

I’ve been using 14Dayz to track my projects. The Free Plan is more than enough for a solo operator like myself. You can track up to 4 Projects with 10 Categories of work. Categories can have dollar values assigned, and you can generate reports in both time and total dollar values.

The reporting means I can track my budgets for individual projects, as well as track my weekly workload (good for figuring out if you can pay the rent, for example) and I can also gain a precise insight into exactly how long particular tasks take me.
On my current project I have only a couple of final pieces of work to go, and I am am currently only 5% off the budget. At the moment I think I will hit smack on the budget. Not too shabby.

Being able to estimate effectively means you can bid for project work with confidence that you will be on time, and on budget.

This is great for both you and your clients.