Browsing articles from "March, 2006"
Mar
31
2006

What Grandma never told you about Cookie.setMaxAge(0)…

While I’ve blogged about cookie grief before, I spent most of yesterday discovering more than a man should about cookie deletion. So I’m iterating over request.getCookies() and finding the relevant cookie to delete, then calling setMaxAge(0) to expire it immediately. What could go wrong? Well… the cookie wasn’t disappearing. These things can be a bit of a bugger to track down since you need to see the browser and response headers to work out what [...]

Mar
28
2006

Iterations considered harmful?

It would be pretty insane to argue that regularly delivering running, tested, value-add code is hazardous to any project. But when it comes to iterations, if you’re not careful the mojo can get very funky pretty quickly. I’ve just finished reading a fantastic article by Alistair Cockburn on the misuse of iterations in agile projects… and I’ve just realised that I’m living the nightmare myself! Alistair’s argument comes down to the fact that shipping iterations [...]

Mar
22
2006

What they never told you about SimpleDateFormat…

I was tracking down some unusual date behaviour and came across this little gem. Check out the following code and tell me what the output should be… DateFormat formatter = new SimpleDateFormat(“EEE, dd MMM yyyy HH:mm:ss z”); Date startDate = new Date(); String strDate = formatter.format(startDate); Date parsedDate = formatter.parse(strDate); System.out.println(“Start Date is: [" + startDate +"] Parsed Date is: [" + parsedDate + "]“); Looks pretty straight ahead. Create a new date formatter, apply [...]

Mar
18
2006

Drinking the Ajax Kool-Aid… Can I just dump my web framework?

I’ve been integrating DWR into our web monitoring app to display recent monitoring events dynamically while the user is doing other stuff. Since I already have a service object that does all the heavy lifting, integrating it was a snap. And now they have a section of the page where they can see events as they happen. Pretty chuffed with myself, I decided to experiement with making one of our edit forms ajax-ified. Again, the [...]

Glen Smith

About Glen

Co-author Grails in Action