Archive for the ‘Opinions’ Category
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

How do you feel during your daily Ruby programming workflow? Do you feel fun or productive? Either way, you’ve got to feel grateful!
After several years not doing any serious PHP programming, today I get curious.
Right now, PHP has evolved. PHP programmers are not “script kiddies” anymore, they’re professional programmers with quality MVC web frameworks.
Author: ceefour | Filed under: Opinions
Tags: framework, php, Rails, Ruby, symfony, syntax
Just got a server hard drive crash
We should be back operational soon. In the mean time please bear with us. Thank you.
Author: ceefour | Filed under: Complaints, News, Opinions
Recently I got a task which involves moving, or let’s say copying, an entire Subversion repository with history to another server. Problem is, I didn’t have access to the server itself, which means I couldn’t do a regular “svnadmin dump”.
SVK comes to the rescue!

To make it work, first of all you need to install SVK. In Ubuntu it goes like this:
sudo aptitude install svk
When you first run svk it’ll ask you to create a local depot, you can simply agree to its suggestion.
Author: ceefour | Filed under: Cool, Opinions, Tips, Tools, Tutorials
Tags: dump, export, import, load, migrate, migration, repository, subversion, svk
I’d like to express a warm notice that AdaRuby.com might be down intermittently as we’ll be having major rearrangement and server upgrades of our hosting facilities in the coming days.

The upside is, when it’s done (and oh YES it will be done!), I’ll be providing you interesting information on the stuff that we’re doing, especially our experience regarding the hosting services that we have been using all this time.
Looking forward to hearing you share your experience as well!
Author: ceefour | Filed under: News, Opinions, Rails, Rails Hosting, Tips
Tags: 305, 317, 321, 324, 328, 335, 355, 356
Design Patterns in Ruby documents smart ways to resolve many problems that Ruby developers commonly encounter. Addison-Wesley Professional press has this exciting book, authored by Russ Olsen.
Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby. Most design pattern books are based on C++ and Java. But Ruby is different—and the language’s unique qualities make design patterns easier to implement and use.
Tags: 299, 308, 309, 318, 319, 343
You know what, I really wanna learn this whole JavaEE-related thingy……
For some reason it’s unavoidable……. it’s bound to be touched by me……

You see, the trend is going RIA. MVC is going away. AJAX ain’t gonna compete. At least not fully. And will lose in many ways in respect to something like Adobe’s Flex. (Unfortunately there’s not much competitor better than Flex, and fortunately it’d probably be “standard” in the near future). Esp. with Flex going open source. Flex will need a backend, since it’s not a server-side product. There is Flex LiveCycle Data Services ES (what a name!!) by Adobe. There’s also BlazeDS open source. There’s also the excellent WebORB, which is free and open source for Rails and PHP. Oh yeah, it’s free for Rails!
Author: ceefour | Filed under: Ajax, Cool, Enterprise, JRuby, Opinions, Praises, Rails, Ruby, Tips, Tools, Web 2.0
Tags: 286, 291, 299, 309, 311, 322, 325, 327, 330, 331, 332, 333, 350, 351, 353, 358, 366, 368
There’s a common pattern for developing DSL (Domain Specific Language) in Ruby. It’s used in RSpec, the Statemachine Gem, and Unclebob’s Clean Code talk at RailsConf 2007. The name for this pattern is the DSL Block Pattern.
RSpec
describe "Bowling Game" do
it "should score 0 on a gutter game" do
game = Game.new
20.times { game.roll(0) }
game.score.should eql(0)
end
end
Statemachine
sm = Statemachine.build do
trans :locked, :coin, :unlocked
trans :locked, :pass, :locked
trans :unlocked, :pass, :locked
trans :unlocked, :coin, :unlocked
end
Parser
Author: ceefour | Filed under: Cool, Opinions, Rails, Reviews, Ruby, Tips, Tools, Web 2.0
Robert Thau from Smartleaf proposes a cool idea for implementing DSL for use in Active Record permissions. It makes it easy for a lot of users to have access rights and very exciting at the same time…
This is the Tease….
class Order < ActiveRecord::Base
access_control_keys ['id', 'owner_id', 'paid']
require_privilege :place,
:for_action => :create,
:to_update_attribute => [:payment_authenticator, :paid]
require_privilege :edit, # LineItem also checks this for attr changes
:to_associate_as => ['LineItem#order'],
:to_dissociate_as => ['LineItem#order'],
:to_update_attribute => [ :shipping_address ]
require_privilege :ship, :to_update_attribute => :shipped
...
end
The implementation:
Any Ruby on Rails programmer would have touched Active Record, probably in a very early phase. Active Record deals with everything that’s related to the database of your Ruby on Rails applications, and in many ways a bit more.

Apress recently launched Pro Active Record: Databases with Ruby on Rails, which I can honestly say, is the most exhaustive, if not the only, book about Active Record I’ve ever known to date.

microformats has been only two years old, yet it has brought significant changes in a relatively short time.
What is it, actually? According to microformats.org, “[microformats is] designed for humans first and machines second, [they] are a set of simple, open data formats built upon existing and widely adopted standards.”
Enough with the fluff, let’s see how it actually works, microformats in action:

Flickr picture source
The above picture is me browsing to the LinkedIn profile of one of Indonesia’s renowned Ruby on Rails experts, Arie Kusuma Atmaja. The overlay window that contains these semantic information is not a LinkedIn feature. Rather, it is the easily usable, cross-browser Microformats Bookmarklet by LeftLogic. Go on… try it if you haven’t!
Author: ceefour | Filed under: Ajax, Beginner, Books, Cool, Friends, HTML, News, Opinions, Plugins, Praises, Rails, Reviews, Ruby, Tips, Tools, Tutorials, Web 2.0