The Perils of “rescue Exception”
26 days ago by sunpig
So remember, your application errors should be subclasses of StandardError and if you want to catch everything, just stick will plain old “rescue => ex”. Your application will behave better for it.
ruby
exception
rescue
begin
standardexception
interrupt
kill
zombie
26 days ago by sunpig
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
Vagrant - Welcome
december 2010 by sunpig
Vagrant looks pretty awesome. This might be a must-have.
vagrant
virtual
virtualized
development
environment
ruby
virtualbox
deployment
from twitter
december 2010 by sunpig
Integrating Ruby and Watir with NUnit (Scott Hanselman)
june 2005 by sunpig
You know, I might just skip Python altogether and get straight into Ruby
ruby
watir
testing
unittesting
scotthanselman
software
code
development
unit
june 2005 by sunpig
related tags
1.9.2 ⊕ 3.1 ⊕ 3.2 ⊕ 37signals ⊕ abstraction ⊕ accepts_nested_attributes_for ⊕ access ⊕ account ⊕ action ⊕ actionview ⊕ activerecord ⊕ activestate ⊕ adapter ⊕ advice ⊕ age ⊕ ajax ⊕ algorithm ⊕ alphadecimal ⊕ amazon ⊕ amsterdam ⊕ anildash ⊕ api ⊕ app ⊕ array ⊕ assert ⊕ assert_response ⊕ asset ⊕ assets ⊕ assign ⊕ assignment ⊕ assurance ⊕ attributes ⊕ attr_accessible ⊕ auth ⊕ authentication ⊕ automatic ⊕ avdigrimm ⊕ backbone ⊕ base62 ⊕ bash ⊕ bdd ⊕ before ⊕ begin ⊕ block ⊕ branch ⊕ brew ⊕ bridge ⊕ builtin ⊕ bundle ⊕ business ⊕ c ⊕ c++ ⊕ cdn ⊕ chriseppstein ⊕ class ⊕ client ⊕ close ⊕ code ⊕ codemagic ⊕ coding ⊕ coffeescript ⊕ collection ⊕ command ⊕ compass ⊕ composite ⊕ confidence ⊕ configuration ⊕ configure ⊕ connect ⊕ controller ⊕ convention ⊕ convert ⊕ create ⊕ criteria ⊕ css ⊕ danbenjamin ⊕ data ⊕ dataaccess ⊕ database ⊕ date ⊕ datetime ⊕ db ⊕ dbd ⊕ dbi ⊕ ddollar ⊕ decimal ⊕ deploy ⊕ deployment ⊕ design ⊕ dev ⊕ development ⊕ devise ⊕ dhh ⊕ distribute ⊕ dns ⊕ double ⊕ dry ⊕ env ⊕ environment ⊕ equals ⊕ error ⊕ examples ⊕ exception ⊕ expect ⊕ expressions ⊕ extend ⊕ facade ⊕ faraday ⊕ fashion ⊕ fast ⊕ feature ⊕ file ⊕ flow ⊕ foreman ⊕ format ⊕ formatting ⊕ forms ⊕ freelance ⊕ fun ⊕ function ⊕ gallery ⊕ gem ⊕ generate ⊕ gilesbowkett ⊕ git ⊕ github ⊕ goodpractice ⊕ guide ⊕ halt ⊕ haml ⊕ handle ⊕ helper ⊕ helpers ⊕ heroku ⊕ homebrew ⊕ hotness ⊕ howto ⊕ html ⊕ http ⊕ httparty ⊕ https ⊕ ide ⊕ idiom ⊕ idoom ⊕ image ⊕ images ⊕ include ⊕ information ⊕ install ⊕ integration ⊕ interrupt ⊕ intstall ⊕ isprime ⊕ it ⊕ iterate ⊕ java ⊕ javascript ⊕ jobs ⊕ jonlarkowski ⊕ josevalim ⊕ js ⊕ keyboard ⊕ kill ⊕ komodo ⊕ lambda ⊕ language ⊕ languages ⊕ lark ⊕ launch ⊕ learning ⊕ leshill ⊕ let ⊕ library ⊕ lisp ⊕ literate ⊕ load ⊕ mac ⊕ manage ⊕ management ⊕ manager ⊕ matcher ⊕ maths ⊕ mattsears ⊕ method ⊕ middleware ⊕ migration ⊕ minify ⊕ minitest ⊕ mistakes ⊕ mmongoid ⊕ mock ⊕ model ⊕ mulitple ⊕ mysql ⊕ nested ⊕ net ⊕ nil ⊕ node ⊕ node_modules ⊕ npm ⊕ obidos ⊕ object ⊕ oo ⊕ oodb ⊕ open ⊕ operator ⊕ or ⊕ orm ⊕ osx ⊕ p290 ⊕ package ⊕ paperclip ⊕ parameter ⊕ params ⊕ partial ⊕ patch ⊕ patched ⊕ patterns ⊕ pdf ⊕ performance ⊕ perl ⊕ php ⊕ pipe ⊕ platform ⊕ platformatex ⊕ postgres ⊕ postgresql ⊕ pow ⊕ practice ⊕ precompile ⊕ presentation ⊕ prime ⊕ print ⊕ proc ⊕ process ⊕ procfile ⊕ prognostication ⊕ programming ⊕ prompt ⊕ proxy ⊕ psychology ⊕ python ⊕ quality ⊕ rack ⊕ rails ⊕ railscast ⊕ rake ⊕ rb ⊕ reference ⊕ reges ⊕ regesp ⊕ region ⊕ render ⊕ request ⊕ require ⊕ rescue ⊕ respond_to ⊕ respond_with ⊕ response ⊕ route ⊕ routing ⊕ rspec ⊕ ruby ⊖ run ⊕ rvm ⊕ ryandaigle ⊕ s3 ⊕ sass ⊕ sb ⊕ scheme ⊕ scm ⊕ scotthanselman ⊕ scss ⊕ searchreplace ⊕ security ⊕ select ⊕ selector ⊕ separate ⊕ server ⊕ set ⊕ setup ⊕ shell ⊕ short ⊕ shortcut ⊕ shortener ⊕ should ⊕ sinatra ⊕ slides ⊕ slow ⊕ smell ⊕ software ⊕ sourcecontrol ⊕ spec ⊕ specify ⊕ speed ⊕ sprite ⊕ sql ⊕ sqlserver ⊕ ssl ⊕ stable ⊕ stack ⊕ stackoverflow ⊕ standardexception ⊕ standards ⊕ start ⊕ startup ⊕ status ⊕ stcuture ⊕ strftime ⊕ string ⊕ stub ⊕ style ⊕ subject ⊕ suite ⊕ symbol ⊕ sync ⊕ syntax ⊕ tdd ⊕ teardown ⊕ template ⊕ test ⊕ testcase ⊕ testing ⊕ tests ⊕ text ⊕ texteditor ⊕ textmate ⊕ thin ⊕ thoughtbot ⊕ tips ⊕ tools ⊕ trends ⊕ tricks ⊕ tsa ⊕ tsql ⊕ tutorial ⊕ tutorials ⊕ undefined ⊕ unit ⊕ unittesting ⊕ update_attributes ⊕ url ⊕ use ⊕ user ⊕ vagrant ⊕ validation ⊕ variable ⊕ variables ⊕ version ⊕ versioning ⊕ view ⊕ viget ⊕ virtual ⊕ virtualbox ⊕ virtualized ⊕ vulnerability ⊕ watir ⊕ web ⊕ webdev ⊕ webkit ⊕ work ⊕ xss ⊕ zombie ⊕ zsh ⊕Copy this bookmark: