| Tuesday, October 17, 2006 | |
| | | A Developer's Perspective | |
 | Rick Ross is the founder of Javalobby. He is a frequent speaker at Java-related events and a well-known advocate for Java developer interests. |
My Unexpected Reward from Best Buy (Please take a look at the new JL Expert Presentation on building killer web apps with Ajax and JSF. This Ajax stuff may be easier than you think.)If you offer a rewards program to your customers, then it’s a good idea to try to make it rewarding! At the end of last week I received an email from electronics retail giant, Best Buy, that I had earned a modest amount of "My Rewards" credit from prior purchases, but my credit would expire in early November. On Sunday, Elizabeth and I were out with the kids and ended up near a Best Buy store, so we stopped there to use up my soon-to-expire store credits.
I walked through the store and found little of interest. If you've ever been to my place, then you know I have no right to complain about lacking anything in the realm of electronics. As a husband, however, and being the father of four daughters, I am never at a loss for ways to part with my money. Elizabeth and the girls browsed the movie section and found several DVDs they wanted, so we headed to the checkout counter with the DVDs and reward certificates in hand.
The woman at the counter totaled up our purchase, which came to $28.67. I handed her certificates for $30, and she looked blankly at me and said I couldn't use these. I asked why not, and she explained she could not give me change for purchases made with reward certificates. I told her that would not be a problem, and that Mr. BestBuy could simply keep the change. She explained further that the computer would not even allow her to apply the certificates unless the purchase amount actually exceeded the amount of the certificates.
Best Buy is a big company, and they don't give much latitude to employees on the floor, so I ask whether her manager might be able to do something about it? She shrugs and says that she cannot, in any case, so she calls up the manager. We wait for about five minutes or so, and I'm starting to feel like my rewards are less than perfectly rewarding. Policy-driven stupidity really gets my goat, but I want to see whether the manager can work it out. Meanwhile, he's stuck at the customer service counter with two clerks and a very determined customer who wants him to identify and order some unlabeled, microscopic repair part for a digital camcorder. We decide to walk over to the customer service desk and wait for him there.
Eventually the manager extricates himself from that situation and turns his focus our way, where a young man named Corby has begun ringing us up. Now the "3 DVDs for $20" special deal isn't appearing, so Corby tells us the total will be $40 or so. We point him to the weekly newspaper circular, and he calls someone back in the movie section and verifies that the price is indeed $20 for all three. Now the total is again $28.67, and we're back to square one, but finally the manager is involved. Corby and the manager are both scratching their heads about what to do with the reward certificates, so I say "Hey, you routinely do a manager's override to mark a price down when you need to. Why don't you just do a manager's override and mark UP the price of one of these DVDs by a buck or so? That should solve it."
Manager looks at me grimly and says, "I can't do that. I would almost certainly get fired for doing that." He is deadly serious, as if increasing Mr. BestBuy's profit would be crossing into territory that is seriously off limits. He can lower the price of his inventory any time, but he'd better not dare to increase it, even with the consent and urging of his customer! He is as constrained by the computer and by corporate policy as the cashier is, and he's got no latitude to solve this problem.
The eventual solution, of course, was painfully simple (suggested by the aforementioned Corby, who deserves to have a bright future in Mr. BestBuy's empire.) We just grabbed a Diet Coke and a Kit Kat Bar, added them to the purchase, handed over our certificates and about forty cents, and we were done. I didn't even know they sold soda and candy at the electronics store, but you learn something new every day. So, twenty or thirty minutes after trying to buy a few DVDs with my "reward certificates," I was finally able to leave the store with only a minor headache and most of my frustration dissipated. I don't suspect this is what the architects of the "My Rewards" program originally envisioned.
A growing number of businesses rely on software systems that aren't half as adaptable as a thinking person making informed choices. Over-reliance on such systems disenfranchises employees who might otherwise be motivated to think and act intelligently on behalf of their employers. Even worse, as the Best Buy manager stated, he could be fired for making a smart and profitable choice for his company. The money I was originally willing to walk away from was probably equal to a decent portion of Best Buy's average profit on a transaction of that size, but the manager might lose his job if he managed to capture that profit for his company.
Friends, we are the people making the software that makes our own lives so aggravating and stressful. Problems like this aren't exclusively Mr. BestBuy's fault, they are yours and mine, too. We need to speak up and tell the "management decision makers" of the world it is a bad idea to remove the human being from their systems. Instead, they should be placing more energy into trying to empower and support the human beings who use these systems. The computer is the last thing to blame, the fault lies with the people responsible for making the computer behave so stupidly. The fault lies with people like us.
My unexpected reward from Best Buy is increased clarity about the importance of making systems operate more adaptively. They need to allow humans to make choices which a computer cannot reasonably be expected to make. That is worth a lot more than $30, so maybe it was a good deal after all. Thanks, Best Buy!
Until next time,
Rick Ross
rick@javalobby.org
AIM or Yahoo Messenger: RickRossJL | | |
| | |
| |  | Matthew Schmidt
is the man behind the scenes at Javalobby. If you have questions
or concerns, feel free to email him at matt@javalobby.org. |
Recursion: Deceptively Complex?
Yesterday, I was working on a bit of code that required some recursion (well, two recursive methods actually). When a problem can be solved by recursion, it usually takes me a bit of time before I can wrap my head around how simple the solution actually is. Yes, I'm sure all you readers out there are thinking that I'm not truly l33t for not being able to whip out a recursive solution in 1.35 seconds. Fortunately for me, I have an excuse - I've had the chance to use recursion perhaps 5 times in the last 5 years. Recursion can be a powerful solution, but I think for many people (myself included), it can take a little while to wrap your brain around just how it works. For example, we had an outer loop that went through all the comments for a link at dzone.com. That outer loop called a method which was designed to set the depth of the comment in the thread tree in relation to its ancestors. This method that set the depth was actually a recursive method that set the current depth and then looped through the list again looking for the immediate child of the current comment and then calling itself again and again until it finished working through the links. Now, I'll be the first to admit that this probably doesn't sound like the most efficient code the planet has ever seen, but it doesn’t overflow the stack and it gets the job done. The whole thing (with the two loops and including comments) was about 12 lines of code. As I said, the worst part about the whole thing was trying to understand that this mode of coding was actually going to work at all! Exception Handling Styles
Late yesterday afternoon, an interesting post from Phil Swenson crossed the Javalobby moderation queue that we approved this morning. Phil has been pondering the different styles that people use for handling exceptions - specifically when dealing with JDBC connections. He has noticed that his style is much different, using a catch on the outside of all the DB opening and closing code instead of wrapping each of the individual close calls with try-catch statements. His post has led to some interesting discussion on the different ways that people handle that particular type of code. Many users have pointed out tools like DBUtils from Jakarta or using Spring. Here at DeveloperZone, we've been primarily using Spring in combination with Hibernate or iBatis - which usually shields us from needing to catch all these exceptions. I think that this type of checked exception is one of the primary reasons that people use Spring in conjunction with the various persistence layers - to hide from all this extra code bloat. Flat or Threaded: You Decide
As I discussed earlier in the column, I've been working with recursion the last day or so, specifically in the realm of giving users the choice of seeing the comments on the link in the context they were posted. The problem we're having is that we're not in agreement over whether this should be the default view. If you recall, we posed this same question to Javalobby members some months ago and eventually decided to go with a standard flat view. What makes the decision more interesting at dzone though, is that two of the major competitors (digg and reddit) both use an indented threaded view for the comments. In addition, both seem to take different roads. Digg has gone with a single layer of comment threading, only letting you reply directly to top-level comments. Reddit, on the other hand, lets you reply to each and every comment - much like a forum thread. Personally, I feel like the threaded view is more informative when you're looking at the comments - it lets you see who has replied to whom. What are your feelings? When looking at a dzone link with comments (this one for example) do you like the way we have it or would you prefer it to default to the comments being threaded? Obviously, we'll also make it be a user preference so that those who login can have it their way. Would the flat view work better if we showed the parent message's id and gave a link to it from the child? If you have some ideas on how to improve the comments at dzone, feel free to drop me a line. What Can You Get Done in 74 Seconds?
Since it's a bit of a rainy fall day here at DZ HQ, I thought I'd try to lighten things up with a fun little piece to end my column. The other day, Mike Cannon-Brookes of Atlassian sent me this video link showing what a day in the life of the developers of Confluence is like. It seems to me that more people need a "beer hour" during the day! Watch the video, and then vote for it on dzone. Until Next Time,
Matthew Schmidt
matt@javalobby.org
Yahoo IM: mattschmidtjl | | |
| |
| |  | Erik C. Thauvin maintains a blog
, as well as one of the web's first and most popular linkblogs, which he updates daily with the latest Java and technology news. |
|
| |
| |  | A recap of
some of the most popular and active Javalobby.org
discussions this week. |
|
String is not a good universal datatype
|
Peter Veentjer wants to make clear that using Strings as a datatype is terrible for design of objects. The development may be faster on the short run, but on the long run, a price has to be paid
| |
Full Discussion |
Posted By: Matthew Schmidt - (29 Replies)
|
|
Does Groovy have any momentum?
|
After doing quite a bit of work with Ruby, I'm seeing a lot of the weaknesses in the traditional "Java" way of doing things. I'm curious, does Groovy have any momentum?
| |
Full Discussion |
Posted By: phil swenson - (25 Replies)
|
|
Make formal parameters implicitly final
|
I Suggest to make the formal parameters of methods implicitly final. Ability to assign a new value to primitive or reference type formal parameter is in fact an ability to write unclear code.
| |
Full Discussion |
Posted By: Nikolay Skachkov - (19 Replies)
|
| |
| |  | Technical papers & research related to Java development. |
|
Crystal Reports for Eclipse Developers
|
Crystal Reports for Eclipse is designed specifcally for Java application developers. It allows them to experience powerful, code-free reporting using a 100% pure Java report designer and engine. Developers can build new reports, access existing Crystal Reports documents, and deploy applications with Java reporting components or with the Business Objects business intelligence (BI) platform.
| |
Download Full White Paper |
Posted by: Business Objects
|
 | Product and
service announcements for Java developers. |
| |
|