Five Common Rails Mistakes
26 days ago by sunpig
I’ve worked with Rails for quite a while now and in that time I’ve seen a lot of Rails applications and both read and written a lot of bad Ruby code. Here’s five common mistakes that I see in almost every Rails codebase.
rails
programming
oo
ruby
patterns
mistakes
26 days ago by sunpig
Testing like the TSA - (37signals)
7 weeks ago by sunpig
Every line of code you write has a cost. It takes time to write it, it takes time to update it, and it takes time to read and understand it. Thus it follows that the benefit derived must be greater than the cost to make it. In the case of over-testing, that’s by definition not the case.
Think of it like this: What’s the cost to prevent a bug? If it takes you 1,000 lines of validation testing to catch the one time Bob accidentally removed the validates_presence_of :name declaration, was it worth it? Of course not (yes, yes, if you were working on an airport control system for launching rockets to Mars and the rockets would hit the White House if they weren’t scheduled with a name, you can test it—but you aren’t, so forget it).
testing
tsa
dhh
rails
ruby
tdd
bdd
programming
software
assurance
quality
confidence
Think of it like this: What’s the cost to prevent a bug? If it takes you 1,000 lines of validation testing to catch the one time Bob accidentally removed the validates_presence_of :name declaration, was it worth it? Of course not (yes, yes, if you were working on an airport control system for launching rockets to Mars and the rockets would hit the White House if they weren’t scheduled with a name, you can test it—but you aren’t, so forget it).
7 weeks ago by sunpig
ORM is an anti-pattern | Seldo.Com Blog
june 2011 by sunpig
RT @izs: ORM is an antipattern.
/via @seldo, whose tweet yesterday implied all this obviousness anyway.
orm
antipattern
model
relation
activerelation
sql
rails
abstraction
/via @seldo, whose tweet yesterday implied all this obviousness anyway.
june 2011 by sunpig
Confirmation bias - GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS
may 2011 by sunpig
RT @thoughtbot: Confirmation bias.
thoughtbot
giantrobots
password
email
confirmation
signup
register
clearance
rails
engine
may 2011 by sunpig
related tags
1.9.2 ⊕ 3.1 ⊕ 3.2 ⊕ 37signals ⊕ abstraction ⊕ accepts_nested_attributes_for ⊕ account ⊕ action ⊕ actionview ⊕ activerecord ⊕ activerelation ⊕ advice ⊕ amazon ⊕ amsterdam ⊕ antipattern ⊕ api ⊕ app ⊕ array ⊕ assert ⊕ assert_response ⊕ asset ⊕ assets ⊕ assignment ⊕ assurance ⊕ attributes ⊕ attr_accessible ⊕ auth ⊕ authentication ⊕ automatic ⊕ backbone ⊕ backgone ⊕ basecamp ⊕ bdd ⊕ brew ⊕ browser ⊕ bundle ⊕ business ⊕ caching ⊕ cdn ⊕ class ⊕ clearance ⊕ client ⊕ clientside ⊕ code ⊕ coffeescript ⊕ collection ⊕ command ⊕ compass ⊕ confidence ⊕ configuration ⊕ configure ⊕ confirmation ⊕ controller ⊕ convention ⊕ convert ⊕ convert_options ⊕ create ⊕ criteria ⊕ css ⊕ danbenjamin ⊕ data ⊕ dataaccess ⊕ database ⊕ ddollar ⊕ dependency ⊕ deploy ⊕ deployment ⊕ design ⊕ dev ⊕ development ⊕ devise ⊕ dhh ⊕ distribute ⊕ dns ⊕ email ⊕ engine ⊕ environment ⊕ error ⊕ examples ⊕ exception ⊕ expect ⊕ extend ⊕ fashion ⊕ fast ⊕ feature ⊕ file ⊕ fix ⊕ foreman ⊕ format ⊕ forms ⊕ framework ⊕ freelance ⊕ frontend ⊕ fun ⊕ gallery ⊕ gem ⊕ generate ⊕ giantrobots ⊕ gilesbowkett ⊕ github ⊕ guide ⊕ haml ⊕ handle ⊕ helper ⊕ helpers ⊕ heroku ⊕ homebrew ⊕ hotness ⊕ howto ⊕ html ⊕ http ⊕ https ⊕ hypertext ⊕ idoom ⊕ image ⊕ imagemagick ⊕ images ⊕ include ⊕ install ⊕ iterate ⊕ javascript ⊕ jobs ⊕ josevalim ⊕ js ⊕ launch ⊕ leshill ⊕ load ⊕ mac ⊕ manage ⊕ method ⊕ migration ⊕ mikewilliamson ⊕ minify ⊕ mistakes ⊕ mmongoid ⊕ mock ⊕ model ⊕ monkey ⊕ monkeypatch ⊕ mulitple ⊕ mvc ⊕ mysql ⊕ nested ⊕ node ⊕ nodejs ⊕ object ⊕ oo ⊕ oodb ⊕ orm ⊕ osx ⊕ p290 ⊕ packaging ⊕ packahe ⊕ paging ⊕ paperclip ⊕ params ⊕ partial ⊕ password ⊕ patch ⊕ patched ⊕ patterns ⊕ pdf ⊕ performance ⊕ pjax ⊕ platform ⊕ platformatex ⊕ postgres ⊕ postgresql ⊕ pow ⊕ precompile ⊕ presentation ⊕ print ⊕ process ⊕ procfile ⊕ programming ⊕ pushstate ⊕ quality ⊕ rack ⊕ rails ⊖ railscast ⊕ rake ⊕ readme ⊕ region ⊕ register ⊕ relation ⊕ render ⊕ require ⊕ rescue ⊕ respond_to ⊕ respond_with ⊕ rest ⊕ route ⊕ routes ⊕ routing ⊕ rspec ⊕ ruby ⊕ run ⊕ rvm ⊕ ryandaigle ⊕ s3 ⊕ sass ⊕ sb ⊕ scss ⊕ security ⊕ selector ⊕ separate ⊕ server ⊕ set ⊕ setup ⊕ sheet ⊕ shortcut ⊕ signup ⊕ slides ⊕ slow ⊕ software ⊕ spec ⊕ speed ⊕ sprite ⊕ sql ⊕ sqlserver ⊕ ssl ⊕ stacker ⊕ stackoverflow ⊕ start ⊕ startup ⊕ status ⊕ stub ⊕ style ⊕ suite ⊕ symbol ⊕ sync ⊕ tdd ⊕ template ⊕ test ⊕ testcase ⊕ testing ⊕ thin ⊕ thirdparty ⊕ thoughtbot ⊕ thoughtbox ⊕ tips ⊕ tools ⊕ tower ⊕ tricks ⊕ tsa ⊕ tsql ⊕ tutorial ⊕ tutorials ⊕ ui ⊕ update_attributes ⊕ url ⊕ user ⊕ validation ⊕ version ⊕ versioning ⊕ view ⊕ viget ⊕ vulnerability ⊕ web ⊕ webdev ⊕ webkit ⊕ work ⊕ wpo ⊕ xss ⊕ zsh ⊕Copy this bookmark: