links for 2009-09-23

Sep 24 2009

No responses yet

Rails 2.3 BacktraceCleaner and TextMate

Sep 23 2009

Start from Rails 2.3, it includes a new class called BacktraceCleaner:

Many backtraces include too much information that’s not relevant for the context. This makes it hard to find the signal in the backtrace and adds debugging time. With a BacktraceCleaner, you can setup filters and silencers for your particular context, so only the relevant lines are included.

Here’s how it works:

bc = BacktraceCleaner.new
bc.add_filter { |line| line.gsub(Rails.root, ”) }
bc.add_silencer { |line| line =~ /mongrel|rubygems/ }
bc.clean(exception.backtrace) # will strip the Rails.root prefix and skip any lines from mongrel or rubygems

Which is simple, great and smart, well, most of the time.

If you are a hardcore TextMate fan, like me, and you like using command+R to run your ruby code/test, you will find you can’t open files by clicking the backtrace list links on the result window. Actually, you still can, but instead of opening the file you want, it opens a new window with a empty new file.

The reason is simple, BacktraceCleaner has a default filter “line.gsub(Rails.root, ”)”. It removes your project path from file full name.

Solution is simple too:

  1. Remove “add_filter   { |line| line.sub(“#{RAILS_ROOT}/”, ”) }” from “vendor/rails/railties/lib/rails/backtrace_cleaner.rb”
  2. Add “Rails.backtrace_cleaner.add_filter { |line| line.sub(“#{RAILS_ROOT}/”, ”) } unless RAILS_ENV == ‘test’” to “config/initializers/backtrace_silencers.rb”

That’s it. Is it a bug for Rails, or not?

No responses yet

links for 2009-09-22

Sep 23 2009

No responses yet

Did You Know 4.0

Sep 18 2009

This is another official update from XPlane to the original “Shift Happens” video. This completely new Fall 2009 version includes facts and stats focusing on the changing media landscape, including convergence and technology.

Anyway, if you don’t know, you should know!

No responses yet

links for 2009-09-17

Sep 18 2009

No responses yet

links for 2009-09-01

Sep 02 2009

No responses yet

Design a iPhone Convert App

Aug 25 2009

This is how TapTapTap designed their iPhone Convert App:

Convert Design Evolution from tap tap tap on Vimeo.

Pretty amazing!

No responses yet

TextMate Shortcuts Desktop

Aug 23 2009

I’ve been using this TextMate shortcuts Desktop Wallpaper for two years already, it’s really helpful, no matter how long have you used TextMate. And, did we missed anything new about TextMate in the past two or three years? I don’t think so.

Snow Leopard is here already, but we still know nothing about TextMate 2.

Download ↓

TextMate Keyboard Shortcuts Desktop Wallpaper 1280 x 800

TextMate Keyboard Shortcuts Desktop Wallpaper 1920 x 1200

Source: Scott Boms

One response so far

links for 2009-08-14

Aug 15 2009

No responses yet

links for 2009-08-11

Aug 12 2009

No responses yet

« Newer - Older »