Categories
Shopping Web Development

Newest member of club moron: Bank of America

I am not a fan of Bank of America by any stretch of the imagination. Any establishment gouging its clients with fees, more fees and then some fees again; where the whole profit notion is based on those fees – that’s motivation enough for me to seek refuge.

The end to my relationship with BofA’s predecessor in Massachusetts, Fleet, came when I had to pay $35 for them to process an incoming funds transfer. They make money off of holding the money, but for just keeping the computer on, I got to pay them for the service. I feel bad for the masses who hate the bank and stay with it for laziness. I am digressing…

I originally had a TWA frequent flyer card issued by MBNA, which after the airline folded became an ‘Elite Rewards’ card. Elite Rewards is a mediocre, but free, program where you earn a point per dollar and then eventually redeem them for gifts and coupons, all at rather silly ratios. Still, it is free and that’s nice. The card also has what I feel is the best feature ever for a credit card: Shopsafe. Shopsafe  is a service through which your credit card gets a one-use, limited duration, limited funds credit card number, linked to your real number. This is so brilliant because even if the virtual number is stolen, the damage is limited. In a world experiencing lax security at TJ Maxx where companies still insist on storing your card number for later use (don’t trust them!) – I would rather use a one-time number that will turn invalid immediately. Store that.

MBNA was taken over by Bank of America. Bummer but I would even stick with the devil to keep Shopsafe available.

Even Bank of America saw the utter genius of Shopsafe so they kept it alive, but never cared to drum up the marketing around this unique feature. Moronic. Then, I go to Elite Rewards’ website tonight and find out that despite the fact that I ordered gift cards from them while it was still MBNA at my current address, the only address they have for me is the one from 2000. Elite Rewards is owned by Bank of America. I am a Bank of America customer. They send me bills at the correct address. Better yet, I even get my Elite Rewards statements at my home address. Yet when it comes to giving back to me my rewards, the effort is nil.

I would not mind that if the hideous website would allow you to update your address. Wrong again. You can update your profile. What is profile? Your travel profile. The word profile that you and I use on websites, well, that word does not apply. You just have to call them. Moronic again because call centers are expensive. Oh yeah, they pay for that with the FEES that their customers pay. Right…  Even the ‘contact us’ submission is moronic: if you do not have a complaint to report, you cannot submit your request. Oh, and guess what – if you DO have an issue with the delivery of the reward, THAT is where you get to enter your current address.

As the founding member and head moron, I welcome Bank of America’s Elite Rewards to Club Moron.

Share
Categories
Java

Odd behavior using Apache Commons Pool

I am trying to use an object pool. The idea is to reuse objects that require resources or time during their creation and that can easily be reset after each use. The classic example is a network connection pool, and the Apache Commons Database Connection Pool (DBCP) is the prime example and user of its sister project, Apache Commons Pool. DBCP is in very wide use and as such I felt is a good reason to rely on Commons Pool in my code. And like DBCP, I am using Commons Pool to manage connections, XMPP connections in my case.

Like a good object pool, Commons Pool relies on an Object Factory which is supposed to manage the lifecycle of the pooled objects. The factory, PoolableObjectFactory, has all the methods you would expect

  • instantiating pooled objects
  • activating objects when being ‘borrowed’ from the pool, taking back resources if necessary
  • validating objects – is the object ok for use? are all the resources successfully regained
  • passivating – releasing resources when the object is not in use, after it is ‘returned’
  • destruction – no need to keep too many objects around if no one is using them

My test case involves the use of an XMPP message source, sending messages every 50 milliseconds or less, and an XMPP message reader, which reads the message and replies to the source.

The reader runs on an infinite loop (e.g. for ( ; ; ) ) while the source sends the messages and then loops infinitely waiting for the responses. Since the sender sends the messages rapidly but in serial fashion, one XMPP connection was necessary, but the reader – which is supposed to do work on the messages, I wanted to use the pool. The sender sends 50 messages and as mentioned, waits, using built-in functionality in the XMPP client library I am using, Smack.

The final bit of information necessary to understand what I experienced is that to implement the pool I am using Commons Pool’s built-in GenericObjectPool with a setting telling it to block requests when all of the pool’s objects are in use. In order to avoid absolute lockups, I also set the pool up to time out after 10 seconds. More importantly, the pool is set up to have at least 2 objects, up to 5 objects if necessary, and to leave 4 idle if they are already created. These are all cool and pretty useful settings afforded to me by GenericObjectPool.

It appears that while the reader currently does nothing else but a one-line manipulation of the incoming message, I am reaching that timeout when no objects are available. The way my code initially worked was:

  • Poll the XMPP queue for messages. If none arrived, sleep for 150 milliseconds.
  • If a message arrived, borrow a connection from the pool
  • Process the message
  • Send response using connection
  • Return the connection to the pool

Apparently this caused this supposed deadlocking or timeout. While it is a single thread that sleeps, and I hope resumes when it wakes up, I kept getting exceptions pertaining to the timeout.

My current ‘solution’ reduces the borrow-object return-object time to the bear minimum, where the aforementioned workflow is now (changes underlined):

  • Poll the XMPP queue for messages. If none arrived, sleep for 150 milliseconds.
  • If a message arrived, process the message
  • Borrow a connection from the pool
  • Send response using connection
  • Return the connection to the pool

What is interesting to me is why the unused connection, which I *did* return to the pool, were not being reused and thus caused the timeout. My code is not even remotely great. The ‘solution’ mentioned above is but an empirical result with a mild shot of rationalization. Hope it keeps working.

Share
Categories
General

Canon: Another hallmark of support stupidity

How much space does it take to maintain the drivers, support document and other bits you need in order to run an electronics product? Not much, I would say, probably a few dozen megabytes at the most. How much does a multi-billion dollar organization, let alone a global force in imaging, makes on the products we buy from it? Well, several billions of dollars, you would hope. You would therefore expect such a company to have the petty cash to maintain the aforementioned drivers, manuals and software for your product even after it stops making it, for the remote chance you would need to download those documents when you install that product anew on a different machine, right?

If you are talking about Canon, you would be dead false. You see, if you do not own a product from the last two years, well, you are dead in the water. Really. I have a Canon Pixma MP150 printer/scanner which I actually like and DO spend good money buying original ink for. But you see, Canon does not care enough about you or me, for that matter, to still have the files I need or expect to have there for me, on its site. If you go to their website’s support section or look for download for your device, and if that device is well, older than say, two years, you would find nothing. They do not care anymore. Or they cannot afford the cost of space. I would love to give them the space if they want me to host the files. I can afford it.

Reminds me of the conspiracy theorists who say that printers have a built-in limited lifespan. That is, you buy a vacuum cleaner and the manufacturer built it just bad enough so it dies 3 days after the warranty expires. In the case of Canon, that is probably right – if your printer is older than two years, maybe it should be dead already. Not sure Canon will stay on my shortlist anymore.

Share
Share