Tuesday, November 24, 2009

Hudson + Sonar = A Perfect Match!

Last week, I blogged about "Continuous Quality Using Sonar". It requires just 5 simple steps if you have Hudson running as your CI(Continuous Integration) server to install and use Sonar. Yes, 5 simple steps is all you need to get a neat and intuitive dashboard from Sonar. So, lets see what those 5 simple steps are.

Step 1: Download, install and start the Sonar Server. 
Download the latest Sonar release from here. Unzip the distribution to your favorite location, mine was in C:\dev\projects\sonar-1.11.1. Based on your platform, run the batch file or the shell script from within the bin folder. On windows, it is C:\dev\projects\sonar-1.11.1\bin\windows-x86-32\StartSonar.bat.
Open a web browser and browse to http://localhost:9000. The default login and password is admin/admin.

Step 2: Install and Configure Sonar plugin on Hudson.
Open your Hudson dashboard. Mine is located at http://localhost:7223. Click on Manage Hudson - Manage Plugins. Click now on the Available tab, you should see the Hudson Sonar Plugin. Check this plugin and click on the Install button at the far right hand corner.
Restart Hudson and you should be able to see the plugin in the Installed tab as shown below:




Next, configure the Sonar plugin from within Manage Hudson -> Configure System. I am using the default database, and so didn't make any changes here. However, if you are using a different database server, you need to provide the database URL, username, password and so on as shown below.




Step 3: Configure your Hudson Job 
In order to activate Sonar on a project, click on Configure, and within the Post-build Actions, check Sonar and you should see the following properties. Fill those properties and Save this configuration.




Step 4: Build your project
Even though you don't require Maven to be used as a build tool for your project, Sonar does still require Maven to run. If Maven isn't installed, you can download and install Maven from here.
Force a build on your Job on the Hudson dashboard. If Maven is installed, you should be able to see the following output in the Console Output on Hudson dashboard.




Step 5: Browse to Sonar Dashboard
Once the build succeeds in the last step, browse to http://localhost:9000. And you should be able to see the Sonar Dashboard as such:


That's all it is to download, install, configure and get continuous quality updates from Hudson and Sonar. The above steps took me less than 15 minutes.

I am sure many of you are already using Sonar. I haven't used it with any of my clients yet. Hopefully, will do so soon. Share your thoughts if you are using Sonar.

P.S: In case you are using other CI servers, no need to panic. You can read a detailed documentation here for all the CI servers Sonar supports here.

Friday, November 20, 2009

Continuous Quality Using Sonar

The first time I looked at Sonar was almost an year ago. At that time, Sonar worked with just Maven and most clients I was working were using Ant. The other reason I didn't dig deeper into Sonar was because we already had written a Plug-in to generate a dashboard using FuseMetrics. You can read more about FuseMetrics and what it does and an article I wrote for Javalobby here.
Last week, one of my colleagues asked about Sonar, and that's when I decided to have another look. Sonar now has a Hudson plugin, and in just a few minutes I was able to download Sonar, install the Hudson plugin, make some changes within my project in Hudson, run a build. Within minutes, I was able to browse my project and look at the dashboard from within Sonar. Awesome.

Yes, it took just a few minutes. Of course, you should have Maven installed on your machine.

Sonar and Hudson are a perfect match if you are conscious about the quality of your code.

Stay tuned for a detailed post about Hudson and Sonar in a few days.

Thursday, July 30, 2009

Meera Subbarao - Recent Nomination Into The Global Directory of Who's Who

I guess this a new type of scam from these spammers. The email was of course in the quarantine summary I received. But, I decided to post it just in case people who have no clue might click on the link they provide and get scammed.

Attached below are the contents of the email.

Dear Meera Subbarao,

It is my pleasure to inform you that on July 23rd, 2009 your information was reviewed and accepted for inclusion in the 2009/2010 edition of our registry.


The Global Directory of Who's Who each year, recognizes and selects key executives, professionals and organizations in all disciplines and industries for outstanding business and professional achievements.
This recognition is shared by those who have reached a distinguished level of success in their chosen profession.
Please take a moment to complete the invitation by clicking on the link below. We ask that you complete it carefully, as it will be reviewed by our editorial department.


The link provided here has been removed.

** Please complete the online link by August 15th.


The Global Directory of Who's Who is pleased to inform you that there are no fees or dues to be included in the publication. On behalf of the publishing department and our esteemed staff, we wish you continued success.

Sincerely,
John Franklin


In case you received any such emails just delete them. Don't even bother to read the same.

Thursday, June 4, 2009

How Did I Lose focus?

I was a master multitasker. Working a full time job, writing blogs, writing articles, reading a lot of books, and writing detailed reviews for all the books I read. To top this all, take care of my family, drive my teenage daughter everywhere, cooking which of course is my hobby. I did all these with great interest and a perfect timing.

However, from the past 7-8 months, not sure what happened everything changed. Not one blog entry for months. Didn't write one article for Javalobby. Wasn't able to finish the two books which came my way. I keep grumbling while cooking. Can barely walk for a few yards because of the foot problem.

Is it because of the hectic travel schedule within the job? Is it because of my persistent foot problem which has become chronic? Is it because I am getting old? Or is it just a temporary phase which everyone goes through? Haven't excercised in almost a year now.

I have no idea. I don't like this phase at all. I really want to get back on track. But, have no idea where to start.

Why am I not able to work effectively as I did earlier?Has this happened to you? How did you get back on track?

I hope I will get back my focus and mutltitasking abilities soon, and be more active within the community.

Wish me luck.

Friday, April 3, 2009

STP Conference - Won Olympus Stylus 1050 SW

I talked yesterday at the STP Conference held at San Mateo, CA. My session was from 2.15 - 3.15 p.m. The hall was packed. The audience was very communicative and enthusiastic about knowing how to test web services. Oh yes, I spoke about testing web services using SoapUI.

Here are the details about my talk as posted on the conference web site:

NEW!
805 Web Services/SOA Testing Made Easy
By Meera Subbarao
Learn how SoapUI can be used to write functional tests by creating and executing test cases against your Web services. Includes a demonstration using Groovy scripts for assertions, properties setup and tear down for each test case. Also covers use of the tests in a continuous integration environment, with the Hudson Java servlet as an example of integration and execution of the tests, breaking the build when tests fail and generating reports.
NOTE: A laptop is strongly recommended for this class.

BTW, I didn't write this blog entry to mention about my talk. I actually won an Olympus Stylus 1050 SW Digital Camera. The camera is worth $300. Just awesome. It is the first time I have ever won anything. And that too a digital camera when the one we had just broke last week. Amazing.

Friday, March 6, 2009

Hudson and Doxygen

I wrote an article last year for Javalobby and couple more blogs on Doxygen called "Javadoc or Doxygen". Doxygen is a documentation tool for many languages such as Java, C, C++ and so on. In that article, I show how to use Doxygen for generating technical documentation based on your source code, keep this up-to date by adding additional tasks to Ant build files, and run them from your CI Server(Hudson in my case) on commit and nightly builds, and also publish the results.

It sure was easy and needed just 3 steps. However, while preparing for my presentation for SD West next week, I saw that Hudson has a neat plug-in for Doxygen. So, here is another way of generating your documentation on a daily basis in 3 simple steps.

1. Download the Doxygen plug-in for Hudson. This is quite easy if you already have Hudson up and running. Just click on the '"Manage Plugins" link, and in the available list check Doxygen and install. Restart hudson for this plugin to become available.

2. Next, configure the plug-in within your Hudson job. As shown below:

3. Finally, if you have configured the Doxygen config file earlier, just force a build and see your updated docs on the dashboard of your project. No XML file, no Ant targets. Isn't it cool?



Just 3 simple steps, how much easy can generating documentation be? Now you know why I am so crazy about Hudson. Don't you agree?

As always, keep me posted if you need any help. You sure won't. But, in case....

Thursday, February 12, 2009

Book Review : Stripes:...And Java Web Development Is Fun Again

It has been a hectic 2009. I was working in San Francisco for the past 7 weeks. Back after a long time. I read several books while traveling to and from San Francisco, so you will see many more book reviews in the coming weeks.

Just yesterday, the review for "Stripes:...And Java Web Development Is Fun Again" was posted on Javalobby. Stripes is an amazing framework, and this book with quite funny quotes and excellent working examples makes web development really fun.

You can read the chapter-wise review in detail here.

Are you using Stripes? Have you read this book? Mind sharing your thoughts about Stripes or the book?

Stay tuned for many more reviews for some very interesting books coming soon..

Thursday, January 15, 2009

Book Review : JBoss in Action

The detailed chapter-wise book review for JBoss in Action has been published on Javalobby yesterday. I am really really surprised by the comments that review has received; 123 comments in less than a day. Of course, DZone has partnered with Manning to give away a free book. Most comments are for the free book giveaway.

I have been getting free books for almost 5 years now. It is not actually free, I do spend a lot of time reading and writing detailed reviews. And, of course I pick and choose which books I want to read.

However, I was surprised to see so many using JBoss AS. So, fellow developers, if you are using JBoss and want a free copy of the book, leave a comment. You might be the lucky one to get the book also.

Thursday, January 8, 2009

JBoss in Action : A Sneak Peek

Since this is my first post for 2009, WISH YOU ALL A VERY HAPPY NEW YEAR!.

I started reading the book "JBoss in Action" in October 2007 just before I did the interview with the authors of this book for Javalobby titled "An Interview with JBoss in Action authors Javid Jamae and Peter Johnson. I kept asking the authors and also the publishers every few months if the PDF I was regularly getting the final version. It took almost 1 and 1/2 years from the day I started reading this book. Anyway, the book is finally out.

The book is just amazing. The authors have packed so much detail in this book. JBoss in Action is the first book I have read to focus in detail on how to use the JBoss 5 application server from installation to configuration to production development. The topics on security are also very well covered.

This book is divided into four parts, containing 15 chapters and two appendices. This books covers 5.0.0.GA version of JBoss AS, the chapters on the portal are based on the 2.6.4.GA release running on JBoss AS 4.2.2, and were later verified with JBoss AS 4.2.3 and Portal 2.7.0.

Part 1 covers JBoss AS basics like configuring the server, deploying and undeploying applications and a brief overview of security.

Part 2 shows how to configure, deploy Java EE technologies. There is a complete chapter messaging and web services as well. Very interesting chapters.

I wasn't sure why the authors decided to dedicate Part 3 entirely to JBoss Portal. I did evaluate JBoss Portal long time ago, no real experience here. I would have loved to see this part replaced with two chapters on JBoss Seam. The earlier version of PDF I read had JBoss Seam, I guess the authors had their reasons to remove those chapters.

Part 4 : Going into Production was very interesting. Especially the topics which cover Clustering and tunning the JBoss AS are very well written.

I was a big fan of JBoss until 2007. Once we switched to Java 6, I had big trouble using JBoss and EJB3 with Java 6. So, I haven't used JBoss since than. But, I have seen many of my clients using JBoss.

It is very simple to rate this book: everyone who uses JBoss AS should own and read a copy.

Stay tuned for a detailed chapter wise review and the rating on Javalobby.

Tuesday, December 30, 2008

2008 : The good, bad and ugly

I am so glad 2008 is finally coming to an end. It was indeed a roller coaster ride for me from the beginning. Lots of ups and downs.

The highlights of 2008 were speaking at conferences, giving presentations locally, wrote 68 articles for Javalobby, the three part SoapUI article was #1, #2 and #8 at Architecture Zone and SOA Zone. I also had the opportunity to learn and use many tools.

Now coming to the bad. I always wanted to learn Maven; I even tried to use it a few times. I first tried to use Maven was when I reviewed the book “Java Power Tools”. It was a simple project, and everything seemed to work fine. However, I failed miserably when I tried using Maven for a few other examples. Instead of persevering through my problems I gave up.I started out wanting to become an expert on Maven; I ended up being just another Novice.

Up until my spell of laziness, I read about 2-3 books a month. Starting in about October, I began to lose interest in reading and reviewing books. But I do hope to reverse this trend in the next year.

I never knew that there would be something worse waiting for me in 2008. I used to feel so bad whenever I heard on TV that a company was closing its operations and all the employees were laid off. I felt so bad for them, had no idea that it was going to happen to me also.

When I heard that the company I was working was closing its operations and we were given just 3 days notice, I was devastated, shocked and stunned. I just can't even write how I felt in those few days. My world had turned upside down. I had planned a trip to India to visit my parents and had collected 80 hours of vacation. Lost all of them, the company had no policy of paying for unused vacation. Hah, they tell me at the end. It was just bad.

However, I am sure I had done some good karma, I was able to find another job in just 3 days. Thanks to one of my Friends who referred me.

Now that I have gone through the worst, I am sure I will be able to cope better next time if the same happens.

Anyway, what an incredible year 2008 was. Life is full of surprises; good, bad and ugly, and if and only if we could predict the future........

Tuesday, December 16, 2008

Stripes Framework - Worth Trying

When I received an email a couple of weeks back from "The Pragmatic Bookshelf" about the book "Stripes ...and Java web development is fun again", I completely ignored the same. I didn't want to learn yet another web framework, and write a detailed review either. I wish I had signed up for reviewing this book.

Just a few days back, I read the article on "TSS" about Stripes called "A Stripes 1.5 Test Drive". The one and only one thing which attracted me to this article was that other than the web.xml file, there wasn't any XML configuration files to be written and to maintain.

I read the article with great interest, and also read the documentation on the Stripes web site. Next, downloaded the libraries and was able to get it working with the many samples I had in minutes. Yes, trust me just minutes.

So, I decided to do something even more interesting which I always do and surprisingly it worked like a charm. I am planning on writing a detailed article about how I was easily able to use Stripes with my existing sample projects.

Have you used Stripes? What do you think about the same? Isn't it a great framework?

Stay tuned about my article as well, I will keep you posted sooon.

If you haven't used Stripes, give it a try. You will be really surprised to see how easy it is to use Stripes.

Tuesday, December 9, 2008

The Three Pillars of Continuous Integration

Continuous Integration commonly known as CI is a process that consists of continuously compiling, testing, inspecting, and deploying source code. In any typical CI environment, this means running a new build every time code changes within a version control repository. Martin Fowler describes CI as:
A software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build to detect integration errors as quickly as possible.

Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.

While CI is actually a process, the term Continuous Integration often is associated with three important tools in particular. As shown in the screen above the three pillars of CI are:

1. A version control repository like Subversion, or CVS.

2. A CI Server such as Hudson, or Cruise Control

3. An automated build process like Ant or Nant

So, let’s look at each of these in detail:

Version Control Repository:

Version control repositories also known as SCM (source code management) play a crucial role in any software development environment. They also play a very important role for a successful CI process. The SCM is a central place for the team to store every needed artifact for the project. It is mandatory for the teams to put everything needed for a successful build into this repository. This includes the build scripts, property files, database scripts, all the libraries required to build the software and so on.

The CI Server:

For CI to function properly, we also need to have an automated process that monitors a version control repository and runs a build when any changes are detected. There are several CI servers available, both open source and commercial. Most of them are similar in their basic configuration and monitor a particular version control repository and run builds when any changes are detected.

Some of the most commonly used open source CI servers are; Cruise Control, Continuum, and Hudson. Hudson is particularly interesting because of its ease of configuration and compelling plug-ins, which makes integration with test and static analysis tools much easier.

Automated Build:

The process of CI is about building software often, which is accomplished through the use of a build. A sturdy build strategy is by far the most important aspect of a successful CI process. In the absence of a solid build that does more than compile your code, CI withers. With automated builds, teams can reliably perform (in an automated fashion) otherwise manual tasks like compilation, testing, and even more interesting things like software inspection and deployment.

Now that we have seen the important tools in our CI process, let’s see how a typical CI scenario looks like for a developer:

* CI server is configured to poll the version control repository continuously for changes.
* Developer commits code to the repository.
* CI server detects this change, and retrieves the latest code from the repository.
* This causes the CI server to invoke the build script with the given targets and options.
* If configured, CI Server will send out an e-mail to the specified recipients when a certain important event occurs.
* The CI server continues to poll for changes.

Why is CI Important?

This is one of the most frequently asked questions, and here are a few points to note about this powerful technique:

* Building software often greatly increases the likelihood that you will spot defects early, when they still are relatively manageable.
* Extends defect visibility.
* CI ensures that you have production ready software at every change.
* CI also ensures that you have reduced the risk of integration issues by building software at every change.
* CI server can also be configured to run continuous inspection which can assist the development team in finding potential bugs, bad programming practice, automatically check coding standards, and also provide valuable feedback on the quality of code being written.

Over the past several months, I have assisted several companies in implementing CI. There was a little bit of resistance from the developers in the early stages when we implemented continuous feedback. But, never heard a single negative comment about this approach. If you already have a version control repository and automated builds, you are very close to the CI process.

Download one of the open source CI servers, configure and setup a simple project. It should take less than an hour if you have automated build scripts. Start adding additional features like code inspections, generating reports, metrics, documentation and so on. Most important, send continuous feedback to your team.

Give this process a try, you sure will be surprised to see how effective it is. And, as always share your thoughts, concerns or questions.

Monday, December 8, 2008

Spring vs EJB War : Will It Ever End?

I can't believe I am even writing this post. My article at Javalobby "EJB 3.1 - EJB New and Improved", became the place for a few people to make it a Spring vs EJB war.

I received several emails asking about my opinion. I did comment saying
As long as it is a healthy discussion on Spring Vs EJB and not a war of words between two individuals, I have no problem at all.


There was one person who went to say that "I was gaining more popularity with this article". I have been writing articles from many years now. Every time I have learnt something new or interesting, I have tried to share those with my community. I don't need such fame.

Of course, it had no effect, and the discussions took a completely different route.

I had seen such war of words and arguments when it came to Java vs .NET, but never had heard or read about two great and very useful framework and specification. I had one former colleague who went to such an extent saying:
I will jump off the bay bridge rather than work on Java.


I didn't understand that statement than, and don't even now. And now with this discussion taking a route which I had never imagined, I am even more confused.

What are your thoughts? Why do developers go to such extreme? Isn't it another language or framework? Don't we learn new languages when we go to different countries however hard it may be? Why we as developers have such hatred towards other technologies?

Thursday, December 4, 2008

Interesting books from Apress

I received an email yesterday from the contact I have for Apress about some new and interesting books. Some of these books are going to be available in January 2009, and some in late December.

Here is a sneak peek into the list:

978-1-4302-1877-7 Spring Persistence — A Running Start Fisher, Paul Jan 2009

978-1-4302-1648-3 Pro Spring Persistence with Hibernate Seddighi, Ahmad Jan 2009

978-1-4302-1881-4 Apache Batik: SVG Toolkit Kumar, Ajit Jan 2009

978-1-4302-1926-2 Grails Persistence with GORM and GSQL Fischer, Robert Jan 2009

978-1-59059-995-2 The Definitive Guide to Grails, Second Edition Rocher, Graeme Jan 2009

978-1-4302-1600-1 Groovy and Grails Recipes Jawad, Bashar Dec 2008

978-1-4302-1055-9 Practical RichFaces Katz, Max Dec 2008

978-1-4302-1883-8 Eclipse Rich Ajax Platform: Bringing Rich Client into the Web Lange, Fabian Dec 2008

And here is a list of books which have already been published and is available for you to purchase.

1. 978-1-4302-1061-0 Beginning Java™ ME Platform Rischpater, Ray Oct 2008

2. 978-1-4302-1624-7 The Definitive Guide to Spring Web Flow Vervaet, Erwin Oct 2008

3. 978-1-4302-0963-8 Beginning Database-Driven Application Development in Java™ EE: Using GlassFish™ Vasiliev, Yuli Sep 2008

4. 978-1-59059-737-8 The Definitive Guide to Apache MyFaces and Facelets Wadia, Zubin Sep 2008

5. 978-1-4302-1057-3 The Definitive Guide to SOA: Oracle® Service Bus, Second Edition Davies, Jeff Sep 2008

6. 978-1-4302-1031-3 Beginning Google Web Toolkit: From Novice to Professional Smeets, Bram Sep 2008

7. 978-1-4302-1009-2 Pro Java™ EE Spring Patterns: Best Practices and Design Strategies Implementing Java EE Patterns with the Spring Framework Kayal, Dhrubojyoti Aug 2008

8. 978-1-59059-921-1 Pro Spring 2.5 Machacek, Jan Aug 2008

9. 978-1-4302-0973-7 Practical API Design: Confessions of a Java™ Framework Architect Tulach, Jaroslav Jul 2008

10.978-1-59059-986-0 The Definitive Guide to Terracotta: Cluster the JVM for Spring, Hibernate and POJO Scalability , Terracotta, Inc. Jun 2008

11.978-1-59059-979-2 Spring Recipes: A Problem-Solution Approach Mak, Gary Jun 2008

12.978-1-4302-1045-0 Beginning Groovy and Grails: From Novice to Professional Judd, Christopher M. Jun 2008

Tuesday, December 2, 2008

Article Recursion

Sometime in late October, I wrote an article on code coverage for Javalobby called "Is Code Coverage Important?". This article had some very interesting comments. This article was quoted in many blogs.

And, just yesterday my friend Andrew Glover wrote an article in his The Disco Blog called Code coverage coterie confab.

The article was also quoted by another blog as well. The article is "Code Coverage, what is it good for?".

What are your thoughts about code coverage? Do you use it? Share your thoughts?

EJB 3.1 - A Brief Look

Just yesterday, the article I wrote on EJB 3.1 - EJB New and Improved! went live on Javalobby. In this article, I examine a few interesting topics being considered in the new and improved version of EJB such as optional Session Bean Business Interfaces, Global JNDI Names, Singleton Session Beans, and the EJB 3.1 Embeddable Container.

The article has generated very interesting discussion from many readers, and there are very good comments as well. Javalobby also posted it as a Spotlight Feature.

I used the latest version of OpenEJB which has support for quite a few features of EJB 3.1 to work out all the samples. I was able to unit test all the samples as well with just a click of the button in Eclipse IDE. Just amazing for how EJB's have come.


Monday, December 1, 2008

Any Code Analysis Tools for Groovy & Grails?

I had an interesting comment from one of the readers at Javalobby. To quote him:

Hello Meera,

I was just wondering if we have a code analysis tool in the market that integrates and works well with Grails & Groovy? Your response is very much appreciated and valued.

Many Thanks,

Navatha




I have used code analysis tools for both Java & .NET, but none for Groovy until now. I am pretty sure FindBugs which analyzes the byte code might work for Groovy and Grails. All other tools inspect the source code, so we might not be able to use any of them.

Have you used any such tool with Groovy & Grails? Any ideas? If so, please share your thoughts.

Saturday, November 29, 2008

Terror in India

The terror attacks in Mumbai(Bombay) have made me so sad and mad from the past 2 days. Having had holiday on both Thursday and Friday, and watching this ongoing fight live on CNN, has troubled me even more. Like they say "Picture says a thousand words", seeing the images brings tears into my eyes.

I just don't understand how these terrorists could just go off and kill all the innocent people. They even went into a Maternity and Childrens hospital, can you believe how cruel these terrorists are? What might be going on in their minds? How do they get such hatred toward people?

Reading all the online stories makes me even more sad. Just unbelievable. With more than 1 billion people, how do we suspect any one person of this motive?

Who is responsible for the bloodshed? Can anyone stop this bloodshed at all?

If there is God, I pray to him sincerely to put some common sense into the brains of all these terrorists.

Wednesday, October 22, 2008

Why Pair Programming Should be made MANDATORY

Pair Programming is one of the most controversial topics discussed time and again. In the beginning I was a bit hesitant about this practice, but slowly I got used to this and really enjoyed working with another developer. However, when in one of my projects, I was the sole developer for nearly months, I knew how important it is for us to really have another pair of eyes. The few months I worked alone, I was not myself at all. Even though I had the opportunity to learn all the latest and the greatest technologies, I just couldn't take it anymore. I had to resign and so did I.

Now that I am reading the book "Pragmatic Thinking and Learning
", I was able to clearly understand why I felt the way I was in that Job working alone. In Chapter 4: Get In Your Right Mind Andy explains about Pair Programming and why it is important. He first explains about the R-Mode and the L-Mode of our brain. So, you may ask what is R-Mode and L-Mode:


If you're looking for global, holistic patterns, you need R-mode. If you need to analyze parts and look into detail, then you need a more L-mode approach. For most of us, this level of specialization is how it is. R-mode sees the forest; L-mode sees the tress.


For pair programming, Andy very well explains that we need to get both R-mode and L-mode working together, and the only way to do this is by having your L-mode work with another person's R-mode or their R-mode work with your L-mode.

Again,to quote from this excellent book:

The navigator is free to see these larger relationships and the larger picture, And most of the time, you cannot see these relationships if you're driving. So if you aren't pair programming, you definitely need to stop every so often and step away from the keyboard.


This doesn't mean that you should pair all the 8 hours you are working. I suggest we should pair when we are working on a critical piece of our module, when we are trying to fix bugs, learn a new language, writing build files. Always better to have another pair of eyes, and another mode of brain.

What do you think? Are you using Pair Programming at all? What are your thoughts?

Tuesday, October 14, 2008

Clean Code : MUST Read Book

Just yesterday, I posted a brief review of Clean Code: A Handbook of Agile Software Craftsmanship written by Robert C. Martin. at Javalobby.

What an amazing and interesting book it is. Around 4 weeks back, the book was at my front door when I came back from work. The next few weeks were quite hectic and I had no time to even open the book. Finally, two weeks back I decided to just browse the contents. I first read the foreword, which again is amazing. That was the beginning, I just couldn't stop.

This time since I hadn't signed up to review this book, I thought I should try a different format of writing the review. I mentioned 5 reasons why this book was worth reading, simple ones. And, later at the end summarized what I had learnt from this book. I guess it stuck a cord with the readers, and there were some good comments as well.

Take a look at the review, and try to get this book if you read or write code. Trust me it is worth the money and the time.

P.S: I sent an email to the publisher to find out who had shipped this book, and my contact at Pearson had sent the book. I did thank her profusely for sending this book along as well.

Friday, October 10, 2008

Maven: The Definitive Guide--New from O'Reilly

For those of you who are interested in learning and using Maven as your build tool, O'Reilly has just released a book called "Maven: The Definitive Guide".

To quote from the email I received:

For too long, developers have worked on disorganized application projects, where every part seemed to have its own build system, and no common repository existed for information about the state of the project. Now there's help. The long-awaited official documentation to Maven is here.

Maven: The Definitive Guide (O'Reilly, US $34.99) serves as both an introduction and a comprehensive reference for Apache Maven, the tool that will transform the way an organization builds and manages application development. Written by members of Sonatype's engineering team—including Jason van Zyl, the creator of the Maven central repository—the book explains why Maven is replacing Ant as the tool of choice, not just for open source Java projects, but for applications in many other languages, including Scala, Ruby, and Groovy. The book also provides the first in-depth overview of Maven 2.

The first half of this book introduces Maven by example, with a series of real-world, multi-module applications that can be used as templates. The second half serves as a reference to a wide range of topics, teaching readers how to:

* Get started with Maven
* Understand the Project Object Model (POM)
* Integrate Maven with Eclipse
* Master advanced dependency management
* Use the Nexus repository manager
* Integrate Maven with Spring and Hibernate
* Write and use Maven plugins
* Generate a project website
* Customize a build with properties
* Use build profiles and profile activation
* Create and use Maven assemblies
* Develop with Maven archetypes


I did try learning Maven several times, and each time got lost in the POM. It sounds like this book is for people like me, but I already have quite a few books in my list. And with this one for me to review, I sure will have to try all the examples, and there isn't just enough time right now.

Wednesday, October 1, 2008

What's FuseMetrics?

FuseMetrics is an open source tool written in Groovy, which can parse the reports of many of the most common analysis tools:

* Junit
* TestNG
* JDepend
* Checkstyle
* PMD
* JavaNCSS
* FindBugs
* Simian
* Clover
* Cobertura

It produces summary metrics and graphs - sparkline and histograms.

No matter what build tool you are using, Ant, Maven, Gant or Gradle you can use FuseMetrics.

It’s completely open source and we have used it for many of our clients. To read more about FuseMetrics, take a look at the article I wrote at Javalobby here.

Try it out and give us your feedback.

Thursday, September 25, 2008

What's Gradle?

My article a few days ago in Javalobby "Ant or Gant" had some very interesting comments. One reader posted about a new build tool which I had never heard of called "Gradle". To quote his comment here:


gradle is another java+groovy based build-tool
IMO gradle is clearly superior to gant.
it implements support for dependency-management
and some other really smart concepts.
check it out: http://www.gradle.org


As always, I didn't waste anytime once I saw this comment, and read the Getting Started and also Users Guide. It sure looks interesting. I will download Gradle and give it a try and share my experience. In the mean time:

Have you used Gradle? Share your thoughts?

Wednesday, September 24, 2008

Ant or Gant?

If you have complicated build files and have no clue what and how to refactor these files, check out the article I wrote at Javalobby called "Ant or Gant?".

This article explains the following in detail:

1. When to choose Gant?
2. What's Gant?
3. Getting Started with Gant.

Of course, you should know Groovy before you decide to runaway from Ant.

Tuesday, September 23, 2008

Are Software Developers in America Lucky?

This isn't a controversial post. Trust me. Let me give you a small background before you start freaking out.

I have been in the software industry for a long time now. Every time someone moves back to India, and at the same time I chat with someone in India or UAE, I have this dreadful conversation. Read on:

Question 1: Meera, when are you coming back to India?

Meera: I have some family responsibilities, I am not sure I will be coming back soon.

Question 2: You should, the salary they pay here is amazing, do you know?

Meera: Yes, I do. But, I am really happy and content with my salary here as well.

Question 3: How is the working hours there?

Meera: I work 5 days a week if I am within the DC area, and if I am travelling I work 4 days.

Question 4: We work almost 10-14 hours everyday, do you know that?
Meera: Yes, I do. I have also worked when the project was due, and we had tight deadlines.

Question 5: See, that could be one reason why you will not fit in here?
Meera: I don't know, I really know how to manage my schedule and manage work which is assigned to me. So, I don't see any reason whatsoever to work 10-14 hours everyday. I sure wouldn't work at a place where my Manager would expect me to work like that.

Question 6: You guys working in America are really Lucky.
Meera: I don't know, when it comes to work, I can speak for myself and the team with whom I have worked and most worked hard. So, I am not sure why we are lucky?



At this point, I knew the conversation was taking a wrong path, and decided to logout of IM, and later saying that I got interrupted. This has not happened to me once or twice, but many times over the past 2 years. I should admit, I just can't argue at all.

But, I am still shell shocked. Why do developers in India have to work 10-14 hours? Is it really needed? And can you stay focused working 10-14 hours a day? Do you still have the ability to concentrate after 8-9 hours of work? I don't know? I should try working for a month or so in India just to see how things are now, don't you think so?

What are your thoughts? Are we developers working in America really lucky? What do you think?

I remembered the quote from Thomas Jefferson, which says

I'm a great believer in luck, and I find the harder I work the more I have of it.

I guess that sums up why American Developers are Lucky, right?


P.S: If you haven't yet noticed, I am an Indian and proud to be one as well. But, I just don't understand the logic behind working more than 40 hours every single week; and hence this post.

Update: The only reason I posted this article was to know why our fellow developers were working long hours, and to know their state of mind. And it was posted in good faith. I am seeing that the comments are taking a completely different direction, and I just don't want to start a war of words. I am not going to respond/approve any anonymous comments.

Friday, September 19, 2008

Is easyb Easy?

Yes, that's exactly what you will find out by reading the article I posted a few days back at Javalobby. easyb is a BDD framework for the Java platform written by Andrew Glover. And, I learnt quite a few things from Andy as well about easyb. This artcile goes in detail about how to write a

1. Scenarios within Stories
2. Run these Stories from Ant
3. Generate a report.

Check out the article to find out what my verdict was. Also, give it a try and let me know your verdict as well.

Thursday, September 18, 2008

Javadoc or Doxygen?

If you have been thinking about how to improve your technical documentation, than you have to take a look at the article I wrote last week at both Javalobby and also Test Early.

Here are a few reasons why you should consider using the Doxygen:

1. With Javadoc you have to remember all the HTML tags, you need to embed within your code comments. However, with Doxygen code comments are much more concise and polished, without the need for any HTML.

2. Doxygen can also generate a variety of diagrams, we will take a look at some of them later.

3. Doxygen also provides a structured view on the source code. As I mentioned in 2 above in the form of various diagrams, cross-referenced and syntax highlighted code.

4. You get all the above benefits even if the code does not have any comments at all.

5. Last but not the least, Doxygen is a documentation system not for just Java but also for various other languages like C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#.

The article shows in detailed steps the following:

Step 1. Download, Install Doxygen.

Step 2: Configure Doxygen.

Step 3. Doxygen and Ant.

Step 4. Integrate with Hudson.

Thursday, September 11, 2008

See me at Software Development Best Practices 2008

I'd like to invite you to join me at …

Software Development Best Practices 2008
October 27–30
Hynes Convention Center, Boston, MA
http://www.SDBestPractices.com




Software Development Best Practices is where the software development community gathers to learn about the latest business-critical technologies, network with peers, connect with innovative vendors and get inspiration from industry visionaries. The conference features 140+ in-depth sessions covering today's most important topics including agile processes, requirements analysis, project/people management, security, testing, SOA, C++ and much more.

I'm pleased to announce that I'll be teaching following session at SD Best Practices:

"Web Services Testing Made Easy and Fun with SoapUI" on Thursday (October 30, 2008) 10:30am — 12:00pm

You can find additional details about my session here.

Register by Friday, September 19, to take advantage of generous early bird discounts. As a speaker, I can also offer you an additional $100 off the VIP Pass. Simply register at http://www.SDBestPractices.com with the code 8ESPK to get your discount.

I encourage you to visit the website and explore all the excellent educational opportunities SD Best Practices 2008 has to offer.

I look forward to seeing you in Boston!

Wednesday, September 10, 2008

The Art of Debugging with GDB, DDD, and Eclipse

Debugging, the demanding process of finding and fixing programming errors, is fundamental to successful software development. But even many experienced programmers find debugging a challenge.

The Art of Debugging with GDB, DDD, and Eclipse (No Starch Press, September 2008, 280 pp, ISBN 9781593271749) teaches readers how to effectively use the three most popular open source debugging tools: GDB, DDD, and Eclipse. The text-command based GDB (the GNU Project Debugger) is included with most Linux distributions. DDD is a popular GUI front end for GDB, while Eclipse provides a complete integrated development environment.

The Art of Debugging offers readers specific advice for debugging with each tool and explains general debugging strategies. Real world examples of coding errors help to clarify the authors' guiding principles, and readers will quickly understand why their programs crash or throw exceptions.
The authors are well-known for their popular online debugging tutorials, and a printed book is long overdue. According to No Starch Press publisher Bill Pollock, "Programmers are desperate for a book devoted to debugging, particularly with GDB and DDD. Finally, the wait is over. No more debugging by hand."

In the book, readers learn how to:

* Inspect variables and data structures
* Understand segmentation faults and core dumps
* Use features like catchpoints, convenience variables, and artificial arrays
* Avoid common debugging pitfalls
* Prevent errors in the first place by making the best usage of editors, compilers, and static code checkers

The book also includes coverage of advanced topics like thread, client-server, GUI, and parallel programming. Whether readers dread the thought of debugging programs or simply want to improve their current debugging efforts, they'll find a valuable ally in The Art of Debugging with GDB, DDD, and Eclipse.

Monday, September 8, 2008

Princeton Premier Registry Scam

I received an email which is listed here in its entirety. As soon as I saw it, I knew it was another scam. Being a thorough Google researcher, found out many had received the same, and it is just like one of those lottery emails we all receive. So, guys and gals, just delete this email if you ever receive one, and don't click on any of those links or pay any money.

Here is the email:

---------------------------------------------------------------------------------------
Subject: Meera Subbarao's Inclusion In Our Global Network

Meera Subbarao

It is my pleasure to inform you that you are being considered for inclusion into the 2008-2009 Princeton Premier Business Leaders and Professionals Honors Edition section of the registry.

The 2008-2009 edition of the registry will include biographies of the world's most accomplished individuals. Recognition of this kind is an honor shared by thousands of executives and professionals throughout the world each year. Inclusion is considered by many as the single highest mark of achievement.

You may access our application form using the following link:

http://princetonpremierbios.addr2.com/url/437460/6b3fde40/

Upon final confirmation, you will be listed among other accomplished individuals in the Princeton Premier Registry.

For accuracy and publication deadlines, please complete your application form and return it to us within five business days. There is no cost to be included in the registry.

If you've already received this email from us, there is no need to respond again. This email serves as our final invitation to potential members who have not yet responded.

On behalf of the Executive Publisher, we wish you continued success.

Sincerely,


Jason Harris

Managing Director
Princeton Premier

Friday, September 5, 2008

CITCON Amsterdam

CITCON, the Continuous Integration and Testing Conference, hosted by
Jeffrey Fredrick and Paul Julius will take place in Amsterdam on
October 3 & 4. Attendance is free!

This is the third annual CITCON event in Europe. London in 2006 and
Brussels last year were both a blast. Everyone walked away having
learned a lot about the cutting edge of CI and Testing.


You're invited! Register at: http://citconf.com/amsterdam2008/register.php

So, what are you waiting for? If you live somewhere close to Amsterdam, register. Trust me, you will learn a lot from this conference.

Thursday, September 4, 2008

Spring 2.5 books from Apress

Apress has released three very interesting titles on Spring 2.5.

1. Spring Recipes: A Problem-Solution Approach

I read and reviewed this book for Javalobby, and gave it 5 stars for all the categories.

2. Pro Spring 2.5

I might start reading this soon..

3. Pro Java™ EE Spring Patterns: Best Practices and Design Strategies Implementing Java EE Patterns with the Spring Framework

I am reading this book currently, and didn't find anything new which I didn't otherwise know about the Java EE design patterns. Haven't tried working on the code samples either.

If you are using or planning to use Spring, than you definitely need 1 and either 2 or 3.

Wednesday, August 27, 2008

EJB 3.0 and Spring 2.5

For those of you who are interested in using EJB 3.0 components in Spring, I have written a detailed How-to article at Javalobby. This article shows you how easily you can call EJB 3.0 session beans from within your Spring beans.

Also, some interesting comments from readers and a few from Reza Rehman co-author of the "EJB3 in Action" book.






UML Diagrams from NetBeans

Based on the article I wrote at Javalobby: Reverse-engineer Source Code into UML Diagrams, my DZone colleague Geertjan Wielenga has written another article on how to generate these UML Diagrams from within the NetBeans IDE, called Generate UML Diagrams into Javadoc in NetBeans Projects.

I especially liked the way Geertjan starts off his article by saying:
One incredibly useful article recently on Javalobby is called Reverse-engineer Source Code into UML Diagrams, by Meera Subbarao.

Take a look at your leisure.

Monday, August 25, 2008

Reverse-engineer Source Code into UML Diagrams

I wrote an article at Javalobby and testearly about how to use UMLGraph to generate UML diagrams from existing source code, how to integrate these within your build file, and also use the Ant targets within Hudson CI job, and keep your code base and the UML diagrams in sync. I also show how to include these ant targets in your commit builds or nightly builds of your CI jobs, and also publish these artifacts as part of the post build process.

The article shows how easy and simple it is to include UML diagrams within your Javadoc and also keep them updated with every change in the source code repository. We can do these in less than a few minutes, and in a few simple steps.

Getting started with UmlGraph takes five steps:

  1. Download the source code for UMlGraph.
  2. Download and install Graphviz.
  3. Make changes to your Ant build file.
  4. Run the Ant target.
  5. Add this target to your CI job.
The above 5 steps are covered in detail in the article.

Take a look at the article, and share your thoughts. The response has been amazingly good for this article.

Friday, August 8, 2008

Spring's so Groovy

Just yesterday, I wrote an article at testearly.com about how easy it was to use Groovy within Spring. I was reading the book "Spring Recipes - A Problem-Solution Approach", and the last chapter is about "Scripting in Spring".

I wrote a simple "HelloWorldService" in Eclipse IDE following the samples provided by this book. Trust me, it was so easy.

In this tutorial written at testearly, you will learn how to use Groovy with Spring, using an external script source file, how to refresh changes when a script source file is changed, and finally see an inline script which was embedded within the Spring configuration file.

Have you used Spring and Groovy? If so, do you mind sharing your thoughts?

P.S: Stay tuned for a detailed review of the book "Spring Recipes - A Problem-Solution Approach" at Javalobby.



Monday, August 4, 2008

New Apress Java Books - Summer 08

Last week, I received an email from the contact I had for Apress publishers, and was given this list of books which would be available in Summer of 2008. I have already read and reviewed the Spring book "Beginning Groovy and Grails". It was a great book indeed. Here are several other books some of which are already available and a few coming soon.

Pro Spring 2.5

The Spring Framework remains the leader in the move from so-called heavyweight architectures, such as Enterprise JavaBeans, toward lightweight frameworks. Pro Spring 2.5 covers the new features of Spring 2.5, but moreover, it is focused on best practices and core standards of contemporary Spring development.

The Definitive Guide to Apache MyFaces and Facelets

The Definitive Guide to Apache MyFaces and Facelets is an ideal reference if you're looking to develop real–world applications with the open source lightweight Apache MyFaces and Dojo (the Ajax API). It focuses on aspects like scalability, design, optimization, and configurability. And it includes lucid code samples that reflect the pattern being described.

Practical API Design: Confessions of a Java™ Framework Architect

Practical API Design: Confessions of a Java Framework Architect will be required reading for all designers and engineers involved with the development, testing, and maintenance of APIs.

The Definitive Guide to Terracotta: Cluster the JVM for Spring, Hibernate and POJO Scalability

Terracotta CTO Ari Zilka and his team give you the ultimate guide on Terracotta Java application infrastructure, as well as user secrets, recipes, and prepackaged frameworks.

Spring Recipes: A Problem-Solution Approach

Spring Recipes: A Problem–Solution Approach focuses on the latest available Spring 2.x fundamentals that you require for building a three–tier Java EE application with web interface and database persistence. The topics of this book are introduced by complete and real–world code examples that you may follow step by step.

Beginning Groovy and Grails: From Novice to Professional

Beginning Groovy and Grails is the first introductory book on the Groovy language and its primary web framework, Grails. It gets you started with Groovy and Grails and culminates in the example and possible application of some real–world projects. You follow along with the development of each project, implementing and running each application while learning new features along the way.

COMING SOON

Pro Java EE Spring Patterns: Best Practices and Design Strategies Implementing Java EE Patterns with the Spring Framework

Pro Java EE Spring Patterns focuses on enterprise patterns, best practices, design strategies, and proven solutions using key Java EE technologies including JSP™, servlets, EJB™, and JMS APIs. This Java EE patterns resource, catalog, and guide, with its patterns and numerous strategies, documents and promotes best practices for these technologies, implemented in a very pragmatic way using the Spring Framework and its counters.

Beginning Database Development in Java EE: Using GlassFish TopLink

Beginning Database Development in Java EE: Using GlassFish TopLink focuses on the open source TopLink persistence engine as a likely replacement for Hibernate long term. TopLink resides under the emerging official agile lightweight GlassFish application development framework and deployment platform project based on Java EE.

The Definitive Guide to SOA: Oracle Service Bus, Second Edition

The Definitive Guide to SOA: Oracle Service Bus, Second Edition is the first book to cover a practical approach to SOA using the BEA AquaLogic Service Bus tool. And it’s written from the “source”: BEA Systems AquaLogic product lead Jeff Davies.

Beginning Google Web Toolkit: From Novice to Professional

Learn to build rich, user–friendly web applications using a popular Java–based Ajax web framework, the Google Web Toolkit. The authors will guide you through the complete development of a GWT front end application with a no–nonsense, down–to–earth approach.

Thursday, July 31, 2008

[cobertura-instrument] WARN visitEnd, No line number information found for class

Have you seen this warning earlier? I have used cobertura for many years now, and while working on this demo was frequently seeing this warning. The cobertura-report was displaying N/A for Line and Branch coverage.

When I switched back to my Mac, things were working smoothly, when I moved back to my Windows Vista laptop on which I was preparing for the demo, I was getting the same warning and no coverage results.



I tried to run the target from ant with verbose on and it displayed the warning message saying:

[cobertura-instrument] WARN visitEnd, No line number information found for class com.stelligent.demo.CustomerInfo.
Perhaps you need to compile with debug=true?
[cobertura-instrument] WARN visitEnd, No line number information found for class com.stelligent.demo.StringToDate.
Perhaps you need to compile with debug=true?


Looked at the javac task at the Ant website, added a few more options and it worked like a charm. I have no clue why this happens on Vista, is it because I am using Java 6 here and Mc uses Java 5? Go figure.

The changes I added was as such for the javac task:

debug="true" debuglevel="vars,lines,source"


Wednesday, July 30, 2008

Windows Vista - Open Command Window Here

I have been working on Windows Vista machine to prepare for a demo which I was told needs Windows because the client was going to use Windows Live Meeting. So, no idea how to get this working on my Mac.

Anyway, each time I wanted to make sure my project works properly I had to open up a command window and go all the way to my project to run the build. This became frustrating and I looked at the "Windows Power Toys' and noticed that "Open Command Window Here" wouldn't work on Vista.




I accidentally was holding the shift key and also clicked the right mouse button, and viola magic happened. I was able to see the "Open Command Window Here" menu option with no additional downloads required.



Just click on this menu item and keep working. Isn't it neat. One nice thing about Vista.



P.S: I googled the same and found many had already blogged about the same as well. :)

Tuesday, July 29, 2008

Visual Documentation of Ant Dependencies in 3 Simple Steps

Last Friday, I wrote a blog entry at testearly.com about how to create visual representation of ant target dependencies using Grand and Vizant called "Visual Documentation of Ant Dependencies in 3 Simple Steps".

I was having trouble looking at build files generated automagically by one IDE. I like automation, but not which comes with magic. So, I tried using these two tools to generate the dot file and in turn open them using Graphviz. Graphviz is required to get the actual graph from this dot file which is generated by Grand and Vizant. Once you download and install Graphviz, you can run it as a standalone application and open these dot files generated as well.

Can you guess what IDE I was using? :)

Here is the link again for the blog at testearly:

1. Visual Documentation of Ant Dependencies in 3 simple steps.

Thursday, July 24, 2008

RESTful Web Services in 60 Seconds at Test Early

Just yesterday, I wrote a simple tutorial showing how easy it was to create, deploy and test RESTful web services using NetBeans IDE called "RESTful Web Services in 60 Seconds" at my company's blog Test Early.

I continued working on the same and was also able to quickly generate web services for the domain classes I had within my project. This was even more simple with all the CRUD services as well as relationships available in a few seconds as shown below:



Shown below is all the resource and converter classes generated by the IDE.



I was however disappointed that this same operation isn't available when you have a grails project. It would have been easier to right click on all your domain classes and say "generate REST web services" and it would create by default the REST Controller and the changes needed within the URLMappings.groovy class.

You can read all my blog entires at testearly.com here:
1. My entries

Sunday, June 29, 2008

Interesting Book: Persistence in the Enterprise


I received a copy of "Persistence in the Enterprise - A guide to Persistence technologies" book sometime back, I was so busy the last couple of weeks, I literally had no time to even look at the table of contents. Over the weekend, I finally decided it was time to do some justice to this book. So, here is a sneak peek of my review. A detailed review will be posted as always on Javalobby as well.

This book is mainly divided into two parts:

Part 1, "A Question of Persistence", helps the reader understand the many issues and trade-offs we normally face while choosing a persistence framework. This part has 4 chapters that cover the following:
Chapter 1 - A brief history of Object-Relational Mapping. This gives a brief history lesson of some popular relational database persistence mechanisms associated with a few object-oriented languages.

Chapter 2 - High Level Requirements and Persistence. As the name itself suggests, this chapter discusses IT requirements around your persistence framework that you should consider.

Chapter 3 - Designing Persistent Object Services. This chapter introduces the reader to some fundamentals and best practices of domain modeling. Also discusses some common strategies of mapping a domain model to a database with an example-driven approach.

Chapter 4 - Evaluating your Options. This chapter takes you through some best practices for conducting an evaluation based on an objective questionnaire, which is used as a template for comparison in part 2. The questionnaire is very comprehensive, and covers the following sections:
  • Background
  • Architectural Overview
  • Programming Model
  • ORM Features Supported
  • Tuning options
  • Development Process for the Common Example
Part 2, "Comparing Apples to Apples". This part has 6 chapters, the first five cover five frameworks using the approach and questionnaire discussed in chapter 4. The five frameworks covered in the next few chapters are
  • Chapter 5 JDBC
  • Chapter 6 Apache iBatis
  • Chapter 7 Hibernate Core
  • Chapter 8 Apache OpenJPA
  • Chapter 9 pureQuery and ProjectZero
Part 2 is finished with Chapter 10 which gives a summary that compares the mechanisms side by side and goes through a few scenarios in which one or the other best applies.

Appendix - Setting Up the Common Example. This section shows you how to set up and run the example for each persistence framework discussed. It has almost 30 pages, and has every detail and screen shots to get the examples working using Apache Derby as the database, Eclipse as the IDE, and JUnit and DbUnit as the testing frameworks.

Each and every chapter has a summary section, links to developerworks, and references which are really valuable.

If you have are using a home grown persistence framework, or considering writing one, or trying to move from one which you have been using, you should read this book before you venture into either one of those scenarios.

You can find the soft copy of the questionnaire at the link below:
Download the source code here:

Thursday, June 12, 2008

Chapter-wise review: The ThoughtWorks Anthology

The detailed chapter-wise review of the book "The ThoughtWorks Anthology" was published by Javalobby. If you are following TDD, or even planning to do so, this is a good book. There are some very good essays in this book. You can read the review here:

1. Javalobby

The essays which were very interesting and the ones I could apply immediately to my work were:
1. Object Calisthenics essay written by Jeff Bay
2. Consumer Driven Contracts: A Service Evolution Pattern by Ian Robinson
3. Refactoring Ant Build files by Julian Simpson
4. Single-Click Software Release by Dave Farley
5. Agile vs. Waterfall Testing for Enterprise Web Apps by Kristan Vingrys

Did you read this book? What are your thoughts?

Why do you need the latest version of Hudson?

It is hard to keep up with the latest version of Hudson, since they come-up with new releases at least 2-3 times a week. If you want to keep your plug-ins up-to date, you sure should get the latest version. With the latest 1.222 release of Hudson, installing or updating plug-ins is so easy. If you haven't been updating Hudson, this is the time to do so to the latest version which now by the way is 1.223.

Here are the steps to use the latest Hudson version:

1. Download the 1.223 version from here.
2. Stop Hudson and replace your hudson.war with the latest version.
3. Start Hudson, and go to dashboard and click on Manage Hudson which should bring a page like this:



4. Click on Manage Plugins, which will open up a new page as shown below:



5. Now, select the plugins you want to install and click the Install button which is all the way down on the right hand corner.



6. Restart Hudson, and you have the plug-ins installed.

Also, some other new features are useful as well as per the Hudson changelog:

a. "Hudson's own user database" can be now configured to prevent sign-up.
b. Administrator can now create user accounts for others (issue 1193)
c. Authentication failure now leaves the INFO log on Hudson server log.

Tuesday, June 10, 2008

Effective Java - A Must Read Book

After having finished the review for Java Power Tools, and having just submitted the review for "The Thoughtworks Anthology", I was planning on taking a small break from reviewing books.

Last week, I received an email from Addison-Wesley about their 4 new books. Out of those 4 books, Effective Java and Persistence in the Enterprise were the 2 books which interested me. Even before volunteering to review these books, I logged into safari and did read a few chapter links to see if it was worth all the time I was spending. The table of contents and the sample chapters did change my mind.

I just received these books yesterday, and already half way through the "Effective Java" book.
It is just unbelievable. The book is filled with pragmatic advice, plenty of samples, and is also very readable.

Stay tuned for the detailed review which will be published at Javalobby soon.

Monday, June 9, 2008

Hudson - Tips and Tricks

Hudson is an open source CI server that is by far the easiest one to configure. Second to ease of use is Hudson’s impressive plug-in framework, which makes it easy to add features. For instance, Hudson has a plug-in for tracking FindBugs issues, PMD issues, and CheckStyle issues over time as well as code coverage. It also trends test results from JUnit, as well as build results and corresponding execution times. In spite of all these cool features, we had to find ways to get around some common issues we faced at work using Hudson.

The article I wrote at my company's blog Test Early describes a few real-life tips and tricks that I have found at work and will assist in configuring Hudson to work most effectively in your environment as well:

  1. Changing Hudson home directory
  2. OutOfMemoryError
  3. Securing Hudson
  4. Hudson Views
  5. Hudson and Groovy
  6. Spaces in directory names
  7. Browser to use
If you are using Hudson, and need to know what these tips and tricks are check out the article at Test Early here.

Wednesday, May 28, 2008

Java Power Tools Book Review

Just yesterday, I finally finished reading and working out some of the samples from the Java Power Tools book. The detailed chapter wise review is now live at Javalobby.

I am really amazed at how many tools John has covered, and also with such great detail.

It took me a while to add just the links to all the 30 tools John has covered in my review. Each time I added a link, I kept wondering how much time John must have spent writing about each one of these. Awesome. I have such great admiration for John for providing us with such a wonderful book.

Even though the book is heavy, and has 910 pages, I carry it everyday to work. It is a great reference book for all the tools as well.

Also, with the help of this book, and only this book I was able to write my first simple and most simple project using Maven. Yes, you heard me right Maven. Had tried using Maven many times, and every sample I downloaded just failed complaining about some dependency which I wasn't even sure where it was being stored.

Tuesday, May 20, 2008

SoapUI, CI and Coverage

In the first two parts(part 1 and part 2) of this series we have seen how to use SoapUI to write functional tests for web services and also how to use Groovy for test setup, properties transfer, and assertions. As we have already said, tests should be integrated with your builds and should be able to be run with them. If you have automated your builds and they are running as part of your continuous integration (CI) setup, SoapUI comes in even handier: you can run the test suites and the test cases you created and, moreover, you can generate JUnit reports.

This part of the series guides you step-by-step through the Ant tasks for running tests written using SoapUI, generating JUnit reports, integrating with CI, and to top it all off getting code coverage using Cobertura. When you are done with this part, you will be able to reap the benefits of writing tests, continuous integration, and code coverage.

Read the complete article here at Javalobby.

Functional Web Services Testing Made Easy with SoapUI - Part 3

Tuesday, May 13, 2008

SoapUI's so Groovy

Functional Web Services Testing Made Easy with SoapUI - Part 2 is live at the at Javalobby. Part 1 of this series helped provide the background needed to begin exploring web services testing. We learned the basics of SoapUI and how easy it was to write functional tests without writing a single line of code. We also saw how to add assertions to these tests. What we will examine now is how to use Groovy within SoapUI for test setup, test teardown, response validation, and much, much more.

Take a look at your leisure, as always give me a yell in case you need to find out more.

Friday, May 9, 2008

Java Power Tools Finally Arrived

I came home today after work, exhausted sitting in the traffic for almost 2 hours. Opened the door, and to my surprise, I saw the Java Power Tools book waiting for me to be opened. The book is indeed heavy with almost 900 pages. This was one of the books I was waiting to read and review so badly.

I had interviewed John Ferguson Smart a long time back for Javalobby. From the day I did this interview, I was so enthusiastically waiting to read the book. I did glance over a few of the chapters, it is just unbelievable. With 30 tools being covered in this book, I will have to review this book in two parts.

I should mention that I did read the foreword first, since it is written by Andrew Glover, President of Stelligent. And that's where I work. :)

If you are writing software using Java, you should without a doubt get this book.

Stay tuned for the detailed review at Javalobby.

Tuesday, May 6, 2008

Functional Web Services Testing Made Easy with SoapUI - Part 1

I have written a detailed article at Javalobby which provides step by step instructions on how to write functional tests for your web services using SoapUI.

Here are the links where you can find the article on various Zones at Javalobby:
1. Java Zone
2. Architects Zone
3. SOA Zone

The next part in this article will cover SoapUI and Groovy.
Give me a yell if you need any help.