June 25th, 2009
If you’re like me and work on a Ruby on Rails application which is backed by SQLServer (don’t ask!), then you may be interested in this. If not, then go way you lucky bastard!
As we all know, SQLServer is a huge PITA (no limit/offset? WTF?) and up until recently, the ActiveRecord SQLServer Adapter didn’t even ship with Rails. Yeah, there are a lot of them them out there, but they all have their own problems. Anyway, thanks to all the great work done by Ken Collins and company, as of Rails 2.2, the ActiveRecord SQLServer Adapter is back!
I was so happy when I heard this that I instantly installed it over top of our Frankensteined version to see if it would resovle the countless issues we’ve had to deal with. Things were going smoothly and I was jubilant until I discovered that this column quoting issue was still hanging around and causing errors like this:
DBI::DatabaseError: 42000 (102) [FreeTDS][SQL Server]Incorrect syntax near ‘.’.: SELECT * FROM (SELECT TOP 10 * FROM (SELECT TOP 10 [people].* FROM [people] ORDER BY people.[id] ASC) AS tmp1 ORDER BY people.[[id]] DESC) AS tmp2 ORDER BY people.[[id]] ASC
I promptly submitted my glorious 1 LOC patch (actually, it’s more than one line if you include the test case!) and Ken was kind enough to include it in the latest release!
w00t!
Tags: ActiveRecord, Ruby on Rails, SQLServer
Posted in Software Development | No Comments »
June 23rd, 2009
I’m studying Japanese and I want to document some it’s interesting “features”.
Feature 1: Case Markers
The basic word order in a Japanese sentence is subject-object-verb (SOV) as opposed to english where the basic word order is subject-verb-object (SVO). The english sentence “Vince (S) uses (V) a computer (O)” translates to “Binsu-wa (S) konpyuuta-o (O) tukau (V)”. The rule in Japanese is that the verb comes at the end of a sentence. And yes, they call me “Beans”.
Who cares, right? Wrong!
Notice the “wa” and “o” particles in the Japanese sentence? Those are called “case markers” and they accompany the subject (Binsu) and object (konpyuuta). These markers allow us to change the word order of the Japanese sentence while retaining it’s meaning: “Konpyuuta-o Binsu-wa tukau”. Doing the same to the English sentence would radically change it’s meaning to “A computer uses Vince”. Argh! Where’s Keanu Reeves when you need him!
Neat!
Tags: Japanese, language
Posted in Linguistics | 2 Comments »
June 21st, 2009
*GASP!*
I’ve just been way too busy these days. Besides, there are lots of great blogs already out there! Here are some blogs of people I know and have worked with:
If you’re into stuff that may cause your brain to explode, then check out Reg Braithwaite‘s Homoiconic.
Luke Galea is smart and an all-round great guy. The Idea Forge has some really interesting stuff on it. Beer, anyone?
Avdi Grimm’s Virtuous Code is always a good read.
Sean Miller’s mastery of the English language makes me nervous. Check out … So We Built One and see for yourself.
Giles Bowkett blogs so much that it makes my head spin. Where does he find the time?
Posted in Uncategorized | No Comments »