New Website On It’s Way!

August 19th, 2008

Thats the good news.

The bad news is that it is definitely going to break your newsreaders.

I have decided to make my blog the pivotal aspect of my website and I am planning to be more narrow with my focus - technology and development. Other topics, such as photography will be relegated to it’s own blog at some point. That being said, my PostRank are going to be a bit wonky, and AideRSS users are going to have incorrect links for a while (though hopefully I can talk to Melle about getting that fixed).

I am working hard to get the site live before I leave for Alaska (on Friday!) but no promises. The site is coded, just needs a touch of CSS.

PostRank Python API

July 14th, 2008

What is PostRank?

PostRank is a scoring system developed by AideRSS to rank any kind of online content, such as RSS feed items, blog posts, articles, or news stories. PostRank is based on social engagement, which refers to how interesting or relevant people have found an item or category to be.

Public-facing RESTful API’s are becoming more popular as a way to allow access to services by third-parties. AideRSS recently decoupled their PostRank service and offered it as a stand-alone service allowing any developer to use PostRank within their application. I am in the process of updating this website/blog and I am planning to make use of the PostRank service not only as a tool to measure my engagement with the public, but increase the usefulness of my posts.

What is PostRank Python API and what does it do?

This is an api accessor for python that allows a developer to quickly access all of the services offered by PostRank. It is loosely modeled after Mike Verdone’s Python Twitter Tools in that it is simple to use, and it uses the same arguments as those documented on the PostRank API page.

What are the requirements?

  • Python 2.5 (haven’t tested with <2.4)
  • simplejson python library (if using json output)

How do I use it?

Using the PostRank Python API is very easy. The first step should be to look at the API documentation provided by the PostRank website.

feed_id API Doc

We can see what options the api needs in order to satisfy the request. We just need to specify the resource that we want to use, then we can add all the arguments we want passed along to PostRank.

feed_id usage example.

If you have selected JSON as your format, the api will return to you a simplejson object which can be accessed just like a multi-dimensional array. When using JSON, it is extremely simple to get at the information provided by PostRank.

Using the json object.

There is a bit of a trick when using the ‘postrank‘ resource but it certainly isn’t difficult to use.

It works the exact same way - the PostRank API says it wants an array of urls (url[]) so we will pass in an array of urls as an argument (same thing for the feed_id[]).

post_rank API Doc

Following the same pattern as before, we just pass in the resource we want to use and the API arguments.

postrank usage example.

There really isn’t much more to it.

For now, you can find the python library here: http://newthink.net/~ash/software/postrankapi/

When my new website is done, I plan to find a more permanent place for this (and future software).

Next step, creating an egg and integrating with ez_install.

Recent Changes

May 23rd, 2008

Working at Manulife Financial was not a good fit for me. I tried to make it work, but it just wasn’t meant to be. In March, I decided to tender my resignation and move on.

I accepted a job in Toronto doing software development for GAP Adventures. They offered a much more agile development environment where I can use my skills and take the time to learn new skills. Already I have had a chance to look at technologies like Pylucene (for full-text search) and PHPTal (for PHP templating, which I would never recommend to even my worst enemy).

Medical Arts building in Hamilton.

With the change in job also comes a move back to Hamilton. Our new apartment is a 2 minute walk to the train station (I can see the train from our kitchen window) which is really convenient. Although my commute on the Go-train is just over an hour long, I am able to effectively use the time instead of concentrating on driving. I have been able to catch up on some television shows (Prison Break and Torchwood) and have had time to tinker around with some project/development ideas. I have some new ideas which I am exploring which I think might have startup potential but I dont want to get ahead of myself. I have also been able to work on updates to R4NT Magazine which has helped me brush up on my Ruby on Rails.

View of downtown Hamilton from our apartment.

We are still unpacking the new apartment (and by we, I mean Jenna. I finished mine already - I have a lot less stuff, and haven’t been as busy as her) and we have just a few more things to grab from the old one. I am really looking forward to getting settled. I have felt like I have been on the go since Christmas (with the Google interviews, and other interviews). It will be nice just to take a day (or two), bum around on the couch (or near the couch - I just bought a Wii), and just relax.

fcgi and mod_fcgid on CentOS4

March 9th, 2008

I decided recently that I wanted to be able to run Ruby on Rails applications from my webserver. For those who don’t know me, RPM database integrity is a huge issue for me (I do not just install from source on my server!).

Since I had some time this weekend, I decided it was about time I rolled some RPM’s so I could run Rails. Of course, it being over two years since I was last rolling RPM’s for work at Pason, it took me a bit to get back in the swing of things.

I followed the guide found via the Ruby on Rails wiki, and modified it a bit for my server. The two main pieces of software that needed RPM’s were fastCGI and mod_fcgid (slightly different than mod_fastcgid).

Below you can download the RPM’s and the SRPM’s though I will be the first to acknowledge that I cheated a bit. I should have modified the Makefile on each of these programs to make use of an install_dir directive, but since I was building on a clean CentOS4.6 vmware OS, I decided not to go through the hassle. If someone really wants to do it properly, have at it - thats why I included the SRPMS.

RPMS:
mod_fcgid-1.09-1.i386.rpm
fcgi-2.4.0-1.i386.rpm

SRPMS:
mod_fcgid-1.09-1.src.rpm
fcgi-2.4.0-1.src.rpm

Photo Friday: Art

February 25th, 2008

Faux Flower

I’ve been meaning to submit my photos to PhotoFriday for a while, but my gallery hasn’t been diverse enough to fulfull the recent challenges… until this week.

Camera: Canon EOS 40D
Exposure: 0.2 sec (1/5)
Aperture: f/5.6
Focal Length: 85 mm
ISO Speed: 400
Exposure Bias: -1/3 EV
Flash: Flash did not fire