Check out @cwalcott’s latest screencast on UIAlertView Styles in iOS 5 http://t.co/YGsL1PcI
Follow up to yesterday’s tutorial on Core Location: how to use an NSTimer to prevent run-away updates http://t.co/egC402rY
Just posted a tutorial on CoreLocation in iOS for iOSDevNotes http://t.co/8at1xthj
RT @qrush: Extreme commenting, or, how not to write code: http://t.co/VhwGnzTb
Let’s Build NSAutoreleasePool - cocoaheads: http://t.co/iPkcT8N
It’s that time again: time for more programming craziness. Dallas Brown suggested that I talk about how
NSAutoreleasePoolworks behind the scenes. I decided that the best way to do that would be to simply reimplement it, and that is what I’ll discuss today.
Want: Pocket Chain Saw http://t.co/btPiBy8
RT @engadget: SETI comes back from the financial dead, gets a check from Jodie Foster http://engt.co/nTdfz7
“@technoweenie: en(n+)d is amazing: http://t.co/Y5tu4a3” I really don’t like this proposal.
Why has it taken me this long to switch from bash to zsh? http://t.co/mXrqxSt
When working in a Rails app with lots of models, I’m often tempted to clean things up by namespacing. A project I’m currently working on has some 54 models and that number will only increase.
The problem with namespacing is that it introduces a lot of additional ugliness in the models. You have to change the class names and include :class_name attributes in order to find all associations.
A better way seemed to be using Rails 3’s autoload_paths. For instance, if I organized my models into a bunch of subdirectories, then I could do something like the following in my environment.rb file:
config.autoload_paths += %W("#{Rails.root}/app/models/**/**")
This works great when in the production environment, but not in development. Whenever loading an association, I would get something along the lines of “Expected … to define …”. I suspect the issue is Rails reloading models on-demand, and getting confused. In production, all the models are loaded once.
I don’t have a solution yet, unfortunately.
RT @dhh: The Groupon financials are really disappointing :(. I thought they were making money hand over fist. But they’re loosing $100M+ …
Long past time to eliminate software patents. Unfortunately, Congress’ proposed “reforms” will likely compound issues. http://t.co/gOahv1F