How to Parse Dates from Strings

This example shows how to parse dates from strings using the SimpleDateFormat class.

The pattern is specified in the constructor, but could also be done with the applyPattern(String pattern) method.

This example should help ease the difficulty that all beginners seem to face when dealing with formatting dates in Java.



Three Golden Rules to Tackle Complexity

According to Tim Newing, the IT Director of Camelot, there are three golden rules for tackling complexity in IT projects.

  • Do not think of a complex project, but think of a collection of simple solutions.
  • Manage outside the “business as usual”; instead, set up a different business structure so that the project team is not distracted by the normal business.
  • Make sure that people have a good reason to complete the project. This is not the same as motivating them to make the project a success; instead, the objective is to convince them to put the lid on a project when it is time to do so and to prevent feature creep.

Successes in UK IT

The IT industry in the UK has had a couple of much-needed success stories recently. This is a breath of fresh air amidst daily reports of major IT projects failing.

The first success is the completed modernisation of the British Transport Police IT systems.

The second is the positive progress made by the IT department of Camelot in revamping its retail infrastructure, which is the result of adopting the right methods to tackle complexity in such large projects.

See Windows Vista

A quick follow-up on my earlier post. Despite boasting about being a Mac OS X guy to someone who asked me if I had tried Windows Vista Beta 2 myself, I am curious about what is brewing in the Windows world. Although developing applications for Windows is what puts food on our table and pays the mortgage, I have remained relatively detached from the recent developments coming from Microsoft.

Anyway, to see what is coming up in Windows Vista, there is no better place than See Windows Vista. Judging from the promotional videos, the features of the new operating system — the back-end features, that is — vastly improve on the ease of developing graphics-heavy applications. Of course, the Microsoft marketing gurus have chosen the juiciest videos, but there is one irrefutable trend: applications are becoming more and more graphical.

Technorati Tags: , , ,

Validating a Date Field with RIFE

Here is a quick way to validate a multi-part date field in RIFE. By “multi-part field”, I mean one that is made of several fields, in this particular case, a date field, a month field and a year field.

This is best done by creating a bean to hold the input data. Say, we are creating a form to schedule a task. The required input are:

* title
* description
* due date

The TaskBean will be as follows:

The gist of the solution here is the addRule method of Validation subclass. It adds a new AbstractValidationRule that contains a method for validating a given input (in this case, the due date) and returning any found error.