Writings
my take on rails environment specific constants
It’s funny how every Rails application I - and possibly you - work on ends up needing some sort of per-environment global constants.
Examples may include the application url - It might be used in account activation emails and thus should be different between the development and production environments.
Or perhaps your application depends on external services that, depending on the environment, are available in different URIs.
There are a couple solutions out there but my needs were simple and straightforward, thus I developed a small rails plugin that is the simplest thing that could possibly work: AppConstants.
Writings
monit thinking sphinx and rvm
In one of my Rails projects I'm using Sphinx to provide full-text search capabilities. To integrate both worlds I chose Thinking Sphinx, which is just great and so far has met all of my expectations.
Also, as I previously mentioned, I'm using RVM to manage my ruby installations on both my development and production machines and this setup is what motivated this post.
I use Monit to monitor the services running on my production server - nginx, mysql, php - and as of the first deploy of this application, it only made sense to also monitor Sphinx.
Writings
managing multiple ruby versions
Today I read a nice post - in Portuguese - by Fábio Akita on how to manage multiple ruby versions on your machine. I've tried it once with some tool I can't even remember the name but failed miserably.
But this time things look very different. The tool here is the rvm - short for Ruby Version manager - and it works just great.
Let's cut to the chase and imagine that you, like me, want to run/develop/test your code on both ruby 1.
Writings
rupy 2009 poznan
Next week the RuPy Conference 2009 will be held in Poznan, Poland and I was planning to talk there.
My talk had been approved and everything was looking good - I was gonna talk about JRuby in the Enterprise - until my move to ThoughtWorks became a reality less than a month ago.
This move led to a lack of support and time from my current company. I was counting on it to go there but since I'll be leaving soon, that wouldn't be possible.
Writings
my slides from rails summit 09
{% img /assets/images/rs2009.jpg %}
Rails Summit finished a few days ago and I have only one word to describe it: Awesome!
I met some really cool people, discussed a whole bunch of technical subjects and managed not to get so nervous in my first presentation ever - I'm not counting internal presentations I've done for my team...
My slides and source files can be found here. Feel free to contact me with questions if you got any.
Writings
soon off to conquer lands afar
Once more my life is taking a huge turn.
I've been pretty quiet for the past month and honestly don't know how I managed to hold in my excitement. I've just accepted an offer from ThoughtWorks to be based at their australian offices, either in Sydney or Melbourne, depending on where my 1st project will be.
For those of you who don't know, ThoughtWorks is a global IT consultancy that is really well known in the software development community.
Writings
a few more thoughts on final classes
I said final classes are evil and that post got some attention with interesting comments. Maybe because of the title and the tone I wrote it, a few comments didn't get my real intention and perhaps I should have been more explicit about it. Go ahead and read it. I'll wait. :)
Anyway, I thought I'd expand a little more on that subject, explaining my motivation to write that post and going through the topics I think were raised by my dear readers.
Writings
refactoring for readability
Yesterday I've done something I should do more often: Revisit some code written a while ago for our current project and make it better.
Let's face it. We all write crappy code the 1st time. The difference is in what we do about it afterwards.
We might decide it's good enough and keep moving, or we could (and should!) stop and refactor it!
The code I revisited worked as a refactoring exercise and it's initial version is shown below: class Jphoto .
Writings
rails summit 2009 im speaking
I'll be speaking at this year's Rails Summit Latin America in Sao Paulo, Brazil. It will be a good opportunity to meet some amazing people and visit friends back home! :)
Overall I'll be spending 12 days in Brazil, with 2 of them dedicated to the conference. The other 10 I'll be in Rio de Janeiro visiting my family and friends. I strongly advise you to spend some time in Rio too, if at all possible.
Writings
rails rumble 09
Update: The service is now down while we move it from the VPS provided by Rails Rumble to our own. I'll let you know once it's up.
Last weekend Philip, Pedro and myself got together for this year's Rails Rumble.
We haven't had really decided what to do until a few days before the competition, but I had this really simple idea and decided to go with it. Seems people liked it, given a few positive comments we received.