Recent Links feed
- There are no links.
© Copyright Zach Inglis 2009
I have just redesigned my portfolio. I try to keep my portfolio a proper reflection of my skills.
Click to see. Please enjoy :)
My resume is now online! I am available for permanent and contract work and am more than willing to relocate.
This is just a note to say that I am still here. I have been working on some personal stuff including bettering my photography. Above is one of my pictures :)
Below are some links to find me…
Twitter - Smart Captcha
When signing up, if you enter the captcha correctly but there is an error on the form, you do not need to enter it again.
I lost my feed when MediaTemple rudely shut my blog down and I moved to Tumblr. I have just managed to claim my Feedburner URL again, so thanks to the few that stuck around.
I was randomly assigned a group of Rails Rumble entries to judge this year. I’d like to call out my favourites of the ones I’ve judged. I’m looking forward to seeing the full list after I judge.
In no perticular order, my favourites are:
So after doing having the great honour of doing the preliminary design for Rails Rumble, It has just been announced that I am joining some amazing people and judging Rails Rumble aswell. It’s a great privallage and I look forward to judging your apps.
This is a very small tip aimed for people to clean up their code-base and remove some of the double negatives.
Often I shall see:
unless @user.nil?
The issue with this is approach is that unless is harder to read than if, then you have to mentally process the #nil?
The other approach is:
if @user
However, for a lot of people this is not explicit enough. I find that too few know about #present? method
if @user.present?
#present? is literally the opposite of #blank? and thus checks if it is not nil? or if it is not empty?
Hopefully with this small tidbit of knowledge, you can clean up your code and make it easier to read.
I’ve had a lot of issues trying to deploy ThinkingSphinx with Capistrano. This has been for a multitude of reasons. The following is my recipe for deploying and hopefully making it public will make a few peoples lives easier.
This assumes you are using the plugin, not the gem.
In your deploy.rb, add the following at the top:
require 'vendor/plugins/thinking-sphinx/lib/thinking_sphinx/deploy/capistrano'
Then, at the bottom add this:
before "deploy:rollback:revision", "thinking_sphinx:stop_gracefully"
namespace :thinking_sphinx do
after "deploy:default", "thinking_sphinx:symlink"
after "deploy:default", "thinking_sphinx:ready"
task :stop_gracefully do
begin
thinking_sphinx.stop
rescue
puts "ThinkingSphinx is not running. No stop required."
end
end
desc "Configure, Index and then run Thinking Sphinx"
task :ready do
thinking_sphinx.configure
thinking_sphinx.index
thinking_sphinx.start
end
desc "Link up Sphinx's indexes."
task :symlink do
run "ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx"
end
end