Joe Moore's blog



Joe MooreJoe Moore
Standup 06/26/2009: Poor ScrewUnit...
edit Posted by Joe Moore on Friday June 26, 2009 at 01:45PM
  • JQuery Events/live + ScrewUnit = :-(. ScrewUnit swaps the DOM "out from under" the elements that Events/live is watching, which messes with ScrewUnit. Call die on the DOM elements that live events are watching.

  • ScrewUnit + CI + IE = :'-( Also, When ScrewUnit suites become large, they trigger IE's "slow script" warning, which can freeze your continuous integration build. Check out the Registry Hack to set your own timeout.

  • We have a fan of Thor in the house: "Map options to a class. Simply create a class with the appropriate annotations, and have options automatically map to functions and parameters." Which, as is (not) obvious, indicates that Thor is a replacement for rake.

Joe MooreJoe Moore
Standup 06/25/2009: return vs. next vs. break vs. yslow vs. cap
edit Posted by Joe Moore on Thursday June 25, 2009 at 01:40PM

Interesting Things

  • You can never return: ... except when you can. From a block, that is. Returning from a block rarely works:

    result = ['one', 'two'].each do |x|
     return x
    end
    => LocalJumpError: unexpected return
    

    But, you can pass next and break arguments, which will allow you to assign return values from the block:

    result = ['one', 'two'].each do |x|
      break(x)
    end
    => "one"
    
    
    result = ['one', 'two'].each do |x|
      next(x)
    end
    => ["one", "two"]
    

You can return from a lambda, though.

  • Check out Google Page Speed, which is like Yahoo's YSlow, only "better."

    Page Speed is an open-source Firefox/Firebug Add-on. Webmasters and web developers can use Page Speed to evaluate the performance of their web pages and to get suggestions on how to improve them.

  • Like chef? Love capistrano? Check out chef-deploy, which "... Uses the same directory layout as capistrano and steals the git remote cached deploy strategy from cap and adapts it to work without cap and under chef."

  • SFTUG FTW! Another successful SF Tracker User Group Meetup on 06/24. Watch for future events on the Meetup site.

Joe MooreJoe Moore
Standup 06/24/2009: Nginx URL Rewrite Fu?
edit Posted by Joe Moore on Wednesday June 24, 2009 at 03:34PM

Ask for Help

"Does anyone have Nginx URL rewriting fu?"

The pretty documentation is actually quite hard to work with. Does anyone else have a good reference?

Interesting Things

Some developers who were granted early access to Palm's new operating system said it was worth the wait. "We find it's the easiest one to develop for," said Christian Sepulveda, vice president for business development at Pivotal Labs. "It allows for a richer experience, like having a pop-up menu and background processing, which is helpful."

Mr. Sepulveda's company developed four of the first programs available for download through Palm’s app store, including an item for Twitter called Tweed.

Joe MooreJoe Moore
Standup 06/23/2009: Multi-table Inheritance?
edit Posted by Joe Moore on Tuesday June 23, 2009 at 04:29PM

Ask for Help

"Has anyone implemented mutli-table (class table) inheritance in Rails, as apposed to single table inheritance (STI)?"

  • There are some plugins that nobody has tried, such as inherits_from
  • What about a view to represent the super set of tables and rows?

"We're looking for a dead-simple, drop-in JS rating or 'starting' plugin."

Check out the start-rating jQuery plugin. Any other suggestions?

Joe MooreJoe Moore
Standup 06/22/2009: RubyMine Tweaking
edit Posted by Joe Moore on Tuesday June 23, 2009 at 04:21PM

Interesting Things

Joe MooreJoe Moore
NYC Standup 03/35/2009: You have No (CSS) Class!
edit Posted by Joe Moore on Wednesday March 25, 2009 at 06:22PM

Pivot Corey gave a brown-bag lunch talk titled "There is No Such Thing as a CSS Class" (slides and notes) where he describes establishing a project specific "CSS System." This excellent presentation complements the "Consistent and Effective CSS" talk (video and live demo available) given by Pivots Corey, Ryan, and Chris.

Joe MooreJoe Moore
Standup 1/27/2009: Nested Model Forms Soon
edit Posted by Joe Moore on Tuesday January 27, 2009 at 05:58PM

Interesting Things

  • application.rb vs. application_controller.rb: As we all know, ApplicationController breaks with Rails convention and lives in the application.rb file, not application_controller.rb. Be careful if you create an application_controller.rb file of your own, as this can confuse Rails class loading and might result in Rails deciding not to load application.rb.

  • Google Webmaster Tools: Note that if you are using Google Webmaster Tools that statistics are different for www.example.com and example.com (sans www).

  • Nested Model Forms are coming in Rails 2.3! There is even a patch in progress.

Joe MooreJoe Moore
Standup 01/08/2009: libxml leaky; set TZ
edit Posted by Joe Moore on Thursday January 08, 2009 at 05:42PM

Interesting

  • libxml 0.96 and 0.97 leak massive amounts of memory. Don't forget that libxml has other problems, too, as mentioned by us before. That said, it's our go-to XML parser.

  • Several teams have had success with the IE6 PNG fix "DD_belatedPNG" by Drew Diller. But, do not attempt with <tr> or <td> elements, though <td><span>...</span></td> does work.

  • Want to speed up ruby? Who doesn't? Check it out: when you do not set the TZ environment variable, ruby shells out several times per second to see if the timezone has changed. To avoid this, run the following:

$ export TZ=:/etc/localtime 

Thank you Joe Damato!

  • One project recently switched to Passenger with great success. Hundreds of mongrel processes are now gone, deploys are easier and speedier, and the site is faster. WIN!

Joe MooreJoe Moore
Standup 11/21/2008: Pro Bono Airwaves
edit Posted by Joe Moore on Saturday November 22, 2008 at 12:07AM

Interesting Things

  • Rails reminder: flash[:notice] = "Good Job" will survive a redirect, while flash.now[:notice] = "Good Job" will not. In general, flash.now is used when you render a template without a redirect, such as when a form submit has validation errors.
  • Good Books: Several folks have recommended JavaScript: The Good Parts.
  • Pro bono: Would anyone like to help out KUSF for free? Their new website project has been stalled for a year.

Ask for Help

"How do you get Selenium to work with Firefox 3?"

If you know how, pull the jar files out of a later release and use those. Good luck!

Joe MooreJoe Moore
Standup 11/20/2008: Engine Yard ssh key changes
edit Posted by Joe Moore on Friday November 21, 2008 at 01:23AM

Interesting Things

  • Engine Yard has made some changes to their ssh-key setup:

    ...any non-approved keys will be removed from the root user's authorized_keys file. It should be noted that customers should not log in directly as root but rather should log in as their user and use sudo for any commands that need super user privilege. If you are currently using the root user to log in and have your key in roots authorized_keys file it will be removed when this change is made.

    If you are having any ssh problems, contact them.

Other articles: