Mockito

If you are going to set up a completely new greenfield project, I would definately consider using Mockito as mock framework. It expressive and very intuitive, and results in less boilerplate code in your tests than for example EasyMock.

Very few of us are so lucky to be setting up a completely new project, but are stuck with legacy code that probably require more advanced features than those offered by Mockito. In this case I would probably go for a combination of EasyMock and PowerMock.

PowerMock

The last couple of weeks, I have been testing a mock framework called PowerMock. See The PowerMock website for more information and download.

The short version is that this framework extends Easymock and lets you mock static methods, private methods, construction of new objects, bybass encapsulation and more to enable testing of code that used to be considered difficult (or impossible…?) to test.

JavaOne 2008

At Javarforum in Malmรถ yesterday, I gave a presentation about JavaOne 2008. Please see under Resources if you are interested in downloading the presentation.

The content of the presentation is:

  • Java + YOU
  • Upcoming Java Language Features (abstract from TS -5581 and TS-6185)
  • Future of Java (from TS-5581)
  • Boldness (abstract from TS-6213)

JAVA+YOU

Java+You is the theme of JavaOne 2008. No question about it! The feeling I have after day 1 of this year’s JavaOne is that the focus is on the integration with the consumers as well as the developers in all daily-life situations. Rich Green talked a lot about the “Screens of you life” in his keynote today. Whether you read a book, check you bank account statement, chat with friends on you mobile phone or navigate in you car it is all Java… it is the consumer that drives the change…!

This year they even brought Neil Young on the stage to talk about his new interactive blue-ray disc and the way Java technology has enabled him to produce his memorabilia in a format that he feels is what his fans wants – an interactive history of his musical career.

All in all a more or less typical JavaOne day one show. This is my ninth time at JavaOne, so I think I am entitled to say that ๐Ÿ™‚

Java+ME

I’m back :)

It has been a long time since last post from me. I have had a lot to do at work lately, but this is in my eyes not an excuse. Guess I have been wondering whether to continue blogging or not. Seems like these traditional blogs are kind of out nowadays. Everybody seem to have moved from blogging via Facebook over to Twitter…

The title of this post has a double meening. Not only am I back in the blogspace, but I am also back in San Francisco. That means it is time for JavaOne again.Watch out for new posts here. Maybe this is just what I need to get me back in the game again…

Jazz

I just had a look at the Jazz project and downloaded the latest version. I guess I am pretty slow since the Jazz Team Concert 1.0 Beta 2a was available a couple of weeks ago, but better late then never ๐Ÿ™‚

The installation was easy. Instructions for server and client was comprehensive and pretty much straightforward so I had my test project up and running in less than half an hour.

Jazz is IBM Rational’s next-generation technology platform for collaborative software delivery. It is a collaboration platform for the full software lifecycle and absolutely worth take a closer look at.

New Cheese

This is my last day at my current assignment, so I guess you could say that I have run out of cheese (see previous post on cheese).

Luckily enough I have not been like Hem, but more like Sniff, so I sniffed up a new assignment well in advance. On Monday I will start in my new project as an “Agile Coach”. I have always been preaching agile practices on all my assignments, but this is the first time it has been formalized. I am looking very much forward to it, and hopefully it will result in lots of blog posts here in the future.

Agile AM

At a dinner last week I discussed agile development practices with some colleagues. They work in the AM (application management) part of the company so we ended up discussing how these practices are applicable for AM.

We all very soon agreed upon that agile practices are indeed applicable for AM. Some of them are mentioned here:

  • Pair-programming: Reduces risk of introducing new errors.
  • Continuous integration: Enforces the code base to be 100% up-to-date and tested at any time.
  • Test-first: Gives immediate feedback on when an error is fixed and helps extending the test suite.

Scrum is excellent for an AM organization. Just organize all problem reports as a product backlog and plan the ones you want to deliver in the next patch in a sprint backlog. Make sure you make room for urgent matters in the sprint backlog.

Is Java harmful?

An article called Computer Science Education: Where Are the Software Engineers of Tomorrow in STSC Crosstalk discusses the declining competence of tomorrow’s software engineers. If you read the article fast (as most journalists seems to do…), you might get the impression that Java as a language is to blame for this. But reading the article more carefully reveals that the authors are actually attacking the fact that most CS studies are based on Java only.

I agree with the authors that students should learn programming rather than a programming language. And that is best achieved by using several languages in the education. All languages has its purpose (even C# ๐Ÿ™‚ ), and should be used to whatever it is designed for.

What I do not agree with are the reasons the authors means Java matters (concurrency and reflection). They seem to miss that Java is one of the simplest and easiest all-purpose object oriented languages. When teaching fundamental concepts of OO, I would definitely go for Java rather than C++.ย  The Smalltalk guys would probably object to this, but since I have no experience of Smalltalk, Java is my OO language of choice.