Mock Objects

When testing it’s pretty common to see the need for mocking a certain object, say, a Data Access Ojbect. This way you don’t need to depend on a database and you can focus on the actual logic implemented by the method being tested.
For that you have several alternatives like creating the Mock class by hand [...]

Why I like ruby #0 (…or Ruby: The language of the lazy programmer)

This is quite funny. A friend, Perl addicted, is now learning Ruby. He really enjoys the language but made a interesting observation: Ruby is a language for lazy programmers!
Well, I have to agree… You know, I love saving keystrokes and achieving more by writing less. And this is so true with Ruby.
Let me give a [...]

QCon 2008: Domain Specific Languages

Today was the first day of the conference and it started with a tutorial about DSL’s with Martin Fowler, Neal Ford and Rebecca Parsons. We also had as attendants Ola Bini, core developer of JRuby, and others. My expectations were pretty high and the presentation didn’t let me down. I’ll try to put here toghether [...]

DBUnit and Hibernate

I never paid too much attention on testing database stuff. While working with java, the closest I got to something workable was using the test case abstractions provided by the Spring framework. It ensures that each test method runs in its own transaction that is rolled back after the test’s execution.
Fair enough. I used the [...]

Spring 2.5: Dependency Injection that doesn’t hurt

Dependency injection - DI -  is a great thing. Really. The hability to tweak implementations without touching your code is awesome and the DI frameworks, like spring, saves you a lot of coding. No more service locators stuff.
But, and there is always a but, you’re left with a bunch of XML configuration. And I hate it. [...]

Eu odeio XML

Isso é um fato. Cada linha de XML que eu escrevo me faz pensar em formas de evita-las. E isso não é simples.
Ultimamente, desde o Java 5, tem se trocado o XML pelas annotations. Tá bom, fica bonitinho né? Até que fica. Em alguns casos, até mais organizado. O Hibernate desde a versão 3 faz [...]

SCEA 5 Beta

Hoje fiz a versão beta da nova prova de arquiteto da Sun e eis algumas impressões:
- É longa e cansativa… fato justificável se levar-mos em consideração o fato de ser uma prova em estado beta. Ela possui mais questões que a versão final. São 153 questões no total, em 4h e 30min.

Como o Spring me ajudou a manter o Active Record

Nesse primeiro post vou falar um pouco sobre meu novo trabalho. Na verdade, sobre um problema que encontramos lá.
Dentre diversas coisas que estamos fazendo, como migrações por exemplo, estou ajudando na elaboração da arquitetura que irá abrigar as novas aplicações desenvolvidas na empresa.