francis

Ruby



Writing

Saturday, 2 August 2008 8:58 P GMT
I finished my radio play off today and will be sending it to the BBC next week. Quite excited about it but not really holding out a huge amount of hope because there isn't a lot of point getting too worked up about stuff.I've been reading num

Maintenance programming

Friday, 20 June 2008 8:42 A GMT
Comment left here - it's also worth following some of the links in the article.Never install the Java Decompiler, JAD, and look at the library code you are dependent on.Just don't.If you do, however, never run the FindBugs utility (which I re

Soap4r woes

Tuesday, 20 May 2008 3:53 P GMT
Just in case this burns someone elseTalking to a web service that returns an array of mixed complex types (ooh goody!)soap4r returns a lot of SOAP::Mapping::ObjectThese pretend to be a kind of hash (of hashes of hashes if you go really deep), so I co

Rails: I can put together a simple database-backed app really quickly

Friday, 25 April 2008 11:47 A GMT
Comment left here ... and that's why I use RoR. 90% of the "anti" opinions here don't get it. It's quick, it has a low entry barrier, and, if you want the Ajax stuff, it's very easy to do simple things. If you want stuff tha

Getting the number of months between two dates in Ruby/Rails - updated

Wednesday, 2 April 2008 12:30 P GMT
Here lies the one that works, not the old one I posted ages ago. It also uses dates instead of timestamp differences and should therefore not break if you ask it to go before the Epoch (some time in 1970 I think):

DHH the windows hater - or maybe needs to think a bit before he spouts off?

Friday, 7 March 2008 9:25 A GMT
Comment left here  I am a Rails developer who uses a proper IDE (Netbeans for Ruby) and Windows. Installed Cygwin to give me the bash shell and the other tools I need to talk to our Linux server backbones. I started on Unix/Sun workstations, wen

SQL is dead?

Tuesday, 19 February 2008 5:23 P GMT
Comment left here.  XML - sighI read Oracle's early papers on XML DB - "we store the schema and the data separately, with pointers into the data"Codasyl in disguise. The same with the o-o databases, hierarchical databases - none of

Deep merge a Ruby hash, the joys of recursion

Friday, 15 February 2008 5:23 P GMT
I was doing some hacking with lists of valid phone number codes (3,4,5 digits depending upon various factors). I used hashes that could be walked down because of the key lengths. Now we've decided to do it  differently because the data file

Strange error with ActiveRecord in Rails

Thursday, 31 January 2008 5:24 P GMT
I was getting this: undefined method `to_f' for {}:HashWithIndifferentAccessThis was happening in the after_create method. We have a table that lists fields and what validation is needed, we use this to pick out the value in the record so we can

Debugging Rails Applications

Tuesday, 11 December 2007 5:27 P GMT
I've said that I use netbeans on this blog a few times but never really gone into why.First, I can park all of the class/project browsers and output windows in the margins of the page and they only pop-up when I click on them.Second, I can tear o

Fun with openssl on Ubuntu and Ruby 1.8.6

Monday, 10 December 2007 5:27 P GMT
We migrated a core system to our shiny new cluster on Friday. Colin got everything going apart from a call-out to a 3rd party back-end system that uses SOAP. Tracking down the problem:The error message was a method_missing talking about load_file.I d

Rails Yet To Make Dent in the Enterprise?

Thursday, 29 November 2007 5:28 P GMT
Managed to post this twice becuase their system wouldn't let me log in ... http://www.adtmag.com/article.aspx?id=21641> Absence of sophisticated IDE/Debugging tools - Eclips

RSpec gotchas with exception handling

Tuesday, 27 November 2007 5:29 P GMT
If your code throws exceptions then beware that RSpec uses exceptions to talk to itself, if you catch exceptions then beware that you could be masking the error RSpec is trying to report.If you're staring at something tha