Subscribe :: Bookmark and Share

Random ravings from

sponsors

eBay Auctions

IBM X220 EServer PIII 1.2 GHz/512 mb Server   IBM X220 EServer PIII 1.2 GHz/512 mb Server
USD$95.00 Bids: 0
Location: US
General Technics PIII 1.2 Ghz Blade Server 512MB 20G   General Technics PIII 1.2 Ghz Blade Server 512MB 20G
USD$9.00 Bids: 0
Location: US
HP DL380 G5 DUAL CORE 1.6 GHz 4GB 4x 72GB SAS Server 2U   HP DL380 G5 DUAL CORE 1.6 GHz 4GB 4x 72GB SAS Server 2U
USD$2,995.00 Bids: 0
Location: US
Tyan Server S2882-D Dual AMD Opteron 248 2.20 GHz, 8GB   Tyan Server S2882-D Dual AMD Opteron 248 2.20 GHz, 8GB
USD$750.00 Bids: 0
Location: US
Sun Fire V210 Server w/  2 x 1.34 GHz / 4Gb / 2 x 73GB   Sun Fire V210 Server w/ 2 x 1.34 GHz / 4Gb / 2 x 73GB
USD$3,400.00 Bids: 0
Location: US

09 July 2008

Advice: scaling to 1 Billion pages view per month

Comments (0)

Here is a great article describing how Jim Meyer, Manager of Linked In's Light Engineering Development scaled his facebook application, Bumpersticker, to over 1 Billion page views per month.

In a nutshell, his three design guidlines are :

  • Talking to spindles is bad - talking to file systems and databases has to be minimized
  • Dynamic content is your enemy. Anything you can turn into static, including periodic re-caching should be removed.
  • Push everything you possibly can to the client to reduce the amount of traffic going over the network no matter where the client is.
Thanks to the guys at RailsEnvy for the tip.

09 July 2008

Building code quality into the culture of a development team.

Comments (0)

I like to build code quality in the culture of development team. Being proud of the code quality is something that I want my developers to aspire to. I actively manage towards this by focusing on shipping high quality production code; not on technical issues [I'm pretty agnostic when it comes to technology].

The three management tools I use to achieve this are:

  1. Agile development methodologies
  2. Building code quality into programmer KPIs
  3. Make programmer KPI measurements public

Agile Development Methodologies

By this I mean:

  • Small milestones of production quality code & all stakeholders having visibility of project progress
  • Programmer commits own tests with code
  • At least a daily build, or preferably a build with every commit & the team is notified of a commit that breaks the build; ie: cruisecontrol 
  • Daily team meetings [ie:scrum] that update on progress

Stake holders should be able to see an up to date view of project progress & quality. Issues should be identified early & remedial action can be taken before a small issue becomes a large issue.

I like to have a stated code testing/quality assurance strategy. With Tickex, we had commercial pressures to ship code very fast, & change often so I settled up on the follow [its tailored for a Ruby on Rails project]:

  • Standardise environments [development, test, stage, production]. Developers can use their preferred tools, but commited code must work on the standardised environment.
  • Aim for 100% Rspec Model coverage
  • Cruisecontrol runs tests on every commit & notifies team if build is broken
  • Utilise Selenium for user land testing, rather than testing controller actions.
  • Performance testing using Hpricot & Selenium Grid -  - to script concurrent user sessions
  • Manual tests for muliple browsers [ok as long as the feature set is not massive]

This is a balances providing the high level of testing coverage with the ability to rapidly turn around features. As a result of this, we have experienced zero downtime from code issues, and very few bugs have made it into production [& most of those have been specification issues, rather than code].

Build Code Quality into Programmer KPIs
Every environment is different, but here are some guidelines. Each metric on its own is pretty much worthless, but the whole will build a picture.

Quantative KPIs

  • lines of code
  • milestones met or features delivered
  • bugs in code
  • number of times commits break build
Note: lines of code is a bit controversial as on its own its a pretty meaningless measure [a good programmer will do something in many lines less than a bad programmer, but will also complete more features]. I have a couple of MBA type CEO's who have really struggled with this. Patterns should be investigated though.

Qualitative KPIs

  • Peer reviews - both quality of code & as a team member
  • Customer/Stakeholder feedback - satisfaction with work
  • Test coverage of code
  • Team fit

Make programmer KPI measurements public
Making these measure available public, on a wiki, & in regular team meetings is intended to build a team spirit. Peer pressure can be a better motivator than agressive management.

I don't favour an agressive leadership style. Fear is one motivitor,but I don't believe it leads to habits being formed & long term behaviourial change. I think that respect of a manager & peer pressure lead to long lasting habits being formed. This is not to say be a push over, think hard but fair; If someone is not performing, I put the ownus upon the team to sort the issue quickly, then act accordingly and decisively if needed. The message will be seen that code quality cannot be compromised.

This philosophy is independent of team size or technology. Whether a small ruby/php team or a large .Net or Java team it does not matter to me. What matters is predictably shipping high quality production code that meets customer requirements.
 

07 July 2008

Google now hosting Ajax libraries - w00t!

Comments (0)

Google's new Ajax libaries API is a great way to help offload bandwdith & speed up your sites performance. Google hosts the most popular open source Javascript libraries on their content distribution network architecture. By using the Google AJAX API Loader's google.load() method you can access:

Here is a great article describing how to use this in Rails, although it will soon be in plugin form I believe.

07 July 2008

Your chance to influence Google's web spam team

Comments (0)

Matt Cutts has a thread on his blog asking for what Google's web spam team should work on next. It makes for very interesting reading.

Topics of note:
- Adwords & Blogspot spam will probably soon be targeted
- Link farms and paid links are still working for people & Google can't seem to get onto of this.

Hopefully Google & Matt Cutts will start communicating back to the community a little better after this process.

07 July 2008

Web designers rejoice!

Comments (0)

Google can now index flash

Well, kind of, sort of.. but its definitely better than it was.

Binary content such as images & FLV's will probably always remain invisible to the google spiders.

I think the real bummer is that if I build anything with the two most interesting client side technologies, flash & javascript - it won't get spidered & I won't get search engine traffic.

25 June 2008

HTTP Basic Authentication

Comments (0)

At Tickex we have an API that is accessed via HTTP Basic Authentication.

Here are a few links for developers to read a little bit more about this.

c# dotnet 
java
ruby - it's just one line using open_uri - open("http://www.example.com", :auth_info => [user, pwd]) do |f|
PHP

Ruby is awesome for this kind of stuff - a bit high in CPU usage, but your done in a few minutes.

25 June 2008

IE & XML MIME Type

Comments (0)

It's been awhile since I used IE & had forgotten that it does not handle MIME Type XML very well. IE will treat an XML file as file to be downloaded; which if fine as you can save the file & look at in in notepad or a programming editor. It did cause me some confusion as I told it a client that it would render fine in their browser :-(

Try this url in Firefox, Safari, or Opera & they will actually render the data - Firefox is best as it keeps the XML formatting.

20 June 2008

Google appengine fetch basic authentication

Comments (0)

Google's documentation for the appengine is a bit basic for those not to familiar with Python, like me.

If your building a mashup,  your going to want to use the fetch routine to pull down data from a web service. This is one of those vaguely documented features.

Here is how it's done. 

import base64
from google.appengine.api import urlfetch

url = "www.target_webservice.com"
username = "your_username"
password = "your_password" 
base64string = base64.encodestring('%s:%s' % (username, password))
headers = {'Authorization': "Basic %s" % base64string}
result = urlfetch.fetch(url, headers=headers)

if result.status_code == 200:
 all is good
else:
 something went wrong

 

20 June 2008

Why are there no rails CMS like Joomla?

Comments (0)

If you compare the open source Content Management Systems available in rails, with those availble in PHP, Java, Python [ie: Django], and even dotnet, I think that you'll be disappointed by the feature sets of the rails 
software.

Although lovdbyless & the community engine plugin, whilst not strictly being CMS's provide a social network/blog straight out of the box with a feature set that exceeds the PHP CMS's - for the social networking side of things. 

This is not such a big surprise. Firstly the majority of the open source CMS's [ie: Joomla & Django] are quite mature compared to the rails options. Secondly, and much more importantly [having battled with Joomla quite a bit] .. I think the Rails way would be to build it yourself.

Restful authentication, Restful scaffolding, layouts, plugins, & the mentioned above make it possible to build something quite quickly.

Building it yourself means your not constrained by what someone else thinks you needs. The flipside is you need to have the chops to develop what you want. Just as importantly, you need to know what you want.

On the ruby on rails home page there is a screencast of someone building a blog in 15 minutes. Its not very pretty & its not something I would ever put into production use, but you get the idea of rapid development.

20 June 2008

rake & the test database

Comments (0)

Gentle reminder:

Never, ever point your test environment at your production db. 

Here are the comments from database.yml

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.

enough said. 

20 June 2008

Why am I being spidered for links I don't have?

Comments (0)

Google, MSN, & Yahoo spiders, or crawlers, follow links on web pages.

If there are no links to a page, it should not be crawled by a search engine. Spiders generally don't look at a url & guess what another link should be. That is usually indicative of something a little more nefarious.

You may have links that used to exist, but do not now. These could be from removed the content; or from dynamically generated your urls & the information used to generate those pages no longer exists.

In this case, the links will still be in the search engines index &  polled every so often. This is not a bad thing, as the link will eventually fall out of the search engines index. You can request removal through the webmaster admin tools if this bugs you.

Yahoo's spider deliberately generates a dummy url to generate a "404 - page not found" error to understand how your site handles this. Don't be too worried that Yahoo is spidering weird links for you site.

If you feel you need to, you can trap these requests in your "page not found" web site code.

user_agent = request.user_agent.downcase
if [ 'msnbot', 'yahoo! slurp','googlebot' ].detect { |b| user_agent.include? b }

  # This is a request from a search engine ..do something here..

end

16 June 2008

rails select_tag selected option

Comments (0)


When trying to have a value auto selected, I spent ages trying to understand why this was not working:

Select_tag(:field, options_for_select(@hash), selected _item)

After a little more CAREFUL reading of the documentation & the source code, this did the trick.

Select_tag(:field, options_for_select(@hash, selected_item))

 

13 June 2008

370,000 links indexed in Google.

Comments (0)

I'm pretty happy with that.

This means that Google has spidered and indexed almost 100% of Tickex.com.

As all the pages are dynamically generated, it means that my site architecture is very google friendly. 

All the pages have unique and meaningful title, meta, h1, h2, alt & a title tags.

The link building programme is another matter, but we are nicely positioned for the long tail. 

08 June 2008

Ruby Daemon

Comments (0)

The ruby daemon gem is absolutely brilliant.

It makes creating a ruby daemon simply as pie.

On thing that got me for a bit.. seems its current directory upon startup is / .

So my effort to test by writing to a file in the current directory made it look as though things were not working.

Use full path names in Daemon software. 

 

 

21 May 2008

Oh dear.. I've got a Google Penalty

Comments (0)

If your site suddenly suffers a sharp drop in traffic, then you may be suffering from a Google penalty.

What is a Google penalty?

This is when Google, either via their algorithms or as a part of a manual review, drop your site from 15 to 950 places in their results. 30-60 places seem to be the most common.

There is a simple test to see if your site is being penalised. Search for just your domain name [ie: domain_name.com - without the .com] on Google, MSN, & Yahoo. If Google's position is significantly lower, then you most likely are suffering from one of these penalties.

Google does not officially acknowledge that they place sites under a penalty, but the SEO industry accepts that it does occur. You will notice that any public comment from Google with respect to penalties or changes to the indexing process is very carefully worded. Acknowledging that they treat sites differently could place them in a difficult situation if they were to be deemed a monopoloy [which lets face it, they clearly are.. 90% of my site's traffic comes from google, about 2% from the next search engine, Yahoo].

Why me? What's going on?

The simple answer is Google feels that your site breaches their webmaster guidelines.

The most likely culprits are:

large number of inbound links to your site suddenly appearing; probably as a result of links you've paid for.
large number of links from blog sites suddenly appearing; known as over promotion,
Your site has known blackhat techniques [Hidden text and links, 302 redirections instead of 301, etc..]

What can you do about ?

Getting angry will not help. Sending threatening legal letters will not help.

Google's anti-spam team, headed by Matt Cutts, are the ones responsible for your situation. They truly don't care about your difficulties.

<a bit of history>
Google have had & continue to have considerable problems with people gaming their index.

Their view is giving out information as to why sites have been penalised will help spammers. Thus, they generally don't respond to any requests.

They know they will cause people to suffer, but have made that decision.

They want to cost spammers as much time as possible.
</a bit of history>

Understand that Google now considers your site to be in breach of their guidelines, so find the cause & then fix it. Be prepared for this to take months, even over a year.

No, really. What can I do?


Firsly, sign up to Google's webmaster tools.

These are google's tools for webmasters to see how Google views their site. The dashboard also allows you to send a reconsideration request to google.

Before you send a reconsideration request, you need to identify what is wrong & fix it. Google will not tell you what is wrong, so its very much a random process.

1. Review Google's Webmaster tools & resolve any issues. Of particular interest should be:

  • Diagnostics->Web crawl
  • Diagnostics->Content analysis
  • Links->Pages with external links

With respect to Links->Pages with external links. Review all the sites with links to your yours. If any of these are from paid advertising, Google may deem these to "paid links" & thus spam; so remove them from the offending sites ASAP.

If you have a large amount of inbound links from one site to yours, Google may deem this as suspicious.

If you have reciprocal links, again this pattern may be deemed as suspicious.

Do you sell links on your site? If so, then Google may not be considering you a spammer.

2. Review your site & fix the following:
  • Validate your site with a html validator.
  • Examine each page & look for any hidden text or links that that may appear to be
  • If you have any redirections, ensure that they are 301 - moved permanently, as to many 302 redirections will look like blackhat techniques.

Once you have reviewed & fixed the above, then file a reconsideration request in Google's Webmaster Tools. Do not expect a response as you won't get one. Your traffic will come back all of a sudden, or not at all. If your traffic has not come back, then you know that you have missed something, so review your site, your site's outbound links, and inbound links. Once you feel that you have resolved the problem, file another reconsideration request.

I have read stories of people having their site penalised for over a year, its a very disheartening process.

05 May 2008

Ubuntu Subversion Cheat Sheet

Comments (0)

Install
  sudo apt-get install subversion
 
Create group & user
  sudo groupadd svn
  sudo useradd -g svn svn
  sudo svnadmin create /var/svn
  sudo chown -R svn:svn /var/svn
 
Create repository
  svnadmin create /path/to/repository
 
Start Server
  I don't want to run apache, so I'm running the inbuilt server. To get this running on  ubuntu, create a new file in /etc/init.d & chmod it executable.

#!/bin/sh -e
echo Starting Subversion
svnserve -d -r /home/matt/development/subversion_repository

Add new project
svn import project svn://localhost/project -m "First Import"

Checkout project
svn checkout svn://localhost/project
This is on my internal network, so I'm not going to bother putting permissions on the repository.

05 May 2008

Ubuntu 8.04 & vmware

Comments (0)

It ain't gonna happen.

 VMware need to update their software to work with the latest linux kernel.

Arse :-(

Update: Use KVM instead. 

30 April 2008

Ubuntu install hanging at 15%

Comments (0)

I had a problem with installing Ubuntu on a Toshiba Tecra T9100 laptop. It got through most of the installation process, but then hung 15% of the way through detecting the target file system.

I spent a couple of days searching the web, finding similar issues & trying all sorts of boot options all to no avail.

The solution was quite simple in the end. This machine had 256MB of RAM, increasing this to 512MB fixed the problem & made the machine much more responsive.

I guess Ubuntu needs 512MB of RAM to be usable.

21 April 2008

Hacking Snap to play nice with AJAX

Comments (0)

Snap have a very nice site preview feature. You can see it in action on this site with the little bubbles beside each link. It's not always up to date, but when it works, its great.

One slight problem, the javascript client is just not that bright. It's not AJAX aware, & if you update part of page, then the Snap script just ignores it: boo.

I've found a very simple way around this. Every time you replace a div via AJAX, make sure you run this script after the div has finished loading. This will tag the new url's with snap.

<script type="text/javascript">
  SNAP_COM.shot_main_js_called = false;
  SNAP_COM.shot_main_js();
</script>

The first command fools the snap script into thinking that is has not been run before, whilst the second calls the same function that's called on the window.onload event.

It really is a brain dead simple hack & I find it bit weird that this not a supported feature.

13 April 2008

Installing MySQL Ruby Gem

Comments (0)

When first running Rails & Mysql, you might see thing like this in the log files.

WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
*

You may think.. hello... I have installed the mysql gem via 'gem install mysql'. Indeed you may have, however this WARNING message means that rails is unable to load the required libraries.

To see what is going on, fire up the console & run the following commands.
require 'rubygems'
require 'mysql'

You may see something like this.

ruby script/console
>>require 'rubygems'
[]
>>require 'mysql'
LoadError: libmysqlclient.so.15: cannot open shared object file: No such file or directory - /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so
        from /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from ../../activesupport/lib/active_support/dependencies.rb:496:in `require'
        from ../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from ../../activesupport/lib/active_support/dependencies.rb:496:in `require'
        from (irb):3

So, Rails can see the libraries, but cannot load them.

Here is how I resolved the problem.

1. Uninstall the mysql gem - 'gem uninstall mysql'
2. Reinstall mysql like so..  'gem install mysql -- --with-mysql-lib=/usr/lib/mysql'
3. Restarted mongrel & all was good.

Thanks Ezra for your many posts.

10 April 2008

Rails 2 Nested Resource Forms

Comments (0)

Notes for me as I keep forgetting..

New way of defining nested routes

  map resources :posts, has_many => :comments

New nested resource form 

<% form_for([@post, @comment]) do |f| %>
  .. form code..
<% end %>

10 April 2008

Notes from a short talk on recruitment

Comments (0)

These are my notes for a short presentation on the recruitment side of team building - be they for short 6-9 week projects, for longer projects, and for full time employees to complement an existing team.

For me, team building simply is the act of putting together a group of people to accomplish a goal. The goal may be to get something done quickly, in a short period of time, in a high pressure environment, or it may be to do something reliably over a long period of time.

Team building is key component of recruitment, where you are not only looking for a skill-set, but also an individual to complement an existing team. Equally important to consider are the organisations and team strengths & weaknesses, the individuals skill set, their temperament, and their personal desires/motivations.

I have found it relatively easy to put together teams for short projects, where the goals are easily definable and the end-date is set. Even with quite disparate individuals. It is relatively easy to manage issues as all are aware that the environment is only for a short period and differences can usually be set aside for that period.

Longer term roles [ie: full-time roles or greater than 12 month projects] are a quite a bit more difficult. There is dichotomy of needing to fill the role, but also ensuring that new person will enhance the existing team. There will usually be plenty of suitably qualified applicants, deciding which one will best fit the organisationan and team needs is a challenge.

I try & put together a profile of the target individual in two parts. Firstly, the easy bit, profiling the technical knowledge & expertise required to perform the role. Secondly, the hard bit, what personal characteristics are desired in the target individual ; here we are looking for temperament, ability to handle change, ability to implement change in a group, willingness & ability to learn/contribute/argue.. etc. For full time roles this can take me a few weeks before I'm happy. For short-term, usually an hour or will suffice.

Technical competencies are very easy to review. Just ask the candidate a series of problem solving questions; what you are looking for is the approach to develop a solution, rather than the end result. Then ask the candidate why they have done things they way they have. I've learned quite a bit doing this - seeing several different approaches to the same problem that create the same solution.

I find the personal characteristics much more difficult to quantity. Having already thought through the desired characteristics should provide some guidance during the interview.  If you can afford it, for long-term or full time positions, psychological testing can be of some value & help you round out a character or perhaps raise a flag where one was not apparent. I worked in very risk adverse organisations, a large bank & a large Insurance company & they both utilised IQ & psychological Myers-Briggs style testing for all candidates. I hated it at the time as it generally ruled out the most interesting candidates. Looking back know, I see that it was doing exactly what it was supposed to. A risk adverse organisation will value stability & predictability; rather than look for people who will naturally push boundaries in front of them & potentially cause friction.

For a startup or small to medium company you will mostly likely not be able to afford such testing, nor be able to afford significant chunks of your teams time to interview candidates. You will need to rely upon your experience, instincts & reference check previous employers & employees.

How a candidate will fit into & effect an existing team is difficult to predict. Not every organisation can be like Microsoft, Yahoo, & Google & fly candidates in from all over the world & have them spend large parts of a day with various groups. It is usually worthwhile to arrange for the existing team to spend at least sometime with the short-listed candidates, provide their feedback, & feel that they considered a valuable part of the process. I've never been 100% right with my predictions of how things would work out, sometimes pretty close, & a couple of time just dead wrong. There will always be some level of unpredictable result [ie: people changing their sexual orientation & having affairs.. who saw that one coming?].

At times I've weighed technical skills higher than team fit to challenge the status quo, knowing that some form of conflict would occur - a high risk strategy; it took months, but it paid off in the long run as it challenged the status quo had an effect upon the culture. At times I've weighed social skills higher than technical competence to help stimulate higher levels of communication. Change is always a high risk exercise & each recruiting decision is based upon a unique circumstances that have their own potential risks & rewards. Very rarely is the right answer staring right back at you.

I've made some fantastic decisions & some bad ones. What I have learned is that its best for all parties to recognise a bad decision quickly and take remedial action, whatever that be. I always start an employment relationship clearly articulating expectations and the process if things are going well, and the process if things are going bad.

Take aways.

  • Understand what you are trying to achieve - organisational & team goals - be clear on your technical & personal goals for the role
  • Use pschological testing if you can afford it, but also equally value your instincts & take responsibility for the decision.
  • Get existing team feedback on short-listed candidates if possible.
  • Reference check, reference check, reference check - employers & employers of the short-listed candidates

10 April 2008

How to freeze edge to a specific version

Comments (0)

rake rails:freeze:edge # Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)


09 April 2008

Visual Studio - The most tedious thing in the world to install

Comments (0)

Why does Visual Studio 2007 take so long to install?

I built a VM with XP on a really old machine side by side. The XP machine finished first & I was able to install most of the patches as well.

What is going on there Microsoft?

08 April 2008

International time on Google

Comments (0)

Maybe its been around for ages & I've just noticed it, but Google has a really handy time feature.

Just type in "time [City]" as a normal Google query & the first thing returned will be the local time & day.

time tokyo - time los angeles- time bucharest

All very handy. Laughing

07 April 2008

Agile Development

Comments (0)

Agile methodologies seem to be a bit of buzz word lately. A lot of people seem to be using the term in different ways. What is it exactly?

To me Agile is an umbrella term that encapsulates many different things, but its heart is the recognition that a large number of software development projects were failing and perhaps there could be a better way for most projects.

Basic principals of Agile Software Development

  • Customer satisfaction by rapid, continuous delivery of useful software
  • Working software is delivered frequently (weeks rather than months)
  • Working software is the principal measure of progress
  • Even late changes in requirements are welcomed
  • Close, daily cooperation between business people and developers
  • Face-to-face conversation is the best form of communication (Co-location)
  • Projects are built around motivated individuals, who should be trusted
  • Continuous attention to technical excellence and good design
  • Simplicity
  • Self-organizing teams
  • Regular adaptation to changing circumstances

Several different interpretations of the Agile manifesto

I've tried to use & implement various agile components process in a number or projects, From short 6-8 week projects with a couple of developers to 18 month projects with up to 50 resources and hundres of stakeholders. Success depends upon the willingness to negotiate, the team's confidence of domain expertise, and the willingness to try new things. Team members who can see the benefits become motivated & start to champion elements effecting their domain.

Issues for Client

  • Fixed price bid versus Agile is difficult to accept
  • Acceptance of negotiation; from the beginning acknowledge that requirements will most likely change
  • In return they will get an increase chance of success or at least fewer suprises; this is your chance to leverage 50+ years of software development experience
  • Accepting greater risk; trading off a fixed price contract with a higher level of progress feedback. This gives clients the ability to hit the stop or review button much earlier.
  • Accepts greater involvement and responsibility; providing accountable feedback earlier in the process.

Issues for Project Managers

  • Split the project into as smaller iterations as possible. An iteration being when something useful is complete.
  • User stories lead to less detailed specifications to write & update.
  • Be more proactive in managing scope-creep,resource workload & resulting budget changes
  • Involve the team in task planning
  • Enforce use of tools amongst team - wiki updates, bug-tracking, task pool, daily builds, test coverage [BDD & TDD]

Issues for Programmers

  • Closer interaction with client/customer leads to increased understanding, but can lead to unplanned for feature creap.
  • User stories provide less detailed specifications, must think before coding
  • Smaller milestones mean regular deadlines
  • Behaviour Driven Development [BDD] & Test Driven Development [TDD] means developers will have to get used to writing their own tests [unit/functional/integration].
  • Developers should split code into very small routines - which are easier to test, reuse and share
Just to recap. There is no silver or golden bullet. What works best in one environment may not work in yours. It's ok to pick & choose elements, and to introduce them slowly.

06 April 2008

User Generated Content

Comments (0)

I think I'd be correct in saying that these have been the most successful internet startups over the last five years.

MySpace, Flickr, YouTube, Facebook, Digg, and Bebo.


This what I can see is common amongst them:

  • They don't sell products and are free to use.
  • They are not technology companies. They use fairly standard web technologies and none hold any patents of significance [that I know of].
  • They are fantastic at marketing their brand, but they don't do in the traditional way. They are all brands that have grown through online awareness; no massive tv, radio, or press campaigns.
  •  Their users create most of their content and do most of their marketing for them.
  • Their business model is advertising. Same as a traditional media company; build an audience, then sell access.
  • All have raised significant VC rounds, although I'm not entirely sure they are all profitable businesses.
Creating great content is time-consuming & expensive; these sites have largely avoided this by creating a friendly and easy to use platform and having their users create the majority of their content.

User Generated Content - must remember that.

04 April 2008

A Ruby DSL for flash ?

Comments (0)

HotRuby - is a Ruby DSL for creating flash.

RJS [Ruby JavaScript] is a Rails DSL for creating javascript code using Ruby. That is, some fairly simple ruby code generates some quite powerful, cross browser javascript utilising the prototype & scriptaculous libraries. Here is an example that puts an image on the page as a link, that when clicked, assigns 1 to the javascript value region & then shows div us_selected & hides div uk_selected.

      <%= link_to_function(image_tag("country/usa_dwn.gif" ,
        update_page do |page|
          page['region'].value = 1
          page['us_selected'].toggle
          page['uk_selected'].toggle
      end) %>

HotRuby aims to do the same for Flash. Interesting project. 

04 April 2008

Thoughts on .Net and Rails - notes from a talk

Comments (0)

It's been a year now since I've coded ASP.Net in anger, but here are some Rails & .Net ramblings...

From a business point of .Net lowers the risk of project because it:
- has a large pool of developers
- has been proven to support large commercial applications
- has the backing of a major corporation whom you can have reasonable confidence will still be around in 5 years.

These are all good things & it's quite a rational decision to use .Net.

My feelings on .net

  • C# & VB.NET are a right bitch to programme in compared to ruby - so.much.code.to.do.simple.things. Yes, there is intellisense in Visual Studio.. things would be close to impossible without it.
  • .Net is a mammoth framework. There are so many libraries. Even after coding for a year, I still spent almost 30-40% of my time reading documentation. Socket programming is a complete nightmare.
  • Visual Studio produces rubbish html view code. If IE is your only target browser, then you can get away with it. But your designers will probably use Mac's & keep asking you why their lovely design now looks pants; oh dear.. more css tweaks. Its amazing how much time disappears this way.
  • executes quite fast and is really stable, as long you have not done something really, really stupid.
  • has well proven upgrade paths.
  • you have to make a concerted effort to do things in an agile way [BDD, code testing, etc], its just not as natural as rails & there is no MVC [coming in ASP.Net 3.5, but even that looks like hard work]. Although we intended to do some automated code testing, due to rapidly approaching deadlines we skipped this bit; leading the first few weeks of release being plagued by lots of bugs.
  • is easy to recruit for

Having said all this.. you won't go wrong going 100% .Net. Your job is safe.

My feelings on Rails

  • after the 2-3 month learning curve, I was 3-4 times more productive - not just not looking at documentation - ruby is just faster to get things done.
  • Ruby is optimised for programming rather than computer performance.
  • is easier to produce well tested code [the MVC nature of rails really does make Agile processes easier to implement].
  • is not difficult to host & scale, just different & I think involves much less brain power than scaling out .Net. The framework is just one small part of the whole. Look at www.joyent.com & www.engineyard.com for examples of how to do things.
  • If anyone says to you that they have heard "Rails does not scale" you immediately know that they have not done any independent research, put very little intellectual effort into this thought, and have probably put just as much intellectual effort into everything else that they say. Treat their advice with caution.
  • can happily talk to legacy databases - its just a bit more work
  • does not need visual studio [w00t..!!] I use Netbeans on Vista & Ubuntu.
  • Major vendors, Sun, Oracle, IBM, & Microsoft all have projects to bring ruby & rails into their product suite.
  • resourcing is a problem; there are some really dodgy contractors & companies who say they do Rails out there trading on their names [yes.. I mean you.. you know who you are]. Reference check - more than once.
  • I think its fair to say that 2 very good rails guys [they all seem to be guys with longish hair, goatees and very pale skin..why is that?] will build you a web app at about the same speed as 4-5 average .Net guys [I know its a horrible and unfair comparison] - but my point is you should think of it as a higher cost per resource, but each resource will give you much higher value. Problem will come when you need to resource your team permanently & you may have to recruit & train.

A great symbol of the differences between managing .Net & Java, and Rails developers is the kind of conversations you have. With .Net, & Java, it tends to be very technical, what's the best way to structure this, what is affected with this change, which library should we use..etc. With Rails developers almost 100% of the time talking about business logic.

Rails is great for building and maintaining SEO friendly web apps. It works really well. And if your programmers are good, you will get to market faster than .Net & Java with equivalent resources. To me these are the reasons to choose rails, if your building a web app.

In a corporate environment, It still seems slightly irrational to recommend Rails. The management challenges are definitely higher; resourcing, convincing risk adverse management, then continually defending your choice from interested parties.

04 April 2008

Changing face of Service Level Agreements

Comments (0)

I've been renegotiating some support agreements & it me thinking how things have changed quite a bit over the last 10 years. In the old days, you picked a vendor, then paid a percentage of the purchase price annually, usually from 10%-25%. Oracle & IBM always seemed to be on the higher end.

Running PC Support for a sizeable finance company, I had agreements for a wide variety of hardware, software, and service suppliers; each with their own service level & particular issues. I had agreements with Microsoft, Cisco, Sun, Oracle, IBM, Telco's and a variety of resellers and service providers.

Some experiences..

Cisco: A severe problems with Cisco IGRP routing between about 500 2501 routers & a couple of 7000 series. Cisco acknowledged an IOS bug, escalated the support level & within 24 hours we had a patch that resolved the issue. Fantastic Service.

Microsoft: I experienced a bug with IIS 4.0 which would crash our development servers - 20 developers unable to test their code quickly becomes an issue. A service call was made & escalated, Microsoft acknowledged that there was a bug & that it may be fixed in the next service pack release in a couple of months... oh dear.. in the meantime...

Sun: Happily entered into a hardware support agreement knowing that they could not deliver.  We had a contract for 2 hours onsite support, with the resources being about 4 hours away.

IBM Global Services: Masters of finding billable tasks just outside the service agreements.

Oracle: Yes... that's a bug..there might be a patch in the next release... sorry, gotta go now..

A big name does not guarantee you a great level of support.

I understand the CEO's point of view, service level agreements manage risk. But the world of Open Source has changed things quite a bit. I've now used FreeBSD, OpenBSD, Linux, Apache, MySQL, PostgreSQL, OpenSSL, SugarCRM, PHP, Ruby, Rails, Mongrel, plus quite a few other pieces of software in what would be termed "business critical" operations. That is, the revenue generating activities of the company are completely dependent upon their continued operation.

I am completely happy with this. I might be little bit different from the old school IT executives; I am more than happy to have access to the source code & be able to make any changes I need to; rather than having to wait for vendors who may or may not care about my business.

The same situation is occurring with hardware. Google have lead the way here. Instead of brand name hardware, serious computing power can be built from off the shelf components. Again I am happy to do this, instead of relying upon service level agreements to cover for failures, I've purchased hot standby components & still been almost 50% under a named vendor's price.

If you can afford the technical expertise, and the solutions meet your needs, I feel it makes commercial sense to utilise open source technologies.Having said that, I am currently outsourced hosting my startup's application to Engine Yard. They generally utilise open source software & generic hardware; their unique selling point is the quality of the engineering staff that I get access to. At the moment, I think that I would need two additional staff to cover their work, for less than the cost of half a resource. Again; its a commercial decision & I fully understand the value that's being delivered.

As you move away from infrastructure [web hosting and networking] to software, I don't think the open source solutions deliver enough commercial value. MS Office vs'  Open Office & Google Doc's is not really a sensible discussion. PeopleSoft, JD Edwards, SAP, etc all require the traditional approach. The Salesforce.com model is making in roads; I've even had talks with Oracle & IBM with respect to host database solutions [interestingly, both linux based].