Alistair Davidson | Miscellaneous musings of a multifarious man - mostly rants, raves and random thoughts on Coldfusion MX. And too much alliteration.
Show all feed information | Ping Blog Update
Using MySQL? InnoDB table type? Got a table with several TEXT or BLOB fields? Getting a "Row size too large" error when saving a row with lots of text in those TEXT fields? Confused, because you thought the whole point of TEXT fields was that they stored the text off-table? Well, read on.... …
Lets' say you have a table of assigned_users. Users can be assigned to several different things, so you make it a polymorphic relationship: class User has_many :assigned_users, :as=>:user end class AssignedUser belongs_to :user belongs_to :model, :polymorphic=>true end class Client has_many …
There's lots of "Introduction to Agile principles"-type articles around the blogosphere, but not many I've seen that actually give practical advice down to the level of the real mundanities like ticket-logging. But these things are important - if you're not careful, your ticketing system can end …
Let's say you have a scope on a model that joins onto potentially several related models: class Post has_many :comments scope :commented_on_by, lambda{ |user| .joins(:comments).where( :comments=>{:author_id => user.id} ) } end ( OK, so this is a contrived artificial example, there are better …
keywords database, hash, models, multiple times, query, rails, result set, resultset, scope, sql
I recently got this SEO Spam mail: From: Katie Subject: Web Proposal Date: 24 May 2012 13:07:08 GMT+01:00 To: iTrigga Support Hi, I hope you're doing good! We are suffering from your site: www.itrigga.com saw your website is not ranked on any search engines. If you are interested we want to …
keywords best of luck, business development manager, email, gmt, major search engines, own website, reply, search engine optimization, spammer
Quick tech tip - if you're trying to access Amazon S3 from Ruby, even with the official aws-sdk gem, and you get errors like this: Errno::EPIPE: Broken pipe - when trying to upload, the issue is probably that you need to explicitly set the endpoint appropriately for the region of the bucket …
Recently I've had to work with PHP an increasing amount. I've not been enjoying it. A few recent IRC conversations also got me thinking - is there an entirely arbitrary but kind of fun (and hey aren't they all arbitrary, really?) metric of programming language FAIL / coder FAILs per-language ? So …
Using FeedWordPress to pull in aggregated feeds to a Wordpress blog? Also using the Wordpress MU Domain Mapping plugin to map an arbitrary domain to your blog? Seeing posts get duplicated? Then read on .... I've isolated the duplicate posts issue to some kind of interaction with the Wordpress MU …
We finally managed to get enough space in the schedule to take the plunge and port our monolithic Rails 2.3 app to Ruby 1.9, with a view to increasing scalability of our app. An upgrade to Rails 3 is also on the cards for later, but... one thing at a time. As ever, the path to true Ruby nirvana …
We had an interesting problem today. We were seeing very slow single-row updates (>30s) on our (innodb) scheduled_jobs table, and a large number of the update queries were failing with a LOCK WAIT TIMEOUT. The updates were using the primary key, so they should be pretty fast - but they weren't. …
keywords concurrency, database, few minutes, googling, heap size, jobs, locks, mysql, mysql server, optimisation, performance, primary key, queries, sleep, ssh, threads
Dr Snooks
Techie, climber, footballer, northerner, cynic, stoic, sarky sod. CTO of http://itrigga.com http://instantbadger.blogspot.com
RT @aneel: "if your systems aren't failing, you could go faster" - @adrianco #gluecon@drsnooks
London, England