Tyler Schultz's blog



Tyler SchultzTyler Schultz
Standup 05/22/2012: [SF] CarrierWave is messy
edit Posted by Tyler Schultz on Tuesday May 22, 2012 at 09:18AM

Ask for Help

"CarrierWave is messy leaving files in the tmp directory when running tests. Is rm -rf the best answer?"

Yes!

"While the we love Rails, we don't need it, we just want its asset packaging features. Some suggest using sprockets. Do you have other suggestions?"

Interesting Things

*Gem Maintainers: use LicenseFinder to save users of your gem the hassle of digging through your gem to figure out what license your gem is distributed under.

*A Pivot had great success using Join.me for remote pairing. Setup was a snap! Others suggest checking out TeamViewer as well.

Tyler SchultzTyler Schultz
[Standup][SF] 11/22/2011: Programmatic select box changes
edit Posted by Tyler Schultz on Tuesday November 22, 2011 at 11:12AM

Help!

"How do I choose the value of a select box programmatically? The val function does not seem to do the trick."

Try setting the desired option as selected and then trigger a change event on the select input.

*"A pair is looking for 'multi file upload via iframe-transport' expertise. Specifically uploads in FireFox 3.6."

Interesting

  • The latest RubyMine EAP has improved code formatting options!

Tyler SchultzTyler Schultz
Standup 09/30/2011: Bulk inserts
edit Posted by Tyler Schultz on Friday September 30, 2011 at 09:39AM

Ask for Help

"Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!"

It doesn't answer why your job is using so much memory, but check out activerecord-import.

Tyler SchultzTyler Schultz
Standup 09/28/2011: Epics!
edit Posted by Tyler Schultz on Wednesday September 28, 2011 at 09:10AM

Interesting Things

  • Pivotal SF will be hosting a Tracker Users Group meetup tonight. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.

Help

  • Some pivots are having trouble with a flash embed tag's scale attribute. The desired behavior is that the movie scale to fit the size of the element. According to documentation, this should just work. The flash content will not scale, instead the content is getting cropped.

  • Anyone have experience using Amazon RDS with Heroku?

    Several projects at Pivotal have used this combination with great success.

Interesting

  • A project had some intermittently slow queries. The problem was traced back to some large strings in one of the columns. The team solved this problem by overriding the default scope, and only selecting the expensive column when needed.

Tyler SchultzTyler Schultz
Standup 2010-12-09: Aggregating hudson builds, Time gotcha
edit Posted by Tyler Schultz on Thursday December 09, 2010 at 09:17AM

Help:

  • Does anyone know of a way to aggregate multiple projects into one hudson build? A pivot currently has 4 hudson projects that he'd like to show as one status. If any one project fails to build, then the build should go red, but hudson should still build the other three.

Interesting:

  • Time gotcha:

In 1.8.7 you'll see this:

 > Time.now
 => Wed Dec 08 22:26:37 -0800 2010

 > 1.day.ago
 => Wed, 08 Dec 2010 06:26:44 UTC +00:00

 > 1.day.ago.to_date
 => Wed, 08 Dec 2010

 > (Time.now - 1.day).to_date
 => Tue, 07 Dec 2010

In 1.9.2 you'll see this:

 ruby-1.9.2-p0 > Time.now
 => 2010-12-08 23:28:26 -0800 

 ruby-1.9.2-p0 > 1.day.ago
 => Tue, 07 Dec 2010 23:28:26 PST -08:00 

 ruby-1.9.2-p0 > 1.day.ago.to_date
 => Tue, 07 Dec 2010 

 ruby-1.9.2-p0 > (Time.now-1.day).to_date
 => Tue, 07 Dec 2010 

Tyler SchultzTyler Schultz
Standup 12/08/2010: fo sho really?
edit Posted by Tyler Schultz on Wednesday December 08, 2010 at 09:09AM

Interesting:

Interesting:

  • Tests won't run if rspec is included in the test group. rspec must be included in the development group, or both. When a test run is started the RAILS_ENV is development. After some initialization the RAILS_ENV is changed to test - a point at which the Gemfile has already been evaluated.

Tyler SchultzTyler Schultz
Standup 11/12/2009: Global method cache invalidation
edit Posted by Tyler Schultz on Thursday November 12, 2009 at 01:38PM

Interesting Thing

  • Dynamic use of Object#extend at runtime invalidates the global method cache, causing performance degradations. Consider a design that makes use of extend at class parse time. Here's a slide deck that explains in detail: What Makes Ruby Go

Help

*"Proxying Apache to Thin and getting 502 errors."

Interesting

  • Beware: Health check ping every 3 seconds * 15 mongrels * 1 week = millions of session rows. Create skip_filter entry for your health ping action.

  • Snow Leopard 10.6.2 is out. An unlucky upgrader attempted to go 10.6.1 -> 10.6.2 and it hosed the machine. This required the upgrader to reinstall Snow Leopard from disk, then upgrading to 10.6.2. Backup your data before upgrading!

  • Redefining an aliased method may not do what you expect: When the aliased method is invoked the original implementation executes.

def do_something
  puts "hello"
end

alias :do_something_else :do_something

def do_something
  puts "goodbye"
end

do_something_else    # prints "hello"

Other articles: