ericlefevre

March 30, 2007

Agile seminar with Valtech on April, 26th

Filed under: agile, conferences, valtech — Eric Lefevre @ 1:01 pm

My employer is hosting a half-day seminar on Agile methodologies. Speakers include David Gageot and Greg Hutchings, so it’s bound to be an interesting morning. We will also hear people from Odyssey, reporting on their experience with an offshore environment.

Participation is free; register here.

March 22, 2007

Limitations when using DbUnit in multi-schema environment

Filed under: java, test — Eric Lefevre @ 6:35 pm

DbUnit has a useful feature when using multiple schemas. After setting a property called http://www.dbunit.org/features/qualifiedTableNames, DbUnit will always refer to a fully qualified table name, using the schema in prefix, as expected.

However, it has the side-effect that the schema is then expected to be stored in the data sets. For example, if using Excel files, you’ll need to rename each sheet. Which is feasible, I guess.

The problem comes when you have multiple developers. You usually do not want them to share a database instance, as running the unit test will frequently reset the data. How do you work around that one?

Another thing is that writing the name of a schema is often overkill, even for test. What I’d really want is default to the user name, as SQL clients often do. Why cannot DbUnit do that?

Update (23/03): DbUnit is supposed to take the default schema name from the JDBC connection. However, that apparently does not work when the schema name is specified in the Hibernate configuration. Since I want to obtain the JDBC connection from the Hibernate connection, I am kind of stuck.

March 16, 2007

Change signature of interface methods in implementations

Filed under: java — Eric Lefevre @ 5:55 pm

Every once in a while, I learn a new fact that reminds me to stay humble with my knowledge of Java.
(more…)

Sadek is at QCon

Filed under: agile, conferences, valtech — Eric Lefevre @ 10:30 am

My colleague Sadek Drobi is currently attending the QCon conference in London. Check out his blog, starting from March 14th.

March 15, 2007

Maven Surefire 2.3 released with support for JUnit 4

Filed under: java, maven, test — Eric Lefevre @ 2:52 pm

Surefire 2.3 for Maven has been released March 1st.
No big announcements, just a post on the maven mailing list. Still, it is a big deal for me, as I can at last run my JUnit 4 tests with Maven.
(more…)

March 14, 2007

Gienah: inject Spring dependencies in your JUnit 4 tests

Filed under: java, spring, test — Eric Lefevre @ 3:08 pm

I wanted a way of using my test with dependencies coming from my Spring definition.
(more…)

March 12, 2007

YAGNI — You’re Aren’t Gonna Need It

Filed under: agile, java — Eric Lefevre @ 1:19 pm

A couple of weeks ago, I started working on the objects that needed to be mapped onto the database. As I didn’t know what to do with each of them, I tried to keep things simple by mapping a foreign key into a Long.
A couple of days ago, I realized that this foreign key actually pointed to an object that was now available. Predictable enough, but was I right to map it to a simple Long before?

  • a Long was indeed the simplest thing I could do to design the link, as I didn’t need any other class to be designed to get my first class running
  • however, refactoring it into a real object is not easy; in fact, it is quite risky, as many places in the code will be changed (tests, Hibernate requests, equals() and hashcode() implementations). In fact, I tried and wasted a full day on it.
  • I think I’ll eventually have to remove it entirely before re-introducing the link between the two objects
  • Designing the first class as simply as I could was the right move. However, that’s not what I did; actually, I had added this foreign key because it was there, not because I needed it. If I had refrained from adding it as all, I wouldn’t have wasted time in trying to refactor it.

    All that because I didn’t apply YAGNI properly. A lesson to remember!

    March 2, 2007

    Hiring Tips

    Filed under: misc, valtech — Eric Lefevre @ 12:48 pm

    Every once in a while, I stumble upon a new list of tips to hiring someone. Since I am actively involved in interviewing candidates technically, I always read them in detail.

    If you don’t know them already, here they are for your reading pleasure.

  • Joel Spolsky’s Guerrilla Guide to Interviewing, possibly the most referred to paper on hiring
  • Steve Yegge’s Five Essential Phone-Screen Questions, a bit too system-centered for my taste, but interesting
  • Mike Cannon-Brookes’ 5 Tips For Startup Hiring, Mike is the co-founder of Atlassian; I’ve met him briefly at CITCON London 2006
  • March 1, 2007

    CITCON Dallas/Fort Worth April 27-28

    Filed under: citcon, continuous integration, openspace, test — Eric Lefevre @ 9:11 pm

    Paul Julius and Jeffrey Fredricks have announced CITCON D/FW 2007. It is the third in a series where CITCON London 2006 was number 2.

    Considering how enjoyable CITCON London was, it is totally worth going to CITCON D/FW if you’re around.

    Powered by WordPress