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!

Engine Yard Flex Announced, New Features Added to Solo | Rails Fire

Engine Yard Flex Announced, New Features Added to Solo

Engine Yard is a proud sponsor of RailsConf 2009 in Las Vegas. We’re having a great time speaking with our customers and the wider Rails community. This year, we wanted to share something extra special with everyone—a peek at the next offering in our suite of cloud management solutions: Engine Yard Flex.

Keynote Flex Preview

During our keynote presentation, Agility in Deployment, we previewed several exciting Flex features queued for release in late June of this year. Flex is a cloud computing platform built on Amazon EC2 for hosting real world Rails applications, running everything from Passenger to Rack, Merb, Sinatra, and more.

Instant Self-Healing Clusters

If you’re familiar with our existing Solo platform, Flex takes it to the next level, introducing one-click provisioning of dedicated, load-balanced, self-healing clusters. Adding or removing servers is as simple as clicking a button. If at any time a node in your cluster should become unresponsive, it will be decommissioned and a replacement will take over automatically.

While building Flex, we added some powerful tools to our cloud platform that we couldn’t resist adding to Solo. Even better, they are all available today for all Solo users.

Deploy from the Web, Deploy from Git

Nearly all of our customers use Capistrano for deployment and for good reason; it encapsulates several best practices in an automated fashion that take the guesswork out of deploying Rails applications. We have taken these conventions and wrapped them in a single “Deploy” button, available on every customer’s Cloud Dashboard.

For those of you who prefer the command line, this new method of deployment is also available via Git. Just push to your repository using a tag that specifies your environment and any migrations that need to be run, and that’s it. The Engine Yard Cloud takes care of the rest. Both web deployment and Git push support work alongside Capistrano, allowing you to choose the tool that best fits your team’s workflow.

Real Production Clones

Hosting real applications with real users means taking each deployment seriously. As Ruby developers, we test everything because we believe in the value it provides. This same mindset should be applied to deployment.

Using the Engine Yard cloud makes this a snap. With one click, you can clone any production environment to practice deployment and rollback prior to affecting your customer data. So called “staging” environments are often under-powered and lag behind production environments when upgrades take place. Cloud computing with Engine Yard allows you to make an exact copy of your production environment for just as long as you need it. When you’re confident in your deployment, you can shut down the staging environment with a click of a button, paying only for the minutes used.

Your Business in the Cloud

There is a fundamental shift underway for deployment. Forward thinking businesses can use this to their competitive advantage to increase quality and uptime as well as decreasing time to market. At Engine Yard, we want to enable our customers to take advantage of this shift and we welcome you to join us in the Cloud.

For more information, be sure to check out the Flex Press Release.

Images: