Archives for category: RubyOnRails

My article Tips for Optimizing Rails on Oracle has been published on the Oracle Technology Network site! I can’t say how much i liked working on this.

I tried to synthesize in one place all that needs to be known to make the best from the two technologies and explained all of the tips in oracle-specific terms.

Rails on Oracle comes out as a good performer, but my only regret is that i did not have time to investigate (and maybe contribute back to the community) on adding proper bind variables support to ActiveRecord, which would have been the definitive optimization, but I see that the subject is being actively discussed on the core developers ML, so we may get there soon ;)

On the side, for those interested, I made “a Rails “version” of the HR schema that has been modified to directly comply with the common Rail conventions

I hope that what i wrote there makes sense and I’d love to hear what you think!

technorati tags:, , , ,

I feel that yesterday was a BIG day for Rails. To say it with the words of ThoughtWorker Jon Tirsen:


We had a problem…and the solution is JRuby.

ThoughtWorks will adopt jruby as the deploy platform for their Mingle enterprise project management platform.

The problem was that most of their clients have well established IT infrastructures which cannot be changed so easily to accommodate a new stack. But Mingle is built with Rails, allowing them a huge productivity.

The dichotomy between the scarce client willingness to add new (different, unknown) blocks to their infrastructure and the power of the new tools (specially the ease of development) is something that anyone doing contract-development work faces.

Sometimes the clients don’t give a damn about the technology used, other times they can be pushed to change but most of the time we are required to used the already established technologies (at a higher cost).

Being able to run on a JVM, will remove many obstacles to the enterprise adoption of Ruby and Rails, and having a ThoughWorks backing this solution in production will raise the awareness that this is a feasible.

technorati tags:, , ,

I got a nice easter present yesterday: The Typer  got reviewed on the Rails App Week by Darren at The Web2.0 Show

They nailed it right:  it’s simple by purpose, and i’d dare to say that it has been a big experiment for me in building a clean and simple interface that makes sense for the application.

Posts about thetyper have been very few in the last months, but this is not because the application itself was abandoned, but rather because the typer achieved its goals, and was good enough for my own use.

Some of the techniques i learned while developing it have been useful for me and will spark in various projects that I’m doing as a freelance. Moreover I’m planning some improvements to the interface which will go towards further reducing modality of the interface and improving keyboard commands.

I hope that more people will use it and find it useful, and I’ll be listening to their suggestions to improve it (if you wish you can contact me at luca (at) thetyper.com ).

technorati tags:, ,

ok… saying the title is even longer than typing the command:

svnrails --url ./repos/my_app/trunk my_app

this will make sure you have a functional empty rails application in your local repository that is it will:

  • create a my_app rails application
  • import the application into repository
  • checkout the application from svn
  • remvoe and ignore the log and tmp files
  • rename the database.yml file

nice and easy!

You can read about it here, and download the svnrails.rb script.

technorati tags:

A few days ago I discovered the query_analyzer plugin in a comment on the last article of The Rails Way series. It allows you to have the plans for the queries used in your application directly in the log file and this is invaluable when trying to to optimize the database for you shiny new rails application.

On the downside it was only for mysql and my oracle developer half though that it was what I needed, so here it is (with Postgresql support as well).

Use it but be warned that I don’t want to fork this plugin, so I haven’t prepared a proper svn access to it and I hope that my additions might be integrated by Bob Silva in his own codebase (I’ll post a comment in his blog since I can’t find any other way to contact him).

Download the modified plugin

I read today the humanized blog and I find it’s (very) true what Aza Raskin wrote in Monolog Boxes and Transparent Messages: the best interace should aim to minimize the interruptions in what the user is doing.

When you are “in the zone”, especially when writing or designinig or programming, any interruption in your flow of tought is dangerous and makes you to lose that special status of sharp, focused attention that fosters creativity. Modality in an application interface causes these breaks the main activity and should be reduced when/where possible.

I know that there are many points that can be made better in TheTyper to make the writing esperience even more seamless, and I’ll look into ways to reduce the modal interactions that can interrupt the writer. The first task is to embed the spell check into the main editor, enabling some kind of check-as-you-type mode of operation.

I don’t see many more sources of modal interactions that can be removed from the interface, since all the rest of the popups are for operations which aren’t usually done while writing (e.g. changing the fonts or exporting the document) but nevertheless I’ll need to think a bit more on these issues.

I like to use “simple” text editors rather then word processors to write, I use TextMate on OSX and TextPad on Windows, adopting the OPML editor when i need to support and track structure. But when I saw Writeroom about a month ago I was struck with its beautiful design and essential feature set, I thought that it would have been great if such a kind of editor existed on the web (I was constantly using gmail drafts to jot down notes while not in my office). I have seen that many other around me are doing pretty much the same so having some time this month I did go on and build it myself.

I was planning to start development after I completed Tiber (a web feed reader I’m working on) but then the spreading of the “no frills editor” meme around the blogsphere (see here, here and here) made me change my plans and I suspended Tiber, while working on this writer tool.

Two weeks after The Typer was ready (have a look at the screencast!).

I have put it online with the hope to to show the work and to receive some feedback. If anyone wants to test it, just register your email on the site and i’ll send you an invitation (I’m doing this just to be able to handle the load gradually on the server, I’ll open up the service in september).

Some very interesting rails tools fro the seesaw crew.

It seems that the River of News model for aggregators is getting new attention. Humanized Reader got great reviews from Steve Rubel and 37signals and they deserve all of it: their solution is particularly well designed (even if i feel it being too much blog like…) and the dynamic scroll is awesome.

This renforces my own experience: I’ve never been able to use an aggregator for more than a few hours before i tried the NewsRiver aggregator built into the OPML editor which has been my feed reader ever sicne i tried it for the first time (thanks Dave!):

The interaction with those modeled as a mail reader seemed unnatural to me, I shared much of the feelings that the Humanized crew has:

They had lots of modes. They made me stop and think about navigation every time I looked at the title of a post and every time I finished reading one.

An aggregator is a reading instrument for a very special form of literature which is different from email or books and as such should be built and designed for a different reading experience.

I’ve found that the river of news design is a natural way to read the flow of information coming in the form of feeds. Its interface stays out of the way when reading the news while it gives the correct support for organizing them. Showing the freshest on top and pushing down the (long) page the older it lets me use my prior experience of to find older items.

I’m so convinced of this that a couple of weeks ago i started to build an online aggregator following the river of news design. It’s called Tiber (like the big italian river I live nearby) Now I’m really looking forward to release it and see how it compares with the others.

I just found that in Ruby on Rails there is a “./script/console” script which lets you access all the application from a consol prompt, in this way you can manipulate all of your objects and do all sort of things and i find it really useful specially when you need to debug some nasty bugs in your model.

I had known this before I would have not spent most of the afternoon going after a bug in the Rails application I’m developing. After a long quest around my code, I extracted what seemed the offending piece of program from the model, built a test case and run it in the irb, and there it was a stupid initialization error.

Using console I would have just skipped all the plumbing and beoing able to interact with the single parts of the application I would have concentrated the attention on the model.