Steve Neal
This user hasn't shared any biographical information
Homepage: http://www.smartkey.co.uk
Posts by Steve Neal
Resolving Subservsion Tree Conflicts when Merging
May 13, 2010 - 11:10 am
Tags: Conflict, Merge, Subversion
Posted in Development | 2 Comments
When merging changes in a Subversion project, you’ll need to resolve any conflicts between your checked out version and the one that you are about to merge from the server. Commonly, conflicts arise when two or more developers have modified the same file; these can be resolved by accepting either parties changes or by completing [...]
Open Session in View Pattern for Spring and JPA
March 8, 2010 - 6:13 pm
Tags: Hibernate, JPA, JSP, Open, Session, Spring, Transaction, View, Web
Posted in Development, Java Programming | No Comments
The Open Session in View Pattern is well publicised in Hibernate circles as the best practice approach to presenting data in the Web tier of an application. In this article I’ll demonstrate how simple it is to configure a Spring application to do the same thing with the Java Persistence API (JPA).
Using Mockito to Unit Test Java Applications
February 25, 2010 - 6:39 pm
Tags: Google Code, Java, Mockito, Test, Unit Testing
Posted in Development, Java Programming, Tool support | 12 Comments
If you’ve spent any time writing unit tests then you’ll know that it’s not always straight-forward. Certain things are inherently hard to test. In this post I’ll show you the basic principles of creating mock objects with a little help from the Mockito mocking tool.
One common problem faced when unit testing is how to test [...]
Configuring MySQL on Mac OS X
February 23, 2010 - 2:41 pm
Tags: Mac OS X, MySQL
Posted in Development, Tool support | 1 Comment
I found the documentation for MySQL a little rough around the edges recently when I needed to change a configuration setting for it – everything seemed spread around their comprehensive PDF documentation and it took me a little while to fathom my way through it.
It’s not often that changes to MySQL configuration need to [...]
Using Assertions in Java
February 18, 2010 - 2:47 pm
Tags: Java, Programming
Posted in Development, Java Programming | 1 Comment
I’ve been working on a project this week and have been delighted to see that the original team of programmers who developed it have made the effort to use assertions in their code.
The assert keyword was introduced in Java 1.4 and has since been a sadly under-used language feature. Assertions offer developers a neat [...]
Counting the Days Between Two Java Dates using a Gregorian Calendar
December 2, 2009 - 3:03 pm
Tags: Calendar, Date, Gregorian, Java
Posted in Development, Java Programming | 6 Comments
Today I needed to figure out a way to count the number of days between two dates in Java. There are no API methods that will do this for you so a little work is required to achieve this. This post illustrates the solution I came up with.
Ignoring Files and Directories in a Subversion Project
December 1, 2009 - 11:58 am
Tags: Ignore, Subversion
Posted in Development, Tool support | 1 Comment
Configuring Subversion to ignore files can sometimes cause confusion. Like most things though, if you understand the basic principles, then its not tricky at all. In this post I’ll demonstrate just how you should go about ignoring files in a subversion project.
A Unix Command to Recursively Delete all .svn Folders
November 25, 2009 - 11:26 am
Tags: Subversion, Unix / Linux
Posted in Development, Tool support | 3 Comments
I recently needed to check out a project from Subversion and then delete all of the .svn files from the project directories. Google found me a few different ways to do this, but none of them seemed to deal with a case where some of the directory and file names had spaces or quotes in them – as mine did. After a little experimenting, I figured out how some simple Unix commands that could be combined using pipes to do this.
The Details of Member Level Inner Class Syntax
November 17, 2009 - 3:52 pm
Tags: Inner classes, Java
Posted in Development, Java Programming | No Comments
Inner classes offer are a powerful extension to Java’s object model. However, the syntax for some of the more advanced features of member inner classes is quite tricky to get to grips with. In this article I’ll explain the full details of this syntax.
An Explanation of ‘this’ in Java
November 8, 2009 - 7:03 pm
Tags: Beginner, Java
Posted in Development, Java Programming | No Comments
As every Java programmer should know, code within any non-static method can access the current object via a special reference called ‘this’. Just how this works may not be immediately obvious so I’ve taken a moment to explain it here.
