RSS

There`s still hope

0 Comments | This entry was posted on Nov 05 2008

Ok, this blog isn`t about politics and I`m also not into politics, but for the first time in my life I believe a politician can really make a “real change”. Not only changes in USA, but in all the countries and the way people see the USA.

Congratulations Barack Obama !

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

Why I have been away

3 Comments | This entry was posted on Oct 22 2008

For those you don`t know, when I attended RailsConf Europe, I came to Europe to make a live test in a job I was applying. As you know by my blog post, RailsConf Europe was great. I just wrote one post about it, but that week was incredible busy for me. I still have my notes from the second day of RailsConf, but I don`t know if I`d post them.

The fact is: I got approved (yaaayyy ). So I back to Brazil to start arranging documentation to apply for a work permit in Spain (Madrid City). Now I`m in Madrid, working in the company. This changes a lot of things in my life, but it`ll be an amazing experience for me in any field.

Here i`ll learn a new language (spanish), work and learn with amazing people like Pratik Naik, Xavier Noria e Raul Benito, play guitar hero in the company when stressed, attend nice conferences in Europe like Goruco, RubyConf and others, meet new people in the effervescent nightlife of Madrid…

One last thing: My google summer of project went live yesterday (October, 21) and everything is working fine. In case you want to check it out the URL is http://www.christmasfuture.org/.

Thanks,

ps: In the picture is the amazing new terminal of Madrid`s airport

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

David Pache

3 Comments | This entry was posted on Oct 07 2008

I’m starting a new section in my blog where I’m going to present and recommend talent of many areas, but all related to web development. I believe it is very important this connection with what is being created around the web and us (developers), because besides being good to inspire ourselves, it help us to became more competitive and to ensure we are in a continuous learning, always focusing in our self improvement.

I’m going to present a designer, called David Pache, who brings a minimalist style that in my point of view is something the so called web 2.0 is all about: simplicity. The designer bests creations are his logos. You can see all the process of creating a logo, as well color studies in his “dacheboard” which is kind like a blog, where he wrotes about he develop his works.

Make sure to visit his portfolio. Bellow is just a sample of David’s work.

[David Pache website] http://www.dache.ch/

David Pache

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

How to Run Just one Test Method from your Terminal

0 Comments | This entry was posted on Oct 01 2008

Many times I found myself running all tests just after modifying just one test method. Depending on the size of your project and its test ratio, it can be a very boring waiting for it to finish.

It can be even worse: Imagine you have other tests failing. How can you improve your productivity ?  Just use the “-n method_name” parameter for the method you want to test.

ruby path_to_your_test_case -n method_you_want_to_test

A real example, I want to test the “test_should_do_stuff” method inside my “stuff_controller_test.rb”:

ruby test/functional/stuff_controller_test.rb -n test_should_do_stuff

Worth remember that stills load your fixtures and preforms setup, it only won’t execute the other test methods.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

RailsConf Europe 2008 - Primeiro Dia

2 Comments | This entry was posted on Sep 03 2008

Ontem foi o Tutorials`s Day da RailsConf, mas só hoje que começou oficialmente a RailsConf Europe. Este ano tendo a presença do criador do framework Rails, (David Heinemeier Hansson) para apresentar o Keynote de kick-off da conferência.

No keynote, David falou sobre código legado. A primeira parte da palestra teve um tom mais filosófico, que tem sido (em minha opinião) uma presença cada vez mais constante nas apresentações do David. Ele comentou sobre a importância de termos código legado, que segundo ele, um bom programador é um bom programador se ele tiver escrito bastante código legado. É impossível escrever código que não se torne legado, por isso David defende que código legado deve ser mudado lentamente, sempre que for preciso corrigir algum bug ou implementar uma nova funcionalidade em um código legado, você deve aproveitar a oportunidade para deixar o código melhor e mais bonito. Durante a apresentação ele mostrou exemplos práticos de como refator código legado. O legal foi que ele mostrou isso, usando o código do Basecamp, que é a primeira aplicação feita em Rails, logo código mais legado que isso não tem heheh. Ele comentou sobre a importância de saber onde colocar as coisas em sua aplicação, dando exemplos do que tinha no Basecamp, como um Global Controller, que agregava muitos métodos que só foram parar lá por não saber onde colocar.

Logo em seguida, foi o break e aproveitei pra conhecer pessoalmente o Michael Koziarski que é um dos membros do core team do Rails. Ele é um cara bastante acessível e conversamos sobre o RailsSummit no Brasil. Ele disse que adoraria participar do RailsSummit, mas que tem viajado demais e não iria poder comparecer.

Após o break, escolhi ir na palestra “Hacking the mid-end: Unobtrusive Scripting and advanced UI techniques in Rails” apresentada pelo Michael Bleigh e Chris Selmer, ambos da Intridea. Eles apresentaram, em dois casos de uso, como usar Jquery e comportamento lowpro para manter separados comportamento (funcionamento) e markup de uma aplicação. Basicamente, os dois exemplos trataram de garantir o funcionamento da aplicação com e sem javascript, sem colocar lógica nos views.

Em seguida, assisti a palestra “Rails Software Metrics” feita Roderick Van Domburg da Nedforce, uma empresa holandesa de solucões Rails. Foi apresentado um conjunto de ferramentas para analisar a sua aplicação em termos de métricas de software. Flog, que é uma gem para auxiliar refactoring, falu do Rcov e seu plugin para rails, do Heckle que parece bem legal, pois ele além de analisar a cobertura de testes em sua aplicação, também altera o código dinamicamente. Lembro de ter visto algo parecido em uma palestra chamada “Machucando seu código” que o Fábio Akita disponibilizou traduzida em seu blog. Terminou a palestra comentando sobre o metrics_fu, que são um conjunto de tarefas Rake para usar com o software de integração CruiseControl.rb. Fiquei surpreso com a quantidade de pessoas que disseram usar CruiseControl, assim que possível vou dar uma atenção a isso. É claro que todas essas técnicas de medição de software não valem nada se você não definir metas e procedimentos para analisar elas, caso contrário, serão somente números soltos.

DHH e eu

Após o almoço, assisti “Intellectual Scalability - Solving a large problem with multiple  cooperating rails apps” dada por Frederick Cheung e Paul Butcher, ambos da Texperts. Apresentaram um caso de uso real enfretado por eles na Texperts, onde eles precisaram encontrar uma solução escalável para uma aplicação que iria crescer muito.  A solução (muito semelhante a usar Rails Engines) consistiu em dividir a funcionalidade entre diveras pequenas aplicações. Certo, mas como eles fizeram isso ? Eles mostraram com uma aplicação bem simples o funcionamento do “framework” próprio criado por eles para encarar o problema. Foi uma palestra bem técnica, com bastante código sendo feito ao vivo. Gostei bastante.

Em seguida, não havia nenhum assunto que me interasse e acabei assistindo “Scaffolding an application from schema.rb” dada por Tomaso Minelli. O Tomaso é Italiano e tinha um sotaque carregado, que deixou a palestra um tanto “arrastada”. Foi uma palestra bem iniciante, onde ele apresentous as principais soluções de scaffolding do mercado e apresentou sua própria solucação de scaffolding que é apartir do schema.rb. Ele basicamente redefiniu o método ActiveRecord::Schema.define.

A última palestra o dia foi “Stories on a cloud - Distributed browser testing with selenium” dada pelo Martin Sadler. Com o javascript cada vez mais sendo usado hoje em dia, é preciso termos como garantir que nossas aplicações funcionem bem independente de navegador ou sistema operacional. Ele mostrou o Webrat e RSpec Stories, e logo em seguida mostrou como unir o melhor de cada um atrelando a um servidor Selenium distribuído em vários computadores usando um sistema de mensagens para executar os testes em cada computador. Foi bem bacana, só faltou um exemplo ao vivo pra me convencer.

No momento que escrevo este post, Jeremy Kemper, outro membro do core team, está dando um keynote de encerramento. Se for legal, posto o que ele falou mais tarde.

=D

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

Portal UCA

0 Comments | This entry was posted on Aug 20 2008

Portal UCA

Está quase pronto o Portal UCA ( um computador por aluno) o qual irá agregar os estudos de caso realizados durante o projeto piloto com o laptop XO.

Após o término do mesmo irei disponibilizar, em alusão ao portal, um estudo de caso de como foi desenvolvido, plugins utilizados, problemas enfrentados e demais questões enfrentadas no desenvolvimento para ajudar quem está iniciando no mundo Rails, pois é uma aplicação bem simples, mas que apresenta bons detalhes pra quem está recém se aventurando com Ruby on Rails.

Outra novidade: irei participar da minha primeira RailsConf e vai ser na europa, mais precisamente em Berlim. Para saber mais sobre a conferência acesse o link que está na minha barra lateral aqui do blog. Pretendo é claro fazer uma cobertura do que eu presenciar por lá, fiquem no aguardo.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

Writing Opinionated Software

3 Comments | This entry was posted on Jul 28 2008

Sometimes I got myself thinking what makes a software have its own opinion and be considered “optioned software”. Would it be related to the language philosophy or to the programmer itself, or both of them?

People usually say Rails is a good example of optioned software. I can say I take part of the same opinion, but I’d like to take this point a little more further by not emphasizing only the software, but the programmer and how its culture could be incorporated (and not avoided) in the software it produces.

Out there, in the software market, when hiring people, companies usually claim they give plenty of room for people to innovate, share ideas and try new things and all that cool stuff we usually hear from Googles’s employees about independence and space to build your own skills and develop ideas within the job. But what we found most in the reality is the same copy & paste philosophy everywhere. The programmer usually don’t have time to try new things, because he is stuck with a pile of tedious tasks to complete and the deliverable is always behind schedule, which appears to be a endless cycle, project after project.

I believe, Ruby on Rails came to “save” the people from these kind of starving companies, which likes to hire young and “virgin” employees to mold them to the “Software Factory” style. Ruby on Rails lets the programmer surpass most of the tedious tasks, so it lets the programmer have free time to innovate in other areas of the software. It depends, of course, on the company philosophy, but when companies envise the real profit they can benefit from having a happy employee and tailoring the software for the user real needs, the companies will would like to have adopted the Ruby on Rails earlier.

Ok, but where the programmer opinion comes in ? I strongly believe by having more time to think, the programmer can not only fix issues, but can also suggest new features, test and present them very quickly and best of all, he also can earn more as people usually like to pay for what’s well done.

All in all, writing optioned software is not about yelling what’ s your favorite band, but it’s all about programming and being happy.  I am a happy programmer and you ??

[update 08-01] Thanks Soleone for your suggestion

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

Ultrasphinx bug?

1 Comment | This entry was posted on Jun 15 2008

It seens Ultrasphinx plugin for Ruby on Rails doesn’t know how to deal with Decimal data type from MySQL.

You can use a Decimal column for indexing, but when you need to make thecolumn sortable it comes the problem. As you know, faceting is on for numeric and date fields and to add the sortable feature to it, we need to pass a hash with

{:sortable => true}

Ok, then you run rake tasks to rebuild your configuration file and indexes and try to sort the search by the Decimal column and we got an error saying our column isn’t sortable.

You can check isn’t generating the _sortable sufix by looking the ultrasphinx configuration file. All other sortable fields have their _sortable sufix added to ti, except by the decimal field.

I’ll report it as soon as possible to Evan Weaver, the plugin’s owner, or maybe try to fix it by myself.

Updated: June, 16

I fixed by adding  ‘decimal’ => ‘float’ in the TYPE_MAP inside the fields.rb file of ultrasphinx plugin.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

RELEASED - “Rails 2.1 - What`s new ?” Book

2 Comments | This entry was posted on Jun 09 2008

Book Cover

The Book Rails 2.1 - What`s new ? Made by Carlos Brando and Tapajós was released last week. It was the very first book presenting Rails 2.1 and its new features, in Portuguese, and best of all, it was released free of charge ( like free beer).

But Carlos Brando and the Brazilian rails community were very upset because most Railers of the world couldn`t read portuguese so they couldn`t rejoice the book like us. So I and other fellows, lead by Carlos Brando got together to translate the book to english, so all people could read and use it.

I`m very proud of being part of this community that made the translation and reviewed it in less than 2 days. You can download the book here or from Carlos Brando blog.

I and these guys are who made this task possible, so please thanks us and if you like our work, please recommend us in in Working With Rails:

Rafael Barbosa - Recommend
Made Introduction and chapter 1

Caike Souza - Twitter: @caike
Made Chapter 2

Pedro Pimentel (Myself) - Recommend
Made Chapters 3-8 and 10-13

Abraão Coelho - Recommend
Made Chapter 9

Ricardo S Yasuda - Recommend
Made Chapter 14

And last, but least, don`t forget to thanks and recommends the authors if you haven`t did yet.

Recommend Carlos Brando

Recommend Marcos Tapajos

More information about the original book can be found in Carlos Brando blog.

Download the book here

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb

Open Source Rails

0 Comments | This entry was posted on Jun 02 2008

Para quem gosta de aprender olhando código existente ou prefere não reinventar a roda toda vez que for criar um sistema em rails, temos agora a oportunidade de pesquisar e baixar sistemas rails completos.

A iniciativa é do railer Jacques Crocker, que criou o site Open Source Rails, onde ele compila grande parte dos sistemas rails open source do mercado, como por exemplo, Mephisto, Typo e Lovd By less. Ele convida a comunidade a se cadastrar no site e a mandarem novos sistemas para lá. Vale a pena conferir o projeto e contribuir, pois é importante para a comunidade rails!

Open Source Rails - http://www.opensourcerails.com/

Jacques Crocker - http://www.railsjedi.com/

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Slashdot
  • StumbleUpon
  • Technorati
  • description
  • LinkedIn
  • YahooMyWeb