Git Rebase Workflow

| Comments

New gist for using a rebase workflow with git.

Again probably not interesting to everyone but it gives the bare bones of what you need to do.

Thoughts on GNU Hurd

| Comments

After reading a recent article about GNU Hurd on hacker news I’m struck by the thought that GNUs development of Hurd is a perfect example of a failed software project.

There was an initial great idea to build a microkernel based OS with all these cool features. But what crippled the project was a combination of:

Despite all this the idea of a Hurd system is still attractive to many and personally I look upon it with some nostalgia. I was completely obsessed by operating systems and coding them around 2000.

I’d love to see a successful Hurd project running on something like L4. But would such a system gain enough interest in the current open source environment. If Hurd was available before Linux it seems like it would have taken off and they could have rode the wave of open source enthusiasm. Now it seems to me that the space is pretty full and a new os has little opportunity to gain real market share. Surely Linux and *BSDs are good enough for people interested in a Hurd system.

Anyway this is all irrelevant until they have something working that people can run, even in a limited sense. Debian has a port but it seems progress is slow.

Why people dont consider gnu projects? Poor public image, it doesn’t appear fun to work on gnu. Look at the buzz around rails for how to manage your public image. Restrictive coding standards and legal hassle.

Original link

Site Update

| Comments

I’ve been rather lax in my updates of late so here is a new site and a status update all rolled into 1.

So a few updates for those interested.

I attended both YOW! and Erlang Factory Lite in Brisbane late last year, and had an absolute blast. Met lots of cool people and got inspired to do more this year. The only downside is I have far too many things I want to do and only limited time.

Went to the YOW! workshop “REST in Practice: A Tutorial on Web-based Distributed Systems” by Jim Webber, and got a great new perspective about RESTful architectures along with some gentle ribbing about the deficiencies of Rails due to me being the only Ruby/Rails guy in attendance.

Shout out to OJ for organising the Erlang Factory Lite. He’s talking at Erlang Factory in San Francisco about Riak, so go along and say hi.

I’ve been wanting to update my blog for a while so I bought a domain name or two and converted the site off Wordpress. For now it’s living on github pages and is very much a work in progress. More updates and features to come.

Other than that I’ve been hard at work on a few Ruby and Erlang projects, and am excited to be attending more Sydney user groups. This month I was at RoRo and there is an Erlang group starting up next month which I’ll be at.

Git and Mercurial Workflow Gist

| Comments

Just added some gist notes on my git and mercurial workflow.

Switching between the two does my head in sometimes.

Probably not that interesting for git or mercurial experts but just something to jog my memory when I have to switch. I’ve got them taped to my desk right beside my note book of Emacs keybindings.

Git & Github Gist

Mercurial Gist

iPad and eBooks Galore

| Comments

Having recently caved and bought an iPad. It’s exceptionally good, much better than I expected, it’s just I need to fight to get it back off my wife and/or kids.

I’ve started changing over to using eBooks for all my new technical books, and getting rid of paper copies. I doing that I found that 2 of my favourite publishers offer eBook upgrades to paper books you’ve already bought.

O’Reilly offers this:

“Upgrade to the electronic version of any print book you’ve registered at oreilly.com, for just $4.99. ”

All you need to do is register an account with them.

Manning offers this:

“Free eBook With Every pBook! If you are an owner of a Manning pBook you can get a free eBook at any time easily from your account.”

And The Pragmatic Programmers offer something similar.

So out with the dead trees and in with the bits.

Agressive Emacs Spring Clean

| Comments

A few weeks ago I mentioned that I was going to start using Emacs regularly for my Ruby/Rails development.

Well it turned into a rather deep dive into Emacs customisation and the results so far are very pleasing. Something about starting from scratch is very liberating and I’ve found the customisation process very easy this time. So far I have Emacs 24 setup with ECB, Rinari, ELPA and a whole host of Ruby/Rails modes on both OS X and Ubuntu Linux.

Everything is up on github.

I’ve still got my old configuration files hanging around in personal-lisp, which I will gradually migrate over. The top of that list is getting my Erlang mode and Distel working again.

Emacs Reboot

| Comments

I’m trying out a little experiment for the next few week. I’ll be using Emacs as my Ruby/Rails environment today and hopefully every few days until I’m really rocking my emacs-fu. During the day I’ll note what I don’t know how to do or doesn’t work the way I’d like, and try to find a solution for that the next time I’m using Emacs.

I’ve been somewhat meh about IntelliJ/RubyMine for a bit. They’re both nice enough but it feels like I’m only using them as a fancy editor and everything else (git/rspec/cucumber/rails) gets run in a terminal. Plus a few things are really annoying me, code completion kind of sucks, memory usage of the IDE is quite high and the refactoring support is not what it should be.

I’ve started with a blank slate, forked the emacs-starter-kit and so far only customised the colour theme.

Here’s to more productive emacs sessions.

Setting Up Oracle 10g XE With Rails 3

| Comments

Just linking to a gist I created about setting up Ubuntu with Oracle 10g XE and Rails 3.

The Oracle gem works for most of the common cases but it’s quite clear that in the Rails world it isn’t a first class citizen.

The Rubinius Virtual Machine

| Comments

Cool talk about the Rubinius Virtual Machine.

http://vimeo.com/17380962

Rails, ORA-000972 and You

| Comments

Lately I’ve been running up against “ORA-00972: identifier is too long”, when writing Rails migrations for Oracle. This particular error indicates that one of your identifiers is longer than 32 characters which is the maximum length for Oracle.

It’ll look something like this in your code:

1
2
3
4
5
6
7
8
9
class CreateLongTable < ActiveRecord::Migration
  def self.up
    create_table :long_table do |t|
      t.string :title
      t.references :someother_really_long_identifier
    end
  end
  ...
end

This migration will give you a foreign key id called someother_really_long_identifier_id which is obviously too long for Oracle. The solution is to use your own foreign key id name. In your migration add a shorter reference.

1
2
3
4
5
6
7
8
9
class CreateLongTable < ActiveRecord::Migration
  def self.up
    create_table :long_table do |t|
      t.string :title
      t.references :short_name
    end
  end
  ...
end

Then in your model use the shorter foreign key name.

1
2
3
4
5
class LongTable < ActiveRecord::Base
  belongs_to :someother_really_long_identifier,
             :class_name => 'ClassName',
             :foreign_key => 'short_name_id'
end

And everything should be sweet, your model will use someother_really_long_identifier and no-one need know that the table is really using short_name_id.