Sharing the good stuff, too
I said recently, while whining about work, that my job often provided me with interesting, crunchy little problems to solve. This morning was a good example.
First reactant: our site catalog and purchase process is a home-grown affair, originally written by my predecessor but almost entirely rewritten by me over the past two years. Like any good server-based application, it was written up to spec and not beyond, and has changed with our needs; for instance, I added the ability to sell “bundles” of books under a single price. But, in general, if we want it to do something it hasn’t done before, I have to get under the hood and figure out how it’s going to happen.
Second reactant: as a Massachusetts-based company, we collect MA sales tax (5%) for sales to customers in the Commonwealth. (Why do I keep winding up in commonwealths?) Currently, that’s hard-wired in the function that figures the purchase total: $after_tax_cost = $cost * 1.05 or something like that. (Undoubtedly the variable names are different.)
Catalyst: Saturday is a sales tax holiday in Massachusetts.
See what I mean? Interesting, crunchy problems. I’ve got a plan, and I’m coding already. Maybe while I’ve got my head around this section of the site I’ll put in the custom discount function I’ve been thinking about for months.
Now playing: The Ocean from Mortal City by Dar Williams