Posts Tagged ‘OO’

Working days

Saturday, May 31st, 2008

I’m all for reusable code. Whenever I’m coding, I’m constantly wondering if there’s a way that I can further abstract what I’ve done so I can use it somewhere else. Because of this, I came across a problem yesterday that got the better of me a little.

I’m working on a project at the moment that requires me to have an awareness of “working” days. Specifically, when a product is sold, the customer has three working days to cancel their order. This would be all well and good if there was 365 working days in the year, and all companies were the same. I started out with this assumption, but was quickly confounded.

Before I explain how I solved (well, only partially - it would require a calendar app to fully solve it to my satisfaction!) it, I’ll explain a little about how some classes come to be in my workflow. (more…)


Bad Behavior has blocked 119 access attempts in the last 7 days.