Friday, January 20, 2006

Bit by SimpleDateFormat

Maybe I'm just lame, but mainly I think I just assumed I knew more than I really did.

Beware of using the following...
SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");

You would think that you are doing yourself a favor and that the above would require a user to enter four digits. That is not true. What happens is that if there is four y's entered the year is assumed to be literal. Meaning that if a user enters 1/1/05, the Date will end up being Jan 01, 0005. Not cool.

So, according to the javadoc...

SimpleDateFormat Javadoc

You are better off using a MM/dd/yy pattern. Why?
Well, when the year pattern only specifies only 2 characters, the 80/20 rule is applied to the year. The 2 digits are considered against 80 years prior and 20 years after the date the SimpleDateFormat was created on. Thus 1/1/05 becomes Jan 01, 2005.

Bass Ackwards I say, but oh well...

Thursday, November 10, 2005

Today's reading

Today I am going to read a few articles I think. Well, I hope. I never tend to get around to reading these articles as quickly as I'd like, but here goes...

First up is Mule
Overview
Introduction

Next let's get in some SOA...
What is service-oriented architecture?
Dynamic Service-Oriented Architecture
This last one is a nice tie in as it is about using Mule for event-driven services
Event-driven services in SOA
Let's not forget wikipedia

Tuesday, January 11, 2005

Joelonsoftware: Functional Specs

A good read on the normally mind flogging idea of functional specs...

Painless Functional Specifications - A series of articles on writing functional specifications. "Software engineers who dive into code without writing a spec tend to think they're cool gunslingers, shooting from the hip. They're not. They are terribly unproductive. They write bad code and produce shoddy software, and they threaten their projects by taking giant risks which are completely uncalled for."
Part 1: Why Bother?
Part 2: What's a Spec?
Part 3: But... How?
Part 4: Tips

I'm going to read the Painless Schedules article as well.

First post...

Aaah the first post...

All new boards have one, all new blogs need one. I love seeing a new board come up, or a new 'official' topic hijacked by some boob announcing that - between visits to http://www.playhousedisney.com - managed to make the First post