José Mota — Web engineer & architect

Categorized under Development

Rails 3 has_many :through checkboxes

On Twitter I wrote:

Rails does it for you, just add sheet_ids[] to the form with the checkboxes and it’s done! will blog.

Being a music teacher, my fiance needed to keep record of tests her students perform. Also, each test has several sheets that need mentoring and monitorization through several parameters. I decided to help and reentered the Rails world, and since I have found no answer on this topic, I decided to write it myself.

This situation is a perfect model for using the so well known HABTM checkboxes.

Read the rest of this entry »

November 5th, 2010 — 2 comments so far

Singular resourcing on Rails 3 beta

Today I’ve been struggling on my project to be. I want to build it just right so I can learn Rails 3 the best way and enjoy the Ruby and Rails experience a little more. I love their ways, but sometimes it gets tough to go around the normal skeleton of an application.

Singular resourcing was harder to grasp than I thought

The idea is actually pretty simple to understand: for example, you say you want a user to access only one resume because that’s the only one he would have. The scaffold generator adjusts the routing accordingly; well, at least it should.

Read the rest of this entry »

July 6th, 2010 — Leave a comment!

Apresentação no Barcamp PT

Vou estar no Barcamp PT Primavera10. O encontro vai ser realizado no Hub do Porto, nos dias 5 e 6 de Junho e eu vou apresentar o tópico: Psicologia, Paixão e Rails (PPR) – Uma perspectiva mais humana do desenvolvimento Web.

Psicologia não exige curso superior

Se achas que não consegues ser psicólogo, então precisas mesmo de vir!

Um bom amigo é um psicólogo; um bom homem da web também é (leia-se “deve ser”) um psicólogo. As variáveis aqui são o prisma e a aplicação da ciência. Vou falar de como psicologia afecta as nossas decisões, bem como as dos nossos clientes e de como podemos contornar os tão afamados entraves e desatinos.

Paixão é a força motriz

Não é o dinheiro que nos motiva (pelo menos não só). A verdadeira força que nos orienta a atingir resultados e ter motivação é paixão. Os teus pais sempre te disseram: Faz aquilo que gostas. ou Quem corre por gosto, não cansa.

Ruby on Rails para concretizar

Até hoje ainda não encontrei ferramenta mais completa e linguagem mais simples do que Rails e Ruby, respectivamente. O padrão MVC aproxima o negócio do cliente ao software que quer implementar. O REST permite que os objetos de negócio sejam manipulados de forma simples e uniforme. Existem tantas outras coisas que fazem do Rails a ferramenta de elite.

Se quiserem saber mais, venham! Estou a pensar em apresentar algo mais interativo; algo como envolver a audiência de um certo modo, portanto acho que vai ser bastante engraçado!

May 19th, 2010 — Leave a comment!

HTML Semantics: br’s & control labels

<br /> elements break content. They don’t space it.

This gave birth to a nice debate. I threw that tweet because I was facing a terrible blunder from a fellow designer. He was using <br />'s to wrap an <hr /> just to give the ruler some space — instead of adding margins to it —. Paulo Zoom and Levi Figueira propelled the whole thing and I kinda moderated it. The end result was quite satisfying.

Read the rest of this entry »

April 29th, 2010 — 1 comment so far