Too Cool for Internet Explorer

Saturday, December 22, 2007

Ruby Christmas and New Year best wishes

From: Me

To: You

Cc: All

We can find hope on unexpected places…

We just need to want to.

And here is my last code of the year:

Sunday, December 16, 2007

Rails, Rails and my Ruby weekend after

Rio on Rails is over, but was a great event.

Yeah, that was a good one. Well organized, all presentations on time, a participative audience. A great event, on all aspects.

Congratulations to everyone involved.


And Fabio Akita’s “The First Rails 2.0 Screen Cast” is making waves on the net.

Rio on Rails 2008. I want to be there !

Yesterday, another event “Rails for Kids”:

A charity Rails presentations marathon, we could follow at home with “TreinaTOM” web interface.

That was amazing!

I count 50-60 average audience following it along the day (almost from Brazil, but at least two from US).

And those presentations confirm my “Rio on Rails” feedback: I need to open my mind to some practices I don’t used to be familiar with.

Followed Google with just a few points:

  • Test Driven Development or Behavior Driven Development (the newest euphemism) with Ruby.
  • Domain Specific Languages and how to use .
  • Agile Development Techniques.

Thanks to: Danilo Sato, Ronaldo Ferraz and Vinicius M Teles / Marcos Tapajos, respectively to open my mind on that subjects.

Those last events are all about Rails, but I will not start with Rails yet.

So I have to find a way to practice the first two items with Ruby only.

About Unit Testing with Ruby, I started With Satish Talin.

By the way, on my research about TDD and DSL, I find a useful place to MetaProgramming, and keeping me DRY on “Ruby thinking way”.

OK, OK, I have to start with Rails ASAP...

That is Cool!

Sunday, December 9, 2007

My personal Ruby project

After working with java for a while, a problem came up to me.

Here at work we have an architecture checklist for all pre-production applications.

My recurrent problem is: lack of more descriptive comments on Javadoc for generated getters and setters on Database field’s value objects.

Unfortunately we access DB directly here no Hibernate, just some regular SQL on DAO, and associated VOs.

Here is an actual VO sample:

/**

* @return the cdNAT

*/

public java.math.BigDecimal getCdNAT() {

return cdNAT;

}

/**

* @return the cdSUCDESTPAG

*/

public java.math.BigDecimal getCdSUCDESTPAG() {

return cdSUCDESTPAG;

}

And here is a desired one:

/**

* @return the event’s nature from the payed indemnizations

*/

public java.math.BigDecimal getCdNAT() {

return cdNAT;

}

/**

* @return the office’s code from the payed indemnizations

*/

public java.math.BigDecimal getCdSUCDESTPAG() {

return cdSUCDESTPAG;

}

We have comments on all tables (and columns), on data base.

So my project is: create a Ruby application that will gather comments from database, join the terms: “return the” with the column comment and “from the” with the table comment, and create a really descriptive comment on Java source.

On the first version, will have to pass the java file and the table name.

On further versions, will try to do a deep analysis on corresponding DAO class, taking all table names, locating the child VOs and do the work there.

Current status:

  • I have all the SQL needed to the job tested using tiny Ruby programs;
  • I’m studying “active records” to use it on my Ruby programs;
  • Made some practical tests, and experiences to select a Ruby GUI, to get it done.

The future:

  • Extend this functionality to Ruby / Rails.
  • Try an open source project on that subject, or include this functionality on an open source project that already exists.
Any Help, suggestion, tip or reference Welcome

Sunday, December 2, 2007

Rails, a lightweight and unobtrusive framework


May Rails be the first “love at never sight” case in history?

That is true, I never sight Rails deeply before, just some articles and podcasts now and then.

But there is a good conductor on it.


Like Ruby, one thing that really catches me up. PRINCIPLES!

A basic one is the “convention over configuration”.

The way I get to Java / J2EE world is a bit weird.

I came into that to keep myself on IT market, but that assort of configuration work needed to accomplish a Java application, bothers me a lot.

Another one is the “non Switzerland approach”.

That is: not to stand neutral about something, just make a decision (a good one) about anything involved on a web application.

We know that we have to use “active record” when dealing with databases, and now with Rails 2.0, we know will use REST pattern to tie the application pieces all around.

That is cool, since I will not be dealing with configurations and decisions that have nothing to do with a developer principal concern: the application itself.

More details? You can find here, where David Heinemeier Hansson, explains why Rails 2.0 isn't going to be a unicorn.