One day I found myself in the situation that I had to write a unit test which checks whether my code is annotated in a particular way. I wondered how one could do that without doing an integration test that actually processes that annotations. My first idea was to use the Reflection API, which in fact worked, but was not looking smart. In fact, I wanted to have a Hamcrest matcher instead, since...
on Dec 27, 2013
Bugs are inevitable. Even after you thought you have finished coding your work, another bug creeps in, making you want to wish the bugs were real tangible objects that you could squish with your bare hands. Being a developer, you should be armed with the right weapons to battle bugs for they come almost all the time. In fact, they are building yet another Death Star. If you don't get vigilant,...
on Oct 24, 2012
Acceptance Test Driven Development (ATDD) is a method wherein business stakeholders, analysts, testers and developers collectively specify and agree on what needs to be completed in the project. Requirement specifications are set and verified even before actual development starts. This ensures that only those value-adding features are delivered to the business.
Instead of validating after the...
on Oct 21, 2012
Earlier this October, I was given the privilege of speaking at JavaOne regarding the fusion of contemporary Continuous Delivery processes and practices with the established and widely-accepted Maven release process. I spoke in detail about the similarities as well as the main differences, and how these techniques and methodologies can be combined to deliver iterations and releases that highlight...
on Oct 18, 2012
I like a good Java puzzle. The trickier the better. In this article I will tell you about a new set of puzzles by Wouter Coekaerts that will melt your Java brain.
About five years ago, I was suckered into participating in a Java Black Belt competition at a Java Tech Days in London. This was in the days before Her Royal Highness decided she had had enough South African visitors...
on Feb 16, 2012
Welcome to the 198th issue of The Java(tm) Specialists' Newsletter sent to you from Chania in Greece. My readers in colder climates frequently get annoyed when I tell them that "life's a beach". They imagine us having constant sun here. It's not true. We do sometimes have torrential rains and cold weather. It even snows here occasionally. In fact, the delivery...
on Feb 14, 2012
In this article we coax the JVM's Rhino (an elusive, misunderstood, and ignored member of the ecosystem) into a mind meld, giving it access to the JVM's thoughts, experiences, memories, and knowledge; and take it where no Rhino has gone before !
Let me set the context with some quick code:
ScriptEngineManager sem = new ScriptEngineManager(); ScriptEngine jsEngine = sem.getEngineByName("...
on Jan 25, 2012
I mentioned the idea to use Wordle as an execution profiler while presenting the profiling section of my performance tuning course in Paris last December. The idea was seeded by presentation that Neal Ford did a few years ago in which he used Wordle to expose the vocabulary of a Java application. Neal took a pile of source code and fed it into Wordle. The result was a word cloud that visualized...
on Jan 9, 2012
#How to run the dev test cases
All of the test cases can't be ran on the windows platform because the firefox can't support the ajax and JSF based on the windows platform very well. If you want to ran the tests, please check out all of the codes to the linux, ubuntu or mac platform.
1). Download the firefox and install it, On my platform, I...
on Oct 14, 2013
Your First Mikado Graph
by Ola Ellnestam and Daniel Brolund, authors of The Mikado Method
The Mikado Method is a structured way to make significant changes to complex code. What that means, is rather than getting caught up in the complexity of moving parts, analyzing the entire codebase and doing guess work, the Mikado Method removes the least amount of obstacles at a time in order to achieve...
on May 15, 2013
Acceptance Test Driven Development (ATDD) is a very effective development practice that essentially involves writing specifications in the form of documented and automated examples. These automated examples become automated acceptance tests that validate the features being delivered. The process of writing these examples encourages teams to focus on where the business value of a feature is coming...
on Sep 12, 2012
This blog lists the tips, tricks and answers to some of the commonly asked questions on Embedded GlassFish. This list is not sorted in any order. As I recalled I just listed them out here, and will add more as I come across more tips n tricks.
Which version of Maven is supported by Embedded GlassFish Maven Plugin?
org.glassfish:maven-embedded-glassfish-plugin supports Maven 2 and Maven 3
on Mar 19, 2012
This blog describes how to configure org.glassfish:maven-embedded-glassfish-plugin for deploying more than one application.
There was a community request for this. Refer:
The following pom.xml snippet shows how to configure...
on Mar 18, 2012
I’ve just returned from Ireland, where I was presenting a seminar on Clean Code Practices for Java Developers at the Paddy Power Technology Series. You can view my presentation notes.
I also gave a presentation introducing Thucidydes, which included a live coding demonstration. You can find out more about it.
While there I also trained two teams at Paddy Power (an online betting agency,...
on Mar 13, 2012
In the previous articles we have concentrated on testing using Glassfish. But can you use the same
recipe to do testing on Weblogic. The answer is YES, but ..... Yea you know there is always a caveat.
First make sure you have Weblogic installed properly. Note I did the testing with the latest 12c version,
so your mileage may vary.
Download the attached zip file again and follow along. In...
on Jan 13, 2012
Today I decided it was past time to reorganize the slides in the performance testing section of the course. I added a number of new diagrams and charts to help organize the materials and then I went back and started to review some of the definitions that I was using. First up was the question; what is performance testing and how is it related to load testing.
I must confess that I derived a...
on Jan 12, 2012
During the recent JavaOne conference, I was able to share how developers can put their Java codes up a notch by using functional programming and clean coding practices. Functional Programming puts the spotlight on what we want to get out of our codes rather than how we are going to execute them. With this in mind, codes are relatively easier to understand and are less error prone, due to the fact...
on Oct 20, 2012
Behavior-Driven Development (BDD) is all the buzz now. To contribute to the increasing buzz BDD has been creating, I'm heading off to the Canberra JUG meeting next week to give a talk about it.
BDD is a communication and collaboration process that aims to deliver what is only value-adding to the business. It is a process of establishing a common language between the business stakeholders and the...
on Oct 17, 2012
It eventually happened that I had to ensure that a class of mine is annotated in a particular way (I didn't want to bind the whole framework that uses the annotation just to ensure this single issue, as this was a unit test but not an integration test). So I wrote my own Hamcrest matcher with few pieces of reflection inside. Short time later I noticed that Hamcrest co-owner Nat PRYCE already did...
on Sep 1, 2012
Next week holds a lot of exciting events for me at Canberra. Aside from delivering a talk on Behavior-Driven Development for the Canberra Java Users Group, I will also be conducting the Agile Java Development Practices workshop.
If you want to learn how to write effective tests and better your code, produce high quality applications, know the latest on agile development tools and practices, and...
on Oct 17, 2012