Posted by Alexandre Martins on February 19, 2009
It’s been a while since I read some interesting posts showing creative uses of Hamcrest library out of test code. Since then I’ve been proscrastinating to implement my own version, trying strongly typed java delegates. Thankfully this week I came across a nice API called hamcrest-collections. It uses Hamcrest to implement features such as select, [...]
Posted by Alexandre Martins on January 1, 2009
Currently I am learning Clojure. It is a functional programming language, but not a pure one, since you can both write code that share state (mutable) and also ones that doesn’t. Why Clojure? The main reason why I chose Clojure is its easy interoperability with Java, still one of the most used languages, bringing to [...]
Posted by Alexandre Martins on November 14, 2008
Since JBehave 2.0 was released in September, I’ve been using it on my current project to verify the acceptance criteria for the features we are implementing, ensuring that the web interface is following the right workflow, and is displaying the data as expected, as well as some other important elements. What is JBehave? JBehave is [...]
Posted by Alexandre Martins on September 30, 2008
One of the things I really like about Spring 2.5 is the new set of annotations for defining controllers. Now you don’t have to extend any superclass to turn your class into a controller, just add the @Controller annotation on the top of the class definition and that’s it, you got one (still have to [...]
Posted by Alexandre Martins on April 15, 2008
One of the deliverables to our current client is a project template, containing tools to guide them to build better software, ensuring lower bug occurrence and system integrity. One tool we are using is Findbugs. One day, when running it, we came across an interesting issue, Findbugs was complaining that a class in a project [...]
Posted by Alexandre Martins on September 21, 2007
This week, during another refactoring session, I had the idea that every time I come across code that needs to be modified to conform to one of the principles of best practices for software development, I’ll modify it and share the solution through this blog, exploring its drawbacks, benefits gained by conforming to the principle [...]
Posted by Alexandre Martins on July 18, 2007
Paul Hammant has just announced the PicoContainer 2.0 beta release. I’m particularly happy with the news, because I thought they had stopped to work on this project and I’ve always preferred this dependency injection container, its configuration is quite simple. So now it’s time to check it out!
Posted by Alexandre Martins on July 4, 2007
JBehave and JMock2 are tools I’ve been using on my latest projects to define the behaviours of my objects. Both, when used together supplies pretty much all the resources needed to write effective behaviour verification. But in this topic I’m going to talk about JBehave Matchers. Matchers are handy objects, inspired by JUnit Assert class, [...]
Posted by Alexandre Martins on June 11, 2007
Currently I’m working on my personal project, aiming to increase my Ruby On Rails skills. It’s quite a simple system for my dad’s company and one of the features is to register his clients. I started it out writing the Specs and as I’m new to the Ruby world, doubts started to pop inside my [...]
Posted by Alexandre Martins on January 25, 2007
If you think you know how to work out the age of a person, based on his date of birth, it’d be better to review your concepts about implementing this functionality. Enjoy the code!! public UserImpl( UserTO user, String status ) { _user = user; _status = status; _age = 0; Calendar today = Calendar.getInstance(); [...]