Archive for April, 2008

Look at your PC from Mac

If you have a PC to connect to quickly while you are on Mac, try Remote Desktop Connection; it works quite well for a beta release.


RGhost & Radiant CMS

If you are planning to use RGhost with the Radiant CMS. Do not extract RGhost in to the vendor/plugins. It certainly wont work. The best thing to do would be to make it available as an extension.

These steps may be useful in getting it working:

  1. sudo gem install rghost
  2. cd vendor/extensions
  3. gem unpack rghost
  4. mv rghost-0.7.4/ rghost
  5. cd rghost
  6. mv lib/* .
  7. rmdir lib
  8. mv rghost lib
  9. rm rghost.rb

Finally add the following to rghost_extension.rb

require 'document'
require 'data_grid/data_grid'
class RghostExtension < Radiant::Extension
  version "0.7.4"
  description "RGhost Extension"
  url ""
  def activate
    RubyGhostConfig::GS[:path]=case PLATFORM
      when /darwin/: "/opt/local/bin/gs"
      when /linux|freebsd/: "/usr/bin/gs"
      when /mswin/: "C:\\gs\\bin\\gswin32\\gswin32c.exe"


MySQL Auto-increment Column

Fact: MySQL keeps its auto-increment counter in memory for Innodb table, this gets initialised when the database starts. The number that gets assigned when the database gets loaded in the memory is found by for e.g. in the id column by max(id)+1 or 1 if empty. Each time you add a record with a NULL value for the auto-increment column, this value in the counter is assigned and counter is incremented again by 1. More on How AUTO_INCREMENT Handling Works in InnoDB.

Some one in the #rubyonrails found it as a problem. He/she had removed the record with the biggest value, restarted the database and the id gets recycled. As per the log story, record was removed but only to be found again. Their solution was to keep a counter on a table, set it manually, and all the dance that you have to do with rails when you mess with the id attribute.

In fact, if they had done it properly, i.e. using dependency options in associations; removing the biggest record and its id being recycled should not be a problem at all. But you know its never a programmers’ fault. In the end I suggested him/her to set a flag to the record that it is unusable instead of removing it. But hey, will they listen? No, it is cool to mess with id column.


Google App Engine

Google App Engine


  • Free
  • Scalable
  • Easy to deploy


  • SQL less
  • Python so far
  • Cannot write files
  • external access limited to HTTP and HTTPS

Anyway, looks interesting, with scary code.