Articles

Greasemonkey script for pootle

I think one of the most unpleasant tasks when you internationalize a web page is locate missed sentences and translate them.

Pootle allow us to keep a centralized translation repository where translators can work together. But pootle sentences navigation is a little weird and you always finish searching sentences by hand.

NAMED_SCOPE in Ruby on Rails

The has_finder gem has been added to Rails with a different name: named_scope

For better understand let go through the following example:

class Article < ActiveRecord :: Base
named_scope :published, :conditions => {:published => true}

named_scope :containing_the_letter_c, :conditions => "author LIKE '%c%’"
end

Article.published.paginate(:page => 1)

Search from multiple tables in mysql

CREATE TABLE `tagsearch`.`books` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(200) NOT NULL,
`author` varchar(100) NOT NULL,
`price` float(10,2) NOT NULL,
`comment` text,
`created_on` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`updated_on` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
)

CREATE TABLE `tagsearch`.`tags` (
`id` int(11) NOT NULL auto_increment,
`tagname` varchar(200) NOT NULL,
`counter` int(10) NOT NULL default '0',

The Third Seattle.RBBQ

Back yard
Figure A Back yard

For the third year in a row, it’s the Seattle.RBBQ at Geoff’s house in Seattle!

Competitor Comedy

Shopify got profiled last week in Practical E-Commerce as cart of the week . According to them they found 300 different Shopping cart packages, I know our market was big but that’s pretty insane.

Anyways, their Cart of the Week feature pits one Cart against another by asking a competitor to comment on the software, CNN style. In our case they asked Rick Wilson of Miva Merchant to comment on Shopify. Here is what he dislikes:

93. RESTful Rails

This is the presentation that I gave to Silicon Valley Ruby on Rails. Some of the topics covered were:

Sorting things out

I recently packed up everything I own and moved. I'd lived in my old place for about nine years and I have the packrat gene on both sides of the family tree, so I had a lot of crap to sort through to figure out what to move and what to trash, as well as which box what should go in. Now that I'm here in the new place, I've had to sort through the remaining stuff to figure out where it all goes. So you might appreciate that sorting has been on my mind a lot lately. (See? It's a topical tie-in. I don't do those often, so I hope it wasn't too awkward.)

Sorting things out

I recently packed up everything I own and moved. I'd lived in my old place for about nine years and I have the packrat gene on both sides of the family tree, so I had a lot of crap to sort through to figure out what to move and what to trash, as well as which box what should go in. Now that I'm here in the new place, I've had to sort through the remaining stuff to figure out where it all goes. So you might appreciate that sorting has been on my mind a lot lately. (See? It's a topical tie-in. I don't do those often, so I hope it wasn't too awkward.)

Arrow Lambdas, a Ruby 1.9 Vignette

Proc, the object-y twin of the syntax-level block, is the subject of a controversial change in Ruby 1.9: the addition of a new literal.

It’s here to stay. Let’s play a bit, shall we?

While we still have Kernel#lambda, in Ruby 1.9 the parser now accepts a literal that looks like the following (to support some great new features such as default arguments and associated blocks):

RORO August meetup roundup and my preso slides

At the RORO Sydney meetup last night we had an awesome line-up of presos, a new venue and a really fun vibe… it’s feeling more like a webjam than a tech meetup!

errtheblog.com blog | Rails Fire

errtheblog.com blog