Bookmarks of the Week – June 3rd
Be the 1st to comment!

21 Ruby Tricks You Should Be Using In Your Own Code Great Ruby tips here. Keeping this open in a browser tab and trying to use the tips throughout the week.

XMLMate TextMate plugin: “Check XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate with support for DTD, W3C XML Schema, RELAX NG, Schematron, XInclude, XML Catalog, and XPath 2.0 Visualizer.”

Elements of Design Great collection of web design elements but together by Christian Watson. Great for inspiration.

Rails Widgets Nice Rails plugins to assist in creating navigation bars, tabs, tooltips, show/hide toggling, and tableizer.

One-line web server in Ruby
Be the 1st to comment!

See One-line web server in Ruby on dzone snippets for exactly as described…a one line web server in Ruby.

Toggling Odd and Even classes in Rails
Be the 1st to comment!

When you need to toggle the odd or even class names to stripe your table rows, or any similar functionality, you can skip using a counter and checking if its divisible evenly and instead use the Ruby on Rails helper called cycle. It cycles through whatever values are in the supplied argument list each time its called, so it can also be used in other situations. Here is an example for marking your table rows with odd and even classes:

cycle('odd', 'even')
Database Schema Browser Rails Plugin
Be the 1st to comment!

I am a very visual person. I like to see graphical representations of large sets of data and complex problems, structures, or processes. This includes application databases, so I was immediately drawn to a new Rails plugin, written by Tom ten Thij, called Schema Browser. It’s as easy as pulling it from git, and running a generate command. The screenshot below is from Tom’s mephisto blog and it illustrates the very nice schema graphic produced from the plugin. Installation instructions on Tom’s blog post, Rails schema browser plugin: proof of concept.

Lovdbyless Schema

Running Multiple Browsers for Testing
Be the 1st to comment!

As web developers we know all to well the challenges of getting our web sites to look and function the same across browsers. I use Browsershots to grab visual snapshots of a page in multiple browsers, but this doesn’t help test functionality, or view a screen that occurs after a user has caused an event.

There’s no getting around needing to test in multiple browsers. Thankfully, you can do this on your computer fairly easily. I am currently able to test, on my MacBook Pro, with the following browsers:

  • Firefox 2 and 3 on Win and Mac
  • Safari on Win and Mac
  • IE 5.5, 6 and 7 on Win

This gives me a good percentage of the browsers in use out there. I do my Windows testing by running VMWare Fusion, and installing IE 5.5 – 7, Firefox and Safari on there.

You’ll need a little help with running multiple Internet Explorer versions and Firefox versions.

Running Multiple Internet Explorers
To run multiple version of Internet Explorers there is a nice installer to help you out. I upgraded my IE to 7, and then ran this installer, which can install any IEs you want from 3 to 6.

Running Firefox 2 and 3
Chu Yeow has posted a nice tutorial on running Firefox 2 and 3. You first need to create a new Firefox profile to ensure that when you run Firefox 3 it doesn’t overwrite your default profile. The mozilla web site has some information on Managing Your Firefox Profiles. Now you can download and install Firefox three and follow Chu’s instructions for running it. If you are on a Mac, Andy Croll describes how to use AppleScript for easy launching.

Now you have no excuse for not testing in multiple browsers. Happy testing!


Warning: Invalid argument supplied for foreach() in /srv/users/serverpilot/apps/brianburridge/public/wp-includes/script-loader.php on line 2678