java

Injecting Logs into Seam Beans

Tagged:  

When using the Seam container there is a useful @Logging annotation which injects a Log object at runtime into the bean. In the seam documentation for unit testing the advice generally is to have setters on the class to allow the dependencies to be set. For logging this is not really desirable. One alternative for this is to write a small class that will inject a Log object prior to testing:

import java.lang.reflect.Field;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
 
public class LoggerInjector {
 

X-Ray plugin: visualise your code in eclipse

Tagged:  

Jacopo Malanti has recently released an excellent plugin for eclipse that allows the user to identify areas for improvement in large code-bases. It is called X-Ray. It draws two styles of diagram:

Cola: A new form of pair programming

Tagged:  

Mustafa Isik has produced a system where two people can edit the same file in a chat like way. Conflict are resolved in real time. This, Real-Time Shared Editing, allows people to work together over the network, this could be a really good technology for when teams work from different sites on the same project. Technologies like these might allow teams to be worldwide, making the most of talent globally on the same software.

Java puzzlers and findbugs

Tagged:  

Programmers need all the help they can get. It can be a thankless task sometimes and language designers with the best intentions cause misleading behavior to occur even in the simplest of code. The authors of Java Puzzlers, have mined the Java specifications misleading problems that cause issues in production code. It makes interesting reading, it can also points to scary traps that could trip up the hapless programmer. They do however recommend a tool called findbugs that will literally find bugs in your software.

Hamcrest and junit4.4

Tagged:  

Since the Hamcrest matching library has been taken out of jmock and placed in its own package it looks to be generally useful for the application developer.  Hamcrest support has now gone into the new version of junit4.4, along with some other interesting features. 

The assertThat assertion now takes a matcher which provides a better alternative to assertTrue improving the error report when a test does fail.  Here are some examples:

 

Dependancy Structure Matrix

Tagged:  

To manage complex interdependencies of components in software architectures a Dependancy Structure Matrix can be produced. This is a relatively recently documented technique is great for an overview of the project: it can be used to get a feel of the system design and the actual relationships beyond that of a block diagram. It might help to identify where the system might be brittle and require refactoring.

Hotext: Interesting new company

Tagged:  

An interesting new service targetting teenagers has been launched in the UK. Hotext is a texting service that uses the internet rather than the Short Message Service. The user has to download a java application to their phone to use the service, it aims to be cheaper than texting for those who text a lot.

Syndicate content
© Andrew Gavin 2005-2009. Get Firefox! Stumble Upon Toolbar Add to Technorati Favorites Get Songbird!