<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Various posts, likely related to Ruby, Ruby on Rails, gems / plugins, or other web development related topics.</description><title>Thoughts.random</title><generator>Tumblr (3.0; @k776)</generator><link>http://k776.tumblr.com/</link><item><title>Dramatically Speeding Up Ruby 1.9.3</title><description>&lt;p&gt;After reinstalling Ruby 1.9.3 recently, it felt a lot slower than it was previously. Thankfully, I stumbled upon some blog posts that deal with this issue. Check these out:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://spin.atomicobject.com/2012/11/06/is-your-application-running-with-ruby-slow/"&gt;&lt;a href="http://spin.atomicobject.com/2012/11/06/is-your-application-running-with-ruby-slow/"&gt;http://spin.atomicobject.com/2012/11/06/is-your-application-running-with-ruby-slow/&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://alisnic.net/blog/making-your-ruby-fly/"&gt;&lt;a href="http://alisnic.net/blog/making-your-ruby-fly/"&gt;http://alisnic.net/blog/making-your-ruby-fly/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I decided to give it a go. I didn&amp;#8217;t compile ruby with the falcon patch, just stock ruby 1.9.3 with the CFLAGS set. I put the following into my ~/.rvmrc file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;rvm_configure_env=(CFLAGS="-march=nocona -O3 -fomit-frame-pointer -pipe")&lt;/b&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(the march of nocona is for my computers CPU. You will need to find the correct one for your CPU or compiling will fail)&lt;/p&gt;

&lt;p&gt;Then I ran &amp;#8216;rvm reinstall 1.9.3&amp;#8217;. Here are the results (the times are the lowest out of three runs of each command):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time ruby -e "count = 0; while(count &amp;lt; 100000000); count = count + 1; end; puts count"&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 7.5s&lt;br/&gt;
After: 3.2s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rails runner 'true'&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 12.4s&lt;br/&gt;
After: 6.6s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rake routes&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 12.5s&lt;br/&gt;
After: 6.8s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rspec spec&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 5m 53s&lt;br/&gt;
After: 3m 17s&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;If you haven&amp;#8217;t compiled Ruby with optimizations, you&amp;#8217;re unnecessarily slowing your application.&lt;/p&gt;

&lt;p&gt;&lt;b style="font-size: 1.2em;"&gt;Updated 26th Nov 2012&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I followed the additional advice in the references above and tried the falcon patch. The results are impressive. Check out these comparisons between just CFLAGS and CFLAGS+falcon patch.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time ruby -e "count = 0; while(count &amp;lt; 100000000); count = count + 1; end; puts count"&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 3.2s&lt;br/&gt;
After: 3.2s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rails runner 'true'&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 6.6s&lt;br/&gt;
After: 4.9s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rake routes&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 6.8s&lt;br/&gt;
After: 5.0s&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;b&gt;% time bundle exec rspec spec&lt;/b&gt;&lt;/code&gt;&lt;br/&gt;
Before: 3m 17s&lt;br/&gt;
After: 2m 57s&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Set the CFLAGS for your system and compile ruby 1.9.3 with the falcon patch. You&amp;#8217;ll save yourself a heaps of time :-)&lt;/p&gt;</description><link>http://k776.tumblr.com/post/36446487851</link><guid>http://k776.tumblr.com/post/36446487851</guid><pubDate>Sun, 25 Nov 2012 08:30:00 +1300</pubDate><category>ruby</category><category>ruby on rails</category><category>speed</category></item><item><title>Wrong way, Right way - Part 3 - Avoid unnecessary load in conditionals</title><description>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I&amp;#8217;ve been using this technique for a while that I&amp;#8217;d forgotten I was doing it. Thumbs up to &lt;a href="http://collectiveidea.com/blog/archives/2011/06/29/get-your-conditions-in-order"&gt;CollectiveIdea&lt;/a&gt; for their post which reminded me and inspired the following.&lt;/p&gt;
&lt;p&gt;Part of a series about common Ruby mistakes that make things slower or are just plain wrong. Not the style of the code (indentation, methods names etc), but the actual code itself. All examples use Ruby 1.9.2 and Rails 3.0.x.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Part 3 - Avoid unnecessary load in conditionals&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Wrong Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if post.comments.any? &amp;amp;&amp;amp; post.author.present? &amp;amp;&amp;amp; post.public?&lt;br/&gt;  puts post.comments.inspect&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;Whats wrong? The conditionals are executed in order. Suppose the post isn&amp;#8217;t even public. Before we even get to that check at the end, we&amp;#8217;ve hit the database twice; once to check for comments, and another to check for an author. 2 database queries that didn&amp;#8217;t need to be run. This may not seem like much, but when you&amp;#8217;ve got many of them in your app, you may be causing yourself unnecessary page load times.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Right Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if post.public? &amp;amp;&amp;amp; post.author_id? &amp;amp;&amp;amp; post.comments.any?&lt;br/&gt;  puts post.comments.inspect&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Whats better? We check if the post is public right away. If it isn&amp;#8217;t, we&amp;#8217;ve saved ourselves unneeded queries. On top of that, since we don&amp;#8217;t use the author inside the block, we don&amp;#8217;t need to load them. All the check wanted to know is if they have an author id. Rails provides a nice boolean style method for every field on an ActiveRecord model. So lets use them, in that case, utilizing &amp;#8216;author_id?&amp;#8217; to check for an author without any additional queries. Then, finally, the comments are loaded, only when the other two, less time consuming checks have passed.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Questions? Comments? Let me know what you thought.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://k776.tumblr.com/post/7055299648</link><guid>http://k776.tumblr.com/post/7055299648</guid><pubDate>Thu, 30 Jun 2011 08:44:43 +1200</pubDate><category>right way</category><category>wrong way</category><category>series</category><category>ruby</category><category>programming</category><category>ruby on rails</category></item><item><title>Wrong way, Right way - Part 2 - Work with eager loading, not against it</title><description>&lt;p&gt;Part of a series about common Ruby mistakes that make things slower or are just plain wrong. Not the style of the code (indentation, methods names etc), but the actual code itself. All examples use Ruby 1.9.2 and Rails 3.0.x.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Part 2 - Work with eager loading, not against it&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Wrong Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;class Post &amp;lt; ActiveRecord::Base&lt;br/&gt;  def last_comment&lt;br/&gt;    comments.order(:position).last&lt;br/&gt;  end&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;Post.includes(:comments).each do |post|&lt;br/&gt;  puts post.last_comment&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;Whats wrong? The &lt;/span&gt;last_positioned_comment instance method on Post is adding an order to comment query, which negates the includes(:comments) part of the Post select query. As a result, you&amp;#8217;ll get one query for all posts, one query for all comments, and one query for each post to get the last comment. (pattern: 1P + 1C + 1*P)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Right Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;class Post &amp;lt; ActiveRecord::Base&lt;br/&gt;  def last_comment&lt;br/&gt;    comments.sort_by(&amp;amp;:position).last&lt;br/&gt;  end&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;Post.includes(:comments).each do |post|&lt;br/&gt;  puts post.last_comment&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Whats better? Because no extra sort is added to the comments, the ones that were preloaded still match. So you end up with only two queries, one for all posts, and one for all comments. (pattern: 1P + 1C). To end up getting the proper sorting, you simply use Ruby&amp;#8217;s sort_by method along with symbol to proc syntax to create a nice clean implementation that works with eager loading.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Questions? Comments? Let me know what you thought.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://k776.tumblr.com/post/6472213903</link><guid>http://k776.tumblr.com/post/6472213903</guid><pubDate>Mon, 13 Jun 2011 12:54:00 +1200</pubDate><category>programming</category><category>right way</category><category>ruby</category><category>series</category><category>wrong way</category><category>ruby on rails</category></item><item><title>Wrong way, Right way - Part 1 - Optimized conditional data sections</title><description>&lt;p&gt;Part of a series about common Ruby mistakes that make things slower or are just plain wrong. Not the style of the code (indentation, methods names etc), but the actual code itself. All examples use Ruby 1.9.2 and Rails 3.0.x.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Part 1 - Optimized conditional data sections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Wrong Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;@comments = Comment.order(:position)&lt;br/&gt;if @comments.count &amp;gt; 0&lt;br/&gt;  @comments.each do |comment|&lt;br/&gt;    &amp;#8230;  &lt;br/&gt;  end&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;Whats wrong? The conditional fires one query for count, and then the loop fires another one to get them again and instantiate them.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Right Way&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;@comments = Comment.order(:position)&lt;br/&gt;if @comments.to_a.any?&lt;br/&gt;  @comments.each do |comment|&lt;br/&gt;    &amp;#8230;&lt;br/&gt;  end&lt;br/&gt;end&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Whats better? Only one query is made.﻿ The conditional loads the records, so if there are any to loop over, they are already loaded and ready to go without an extra query.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Questions? Comments? Let me know what you thought.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><link>http://k776.tumblr.com/post/6471585765</link><guid>http://k776.tumblr.com/post/6471585765</guid><pubDate>Mon, 13 Jun 2011 12:35:00 +1200</pubDate><category>right way</category><category>wrong way</category><category>series</category><category>ruby</category><category>ruby on rails</category><category>programming</category></item><item><title>Review: Gran Turismo 5</title><description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Scan the post for tips. They&amp;#8217;re prefixed with &amp;#8216;&lt;strong&gt;Tip:&lt;/strong&gt;&amp;#8217;, then read the Pros, Cons, Missing, and more Tips are the bottom.&lt;/p&gt;
&lt;p&gt;So I bought Gran Turismo 5 (GT5) a week ago, and I&amp;#8217;ve been playing it with every free minute I can get. I&amp;#8217;ve been a fan of the GT series since I bought GT3 back in 2003. So I&amp;#8217;ve been waiting for GT5 for a while now.&lt;/p&gt;
&lt;p&gt;I bought the standard edition (&amp;#8216;cause lets face it, a book of pictures, a wallet, a key ring, and a model car aren&amp;#8217;t worth the extra $250 the Collectors edition costs).&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s my experience so far and what I think of the game.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;When you get the game, and put it in for the first time, you&amp;#8217;ll be prompted to update the game. This will take a while depending on your internet connection. After that is complete and restarted, you&amp;#8217;ll need to wait an additional 30-60 minutes while it installs all the resources to the hard drive. The game takes a while to load anything with the resources installed, so I can&amp;#8217;t imagine how slow it must be when you try to load everything from the disk.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip: Install all the game resources to the PS3 HDD when you start the game. It&amp;#8217;s needed!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once everything is installed, and you setup your driver and the home screen, then you&amp;#8217;re good to go.&lt;/p&gt;
&lt;p&gt;The first thing I noticed was that the game is really designed for newer widescreen televisions. If you stuck on a 4:3 aspect (like myself) then you&amp;#8217;ll notice some of the game cut off on the left/right sides of the screen. Not much thankfully (about 1cm) but enough to cut of some menu buttons.&lt;/p&gt;
&lt;p&gt;Additionally, the text is very hard to read on 4:3. But thankfully, GT5 does have a handy zoom functionality. Without this zooming, you simply could get a clear enough view of a cars specs to tell apart 750BHP from 150BHP.&lt;/p&gt;
&lt;p&gt;First thing I did was dive into the Licenses and complete the B License. After that, have a go at completing as many Special events as possible, before starting A-Spec/B-Spec. While you could dive into them right away, I don&amp;#8217;t recommend it.&lt;/p&gt;
&lt;p&gt;You get required cars from the Special events which you need in A-Spec. Without them, you&amp;#8217;d have to purchase. As for B-Spec, the driver in training doesn&amp;#8217;t know how to cut corners, so he&amp;#8217;ll need some seriously fast cars, which isn&amp;#8217;t cheap, so best to get the A-Spec up to something around level 10 before starting B-Spec.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip: Complete Licenses and Special Events before starting A-Spec. When you reach A-Spec level 10, then start B-Spec.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Aside from being on the new cordless PS3 controllers, ingame doesn&amp;#8217;t feel much different from GT3, especially if you view it with no GUI or from the outside as you race. The new damage effects are available with standard cars, and not until you reach higher levels. Therefore, don&amp;#8217;t expect to see anything spectacular until you&amp;#8217;ve payed the game for a while.&lt;/p&gt;
&lt;p&gt;The menus and levels are nicely arranged, and the difficulties has a good progression (i.e. doesn&amp;#8217;t too hard too quick). Overall, a smooth playing experience.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Roundup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Nice design and attention to detail on the cars&lt;/li&gt;
&lt;li&gt;Smooth gameplay (easy -&amp;gt; medium -&amp;gt; difficult)&lt;/li&gt;
&lt;li&gt;Good variety (many cars, many maps, and multiple ways to earn money)&lt;/li&gt;
&lt;li&gt;The benefit of having cordless controllers.&lt;/li&gt;
&lt;li&gt;Updates to fix bugs and add new stuff, instead of waiting for GT6&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Slow loading and exiting of pretty much everything (maps &amp;amp; menus take ages to load into and quit from, even after having just been used, i.e. they&amp;#8217;re not stored in memory)&lt;/li&gt;
&lt;li&gt;Disabled damage effects until higher levels and for premium cars only (i.e. one of the games best features is limited to people who have essentially completed the game).&lt;/li&gt;
&lt;li&gt;Not all cars can be purchased when needed. Some races require cars which can&amp;#8217;t be bought from the dealer, and take several days before they show up in the used car dealership.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Missing:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The garage has infinite space. A nice feature would have been to have expandable garages.&lt;/li&gt;
&lt;li&gt;When you tweak your car, there is no option to upgrade the brakes anymore, but there is an option to tweak the existing ones, so it hasn&amp;#8217;t been completely forgotten.&lt;/li&gt;
&lt;li&gt;There is no cancel map load button. So if you went to the wrong map, and realize after it starts loading, you have to wait quite a while for it to load, then to quit, then to load the right map.&lt;/li&gt;
&lt;li&gt;The premium and used car dealerships display is awful. It works, but finding the car you want is not as easy as it should be. They need to add the same sorting controls from the garage into the dealerships.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Tips:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Need more speed? Change the oil of cars you race, especially for used cars. It&amp;#8217;ll give you up to 25BHP more depending on how old the oil is.&lt;/li&gt;
&lt;li&gt;Never sell a car you win, never use a paint you receive. Both of them, with large amounts collected, will earn you awards.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://k776.tumblr.com/post/2103541501</link><guid>http://k776.tumblr.com/post/2103541501</guid><pubDate>Sun, 05 Dec 2010 17:49:58 +1300</pubDate><category>game</category><category>gran turismo</category><category>ps3</category><category>playstation</category><category>sony</category><category>polyphony</category></item><item><title>How fast can your browser run? - Take 2</title><description>&lt;p&gt;&lt;strong&gt;TL:DR:&lt;/strong&gt; Google Chrome has pulled ahead of Webkit in terms of JS speed and feature completeness, however, it hasn&amp;#8217;t utilized the graphics card well enough on the Mac.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s been nearly five months since I &lt;a href="http://k776.tumblr.com/post/666030303/how-fast-can-your-browser-run"&gt;last did one of these&lt;/a&gt;. In that time, Chrome has gone from v6 to v8, Webkit has had close to 10,000 commits, and Minefield has gotten even closer to being released as Firefox 4.&lt;/p&gt;
&lt;p&gt;So I thought it was about time that I tested the latest versions of them again. This time around, I added a few additional tests. HTML 5 is quite a hot topic right now, so is rendering on the graphics card. So I&amp;#8217;ve added a few tests for that, to see how each is faring.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I used the same computer as I did for the tests 5 months ago (a macbook, 2.4&amp;#160;GHz Intel Core 2 Duo, with 2GB or 667 Mhz DDR2 SDRAM).&lt;/p&gt;
&lt;p&gt;Each test was run without any additional programs open, and only one instance/tab of the browser. Details about the individual tests can be found below.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lb2ni7CMqE1qz7w7p.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(1) &lt;a title="Acid3" href="http://acid3.acidtests.org/"&gt;Acid3&lt;/a&gt; - Test was run five times, and the best result picked&lt;br/&gt;(2) &lt;a href="http://beta.html5test.com/"&gt;HTML 5 Test&lt;/a&gt; - Test was run once&lt;br/&gt;(3) &lt;a href="http://www2.webkit.org/perf/sunspider-0.9.1/sunspider.html"&gt;Sunspider&lt;/a&gt; - Test was run five times, and the best result picked&lt;br/&gt;(4) &lt;a href="http://v8.googlecode.com/svn/data/benchmarks/v6/run.html"&gt;V8&lt;/a&gt; - Test was run five times, and the best result picked&lt;br/&gt;(5) &lt;a href="http://ie.microsoft.com/testdrive/Performance/FishIETank/Default.html"&gt;Fish Tank&lt;/a&gt; - Test was run once with one fish, and the lowest and highest frames per second recorded&lt;br/&gt;(6) &lt;a href="http://ie.microsoft.com/testdrive/Performance/SpeedReading/Default.html"&gt;Speed Reading&lt;/a&gt; - Test was run once, and the frames per second and average draw time recorded.&lt;br/&gt;(7) &lt;a href="http://ie.microsoft.com/testdrive/Performance/PsychedelicBrowsing/Default.html"&gt;Colour Wheel&lt;/a&gt; - Test was run once, and the resulting rounds per minute recorded.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Google Chrome and Webkit are no longer tied for first place. Google Chrome has pulled away into the lead, taking first place in five of the seven tests. It has however, not been able to take first place in the Speed Reading and Colour Wheel tests (and infact, got the worst score).&lt;/p&gt;
&lt;p&gt;Most browsers have full hardware rendering support on Windows, but when it comes to Mac, they haven&amp;#8217;t all implemented support for it yet. Hopefully by the next time I do another of these tests, one of the browsers will have implemented Mac support for it.&lt;/p&gt;
&lt;p&gt;Till then, if you&amp;#8217;re looking for something super quick for rendering pages and script, Google Chrome takes the cake!&lt;/p&gt;</description><link>http://k776.tumblr.com/post/1434497341</link><guid>http://k776.tumblr.com/post/1434497341</guid><pubDate>Sat, 30 Oct 2010 11:35:00 +1300</pubDate></item><item><title>How fast can your browser run?</title><description>&lt;p&gt;I wanted to see which browser has the latest and greatest in both rendering engine and javascript engine, so using three well known tests, I put the latest available browser versions for Mac to the test.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What was tested?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following browsers were tested:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://build.chromium.org/buildbot/snapshots"&gt;Chromium 6.0.426.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nightly.mozilla.org/"&gt;Minefield 20100604&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nightly.webkit.org/"&gt;Webkit r60724&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.opera.com/"&gt;Opera 10.54 build 8353&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;For those unaware, Chromium is the latest semi-stable version of Chrome, Minefield is Firefox&amp;#8217;s latest, and Webkit is Safari&amp;#8217;s latest. I couldn&amp;#8217;t find a development build of Opera, so used the latest available.&lt;/p&gt;
&lt;p&gt;For anyone impatient, I&amp;#8217;ll come right out and say it: &lt;strong&gt;Webkit and Chromium are tied.&lt;/strong&gt; Keep on reading to see how.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;&lt;strong&gt;How were the tests run?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not a scientist. I don&amp;#8217;t need untainted results, but I did follow some basic guidelines for each test.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;I used the same machine to test all four browsers. A Macbook, version 10.6.3, 2.4&amp;#160;GHz Intel Core 2 Duo, with 2&amp;#160;GB of 667&amp;#160;MHz DDR2 SDRAM.&lt;/li&gt;
&lt;li&gt;All programs on my machine were shutdown except the browser being tested.&lt;/li&gt;
&lt;li&gt;Each browser only ran one test at a time&lt;/li&gt;
&lt;li&gt;Each test was run five times and the best score picked from it&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://acid3.acidtests.org/"&gt;Acid 3 Test&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Webkit with 100/100 and 1.04s&lt;/li&gt;
&lt;li&gt;Chromium with 100/100 and 1.39s&lt;/li&gt;
&lt;li&gt;Opera with 100/100 and 1.67s&lt;/li&gt;
&lt;li&gt;Minefield with 97/100 and 1.56s &lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://www2.webkit.org/perf/sunspider-0.9.1/sunspider.html"&gt;Sunspider Test 0.9.1&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Webkit with 294.4ms&lt;/li&gt;
&lt;li&gt;Chromium with 334.9ms&lt;/li&gt;
&lt;li&gt;Opera with 426.6ms&lt;/li&gt;
&lt;li&gt;Minefield with 777.1ms &lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://v8.googlecode.com/svn/data/benchmarks/v5/run.html"&gt;V8 Benchmark v5&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Chromium with 5150&lt;/li&gt;
&lt;li&gt;Opera with 3020&lt;/li&gt;
&lt;li&gt;Webkit with 3020&lt;/li&gt;
&lt;li&gt;Minefield with 818 &lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If each place equaled 1 point, then you end up with:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Webkit and Chromium tied with 5 points&lt;/li&gt;
&lt;li&gt;Opera a close second with 8 points&lt;/li&gt;
&lt;li&gt;Minefield not even close, 12 points&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want a nice and fast browser, use Chrome or Safari when they get updated to what is currently in development.&lt;/p&gt;
&lt;p&gt;Minefield (eventually Firefox) has a long way to go with JS engine performance before it&amp;#8217;ll catch up, and full compliance of the Acid 3 tests might still be a fair way off (from what I hear, it may never be 100%, the developers don&amp;#8217;t find the last 3 points necessary features).&lt;/p&gt;
&lt;p&gt;I personally made the switch from Firefox to Chrome not too long ago and the speed difference, from loading Chrome to browsing websites, is notably faster in Chrome than it was in Firefox.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/666030303</link><guid>http://k776.tumblr.com/post/666030303</guid><pubDate>Sat, 05 Jun 2010 21:29:00 +1200</pubDate><category>browsers</category><category>testing</category><category>performance</category><category>speed</category></item><item><title>Migrating from Github to Gemcutter</title><description>&lt;p&gt;( cross-posted from &lt;a href="http://blog.katipo.co.nz"&gt;&lt;a href="http://blog.katipo.co.nz"&gt;http://blog.katipo.co.nz&lt;/a&gt;&lt;/a&gt; )&lt;/p&gt;
&lt;p&gt;For those of you who follow this sort of thing, &lt;a href="http://github.com/"&gt;Github&lt;/a&gt; shut down their gem building.  Thankfully, a newer and easier gem hoster, &lt;a href="http://gemcutter.org/"&gt;Gemcutter&lt;/a&gt;, appeared on the scene not  long before that happened. The idea behind it, for those who haven’t  heard of it, is that you manage your own gem building. Gemcutter doesn’t  wait for your Gem spec to change before it makes a new gem. You simply  build it locally, and push it to Gemcutter, using a handy gem they  provide that extends Rubygems ‘gem’ console command.&lt;/p&gt;
&lt;p&gt;But Github was building gems for some time, and due to it’s  continuing popularity, many well known Ruby on Rails developers and  companies switched permanently to Github for their gem building/hosting  at the time, so it’s likely that quite a few gems you’ve got installed  are from Github.&lt;/p&gt;
&lt;p&gt;To help transition over from Github to Gemcutter, &lt;a href="http://github.com/maxim"&gt;Maxim Chernyak&lt;/a&gt; wrote a great utility  called &lt;a href="http://github.com/maxim/off_github"&gt;off_github&lt;/a&gt;,  which looks at your list of gems, and tells you which ones you’re  installed from Github, and whether they can be reinstalled from  Gemcutter. It saves a lot of time and effort  than having to do it  manually. So here’s how to get started….&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Firstly, lets get the latest version of  Rubygems. This may not be needed for the off_github gem to function, but  it pays to keep this up to date to prevent any issues with newer gems.  Usually, you’ll want Rubygems version 1.3.0 or higher. At the time of  this post, the current version is 1.3.5.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$ gem –version&lt;br/&gt; 1.2.1&lt;br/&gt; $ [sudo] gem update –system&lt;br/&gt; ……&lt;br/&gt; $ gem –version&lt;br/&gt; 1.3.5&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once that’s done, install the off_github gem. To do that, add  Gemcutter as a source and run the gem install command.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$ gem sources -a &lt;a href="http://gemcutter.org"&gt;http://gemcutter.org&lt;/a&gt;&lt;br/&gt; $ [sudo] gem install off_github&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;Rubyforge gems now points to Gemcutter, so the  gem source adding isn’t technically needed to install off_github. That  said, the off_github gem still checks for the Gemcutter source (it’s a  bit outdated) and won’t work without it, so to get around it, install it  before running, and you can remove it afterwards.&lt;/p&gt;
&lt;p&gt;Now go ahead and run the off_github command. If you don’t use sudo to  install gems, then be sure to add –no-sudo the end.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$ off_github [&amp;#8212;no-sudo]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This’ll go ahead and return a list of gems that were installed from  Github, what there Gemcutter gem name is, and the action it’ll take on  that gem (usually reinstall). It’ll then ask you if you want to install.  Type ‘Y’, hit enter, and then choose y/n/a at each prompt.&lt;/p&gt;
&lt;p&gt;If everything went smoothly, you’re all done. You can now go ahead  and delete both the Github and Gemcutter sources.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$ gem sources -r &lt;a href="http://gems.github.com"&gt;http://gems.github.com&lt;/a&gt;&lt;br/&gt; $ gem sources -r &lt;a href="http://gemcutter.org"&gt;http://gemcutter.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So know, you should have Rubyforge as your only gem source.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$ gem sources&lt;br/&gt; *** CURRENT SOURCES ***&lt;br/&gt; &lt;a href="http://gems.rubyforge.org"&gt;http://gems.rubyforge.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Additional Material:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.katipo.co.nz/2010/01/19/migrating-from-github-to-gemcutter/#%20http://www.rubypulse.com/episode-0.16_off_github.html"&gt;&lt;a href="http://www.rubypulse.com/episode-0.16_off_github.html"&gt;http://www.rubypulse.com/episode-0.16_off_github.html&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.katipo.co.nz/2010/01/19/migrating-from-github-to-gemcutter/#%20http://www.rubypulse.com/episode-0.16.1_off_github_revisited.html"&gt;&lt;a href="http://www.rubypulse.com/episode-0.16.1_off_github_revisited.html"&gt;http://www.rubypulse.com/episode-0.16.1_off_github_revisited.html&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://k776.tumblr.com/post/345567055</link><guid>http://k776.tumblr.com/post/345567055</guid><pubDate>Thu, 21 Jan 2010 19:25:44 +1300</pubDate><category>ruby</category><category>ruby on rails</category><category>github</category><category>gemcutter</category></item><item><title>My Tools of the Trade</title><description>&lt;p&gt;A bunch of these posts going around. Thought I&amp;#8217;d chime in and list what using day to day. I&amp;#8217;ve swapped a lot of software recently with what I consider better software.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Not all of it is free. Same I bought on their own, others I got as part of a bundle (like MacHeist). There are free ones out there, but these are the ones I chose and work with.&lt;/p&gt;
&lt;h3&gt;Hardware&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Computer&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;13&amp;#8221; Macbook (late 2008)&lt;br/&gt;Snow Leopard, 10.6.1&lt;br/&gt;2.4&amp;#160;GHz Intel Core 2 Duo with 2&amp;#160;GB of RAM&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Peripherals&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Apple Keyboard, USB connected, full size (with numeric keypad)&lt;br/&gt;Dell Laser Mouse w/ Scroll wheel (I never liked the Mac mouse)&lt;br/&gt;Cheap white earbuds (they block out external sound rather well)&lt;br/&gt;20&amp;#8221; Chimera LCD Monitor via MiniDV to HDMI adapter&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Backup&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;500&amp;#160;GB Seagate External HDD via Firewire&lt;/p&gt;
&lt;h3&gt;Software&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;On The Dock&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/firefox"&gt;Firefox&lt;/a&gt; - My primary browser. Using Chromifox Theme, along with the following active extensions (I have a bunch more disabled that I won&amp;#8217;t list):       
&lt;ul&gt;&lt;li&gt;&lt;a href="http://adblockplus.org/en/"&gt;Adblock Plus&lt;/a&gt; - Block those pesky online advertisements&lt;/li&gt;
&lt;li&gt;&lt;a href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt; - Debug html, css, or javascript issues on your website&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.greasespot.net/"&gt;Greasemonkey&lt;/a&gt; - Improve sites via javascript, e.g. &lt;a href="http://userscripts.org/scripts/show/40617"&gt;troynt&amp;#8217;s twitter script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://chrispederick.com/work/web-developer/"&gt;Web Developer Toolbar&lt;/a&gt; - Inspect various things about a website quickly&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.xmarks.com/"&gt;Xmarks&lt;/a&gt; - Sync your bookmarks and password accross computers and browsers quickly and easily&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.grumlapp.com/"&gt;Gruml&lt;/a&gt; - Desktop application to sync and view feeds managed by Google Reader.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.realmacsoftware.com/socialite/"&gt;Socialite&lt;/a&gt; - Formerly EventBox, originally got this as part of the MacHeist bundle, beats other twitter apps for the features I need.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.potionfactory.com/thehitlist/"&gt;The Hit List&lt;/a&gt; - Very neat little todo list. Again, got this as part of the MacHeist bundle, which is good, cause the price point it a little high.&lt;/li&gt;
&lt;li&gt;Mail - Apples default Email client. I&amp;#8217;ll likely switch to Thunderbird 3 when it&amp;#8217;s released, but for now, Mail does the trick.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://adium.im"&gt;Adium&lt;/a&gt; - Best IM client for Mac I&amp;#8217;ve found thus far. The &lt;a href="http://beta.adium.im"&gt;latest beta&lt;/a&gt; includes IRC support, so I&amp;#8217;ve been able to do away with &lt;a href="http://colloquy.info/"&gt;Colloquy&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Terminal - The center of all development.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;b&gt;On The Menu Bar&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://vibealicious.com/apps/notify/"&gt;Notify&lt;/a&gt; - A very handy app for monitoring your Gmail inbox. Far exceeds Google Notifier.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lightheadsw.com/caffeine/"&gt;Caffeine&lt;/a&gt; - Great when you need your screen to stay lit up for long periods of time, without going dim or into sleep mode.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver"&gt;Quicksilver&lt;/a&gt; - Does the trick, but lately it&amp;#8217;s been kind of slow, and buggy. So have been looking for a replacement. &lt;a href="http://amarsagoo.info/namely/"&gt;Namely&lt;/a&gt; seems to do the trick, but can&amp;#8217;t be removed from the dock but remain active. So won&amp;#8217;t switch yet (I like to keep the dock small).&lt;/li&gt;
&lt;li&gt;&lt;a href="http://skitch.com/"&gt;Skitch&lt;/a&gt; - Create screenshots, annotate them, and share them with other.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.islayer.com/apps/istatmenus/"&gt;iStat Menus&lt;/a&gt; - A really simple way to get constant info on computer temperature, cpu usage, memory usage, and hard drive space. I prefer the simple menu bar ones, but others might like the &lt;a href="http://www.islayer.com/apps/istatnano/"&gt;iStat nano version&lt;/a&gt; or the more detailed &lt;a href="http://www.islayer.com/apps/istatpro/"&gt;iStat Pro version&lt;/a&gt;. I also used it to replace my clock, which has the nice benefit of having a calendar available now.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Other Applications&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://flyingmeat.com/acorn/"&gt;Acorn&lt;/a&gt; - My tool of choice for image editing. Not super powerful, and stuck on the old 1.x version (2.0 has been released), but gets the job done for some basic image work.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/?C=M;O=D"&gt;Chromium&lt;/a&gt;, &lt;a href="http://www.apple.com/safari/"&gt;Safari&lt;/a&gt;, and &lt;a href="http://www.opera.com/browser/"&gt;Opera&lt;/a&gt; as testing browsers (I use Firefox as my main development and surfing browser though).&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.apple.com/itunes"&gt;iTunes&lt;/a&gt; - I&amp;#8217;m a big podcast/screencast watcher, and enjoy listening to online radio too. iTunes is great for both :-D&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.openoffice.org/"&gt;OpenOffice&lt;/a&gt; - Which Mac user doesn&amp;#8217;t have this? &lt;/li&gt;
&lt;li&gt;Screen Sharing - Not sure how many people know (I didn&amp;#8217;t), but Apple has a fully functional screen sharing app available, but not in /Applications. You&amp;#8217;ll find it at &amp;#8220;/System/Library/CoreServices/Screen Sharing.app&amp;#8221;. Copy it to /Applications and you&amp;#8217;re good to go.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sequelpro.com/"&gt;Sequel Pro&lt;/a&gt; - I know how to use mysql command line enough to get basic operations done, but I miss the GUI. So I found Sequel Pro. I use the &lt;a href="http://nightly.sequelpro.com/"&gt;nightly builds&lt;/a&gt;, which has some nice stable ssh support, through which I&amp;#8217;ve connected to one of the servers at work.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt; - Editor for everything web related. Looking forward to TextMate v2.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wakaba.c3.cx/s/apps/unarchiver.html"&gt;The Unarchiver&lt;/a&gt; - Great utility for uncompressing various formats like .zip, .tar.gz, .tar.bz2, and .7zip&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; - I don&amp;#8217;t see why I need to pay for a virtual machine like parallels when free ones work just as well.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Online&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://gmail.com"&gt;Gmail&lt;/a&gt; - Who doesn&amp;#8217;t use this?&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tumblr.com"&gt;Tumblr&lt;/a&gt; - You are here :-D&lt;/li&gt;
&lt;/ul&gt;</description><link>http://k776.tumblr.com/post/223583383</link><guid>http://k776.tumblr.com/post/223583383</guid><pubDate>Mon, 26 Oct 2009 19:28:00 +1300</pubDate></item><item><title>Re-resizing images with attachment_fu</title><description>&lt;p&gt;The application I work on (&lt;a href="http://kete.net.nz"&gt;http://kete.net.nz&lt;/a&gt;) has an image sizes sysem setting that allows site administrators to changes the resized dimensions when someone uploads a photo. But we ran into case where someone drastically changes the dimensions after already adding several hundred photos. Can&amp;#8217;t upload them all again!&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;So we wrote a rake task. It goes through the image files table, getting the parent images (originals). It then checks the resized image dimensions against the image sizes setting. If one has changed, resize it based on the original. If one is missing, create it based on the original.&lt;/p&gt;
&lt;p&gt;Combined with a small hack to attachment_fu plugin (&lt;a href="http://github.com/KieranP/attachment_fu/commit/47437d668f8cab945a5b71465611ba65de362ea8"&gt;http://github.com/KieranP/attachment_fu/commit/47437d668f8cab945a5b71465611ba65de362ea8&lt;/a&gt;), getting the rake task running was a fairly painless task.&lt;/p&gt;
&lt;p&gt;You can see the task at &lt;a href="http://github.com/kete/kete/blob/1-3-prep-work/lib/tasks/tools.rake#L61-197"&gt;http://github.com/kete/kete/blob/1-3-prep-work/lib/tasks/tools.rake#L61-197&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A fair bit of it comments and logging. The keys parts are the two private methods:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;image_file_match_image_size?&lt;/li&gt;
&lt;li&gt;resize_image_from_original&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Both are pretty self-explainitory. The first checks if an existing size setting exists, and the other takes an image file object, and a original file path and does the magic using attachment_fu methods available to us.&lt;/p&gt;
&lt;p&gt;Now whenever we change image sizes, we can run this rake task to resize all images previously uploaded to keep things consistant. Simple and easy!&lt;/p&gt;</description><link>http://k776.tumblr.com/post/136144169</link><guid>http://k776.tumblr.com/post/136144169</guid><pubDate>Mon, 06 Jul 2009 14:31:00 +1200</pubDate><category>attachment_fu</category><category>resizing</category><category>images</category><category>kete</category><category>development</category></item><item><title>Getting Internet Explorer 8 on the Mac (or any other OS)</title><description>&lt;p&gt;While developing &lt;a href="http://kete.net.nz"&gt;Kete&lt;/a&gt;, maintaining cross browser compatibility is a concern for us. We need to make sure that the site runs the same on &lt;a href="http://www.microsoft.com/windows/ie/ie6/default.mspx"&gt;Internet Explorer 6&lt;/a&gt;, &lt;a href="http://www.microsoft.com/windows/ie/ie7/default.mspx"&gt;Internet Explorer 7&lt;/a&gt;, &lt;a href="http://www.mozilla.com/en-US/firefox/"&gt;Firefox 3&lt;/a&gt;, and &lt;a href="http://www.apple.com/safari/"&gt;Safari 4&lt;/a&gt;. As anyone who has tried can tell you, testing with Internet Explorer on a non Windows machine is not easy, but there is a way!&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;The Mozilla developers do an excellent job at making Firefox available on nearly every OS. If it doesn&amp;#8217;t exists, someone can compile it. However, for Linux/Mac users we can&amp;#8217;t get much else. Unlike Apple, who at least offer Safari 4 on Windows, Microsoft doesn&amp;#8217;t support IE 8 on Mac OS X or Linux.&lt;/p&gt;
&lt;p&gt;This makes browser testing for web developers trickier, and usually means having to get a windows computer or ask someone with one to test a site for you. However, just because IE isn&amp;#8217;t natively available, it doesn&amp;#8217;t mean you can&amp;#8217;t use your computer for IE testing at all though.&lt;/p&gt;
&lt;p&gt;Using a handy virtualization program called &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;, and Microsofts recent &lt;a href="http://www.microsoft.com/windows/windows-7/download.aspx"&gt;Windows 7 release candidate&lt;/a&gt;, you can have IE8 on your Mac, or IE8 and S4 on your Linux installation, until June 1st 2010 free of charge.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note 1:&lt;/b&gt; You will need a Mac with atleast 2gig of RAM or more, and 128mb of graphics RAM or more. Any less, and the operating system will be unusably slow. It also isn&amp;#8217;t great at testing flash or shockwave based sites. But its perfect for standard XHTML rendering.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note 2:&lt;/b&gt; A program for Windows XP, titled &lt;a href="http://tredosoft.com/Multiple_IE"&gt;Multiple IE&lt;/a&gt;, by TredoSoft, is not currently available for Windows 7. So you still won&amp;#8217;t be able to access IE6/IE7 easily just yet. However, sources (&lt;a href="http://news.cnet.com/8301-13860_3-10218185-56.html"&gt;cnet&lt;/a&gt;, &lt;a href="http://voices.washingtonpost.com/securityfix/2009/04/microsoft_pushing_out_ie8_thro.html"&gt;washington post&lt;/a&gt;, and more) state that Microsoft will be pushing IE8 as an update for Windows XP/Vista through auto update, rather than an optional update approach they took for IE7 when it was released. So if your site works with IE8, it should hopefully be good for a majority of computers within 3-6 months.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Step 1 - Download VirtualBox&lt;br/&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Install &lt;a href="http://www.virtualbox.org/wiki/Downloads"&gt;VirtualBox&lt;/a&gt; (VBox). If there isn&amp;#8217;t a version available for your operating system, then you might try one of the alternatives like VMWare, however, the rest of this post details instructions for VBox. Installation requires root priveledges.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Step 2 - Download Windows 7&lt;br/&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Get a Microsoft passport (if you have a hotmail account, or use MSN, you already have one). Then select the type of &lt;a href="http://www.microsoft.com/windows/windows-7/download.aspx"&gt;download&lt;/a&gt; you want (I&amp;#8217;m using the 32bit english version). You&amp;#8217;ll be prompted to login to your Microsoft Passport account. Once you&amp;#8217;ve done that, copy the product key and save it to your computer, or print it off. You will need it later. Then select &amp;#8216;Download Now&amp;#8217;.&lt;/p&gt;
&lt;p&gt;The download is about 2.36GB, and took about 35 minutes on my connection using Folx, a Mac download manager.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Step 3 - Configure VirtualBox for Windows 7&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If you haven&amp;#8217;t yet, read the VBox documentation. Create a new Virtual Machine (VM), with a new Virtual Hard Disk (VDH), add your Windows 7 ISO file to Vbox, and then configure your new VM to boot from that ISO. Before you start your virtual machine, the configuration should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://13.media.tumblr.com/9YZEmpsl7n7xgu09g0dpKgeOo1_400.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;img src="http://18.media.tumblr.com/9YZEmpsl7n7xic6cFWZEUHj9o1_500.png"/&gt;&lt;br/&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Step 4 - Setup Windows 7&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not going to explain step by step because it guides you through the process. Basically, when you load up, select your settings, choose a partition and it&amp;#8217;ll install (with a few restarts in between). Fill in some login details afterwards and your in.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Other Steps&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Not quite done. You&amp;#8217;ll need to install an anti virus. I recommend &lt;a href="http://free.avg.com"&gt;http://free.avg.com&lt;/a&gt; . Update it regularly. Update windows by typing &amp;#8216;Windows Update&amp;#8217; into the start bar. And install guest additions. Consult VBox documentation for that. Doing do will make the OS faster, allow full screen usage, and allow you mouse to go from the Mac to Windows and back without needing to focus on or the other.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Questions?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If you have any issues/suggestions, post a comment.&lt;b&gt;&lt;br/&gt;&lt;/b&gt;&lt;/p&gt;</description><link>http://k776.tumblr.com/post/104889294</link><guid>http://k776.tumblr.com/post/104889294</guid><pubDate>Fri, 08 May 2009 16:32:00 +1200</pubDate><category>windows 7</category><category>development</category><category>internet explorer</category><category>browser testing</category><category>virtualbox</category><category>virtualization</category><category>web development</category></item><item><title>Final configuration for my windows 7 VM before installing.</title><description>&lt;img src="http://24.media.tumblr.com/9YZEmpsl7n7xic6cFWZEUHj9o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Final configuration for my windows 7 VM before installing.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/104886970</link><guid>http://k776.tumblr.com/post/104886970</guid><pubDate>Fri, 08 May 2009 16:25:39 +1200</pubDate></item><item><title>Settings for my Windows 7 VM.</title><description>&lt;img src="http://24.media.tumblr.com/9YZEmpsl7n7xgu09g0dpKgeOo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Settings for my Windows 7 VM.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/104886529</link><guid>http://k776.tumblr.com/post/104886529</guid><pubDate>Fri, 08 May 2009 16:24:29 +1200</pubDate></item><item><title>Spotlight, Quicksilver, or Google Desktop?</title><description>&lt;p&gt;Lately I&amp;#8217;ve been trying out various application launchers for my new Macbook. For a long time, I&amp;#8217;ve used Spotlight, the Mac&amp;#8217;s build in &amp;#8216;searcher&amp;#8217;. But after a bit of searching, I found two other contenders. Quicksilver and Google Desktop.&lt;br/&gt;&lt;br/&gt;But I&amp;#8217;m wondering what other people use&amp;#8230; perhaps there is a neat app that combines the arithmetic functions of Spotlight (running &amp;#8216;5*10&amp;#8217; in spot light for example), the multi-action capability of Quicksilver (open with, move to trash, rename etc), and the GUI/Speed of Google Desktop.&lt;br/&gt;&lt;br/&gt;If you know of one, do let me know in the comments.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95570094</link><guid>http://k776.tumblr.com/post/95570094</guid><pubDate>Mon, 13 Apr 2009 11:44:47 +1200</pubDate><category>files, google desktop, macbook, quicksilver, search, spotlight</category></item><item><title>Capistrano Configuration - My first gem</title><description>&lt;p&gt;For my work, we needed an easy way of configuring sites per deployment, but didn&amp;#8217;t want the hassle of multiple yml files to manage. We needed an easy to use ruby syntax that didn&amp;#8217;t require much more than including the code and writing the configurations. So, we created&amp;#8230;.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;&lt;a href="http://github.com/kete/capistrano-configuration"&gt;Capistrano Configuration&lt;/a&gt;. I wrote the code in a lib file and decided to move it to a gem so that others could benefit from it. It&amp;#8217;s especially useful when you have multistage deployments from the same repository, because you can define configurations per deployment.&lt;br/&gt;&lt;br/&gt;You can grab the source by running:&lt;/p&gt;
&lt;blockquote&gt;sudo gem install kete-capistrano-configuration&lt;/blockquote&gt;
&lt;p&gt;&lt;br/&gt;Then in your config/deploy.rb or config/deploy/production.rb files, add something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;require 'capistrano-configuration'&lt;br/&gt;configure :database do&lt;br/&gt;  environment 'development' do&lt;br/&gt;    config 'username', 'app'&lt;br/&gt;    config 'password', 'secret'&lt;br/&gt;  end&lt;br/&gt;  environment 'production' do&lt;br/&gt;    config 'username', 'app_production'&lt;br/&gt;    config 'password', 'secret_production'&lt;br/&gt;  end&lt;br/&gt;end&lt;br/&gt;configure :google_map_key do&lt;br/&gt;  config 'map_key', 'u232398b208x9830x30xb383'&lt;br/&gt;end&lt;br/&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Simple aye? If you have any suggestions, let me know on my &lt;a href="http://github.com/inbox/new/KieranP"&gt;Github account&lt;/a&gt;.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569993</link><guid>http://k776.tumblr.com/post/95569993</guid><pubDate>Mon, 13 Apr 2009 11:44:00 +1200</pubDate><category>capistrano, capistrano-configuration, gems, rails, ruby, work</category></item><item><title>Phusion Passenger and Ruby Enterprise Edition Supporter</title><description>&lt;p&gt;So I finally decided to donate to a project on the web, and I chose two to start with. Firstly, Phusion Passenger. They&amp;#8217;ve done some awesome work, making Ruby on Rails websites much easier to deploy, and run with less memory. Secondly, Ruby Enterprise Edition. It&amp;#8217;s made by the same people as Phusion Passenger. I&amp;#8217;ve used it for some time too, and it&amp;#8217;s much easier to install, upgrade, and manage than any other ruby implementation I&amp;#8217;ve looked at. Another excellent project.&lt;br/&gt;&lt;br/&gt;Got a neat little Phusion Passenger Special Edition logo too.&lt;br/&gt;&lt;br/&gt;Keep up the great work guys!&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569730</link><guid>http://k776.tumblr.com/post/95569730</guid><pubDate>Mon, 13 Apr 2009 11:43:03 +1200</pubDate><category>donation, mod_rails, open source, phusion passenger, ree, ruby enterprise edition</category></item><item><title>System Wide Capistrano Colorization</title><description>&lt;p&gt;I recently discovered the handy little gem &lt;a href="http://github.com/stjernstrom/capistrano_colors/"&gt;capistrano_colors&lt;/a&gt;. It adds color to your capistrano deployment, which makes it easier to spot where things went wrong. But the problem was that it required a change to the deploy.rb code, which meant that if you used it, everyone who deployed the code needed it to. What if you wanted it without adding the new dependancy for everyone?&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Well the first way I thought of was to edit the capistrano gem, and ass the necessary require line to the end of lib/capistrano.rb, but this wasn&amp;#8217;t ideal because if you update the gem, you&amp;#8217;d have to re-add that line each time.&lt;br/&gt;&lt;br/&gt;Well, with the help from the capistrano_colors author (&lt;a href="http://github.com/stjernstrom"&gt;Mathias&lt;/a&gt;), system wise capistrano colorization is now possible, without editing a single deploy.rb file. The solution lies with Capistrano. When you run a capistrano task, after it&amp;#8217;s finished initializing, it then loads up ~/caprc. How does this help us?&lt;br/&gt;&lt;br/&gt;Very simple actually. Instread of adding the require line into deploy.rb, add the same line to ~/.caprc, and you&amp;#8217;re done. Colorized output, without the hassel of dependancies, or upgrading reseting it.&lt;br/&gt;&lt;br/&gt;Thanks for the help on this &lt;a href="http://github.com/stjernstrom"&gt;Mathias&lt;/a&gt;. Has made things so much eaiser now.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Edit:&lt;/b&gt; &lt;a href="http://github.com/stjernstrom"&gt;Mathias&lt;/a&gt; has updated his plugin to include customizable filters, for hiding certain messages that come from deployments. He&amp;#8217;s also updated the README to include the .caprc trick mentioned above.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569885</link><guid>http://k776.tumblr.com/post/95569885</guid><pubDate>Mon, 13 Apr 2009 11:43:00 +1200</pubDate><category>capistrano, capistrano_colors, deployments, gems</category></item><item><title>Unintuitive Ruby feature... or is it?</title><description>&lt;p&gt;The fact that ruby variables reference objects was one of the first things I read about in the differences between PHP and Ruby, but over time, not having actually run into problems, recently this fact took me by surprise so I thought I&amp;#8217;d share my thoughts.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Take this code sample for example:&lt;/p&gt;
&lt;blockquote&gt;&amp;#187; a1 = %w{ 1&amp;#160;2 3 }&lt;br/&gt;&amp;#187; a2 = a1&lt;br/&gt;&amp;#187; a1 = %w{ 4&amp;#160;5 6 }&lt;br/&gt;&amp;#187; puts a1.inspect&lt;br/&gt;[&amp;#8220;4&amp;#8221;, &amp;#8220;5&amp;#8221;, &amp;#8220;6&amp;#8221;]&lt;br/&gt;&amp;#187; puts a2.inspect&lt;br/&gt;[&amp;#8220;1&amp;#8221;, &amp;#8220;2&amp;#8221;, &amp;#8220;3&amp;#8221;]&lt;br/&gt;&lt;/blockquote&gt;
&lt;p&gt;As you can see, the code would seem to indicate that a1 and a2 are separate, and working as you&amp;#8217;d expect (making a copy of the a1 and assigning it to a2). But then take this code for example:&lt;/p&gt;
&lt;blockquote&gt;&amp;#187; a1 = %w{ 1&amp;#160;2 3 }&lt;br/&gt;&amp;#187; a2 = a1&lt;br/&gt;&amp;#187; a1.delete(&amp;#8216;1&amp;#8217;)&lt;br/&gt;&amp;#187; puts a1.inspect&lt;br/&gt;[&amp;#8220;2&amp;#8221;, &amp;#8220;3&amp;#8221;]&lt;br/&gt;&amp;#187; puts a2.inspect&lt;br/&gt;[&amp;#8220;2&amp;#8221;, &amp;#8220;3&amp;#8221;]&lt;br/&gt;&lt;/blockquote&gt;
&lt;p&gt;As you can, a2 was affected by the change to a1. Why? Well it&amp;#8217;s those references I mentioned at the beginning of the post. When you use an assignment (=), it makes a new object and makes that variable reference it, but when you run methods on a1 (like delete), it doesn&amp;#8217;t delete from the variable, but from the object it references, which a2 is also referencing at that point.&lt;br/&gt;&lt;br/&gt;Now the fix for this is quite simple. Instead of just&lt;/p&gt;
&lt;blockquote&gt;a2 = a1&lt;/blockquote&gt;
&lt;p&gt;you replace it with&lt;/p&gt;
&lt;blockquote&gt;a2 = a1.dup&lt;/blockquote&gt;
&lt;p&gt;which works exactly the same way as before, but it points a2 at a new object (a duplicate of a1), rather than making a2 point at an existing object. This is pretty common stuff (anyone using Ruby for a period of time has come across this and knows how it works). But is it really intuitive?&lt;br/&gt;&lt;br/&gt;Wouldn&amp;#8217;t it make more sense to create duplicates by default and create a new a2 = a1.ref type syntax? Afterall, if someone wanted to call a reference, they might as well just call the original (I cannot think of any logical reason to have duplicate variables pointing to the same thing).&lt;br/&gt;&lt;br/&gt;Or perhaps, if references were to stay the default, changing the implementation so that any write actions happen on a copy of it, but read actions happen on the original?&lt;br/&gt;&lt;br/&gt;Any thoughts?&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569622</link><guid>http://k776.tumblr.com/post/95569622</guid><pubDate>Mon, 13 Apr 2009 11:42:00 +1200</pubDate><category>discussion, issues, references, ruby</category></item><item><title>Search for the best Integration testing</title><description>&lt;p&gt;When you make a Rails application, there are some things unit and functional tests just can&amp;#8217;t test. Like if something actually works in practice, or if caching is working the way it should. If you don&amp;#8217;t test these, you can get run into a lot of problems, especially if that code is an application installed in multiple places. And it can be a pain to make sure code you add works as intended before a release (if could take you hours to test). So how do you get around this?&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Well one way is using a service called &lt;a href="http://seleniumhq.org/projects/remote-control/"&gt;Selenium RC&lt;/a&gt;, combined with Test::Unit style scripts. Selenium opens a browser, and runs a series of actions you define in your tests. And this can be quite handy for things like JS/AJAX forms. But what if you don&amp;#8217;t need that? The whole process of loading a browser just to test the login is working, or that a cache is removed when something is updated doesn&amp;#8217;t need the features of a browser. So what do you use?&lt;br/&gt;&lt;br/&gt;Well myself and my work colleagues recently started using an integration system called &lt;a href="http://github.com/brynary/webrat/"&gt;Webrat&lt;/a&gt;, and it&amp;#8217;s worked out really well. Combined with a &lt;a href="http://github.com/kete/kete/tree/master/test/integration/integration_test_helper.rb"&gt;custom test helper&lt;/a&gt;, which provides various custom methods, and alongside gems like &lt;a href="http://www.thoughtbot.com/projects/shoulda/"&gt;shoulda&lt;/a&gt; and &lt;a href="http://www.thoughtbot.com/projects/factory_girl/"&gt;factory-girl&lt;/a&gt;, we have written a series of integration tests that are both small in size, and fastest to run (currently 5.5mins) compared to similar tests with Selenium or by testing this stuff by hand. And what&amp;#8217;s more, once you have the gems in place, it&amp;#8217;s a simple rake test:integration call to run them. No browser configuration or starting up the &lt;a href="http://seleniumhq.org/projects/remote-control/"&gt;Selenium RC&lt;/a&gt; server. There is however Selenium built into the &lt;a href="http://github.com/brynary/webrat/"&gt;Webrat&lt;/a&gt; gem, so if you need to do JavaScript testing, it&amp;#8217;s not hard to.&lt;br/&gt;&lt;br/&gt;Writing tests using &lt;a href="http://github.com/brynary/webrat/"&gt;Webrat&lt;/a&gt; has made writing tests fun (not tiresome) and I look forward to writing more of them in the future. I even wrote a neat (in my opinion anyway) &lt;a href="http://github.com/kete/kete/tree/master/test/integration/integration_test_helper.rb#L456-505"&gt;method_missing definition&lt;/a&gt; that allows a bunch of different method calls to create users with permissions, or to setup new items, and some neat application specific item creation methods.&lt;br/&gt;&lt;br/&gt;Our entire integration test setup is contained within the &lt;a href="http://github.com/kete/kete/tree/master/test/integration/"&gt;test/integration&lt;/a&gt; folder, so feel free to check it out, particularly the &lt;a href="http://github.com/kete/kete/tree/master/test/integration/integration_test_helper.rb"&gt;integration_test_helper.rb&lt;/a&gt; and &lt;a href="http://github.com/kete/kete/tree/master/test/integration/caching_test.rb"&gt;caching_test.rb&lt;/a&gt; (which demonstrates most of the code).&lt;br/&gt;&lt;br/&gt;I&amp;#8217;m interested to hear how others have approached the problem though. How do you test you caching? How do you test AJAX functionality? Post in the comments.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569341</link><guid>http://k776.tumblr.com/post/95569341</guid><pubDate>Mon, 13 Apr 2009 11:41:00 +1200</pubDate><category>caching, integration, selenium, testing, webrat</category></item><item><title>Collection of helpful alias methods</title><description>&lt;p&gt;There was a blog post recently by the guys/gals at Thoughtbot which showed several &lt;a href="http://giantrobots.thoughtbot.com/2008/12/23/script-console-tips"&gt;irb &amp;amp; script/console tips&lt;/a&gt; to make development easier. I&amp;#8217;ve been using them, and the SQL in script/console alone is worth the few minutes of setup. But I went ahead and created some more alias&amp;#8217;s in my .profile file, which I thought some of you might like or already have. They make development just a little bit faster.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;blockquote&gt;# LS&lt;br/&gt;alias ls=&amp;#8221;ls -G&amp;#8221;&lt;br/&gt;alias la=&amp;#8221;ls -la&amp;#8221;&lt;br/&gt;&lt;br/&gt;# RM (to rm -rf)&lt;br/&gt;alias rm=&amp;#8221;rm -rf&amp;#8221;&lt;br/&gt;&lt;br/&gt;# APACHE2&lt;br/&gt;alias apache_stop=&amp;#8217;sudo apachectl stop&amp;#8217;&lt;br/&gt;alias apache_start=&amp;#8217;sudo apachectl start&amp;#8217;&lt;br/&gt;alias apache_restart=&amp;#8217;apache_stop &amp;amp;amp;&amp;amp;amp; apache_start&amp;#8217;&lt;br/&gt;alias ra=&amp;#8217;apache_restart&amp;#8217;&lt;br/&gt;&lt;br/&gt;# MYSQL&lt;br/&gt;alias mysql_stop=&amp;#8217;sudo launchctl stop org.macports.mysql5&amp;#8217;&lt;br/&gt;alias mysql_start=&amp;#8217;sudo launchctl stop org.macports.mysql5&amp;#8217;&lt;br/&gt;alias mysql_restart=&amp;#8217;mysql_stop &amp;amp;amp;&amp;amp;amp; mysql_start&amp;#8217;&lt;br/&gt;&lt;br/&gt;# APACHE SITES&lt;br/&gt;alias hosts=&amp;#8217;mate /etc/hosts&amp;#8217;&lt;br/&gt;alias hosts_users=&amp;#8217;mate /private/etc/apache2/users/rails.conf&amp;#8217;&lt;br/&gt;alias hosts_passenger=&amp;#8217;mate /private/etc/apache2/extra/passenger.conf&amp;#8217;&lt;br/&gt;&lt;br/&gt;# PASSENGER SITES&lt;br/&gt;alias rr=&amp;#8217;touch tmp/restart.txt&amp;#8217;&lt;br/&gt;alias show_logs=&amp;#8217;cd /private/var/log/apache2/ &amp;amp;amp;&amp;amp;amp; ls -la&amp;#8217;&lt;br/&gt;alias clear_logs=&amp;#8217;sudo rm -rf /private/var/log/apache2/*_log &amp;amp;amp;&amp;amp;amp; sudo rm -rf /private/var/log/apache2/*.log &amp;amp;amp;&amp;amp;amp; apache_restart&amp;#8217;&lt;br/&gt;&lt;br/&gt;# RAILS APPLICATIONS&lt;br/&gt;alias sc=&amp;#8217;script/console&amp;#8217;&lt;br/&gt;alias ss=&amp;#8217;script/server&amp;#8217;&lt;br/&gt;alias bgrb_stop=&amp;#8217;script/backgroundrb stop&amp;#8217;&lt;br/&gt;alias bgrb_start=&amp;#8217;script/backgroundrb start&amp;#8217;&lt;br/&gt;alias bgrb_restart=&amp;#8217;bgrb_stop &amp;amp;amp;&amp;amp;amp; bgrb_start&amp;#8217;&lt;br/&gt;&lt;br/&gt;# APPLICATION TESTING&lt;br/&gt;alias test_all=&amp;#8217;rake test&amp;#8217;&lt;br/&gt;alias test_units=&amp;#8217;rake test:units&amp;#8217;&lt;br/&gt;alias test_functionals=&amp;#8217;rake test:functionals&amp;#8217;&lt;br/&gt;alias test_integration=&amp;#8217;rake test:integration&amp;#8217;&lt;/blockquote&gt;
&lt;p&gt;What other tips / tricks do you have? Got a killer alias? Please post in the comments.&lt;/p&gt;</description><link>http://k776.tumblr.com/post/95569141</link><guid>http://k776.tumblr.com/post/95569141</guid><pubDate>Mon, 13 Apr 2009 11:40:00 +1200</pubDate><category>console, development, irb, rails, tips</category></item></channel></rss>
