Agile development has taken off in a big way and there are many notable companies that use it. However, there are still many companies that are stuck in waterfall mode and find it hard to make the transition. Here are some of the agile best practices that I’ve found can be incorporated into any team and provide immediate benefits.
Make it easy to commit code
Make it easy for developers to commit code and try and commit regularly so that your code stays in check.
Merging code that has been worked on for long periods of time is one of the most error-prone and time-consuming tasks a developer can be faced.
The ideal solution is to have your version control system integrated into your IDE, tools such as Eclipse and Subversion make this quite easy to achieve.
Short build cycle
I’ve come across numerous companies where they are so focused on other issues that they totally miss this one. Long build cycles mean that a surprisingly large amount of time is wasted when the developer has made a small change and is waiting for his code to compile. It can also mean that the developer loses momentum and focus, which in turn means that even more time is lost.
In addition to this, you may want to look at JavaRebel – which provides a Ruby on Rails like functionality to Java and allows you to make changes to Java classes on the fly.
Test Driven Development
Unit testing has become very popular and is probably one of the easiest things to sell to your boss. Adding unit tests to your code provides a number of benefits; it helps find development problems early on and provides developers with more confidence to refactor code, which in turn leads to better, more robust code.
Automated build process
There are a number of tools that will allow you to automate your build process CruiseControl and Hudson are two of the most popular ones. Build automation gives you immediate feedback on the health of your project and helps ensure that no bugs or compilation errors are introduced into the build.
Avoid creating silo’s of knowledge
Try and ensure that knowledge of all parts of your system is spread evenly between your developers. This stops development grinding to a halt when a particular developer is ill or on holiday, it also helps ensure your code is of a higher quality as more people will have worked on a particular component and hence it should be more standardized.
Have a place to share knowledge (informally)
Having a common place where everyone can share knowledge easily, such as a local Wiki can prove invaluable. There is obviously still a place for more formal documents, but a Wiki enables developers to do a brain dump on a particular problem or piece of functionality and store information that may have otherwise been lost.
Some of these agile best practices may seem obvious but actually implementing and sticking to them is where the challenge lies. In essence, these practices enable your team to work in a more efficient and responsive way, which should not only benefit the customer but also aid the developers in removing some of the distractions related to development and focus on the core task. Do you think there are there any that I have forgotten? Please feel free to leave a comment below.
With the large number of redundancies, there are more people looking for jobs and fewer jobs actually available. In such competitive times, you need to try harder to stand out against the competition. Having been in this situation myself a few times over the years, I managed to overcome the odds and not only get a job but also have the ability to choose between a selection of roles. Below are some of my ideas on how to improve your chances of landing that dream job.
Before I start I think it’s worth stating that a real interest in programming is a sort of a prerequisite. A lot of my advice will take a considerable amount of time, which will be much easier to handle if you have a genuine interest in this area.
1. Best Practices
Learn about Design Patterns and development best practices. Whatever problem you are solving, the chances are that someone out there has already solved it in a much more elegant way than you could. Learning about best practices can help you avoid making common mistakes and improve your standard of coding in general.
2. Finding Information
Learn how to use Google/resources properly. You might laugh at this one, but knowing the best way of searching on Google for help with a problem or for some extra information can be invaluable. Also don’t be afraid to post to developer forums/mailing lists, or even email the people in charge of a project for some help.
Gain a widely recognised accreditation. My personal recommendation would be The Sun Certified Java Programmer program – it would help give potential employees some reassurance into what your current standard of programming is.
4. Go Agile
Learn about Agile software development – I believe that an Agile approach is the best way to produce software and even if you don’t end up using it, you could incorporate some of the best practices into your role and impress your new boss.
5. Join a Project
Join and contribute to an open source project – preferably something that has a fair amount of developer activity and something that you find interesting and maybe even beneficial to your future options, some suggestions would be Hibernate, The Spring Framework, Selenium.
6. Write a blog
I think this would score a lot of brownie points with potential employees. Starting a blog has a number of other benefits also, such as building relationships with other people in the industry and increasing your level of visibility.
7. Learn Learn Learn
Keep up to date with the latest development related news and learn and experiment with new technologies. See my links section for more places to find information.
8. Improve your C.V
Your C.V is effectively your sales pitch to your potential employers, spend time on making it as clear, concise. Also, ensure that your strengths and full range of technical skills are adequately highlighted.
Why is Interface Design Important?
The usability of your product, whether it is a website, phone app or desktop program is one of the key factors in determining its success. One of the main reasons why Apple products are so successful is because of how easy they are to use.
I have put together a list of best practices that should help you regardless of what form your interface should take.
Having consistency in your interface enables users to apply their existing knowledge of previous applications in understanding and building up an accurate mental model of your application. Accurate mental models lead to less support and training being required.
The system should keep users informed of actions or events, such as errors and state changes that are relevant to the user. This helps provide the user with a greater sense of engagement with the application.
Tasks that the user is likely to do often should be simple and straightforward to do. The interface should be clean and simple with only useful and relevant information and components displayed.
In Western societies, people read left to right and top to bottom. Therefore to complement the users existing knowledge and expectations, screens designs should also be organized from left to right and top to bottom.
Mistakes are easily made. The interface should be able to handle misuse and mistakes by allowing the user to undo and redo operations wherever possible. A level of verification of the user’s input prior to any action is also encouraged.
This wasn’t an exhaustive list of everything that you can do to make your interface easier to use, but more of a high level taster, and if you keep the points mentioned in mind then it will in no doubt lead you in the right direction.
What user interface tips do you use on a regular basis that I didn’t mention above?
Which Java Tech Do I Use?
One of the best things about working in Java development is the vast amount of choice that is available for whatever your technical problem is. All this choice can sometimes be a bit overwhelming so I have decided to put together a list of technologies to help you decide which will be best for you.
The Spring Framework
Spring is the original framework that started the movement away from EJB’s and promoted a new more light-weight way of doing things in the form of Inversion of Control. At its core Spring frees you from having to write repetitive plumbing code and leaves you free to focus on coding business logic. There are also a number of useful additional modules that are provided – such as ones for AOP, JDBC and a request based MVC framework.
Hibernate is the most popular object relational mapping tool. Using Hibernate frees you from having to write low level JDBC code and enables you to deal with objects instead of tables.
I believe JSF is one of the main frameworks that is having success in taking over from Struts. It is a lot more light weight and promotes a more flexible approach to development. JSF is component-centric which makes it very easy to create pages with a number of different inputs. RichFaces is a good example of a popular suite of components that are available. While it had teething problems early on – especially with JSP integration, it has now matured into a much improved product.
Is a lightweight server (servlet container) that can be used to deploy web applications (WAR’s) onto. Jetty is one of its main rivals, which many would argue is faster.
Eclipse is arguably the best IDE out there for Java Development, it is very stable, fast and easy to use. It also has a thriving developer community around it, with many useful plugins available.
JUnit is a very popular framework for developing unit tests for Java classes. Tests are created by extending the base TestCase class and there is an assertion library for verifying the results.
Is a build automation tool that has been built on top of Ant. One of the key differences is that Maven manages your dependencies for you, which makes development a lot easier for large teams. It also generates some very useful project metrics and a wealth of documentation.
Is a new build automation server that I would say is the main sucessor from the original CruiseControl. Hudson provides the ability to automatically check out code, build and test it and then produce a report based on the outcome. Hudson provides some very useful additional functionality, such as change set support and distributed builds.
Is a version control system that is a successor to CVS. Subversion has a number of improvements over CVS, such as moving files is a lot easier, branching is straightforward, and the logging mechanisms are much better.
Allows you to create and easily execute automated tests against an actual browser. There is an IDE version that is a plugin for FireFox that allows you to actually record your interaction with the browser and replay it back. There is also a core version through which you can write tests in Java which is also quite easy to use. I find writing Java based tests is much easier and at a more comforable level of granularity than HTMLUnit.
Scalability and performance optimisation are crucial requirements for todays Web apps – Grinder is one of the best open source tools out there to help you test and refine the capabilites of your application. Grinder has a simple and easy to use UI with a scripting language in Jython to produce more complex tests. JMeter from Apache is also a very good related product.
Feel free to leave any comments if you think I have missed any of your favourite technologies.
Getting Started with Grails
I’ve been using Grails for developing web applications for a while and in this post I’m going to give an overview of Grails and provide some of the benefits and disadvantages of I’ve come across when using it.
Grails is a web framework based on Groovy and Java which can be deployed onto web servers such as Tomcat or Jetty.
Grails follows the convention over configuration concept that Ruby on Rails has made famous. It provides a command line interface and code scaffolding that allows you to create a full application quickly.
If you haven’t used Groovy before the best way to describe it as being a superset of Java; most valid Java constructs are also valid Groovy constructs. Groovy has a number advanced features that complement the capabilities of Java, the syntax is more concise, you can use closures, and there is native support for lists and maps
- The primary benefit is that Grails is a highly productive framework; the emphasis is on being able to automatically create artefacts quickly from the command prompt.
For example grails create-controller creates a new controller and automatically does all of the plumbing related to that controller. Even more powerful is the grails generate-all, which creates all the artefacts and interfaces for performing CRUD (Create/Read/Update/Delete) for the domain specified.
- Grails also underpinned by solid frameworks – it uses frameworks such as Spring, Hibernate (uses GORM which is based on Hibernate) and Sitemesh which are very mature and established frameworks.
- Another important benefit is that Spring Webflow is also built in to the framework – which helps make complex workflows a lot easier to handle.
- Validation is straightforward in Grails; the rules are defined within a static code block within the domain class.
- There is also a very rich plugin ecosystem with Grails – it was built with plug-ability in mind and there is a large set of useful plugins that have been created by the grails community. It is also very easy to use these plugins within your own application using the install-plugin command.
- There are not many real issues with using Grails, however one of the main things to bear in mind is that there is a learning curve associated with using Groovy, so that may make it more difficult to recommend to your colleagues.
- There is also slightly less IDE support for groovy – especially in comparison with developing a vanilla Java application using them.
- A grails application can also be a bit of a resource hog – which can probably be attributed to all of the heavyweight frameworks that Grails is made up of.
- One of the problems using a dynamic language such as Groovy is that some errors that are normally caught at compile time with normal java will be not be caught until run time.
Grails in Action
My favourite book on grails is Grails in action. It is very well written and the authors seem to have a genuine interest in development.
Final thoughts on Grails
I have enjoyed using grails on my last few projects – there was a learning curve at the beginning but the rewards more than make up for that. I will be looking to using it on future projects and would definitely recommend it to other developers.