Alex Pooley's Blog

Hello there, my name is Alex Pooley and I'm a freelance web developer residing in Perth, Western Australia. My passion is in the development of web sites that solve everyday problems. Here's a gallery of some of my notable work. If you need a web site designer or developer, contact me with further details. Lastly, you can read more about me.

SEO With Widgets @ WordPress.org

May 20th, 2008

As you’re probably already aware, back links are the life blood of SEO. Besides three way reciprocal linking, blog commenting, directories, social networking, guest book spamming, and so forth - there are other avenues to getting back links that you may not have considered.

WordPress.org provide a directory of Wordpress plugins that facilitates the publication of user created plugins. The great thing about this directory is that the links are not no-follow, and you can even control your anchor text. Beautiful!

For example, my Social Buttons plugin that allows you to easily embed social voting buttons in your blog posts is located at http://wordpress.org/extend/plugins/social-buttons.

Now, check out the page rank of the main directory!



That’s some nice link juice flowing our way!

OK, so let’s say some day WordPress no-follow the links.. what then? All is not lost! If your plugin is actually any good, people may actually use it, and then they may follow through to your web page. I was very suprised to learn that people are actually using my Social Buttons plugin, despite there being a zillion similar plugins already out there! Here’s my download stats for the plugin since the release:



and here’s my stats of people treking through from the directory to my site:





Sweet!

If you’re really savvy then you can also embed your URL in your widget. This will allow you to get a back link from everyone that installs your widget on their site! I don’t recommend you do this out of context though. Google bans have been given in similar circumstances.

The process to get your plugin added to the directory is pretty straight forward:

  1. Write a plugin
  2. Request to submit the plugin to the directory
  3. Upload the plugin
  4. Revel in Internet glory

Need an idea for a plugin? No worries. The plugin directory provides a list of popular tags and popular plugins.



Don’t know how to write a plugin? Don’t worry, I can write it for you! I’m a freelance web developer and would be happy to write your plugin and discuss your widget marketing options (WordPress, or otherwise). Get in touch with me through my contact form.

Did you like this article? You may like to consider subscribing to my blog. On occassions when the planets are aligned I can provide some good advice and opportunities.



Subscribe To RSS

Ruby Browser Hooks & Facebook Integration Testing

May 18th, 2008

Recently I had to write some integration tests to ensure that my Facebook application was communicating with Facebook correctly. I started out trying to use plain old Net::HTTP which was painful because Facebook appears to actively block programmatic access through their login page. Just as I was about to give up I discovered a suite of libraries that allow you to access your browser from Ruby! The library is fantastic as I can very simply control the forms and content in my browser, straight from my Ruby code. Nice!

The library is called Watir. Watir is a tool to hook in Ruby with IE, but there are ports for Safari and Firefox. I ended up going with the Safari port as the Firefox port looked a bit tricky to install.

Now, for the pièce de résistance …

require File.dirname(__FILE__) + '/../spec_helper'
require 'rubygems'
require 'safariwatir'

describe UserController do
  FB_EMAIL = 'xxx@xxxxx.com'
  FB_PASS = 'xxxxx'

  FB_URL = 'http://www.facebook.com'
  CALLBACK_URL = 'http://dev.xxxxxxxxx.com'
  FB_APP_URL = 'http://apps.facebook.com/xxxxx/'
  FB_LOGOUT_URL = 'http://www.facebook.com/logout.php'

  LOGOUT_REGEX = /http:\/\/www.facebook.com\/logout.php\?.+/

  it "should use UserController" do
    controller.should be_an_instance_of(UserController)
  end

  describe "POST 'index'" do
    before(:each) do
      @browser = Watir::Safari.new
      @browser.set_fast_speed
      @browser.goto(FB_APP_URL)
      @browser.link(:url, LOGOUT_REGEX).click rescue nil
    end

    it "should find authentication prompt" do
      @browser.goto(FB_APP_URL)
      @browser.form(:id, 'loginform').exist?.should_not == nil
      expected = 'Login to Facebook to enjoy the full functionality of'
      @browser.contains_text(expected).should > 0
    end

    it "should authenticate" do
      authenticate
      expected = /Login to the .* application?/
      @browser.contains_text(expected).should != nil
    end

    it "should log in to the application" do
      authenticate
      @browser.form(:index, 1).submit
    end

  end

  private

  def authenticate
    @browser.goto(FB_APP_URL)
    @browser.text_field(:id, 'email').set(FB_EMAIL)
    @browser.password(:name, 'pass').set(FB_PASS)
    @browser.form(:index, 1).submit
  end

end

The code above is a work in progress, but it is still fully functional rspec code. Feel free to use it.

Just a note if you do end up using the Safari Watir port. I had to make a change to the core libraries as there seemed to be a race condition. If you are affected, you will notice an exception thrown part way through entering the data in a form. My quick fix/hack is to extend the sleep time from 1 to something larger. I had no problems after increasing the sleep time to 4.

# safariwatir/scripter.rb
def page_load
	yield
	#sleep 1
	sleep 4
	....
end

Worlds Most Evil CAPTCHA?

May 15th, 2008

A CAPTCHA is that warped text used in forms to keep spammers at bay. Here’s a CAPTCHA I received while trying to grab something off RapidShare.


Worlds Most Evil CAPTCHA?

Oh. My. God.

Somehow I got it first shot (6M34), but I’ll be sure to stay away from RapidShare in the future.