code coverage test

100% code coverage!

The basis of this article is a sequences of tweets betwen me and M. Robert Martin, on April 8th 2011: If you have 100% coverage you don’t know if your system works, but you do know that every line you wrote does what you thought it should.@unclebobmartin 100% code coverage doesn’t achieve anything, save making you safer while nothing could be further from the truth.@nicolas_frankel 100% code coverage isn’t an achievement, it’s a minimum requirement. If you write a line o

test

Cons of custom assertion matchers

Ten years ago, the only tests we knew of were users acceptance tests. The last decade saw a gigantic leap forward: it brought unit testing. Unit testing was made popular with JUnit. In turn, TestNG added annotations to the test classes, making them ever easier. Then, EasyMock provided the means to mock our class dependencies in a test context while Mockito streamlined the process of doing so. One could think everything has been said and done for unit testing and we should move forward to a more w

twitter

Java Twitter integration

During the writing of Learning Vaadin, I create a sample application step-by-step. This application is in fact a Twitter client. Twitter provides a nice API along with its related documentation in order to interact with their site. However, I’d rather deal with a Java API that shields me from all the griity details of the how to let me focus on the what. Hunting for such a component gave me Twitter4j. During my development with Twitter4j, I was stuck with the authentication process. This

identity openid

Identity federation and OpenId

Identity federation is a hot subject at this moment, at least for my customer. It began innocently enough: someone who did not belong to the organization needed to access an application. Not a problem, let’s register him. Some year later, needs number in thousands of users, and the identity management has outgrown its capacities: the software was sized for the organization, not for the myriad of third-party users around it. And yet, partners, customers and providers, they all have very va

quality sonar

Cost of correcting rule breaks

Last week, Simon Brandhof and Freddy Mallet of Sonar team and me were discussing Vaadin uses. At the end of our meeting, and although Vaadin finally did not fit their particular needs regarding Sonar, the talk disgressed toward quality. As regular Sonar users know, the former includes a very interesting plugin aptly named Technical Debt plugin. As a reminder: Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite

dropbox

Dropbox and other backup products overview

I’m a happy Dropbox user but that doesn’t mean I’m not watching similar products, either for myself or my clients. I even made some comparison. Criteria are the following: Features: even though the primary goal of those solutions are backup, some also permit to synchronize data between different computers, share documents with other users or even keep an history of multiple versions in order to restore if an error is madeFree treshold: every product has a free version where you

Both sides of the story

Amazing thing this week! Imagine this case: developers need to access production application servers logs. These are inaccessible for now because application servers machines are production level. So they are placed in a different network zone. Between the AS zone and the DEV zone, there’s a firewall configured to disallow access from developers machines. In order to solve this, a meeting is scheduled and soon, the room is filled by system engineers and software architects, all buzzing idea

dropbox windows 7

Symbolic links for Windows

No Java this week, just the solution of a problem I’ve encountered in the past weeks. Don’t be scared, it’s computer-related. Since a couple of months, I’ve become severely addicted to the excellent Dropbox. It has three features, that linked together are particularly interesting for me: online backup, computer synch and file sharing. If you don’t already have an online storage solution, look at it ASAP: it has a free 2Go version (and by the way, contact me at nico