Ruby 101: Make your class behave like a Ruby built-in
I got re-acquianted with this scenario while working on the OpenAmplify gem – a wrapper for the OpenAmplify API. When you give the api a text like a blog comment, it will return a list of common terms, opinion scores, named locations, and other information that can be used for text mining operations....
Source: Confessions of a Chief Home Officer
How Ruby, Java, C, and PHP fanboys see each other’s languanges
We know it’s not right to start a language war but this one is really funny.
via RubyInside
Related posts:How to create a class on the fly in Ruby “So what if Ruby is dynamic?” This is often the reaction I get whenever I tell friends that Ruby allows you to fiddle with your program...
Source: Confessions of a Chief Home Officer
Coding gems 21-30
#21 A well-written code is a joy to write and a joy to read.
#22 If you can’t explain something to a six-year-old, you really don’t understand it yourself. Albert Einstein
#23 When are you done? Since design is open-ended, the most common answer to that question is “When you’re...
Source: Confessions of a Chief Home Officer
How to setup a Rails 3 app
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 it is not...
Source: Confessions of a Chief Home Officer
How to read Google buzz updates in Ruby
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...
Source: Confessions of a Chief Home Officer
Coding gems 11-20
#11 Either you code it so simple there are obviously no deficiencies or so complicated that there are no obvious deficiencies
#12 In a room full of expert software designers, if any two agree, that’s a majority. Bill Curtis
#13 When in doubt, use brute force. Butler Lampson
#14 You are not in the business...
Source: Confessions of a Chief Home Officer
Coding gems 1-10
#1 The more dogmatic you are about applying a design method, the fewer real-life problems you are going to solve – P.J. Plauger
#2 Let Ruby be Ruby. Let Java be Java. Let Python be Python. Don’t expect it to be Erlang, because it isn’t.
#3.1 Plan to throw one away; you will, anyhow....
Source: Confessions of a Chief Home Officer






