RSS

Archive for the ‘Opinions’ Category

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Being grateful

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.

3 Feb 2010

Why You Should Be Grateful for Coding in Ruby

Author: ceefour | Filed under: Opinions

Just got a server hard drive crash :-(

We should be back operational soon. In the mean time please bear with us. Thank you. :-)

12 May 2008

A Server Hard Drive Crash :(

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!

Firefighter in style!

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.

20 Mar 2008

Migrating Subversion repositories using SVK

Author: ceefour | Filed under: Cool, Opinions, Tips, Tools, Tutorials

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.

2209570995 3969af4b35 Rearranging Stuff Notice, `Experience Report’ Coming Up Soon!

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!

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.

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……

 Ruby on Rails, Java EE, RIA, Adobe Flex, Comet, Messaging, EDA, SOA, …, ouch!!

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! :)

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

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:

  • Data model
19 Nov 2007

Sexy DSL for Active Record Permissions

Author: ceefour | Filed under: Cool, Enterprise, Opinions, Praises, Rails, Ruby, Tips, Tools

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.

 Be an Expert of Ruby on Rails’ Active Record!

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.

Shave your Semantic (or semantic?) Web

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:

Arie Kusuma Atmaja nampang gitu lhoh
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!