I am nearing completion of another Facebook Development Project.
Facebook How-To: uploading files
April 7th, 2013Two more pieces in the Amazon Scalability puzzle
March 2nd, 2013Amazon has announced two exciting enhancements to their EC2 offering: Elastic IP Addresses and Availability Zones toorak
Personal Software Process
February 14th, 2013Erlang:
February 13th, 20137 c’s of software
February 9th, 2013http://future.gigaom.com/2007/07/30/the-7-cs-of-the-software/
The End
March 1st, 2009After 10 years with this domain, which I originally started to manage the Information Architecture list I ran (which had a whole bunch of traffic at one stage) it’s time to move on.
So this is the end.
And a new beginning.
And funnily, there is not much difference between the two:
Top Secret Project now lives at:
http://topsecretproject.finitestatemachine.com/
PHP equivalent of Django Admin?
August 20th, 2008So … where is the PHP equivalent of Django Admin? Or the multitude of Rails Admin plugins?
I don’t care what framework it sits on as long as the out-of-the-box functionality is awesome.
New Facebook App: Telstra HeroMessage®
July 21st, 2008Been very quiet, but I have been working a lot, among other things.
I am happy to announce the launch of my latest Facebook Application: Telstra HeroMessage. You can read all about it at the Telstra HeroMessage® Facebook Application About Page.
I am pretty excited about it, a massive national media campaign is already underway.
*this*
July 19th, 2008Rails Plugin – Acts As Scheduled
April 19th, 2008I’ve just released the first pass of a Ruby on Rails Plugin called Acts As Scheduled.
acts_as_scheduled allows you to manage scheduled events for your models.
A good example of this is scheduling the update of RSS Feeds in a background process using Cron or BackgroundRB.
With acts_as_scheduled your schedule manager can simply call “Model.find_next_scheduled()” to grab the next item from the database.
At the moment it assumes you are working with MySQL.
All you need to get started is to add two extra columns to your table:
t.integer frequency
t.datetime last_scheduled
frequency is the number of seconds for your schedule.
last_scheduled is the date and time the record was last processed.
Ruby on Rails is real smart with times, so you don’t have to worry too much about calculating frequency values:
model.frequency = 1.day
model.frequency = 1.minute
model.frequency = 10.second
In your model class your simply declare “acts_as_scheduled” and you now have two extra methods find_next_scheduled and schedule_complete.
find_next_scheduled
Returns the next scheduled record from the table.
The next scheduled record is calculated as “the record who’s last_scheduled value is less than the current time minus the specified frequency in seconds”.Which is the complex way of saying “if freqency is 1 minute, return the record if it was last_scheduled more than 1 minute ago”
If there is more than one record, records scheduled to occur more frequently will be handled first (so records with minute schedules are returned before records with daily schedules.
schedule_complete
Sets the record’s last_scheduled value to Time.now
Example
class ScheduledItem < ActiveRecord::Base
acts_as_scheduled
endschedule_minute = ScheduledItem.new(:frequency => 1.minute, :last_scheduled => 2.seconds.ago)
schedule_minute.saveschedule_day = ScheduledItem.new(:name =>”day”, :frequency => 1.day, :last_scheduled => 25.hours.ago)
schedule_day.save#returns thing_day because it was last_scheduled 25 hours ago
schedule_day = ScheduledItem.find_next_scheduled
schedule_day.do_some_stuff
schedule_day.schedule_complete
schedule_day.save