Thursday, June 18, 2009

[link] Anti-IF Campaign

http://www.antiifcampaign.com/

"Avoid dangerous IFs and use Object Oriented Principles to build a code that is flexible, changeable and easily testable, and will get rid of a lot of headaches and weekends spent debugging!"

I don't necessarily agree that if statements are _dangerous_. Actually, having read what seems to be the only article on the site, I could abstract to say that newbie developers are far more dangerous than any single construct.

If nothing else the sit is ammusing, on the order of http://www.waterfall2006.com/.


Thursday, June 4, 2009

Rails says, "Undefined method 'call' for SomeController"

20 minutes of my life were lost because I hand-generated a controller.

If your controller looks like this:

class SomeController
end

it should look like this:

class SomeController < ApplicationController
end

:)