Monthly Archives: February 2007

more on blog status

This post was a bit cryptic, sorry about that. What is happening is that I am trying to move to the USA. My wife is from there (and has now gone back there), which is why I should be able to get a visa. I wrote that previous post the day before I went for […]

more Oracle head bashing

Today I have been having ‘fun’ trying to put multi-line text into Oracle SQL scripts. Now, this snippet works fine in SQLPlus: UPDATE email_templates SET email_content = ‘Hello. Blah blah blah. Goodbye.’; But this one barfs when it gets to the first blank line: UPDATE email_templates SET email_content = ‘Hello.   Blah blah blah.   […]

credit card numbers

It seems like a long time since I’ve written any Ruby code, but I needed a little util this morning so I hacked out a couple of scripts. They implement the Luhn algorithm used for credit card numbers. This one checks if a number is valid: digits = ARGV[0].split("").map{|a| a.to_i}   sum = 0 digits.reverse.each_with_index […]

surprise

I guess it shows the wrong attitude when I start feeling all surprised when something worked. Can’t really go into details because it’s my work system, but I’ve spent a few days being frustrated with and fiddling with my development Weblogic deployment. This morning I went for another cvs update and rebuild of everything, and […]

sql whinge

In SQL, when you add a column to a table, you just say ‘add’, e.g. ALTER TABLE my_table ADD my_new_column VARCHAR(12); But if you want to remove a column you have to say ‘drop column’, like this: ALTER TABLE my_table DROP COLUMN my_old_column; This is one of those little inconsistencies that drives me mad – […]