SproutCore Article on O'Reilly InsideRIA Blog
August 13th, 2008
I’m now blogging for InsideRIA. My first article is on SproutCore.
DataMapper/Merb Ambiguous SQLite Error
July 27th, 2008
If you get an error such as:
near ")": syntax error
Check to see if you have any models declaring themselves as DataMapper::Resource but WITHOUT any property declarations.
No meaningful error is reported for this case at the moment (with HEAD as of last night) so it’s a weird one to debug – especially if you generate a bunch of model classes ahead of defining their behavior.
Twitter-Free Fridays
July 18th, 2008
I complied with corporate mandate and wrote a post about Twitter-Free Fridays over on The Barbarian Group blog.
I understand the irony of complaining impotently about an impotent complainer, naturally. Hey, that’s what blogs are for, right?
Business Value in rSpec Stories
July 9th, 2008
Because rSpec provides a friendly, more readable means of describing use cases/stories, I’ve taken to inserting business value statements directly into the specs. While this could get unwieldy, I think it helps keep stories focused while providing clear context and value to coders.
describe "Filtered fields" do
it "should filter content on save to cache expensive transforms while preserving source" do
# do it
end
end
Doing this in xUnit would probably cause you to have a camel-induced nervous breakdown.
iPhone Unit Testing with Ruby
July 4th, 2008
Well, Dr. Nic is kicking ass again.
Though I’m a recent convert to rSpec for my Merb work, I actually prefer to unit test Objective-C with OCUnit. I think it’s just part of that prejudice that tests should be written in the language of the app. Also, the more ‘natural’ it feels to write tests, the more likely folks will do so. In my experience, a great number of Obj-C developers have no interest in writing tests in the first place…
Still, rbiphonetest seems like a great project and I imagine several of the “pure” Web developers on my team who are itching to get into Objective-C will quite enjoy a familiar testing framework.
Eagerly Awaiting Merb 1.0, DataMapper 1.0
July 2nd, 2008
I’ve been having a blast with Merb and DataMapper lately.
Like everyone else who prefers clean over clever and true pragmatism over dogma, I prefer Merb over some of the other options out there for day to day Web apps.
That said, I’ve not done any major work with the two yet. I have some of my long-shelved personal apps being rewritten/written on Merb master and DataMapper master, but I am kind of holding off on larger commitments until the 1.0 release.
If you haven’t checked out Merb and Datamapper > 0.9 you should.
I’m even coming around on rSpec, though I still prefer xUnit style testing because the language and flow is the same across all the types of development I do (PHP, Ruby, Objective-C, Java).
Unit Testing and the iPhone SDK
June 15th, 2008
If anyone sorts out how to get the SenTest framework to play nice with Cocoa Touch apps, kindly let me know.
I found a Google project that looks promising, but haven’t looked into it.
Do my footwork for me!
Coding blind (no tests) is causing my ulcer to flare up.
Nothing but Porn
March 9th, 2008
We just decided that technology kills sex, but canceling cable and Internet access is totally screwed up, so we’re gonna cancel everything but porn channels and porn sites.
iTunes U Rules
January 5th, 2008
I am already fearing the point at which the velocity with which I consume content allows me to see the bottom of the proverbial barrel.
Please, dear God, let Frontline start releasing content under iTunes U. And MIT Media Lab, and…
All I can hope is that they don’t kill the series before I can download it all.
ActiveRecord to_xml Security Strategy
November 12th, 2007
As noted on blog.wolfman.com, there is a security problem when using the scaffolded respond_to set-up. By default, all columns in a given record will be displayed.
The write-safety mechanism provided by attr_accessible doesn’t help in this situation, but having to write a custom to_xml method that steps through each of these already-whitelisted attributes is a bit silly and not very DRY.
My solution is to do something like:
def to_xml(options = {})
super({:only => self.class.accessible_attributes}.merge(options))
end
Breaking that out, as I do, into a SecureModel mix-in seems like a good move.