Posts made in October, 2009

Thoughts on the GPL and WordPress themes

»Posted by on Oct 26, 2009 in Blog | 0 comments

Why the GPL doesn’t matter WordCamp Kyoto 2009 was a great experience. One presentation by Digital Cube provoked a discussion about GPL amongst a small group of attendees, myself included. The major worry about releasing themes or plugins as GPL is that after all the work and effort at producing it, someone you sell it to is going to turn around and re-release it either at a discount or for free. Leaving you, the original developer, feeling cheated. The GPL definitely allows this. But it doesn’t much matter if you understand the concept of competitive advantage. Let me explain: GPL theme/code + something = what you are selling That something is called your competitive advantage. If your competitive advantage is not compelling enough, then you...

read more

[Rails] use DataTime class with ActiveRecord column

»Posted by on Oct 22, 2009 in Blog | 0 comments

ActiveRecord’s :datetime corresponds to ruby Time class. But Time class can’t use old timestamps like 0001-01-01 00:00:00. (ActiveRecord converts 0001-01-01 00:00:00 to 2001:01:01 00:00:00.) So overwrite ActiveRecord to use DateTime class with :datetime. Test Environment: Ubuntu 9.04 ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] rails 2.3.2 – 2.3.4 mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2 Just put following code active_record_datetime_ext.rb into RAILS_ROOT/config/initializers # -*- coding: utf-8 -*- # ActiveRecord column data type :datetime corresponds to ruby Time class. # # class CreateTasks < ActiveRecord::Migration # def self.up # create_table :tasks do |t| # t.column :title, ...

read more