Ruby on Rails Camp Was A Success

Posted by Max Dunn Mon, 20 Nov 2006 20:15:56 GMT | 1 comment

Wow, the Ruby on Rails Camp really went well!

Beforehand, our biggest fear with this unconference format was that only a few people would want to lead a session. So our hearts stopped momentarily when when we called for sessions and only 6 people initially came down. But after a few minutes, a bunch of other people started coming down and we quickly filled up the schedule with 28 sessions.

Besides the great sessions, the speed demo was very popular.

People were also very impressed with the beautiful IBM facility and terrific food and drinks they provided, as well as the free coffee barista and sushi dinner made possible by our other sponsors. Thanks again to IBM for hosting the event and providing all the food and refreshments, and our other sponsors for making this possible!

We had a lot of great feedback about the camp. Greg Tomei said “Wow – my expectations were exceeded by a huge measure!” and Dav Yaginuma said “The very first session on memcached was perhaps the most perfect conference session I’d ever attended.”

But the real thanks should go to all you attendees – it was your efforts that really made this unconference a success!

Posted in

Ruby on Rails Camp

Posted by Max Dunn Tue, 10 Oct 2006 15:54:47 GMT | no comments

It’s here! Ever since Wido and I went to the MashupCamp in July, we wanted to do a similar unconference for Ruby on Rails (RoR). So we have been looking around for locations and figuring out dates, and now have everything finalized. The Ruby on Rails Camp is going to be November 9th at IBM Almaden in San Jose, California.

Is Ruby on Rails Ready for Business?

The focus will be on whether RoR is ready for real-world, real-business applications. Will it scale? Will I be able to hire developers? Will it persist? Will there be support? Will it be compatible with my other applications? Will there be enough third-party components? Will I be able to get funding? These are all issues we hope to talk about, as well as other general Ruby and Rails topics.

Unconference

We are calling it a “camp” rather than a “conference” because it will be held in the Unconference style. So instead of having preset speakers and sessions, the first thing that will happen is that we will ask the participants to decide what sessions they would like to give themselves.

There will also be a SpeedDemo sessions so that participants can show off their own RoR applications – whether they are commercially polished or just something hacked together for fun. This will be a great way to see what you can do with RoR!

Fee

We debated on whether to charge a fee and decided on a small fee of $25 to reduce the number of no-shows. We also are planning to have Kaliya Hamlin facilitate the camp, and the fee will help make that possible.

Signups

So if you are developing a Ruby on Rails business application – or would like to – or are just interested in learning more about Ruby on Rails, you should definitely come to the Ruby on Rails Camp!

Posted in

Apache Redirects to the Rescue

Posted by Max Dunn Sat, 07 Oct 2006 19:36:12 GMT | no comments

There are a couple of technical problems with my web site. The first is that to get into this blog, you need to add the trailing slash at the end of “typo” like this:

http://www.maxdunn.com/typo/

Otherwise, the wiki gives a page not found error for the “typo” page. Of course, when most people type in the URL manually, they won’t add the trailing slash and then get confused when it doesn’t pull up my blog.

I have tried various things in the Rails routing.rb file to correct for this, but none worked. However, a simple change to .htaccess did the trick:

RedirectMatch permanent ^/typo$ http://www.maxdunn.com/typo/

Now another problem I have is that my ISP Site5 maps maxdunn.com to www.maxdunn.com and there is no way to turn this off. This causes several problems:

  • When logged into www.maxdunn.com, you won’t be logged in if you access it as maxdunn.com.
  • If someone first accesses the site using maxdunn.com, then the page cache will create all links as maxdunn.com and serve these up, even if the page is later accessed as www.maxdunn.com.
  • If the site is accessed with both maxdunn.com and www.maxdunn.com, then Google and other search engines will think these are two sites and neither will be ranked as highly.

To fix this problem, there is another simple .htaccess addition that will redirect all maxdunn.com requests to www.maxdunn.com:

RewriteCond %{HTTP_HOST} ^maxdunn.com$ [NC]
RewriteRule ^(.*)$ http://www.maxdunn.com/$1 [L,R=301]

Posted in ,

Ruby on Rails Advanced Page Caching

Posted by Max Dunn Sat, 16 Sep 2006 20:02:37 GMT | 4 comments

Ruby on Rails (RoR or Rails) has some cool caching mechanisms already built in. You can cache parts of pages (fragment caching) or whole pages (action caching) while still going into your Rails code to check for permissions or do other things. However, for the highest performance, you can use page caching which serves the web page without even starting Rails, making it incredibly fast. For instance, on my slow computer, doing action caching was 2 times faster than normal, but doing page caching was 30 times faster! (See Ruby on Rails Caching Benchmarks).

However, the problem I ran into was that when you are logged into my wiki as an editor, you see an “Edit” link on each section of the page, and if you are logged in as an admin, you see an “Admin” choice on the menu. So while the Rails action caching would work fine for this, I couldn’t use the Rails out-of-the-box page caching since if I was logged in as an Editor and browsed through the pages, the next person that looked at the pages would still see all the “Edit” links, even if they were not logged in!

After some thought, I came up with two solutions for solving this problem. The first was based on rewriting the URL depending on what role the user is logged in as. I then came up with a better method that relies on setting a cookie with the current role and then using Javascript to modify the page appropriately. Here are the details on both methods.

Read more...

Posted in

Ruby on Rails Better Wiki URLs

Posted by Max Dunn Sat, 16 Sep 2006 18:36:04 GMT | no comments

Normally links in a wiki would appear like this:

  • http://www.maxdunn.com/show/Ruby+on+Rails

However, I wanted the URLs in my wiki to look more like web pages:

  • http://www.maxdunn.com/Ruby+on+Rails

It is simple to do this and here are the details:

Read more...

Posted in

Barrel Monkeys 2004 Shiraz McLaren Vale

Posted by Max Dunn Fri, 15 Sep 2006 19:21:43 GMT | no comments

I have always thought that I liked over-the-top wines that were reeking with jammy flavors. I even like syrupy ports. However, I have discovered with the Red Heads Studio Barrel Monkeys 2004 Shiraz McLaren Vale that even I have my limits and prefer wines that don’t slip over to the dark side of being port-like. Now, just to be clear, this is a dry wine with no trace of residual sugar. But the nose has these dark port-like aromas that caught me by surprise. Being a Shiraz too, it had these dark earthy flavors that crusted my tongue. I actually drank a few glasses, so it wasn’t all that bad. But it was interesting to finally find a wine that went slightly over my limit for jamminess.

3 out of 4 stars

Available at:

Posted in

Improving Hard Drive Performance

Posted by Max Dunn Thu, 14 Sep 2006 03:37:59 GMT | 1 comment

My computer is pretty lame. It is a lightweight Averatec 3280 laptop running Windows XP, and I bought it at Staples for under $900. This is half the price of a comparable Dell, so I willing to live with its problems. One of the problems is that whenever it hibernates, it comes back up with the wireless card off, so I need to turn it on then search for a wireless connection. Another problem is that the hard drive keeps dropping into PIO mode which makes everything really slow. So far, I have been deleting the IDE controller and rebooting twice to fix it, but this is a lengthy process.

Thanks to James Barton, here are some instructions for getting around this problem. I am going to try this on my computer and see how it works:

  1. Open up the Registry Editor.
  2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet \Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}.
  3. There are several sub-keys under this one, such as 0000, 0001, etc. You are interested in two of them that say Primary IDE Channel and Secondary IDE Channel.
  4. Make the following changes to both of those keys:
    1. Delete any attributes named MasterIdDataCheckSum or SlaveIdDataCheckSum. This resets the tracking for errors that Windows uses to determine when the transfer mode should be lowered.
    2. Add an attribute with the name ResetErrorCountersOnSuccess and a DWORD value of 1. This tells Windows that it should lower the transfer mode when there are six consecutive errors instead of six cumulative errors.
    3. If they exist, set the following keys to a hexadecimal value of ffffffff (eight F’s). This will change the transfer modes to UltraDMA-6:
      • MasterDeviceTimingMode
      • MasterDeviceTimingModeAllowed
      • SlaveDeviceTimingMode
      • SlaveDeviceTimingModeAllowed
      • UserMasterDeviceTimingModeAllowed
      • UserSlaveDeviceTimingModeAllowed
  5. Reboot your computer and check the devices to see if they are set to UltraDMA Mode 6.

Posted in

Ruby on Rails Caching Benchmarks

Posted by Max Dunn Wed, 13 Sep 2006 00:56:53 GMT | no comments

I have been working on optimizing my Ruby on Rails wiki so that it can stand up under heavy load. The first step I took was to implement caching so that the pages don’t need to be re-rendered each time. This is especially important in my wiki since each page can have 6 different sections that need to be rendered:

  1. header
  2. menu
  3. footer
  4. left column
  5. middle column
  6. right column.

I did some quick benchmarks that might be useful for others that are optimizing their RoR apps:

Caching Method   Page Load Time   Pages per Second
None 620ms 1.6
Action 270ms 3.7
Page 18ms 55

These times were produced with the web load testing program The Grinder on my Averatec AMD 2800+ laptop using WEBrick running Windows XP and Rails in development mode.

The main conclusion is that while utilizing Action caching doubled the performance, using Page caching increased the performance over 30 times!

Posted in

"Lipstick Jihad" by Azadeh Moaveni

Posted by Max Dunn Mon, 11 Sep 2006 19:29:13 GMT | 1 comment

In Lipstick Jihad, Azadeh Moaveni provides a fascinating view of the complexities facing the new generation of Iranians living in modern Tehran. Americans are not often exposed to anything more from Iran than crazy ayatollahs shouting angry diatribes against the West, so this is an important book that provides a more realistic view of what life is really like in Iran and how people are attempting to live normal lives against the backdrop of a violent religious police, the continual repression of women, a corrupt and ineffectual government as well as all the splendors, culture, family ties and stumbles towards modernism that makes up the sum of Iran.

Read more...

Posted in

Ridge 2003 Lytton West Syrah

Posted by Max Dunn Mon, 04 Sep 2006 18:26:14 GMT | no comments

Last night, we finally were able to co-ordinate with our friend RexD to come over for dinner. It almost didn’t happen because RexD was up on Montebello Road in Cupertino putting bird nets over the grapes at a small vineyard that he and a group of friends are taking care of. It took longer than he thought, and then he was dirty and sweaty so he went home and showered before coming over. He finally made it 2 hours late, but we are glad that he did because it was great seeing him.

Read more...

Posted in

Older posts: 1 ... 12 13 14 15 16 ... 23