Archive for the ‘Web 2.0’ Category

2 things I most loved about Ruby on Rails this week

Thursday, August 9th, 2007
  1. attachment_fu
    From install to an Image Upload with Amazon S3 storage in about 10 minutes. See the attachment_fu tutorial.

  2. RESTful rails
    An XML API for nothing? Why thanks, Rails.

The REST stuff is really fun to play with … I am finding it breaks a little in the real-world with non-trivial use-cases. Start adding auto-completes and other AJAX elements to your page and you start bending the RESTful model a little. I am figuring it’s best to have the core REST architecture and build on it, rather than bend my code to adhere mindlessly to some REST ideal.

I {heart} Rails.

Amazon Flexible Payment Services

Tuesday, August 7th, 2007

Amazon continues to lead the way into a service-driven future with the release of the Amazon Flexible Payments Service:

Amazon Flexible Payments Service (Amazon FPS) is the first payments service designed from the ground up specifically for developers. The set of web services APIs allows the movement of money between any two entities, humans or computers. It is built on top of Amazon’s reliable and scalable payment infrastructure.

FPS supports micro-payments and the fees look very competitive.

Payments are the last piece of the service puzzle and with the release Amazon now has a complete Operating System for services.

Everything you know about scaling is wrong

Friday, August 3rd, 2007

Scalability of the favourite argument topics of the technically inclined. Having developed some fantastic, all-singing, all-dancing, user-generated social networking Web 2.0 platform*, someone will invariably ask:

“Oh, you used {LANGUAGE X}”
“Will it scale?”

You have to imagine the slightly derisive tone for yourself.

Trouble is, languages don’t scale, systems do.

Assessing scalability on the basis of a particular programming language is like saying to someone who is writing an Encyclopedia: “English won’t scale”.

Systems scale.

If you wrote your Encyclopedia the same way you wrote your product brochure, it wouldn’t scale - small page format, lots of pictures, minimal text with plenty of whitespace. If you write an Encyclopedia, you need to develop a system for handling the information - table of contents, indexing, cross referencing, multiple volumes, alphabetical organisation, thin paper, multiple columns of text, readable fonts.

The language used to write the Encyclopedia or Brochure is secondary to the system that delivers it.

The same is true of Web Applications.

Languages are irrelevant to scale and frameworks (being very close to languages and essentially an extension) only have a minimal impact.

I moved to Ruby on Rails from PHP. The standard argument against Rails from PHP developers is that “Rails won’t scale”**. However, this focus misses the point entirely. I have seen arguments from PHP developers who suggest using single quote for strings ‘ rather than double quotes “, because single quotes parse faster in PHP. This thinking is radically broken.

Scalability has nothing to do with processing performance at the language level.

Scalability is about the system as a whole.

At some point as an application scales, it will invariably require multiple servers and multiple databases, and there is very little any language or framework can do to mitigate this requirement. These requirements are system level, not language level - your only real option is to be ready to build your system out accordingly as it grows. The only trouble you find is when you have made decisions early on that limit the way your application can grow out.

As a corrolary to the scaling issue, my final point is this:

You aren’t going to scale

Call me cynical, call me pessimistic, but lots of people build for scale prematurely.

The focus should always be on creating great user experience.

Unless you have the load to warrant a particular system decision you should not be creating that system (but always within the framework of sensible architectural decisions). Scaling issues are often unpredictable (you don’t know your load profile until you hit it, or are hit by it) but worrying about them before you have to wastes valuable developer resources on infrastructure rather than the interface.

In the Web 2.0 world, scaling problems are a sign of success, but the focus should be on the user, not the system.

* We don’t develop applications or, god forbid, sites anymore, we develop platforms.

** I am aware the argument is a bit confused here, because PHP is compared to Rails, when Rail is a framework based on the Ruby Language and should be compared to a PHP framework like CakePHP.

Lies, Damned Lies, and Equity

Monday, July 30th, 2007

I keep getting offers to work on projects.

This would be great, but most of these project offers are in exchange Equity: “We have a great idea, help us implement it and we’ll give you a piece of the profits down the track”.

Unfortunately, work for equity in practice turns out to mean work for nothing.

Maybe it’s just me, but I’ve had equity in a number of companies, mostly when I was young and inexperienced and Dot Com Exuberance was the style of the time. Unfortunately for me, none of this equity ever turned into anything useful. You know, like actual cold hard cash.  In fact, in at least one case the lure of equity kept me working long past the use-by date of the company.

You need to think very carefully before taking on projects for equity - your effort may never be rewarded.

The harsh reality of the startup world is that most companies will fail.

Startups  that don’t fail will probably not be as big as they promised.

It’s hard to predict the next Google.

If you’re  software developer, it’s very easy to think that it’s all about having a great product - but if you build it they may not come.  It’s important to remembre that it’s not necessarily all about a great product, you also need great marketing, and most importantly of all, incredible luck.

So I may have just turned the next Google down, but I ‘m betting that I haven’t. And I have to focus on my own startup efforts. After all, maybe I’m building the next Google …

Why a code review could save you money

Tuesday, July 24th, 2007

I’ve recently run into several clients who’ve been burnt by contract developers.

There are some obvious financial reasons to contract remote developers in different countries, but the practice can lead to problems.
The problems my clients have had break down into two areas:

  • communication issues
  • code quality

Today I am going to focus on Code Quality. I will write about documenting your requirements effectively another time.

One of my clients needed some very simple changes made to an application. I opened the code up and knew instantly that there had been some very average programmers involved. Files and folders everywhere, with names like “Accounts”, “AccountsOLD”, “AccountsBAK”. To a good programmer this kind of sight is an instant warning - good code is organised, clear and sensible.

I still had hope - code may be disorganised from having several developers work on it, but not necessarily be bad.

However, once I started delving into the code itself, the situation became much worse.

The code structure was just as disorganised and incredibly convoluted. Now, you may be thinking, “if the site is running, who cares if some programmer doesn’t think the code’s nice?“, but the crucial thing here is that bad code costs money. Just in case you missed my point:

Bad code costs money

Instead of having a few simple changes to make, I now had a few difficult and complex changes to make.

The bad code meant that I had to revise my estimate. So I revised my quote. Up. 1 hour of work became 5.

This is great for me, as a contract developer charging by the hour, but really bad if you’re trying to run a business on a budget.

Unfortunately, as I explored further things went from worse to really really worse.

The code was not just bad, but dangerous.

The code was wide-open to a couple of well-known security problems called SQL Injection and Command Injection.  These are the code equivalent of leaving the front door open. To a good programmer, they are too obvious to even really worry about - good practice avoids these issues in much the same way you lock your front door when you go out. You don’t really think of it as a security measure, it’s just what you do.

Good code is automatically protected from these obvious security holes.

These problems meant that anyone could gain access to the system and take complete control of the site.

The  client’s code was riddled with these issues. In fact, all of the code was vulnerable - like someone had built a house with no doors at all, just holes in the walls.  The unfortunate fact is that fixing the code will be a long and involved process because the code was so badly organised and written in the first place.

What can you do?

Using cheaper developers is a business reality. Not everyone can afford to hire the best software developers in town.

However, an independent code audit and review can help ensure your project is on track by providing an independent and expert view of development progress. And if your code is complete, an audit can ensure that your product is rock-solid and production ready. And a code audit gets you the knowledge of an expert without all the cost.

A code audit would consider one or all of the following issues:

  • Application Security
  • Scalability & Performance
  • Code Conventions
  • Code Quality
  • Test Coverage
  • Data Privacy
  • User Interaction
  • Information Architecture

A code audit can catch average code before it goes bad and it could save you a ton of money in the long run.

Multimedia died for a reason

Thursday, June 28th, 2007

The 37 Signals Blog has stirred up controversy again with a post about HTML, CSS, and JavaScript:

On the user experience side of things, we’re not even close to tapping out the potential of HTML. The majority of web sites and applications still suck.

Of course, the flame-war began immediately:

“Flex/Flash/Apollo is totally the future”
“No it isn’t”

I think that is definitely true that we have only scratched the surface of HTML. It’s only in the last couple of years that HTML, JavaScript and CSS have really become advanced, stable and widespread enough to be used for complex application development.  Even features that have gained ubiquity, like auto-complete text fields that talk back to the server, are very recent additions to the developer’s toolkit.

Having worked with WebStart for several years now, the hardest problem to solve is the additional installation. Java makes this particularly hard, but when you use a runtime on-top of the browser, you will always have this additional barrier to adoption. Rather than prospective customers being able to use your application straight away, you are placing an extra hurdle in front of them.

The problem is not insurmountable, but it is there.

On top of all of this, most RIAs I have seen don’t really do much more than a “vanilla” Web 2.0 application anyway. I come from a Multimedia background  (I did a lot of CD Authoring with Director in the 90s) and I’ve done far too much Swing, so I’ve seen many, many fantastically bad applications. There is a reason why software tends toward the a standard set of application principles - business applications don’t need much singing and dancing.

Auto-complete, edit-in-place, drag/drop, lists, options are all standard fare with HTML, CSS and JavaScript  About the only piece that is really missing from the stack is the ability to zoom effectively.

Whichever side of the debate you come down on, you have to admit that it’s going to be an interesting few years.

Useful resources for building Facebook Applications with Rails

Monday, June 25th, 2007

I’ve been looking at building a Facebook app using Ruby on Rails.

Some handy resources:

Facebook as the new uber-app

Wednesday, June 20th, 2007

Facebook is fast becoming my uber-application … it now can assimilate just about  everything. I Twitter from Facebook, I play Chess in Facebook, and I am now looking for something to hook WordPress up (or I might develop that myself) then I can blog from Facebook as well.

One app to bring them all and in the darkness bind them.

And better yet, I put a notice in the Marketplace looking for some freelance development work and within an hour had a response.

Which reminds m, if you need some project work, I’m available. 10 years of experience developing web apllications with a host of technologies.