DHH’s RailsConf 2010 Keynote Video
The keynote is about Rails 3.0 and the many enhancements it bring to make web application development more fun. The improvements in writing database queries (via ActiveRelation), routes, ActionMailer are really neat and I believe would make it easier for developers to get on board with Rails.
The...
Source: Confessions of a Chief Home Officer
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
Java: Delete Files From Path Based On Duration
This function will recursivly delete directories and files inside the said path but it will not delete the path itself. The method takes into account the number of days since the file was created or updated If it is equal or more than the number of duration days, then the file will be deleted, else ignored.
?View...
Source: Tech Tips Tricks
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
Programming today…
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
– Rich Cook
No related posts....
Source: Randell.ph
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
Convert File To Byte Array Using Java
This is a nifty helper method to convert a File object into a byte array. I got this method in Java FAQ.
/**
* Returns the contents of the file in a byte array
* @param file File this method should read
* @return byte[] Returns a byte[] array of the contents of the file
*/
public static byte[]...
Source: Tech Tips Tricks
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






