Archive for the ‘General’ Category

Using ActiveRecord to connect to Sybase Adaptive Server Anywhere on Windows

Posted by Rahoul Baruah on December 21st, 2009 under General, Ruby on Rails and Software Development Tags: , , , ,  •  Comments Off

Just don’t ask why I know this. Please. It’s making me cry.
Install Ruby using the One Click Installer.
Install the ODBC module (by copying the SO files into the c:\Ruby\1.8\i386-mingw32 folder).
Install the ActiveRecord ODBC adapter (gem install activerecord-odbc-adapter).
Edit C:\Ruby\lib\ruby\gems\1.8\gems\activerecord-odbc-adapter-2.0\ lib\active_record\connection_adapters\odbc_adapter.rb – look for line 1588.
Change the line from elsif dbmsName =~ /SQLAnywhere/i [...]

Favourite code

Posted by Rahoul Baruah on November 12th, 2009 under Beautiful Code, General, Ruby on Rails and Software Development Tags: , , , , ,  •  Comments Off

I think Bigwig has become my favourite bit of code that I’ve ever worked on.
Before Bigwig, it was Object Factory, before that it was a Delphi class that I used to create tree-structured data (imaginatively called TNode).
Bigwig’s doesn’t have a test suite and it’s not even my code – it was [...]

Making decisions at a startup

Posted by Rahoul Baruah on October 27th, 2009 under General, Managing Successful Projects Tags: , ,  •  Comments Off

One of the problems of being at a startup is the overwhelming amount of work. So much to do, so little time!
Luckily, this helpful flow-chart helps you decide what to do next.

Posting gems to Rubyforge

Posted by Rahoul Baruah on October 6th, 2009 under General, Ruby on Rails and Software Development  •  3 Comments

Github aren’t building new gems at the moment as they finalise their move to Rackspace. So what do you do if you’ve got a gem that you would like to make available?
Gemcutter’s the new kid on the block – it works as a set of plugins to the gem command that mean [...]

ThinkVisibility: the things that get left behind in the web development process

Posted by Rahoul Baruah on September 13th, 2009 under General Tags: , , , , , , , , , ,  •  6 Comments

I’ll admit it – I’m biased. Dom’s a friend of mine and we do an occasional podcast together (which, incidentally, I will be speaking about at Geekup Leeds this coming Wednesday). So even if ThinkVisibility was shit I would have said it was good.
But it wasn’t shit. It wasn’t good. [...]

Why the lucky stiff

Posted by Rahoul Baruah on August 21st, 2009 under General Tags: ,  •  Comments Off

So _why has vanished off the internet.
I have no idea who he is or why he’s gone. But _why meant a lot to Ruby developers, myself included. He represented style and grace and art and weirdness – that Ruby was about more than just getting the job done in the most [...]

Constructors in Ruby are not guaranteed to be called

Posted by Rahoul Baruah on June 3rd, 2009 under General, Ruby on Rails and Software Development Tags: , ,  •  3 Comments

Today, Caius made a discovery that shocked me.
He had a class, descending from ActiveRecord::Base, with a custom constructor (initialize method). To debug it, he had the constructor raise an exception. In the console, Thingy.new(params) raised the exception as expected. But wotsit.thingies.find_by_field(value) did not. Even though it was instantiating an [...]

Note to self: comparing two branches in git and squashing several commits into one

Posted by Rahoul Baruah on June 2nd, 2009 under General, Managing Successful Projects, Ruby on Rails and Software Development Tags: , , ,  •  3 Comments

I always forget how to do this so I’m writing it down (especially as it’s really easy and git, as usual, makes me feel stupid as Linus is so much smarter than me).
Suppose you’ve been working in branch X and you’re about to merge those changes into branch Y …

work in branch X [...]

My cron jobs and rake tasks won’t write to the Rails log file

Posted by Rahoul Baruah on June 1st, 2009 under General, Ruby on Rails and Software Development Tags: , , ,  •  Comments Off

A project I’ve been working on was recently moved up to Rails 2.2 (Rails 2.3 migration coming soon, but we wanted to take things one step at a time).
All the tests passed. Poking it on the staging server worked well. On to production and all was good.
Time passed. [...]

Note to self: rebuilding ferret indexes when using ferret server

Posted by Rahoul Baruah on May 26th, 2009 under General Tags: ,  •  Comments Off

For some reason ferret server on a site I have been managing has been giving me a load of grief.
I seem to have nailed it down to two problems.
Firstly, monit only seems to like monitoring ferret server under certain circumstances.
Secondly, the ferret indexes don’t seem to like being rebuilt. [...]