I finally decided to give Rails 3 a spin after beta was released 20 days ago. In geek time, that’s being a late adopter. But first, a warning. I’ve read several posts about setting up Rails 3 and as of today, some of them are outdated already. Things are happening so fast that [...]
Categories: Geekiness
Tagged: rails, ruby
- Published:
- Feb 24, 2010 – 11:05 am
- Author:
- By Greg Moreno
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'feedzirra'
profile_name = 'dave.winer'
page = Nokogiri::HTML(open("http://www.google.com/profiles/#{profile_name}"))
feed_url = page.search('//head/link[@type="application/atom+xml"]').first['href']
feed = Feedzirra::Feed.fetch_and_parse(feed_url)
puts feed.title
puts feed.url
puts feed.last_modified
feed.entries.each do |entry|
puts
puts "Title: #{entry.title}"
puts "Content"
puts entry.content
end
I can’t find the Activity Streams tag. Feedzirra could be filtering it but I haven’t look at it yet.
Categories: Geekiness
Tagged: programming, ruby
- Published:
- Feb 11, 2010 – 6:35 pm
- Author:
- By Greg Moreno
If you are building content-management systems or any applications with pages that you want to appear in a Google search, it is very important that you employ search engine optimization techniques or SEO. One such technique involves URLs.
Given a default URL in Rails, e.g. http://cia.gov/users/123, we know as developers that this request involves the [...]
Categories: Geekiness
Tagged: programming, ruby
- Published:
- Aug 24, 2009 – 9:52 pm
- Author:
- By Greg Moreno
Rails’ validations is great because it allows you to quickly implement the valid states of your models and at the same time have a ready-made way of displaying the errors to your users. For example, below is a screenshot of a registration form written with just a few lines of code:
However, this approach requires [...]
Categories: Geekiness
Tagged: programming, ruby
- Published:
- Jul 24, 2009 – 10:17 am
- Author:
- By Greg Moreno
You don’t have to agree with all of them — just be aware of their influence.
– Obie Fernandez, author of The Rails Way
Developer motivation and productivity trump all other factors for project success.
The best way to keep motivated and productive is to focus on delivering business value.
Performance means “executing as fast as possible, on a [...]
Categories: Geekiness
Tagged: ruby
- Published:
- Apr 1, 2009 – 10:22 am
- Author:
- By Greg Moreno