Archive for December, 2011

Why DealFind isn’t such a Find

Sunday, December 25th, 2011

A friend of mine bought a Dealfind voucher for rug cleaning from MarkItClean after staying with me for a while. He purchased the voucher directly from DealFind and forwarded it to me.

After emailing MarkItClean in August, I got busy and didn’t follow up for a while. When I finally got time to chase MarkItClean down I called their number and left a message. A week or so later I called again and got told their voicemail was full. I contacted Dealfind saying the vendor was unresponsive and I couldn’t even leave another message. They gave me an alternate number. I called that and again got voicemail. I left a message, and as expected they did not get back to me in the 3-5 business days they indicated.

In December, I contacted Dealfind again, and asked for a refund. Natalie, asked for the same information I had already supplied in the Dealfind contact form, saying they would contact the vendor on my behalf. I told her that after 6 months of trying to redeem this voucher I wasn’t about to wait any longer, and that Dealfind should have intervened on my behalf the first time I spoke to them. Natalie wasn’t in so Quiin took over, and led me to believe that I would get credited with Dealfind dollars in my account since my friend had paid for it on his credit card. This in fact, was not correct. My friend got credited with Dealfind dollars (he didn’t even get the choice), since he was the original purchaser of the voucher.

At this point I got frustrated and asked to speak to a supervisor, and was transferred to Natalie. She seemed to understand my perspective but claimed there was nothing they could do. Their accounting system and department would not allow them to credit anyone other than the original purchaser, even if they contacted the original purchaser and got permission/confirmation that the voucher was intended for me, and that any credit should also be given to me. I found this unacceptable, and I told her so. I told her that my circumstances were not unique, and that they were leaving their customers unprotected.

Dealfind’s compliance department did not follow up after initial complaints to ensure the vendor provided the service, and they didn’t offer any kind of refund until I refused to accept anything else. The refund + 10% wouldn’t have covered the time I spent chasing Dealfind and MarkItClean down trying to get the service. After a long conversation Natalie said she would talk to her accounting department and follow up with a few other people and get back to me the following day. She did not. Quinn called me the next day, to offer to contact my friend to let him know the vendor did not render the service. Again, a waste of my time at work and of my cell air time. If you cannot count on a manager in a company to do what they undertake, I wouldn’t bet you can rely on the company.

The problem is that Dealfind vouchers are completely transferrable, but there is no protection for the recipient of the voucher in the event that the vendor does not render the product or service as advertised. If you buy someone a voucher as a gift, beware that you may be giving the gift of frustration. Dealfind has rigid business processes that no one there seems willing or able to modify even if it benefits their customers, and ultimately their business.

The TJvWizard

Friday, December 16th, 2011

The TJvWizard makes implementing an application wizard about as simple as it can be, but it suffers from the same problem as a lot of the Jedi library components; a lack of documentation.  There are a lot of hidden Gems in the JVCL if you have the time to find them, and figure out how to use them.  You always have to have it in the back of your mind that a commercial component may be a better solution, both in terms of support and functionality that meets your requirements.

The TJvWizard is not part of the MegaDemo, and the on-line documentation is sparse.  Most of it appears to have been generated, and there is no general usage suggestions.  I’m not a big fan of the JEDI help system, preferring the EMB on-line class centric help format. The format matters little though without the necessary content.

With a plethora of events exposed, it’s challenging to decide what one to use for what purpose.  I thought I would share my findings in the hope that I might make it easier for others to use this component, and because I might forget at some point ;-)

The OnXXXButttonClick events of the TJvWizardInteriorPage class have a Stop boolean parameter passed by reference.  If you leave the wizard buttons enabled, this is a good event to ensure that the data collected on the wizard page is valid before proceeding.  The downside is that you need to provide some visual feedback to the user to explain why clicking on the ‘Next’ button doesn’t take them to the next step in the wizard if the data is invalid.  I use TJvValidators to show error indicators beside UI elements with invalid data.

You can of course disable buttons when entering a page and dynamically update the buttons when OnChange events occur in other controls triggering validations.  The problem with this approach is that if the Back button is used those change events won’t be triggered and the buttons may not be updated appropriately.  Testing all possible navigation pathways for appropriate behaviour is a must.

I use the TJvWizardInteriorPage.OnExitPage event to collect any data from the UI and populate my domain layer, or other structures if I am not relying on the current value of the UI controls.

The TJvWizardInteriorPage.OnEnterPage event is a good place to initialize controls whose content is dependant on the previous wizard page.  The OnPage event may be even better, but I haven’t tried it.  Both the OnEnterPage and OnExitPage events have a FromPage :TJvWizardCustomPage parameter so you can use the transition context to decide if you want to initialize your controls, or leave them be if the Back button has been used.

Finally I use the TJvWizard.OnSelectNextPage and OnSelectPriorPage events to control page transitions, both forward and backward.  My wizards don’t have overly complicated routes.  I have not used the WizardRouteMap components to date.

IMHO the TjvWizard is another JEDI gem, but if you find it hard to use because of a lack of documentation, or are concerned since the last updates appear to be in 2003, there are other choices out there such as the delphiwizardframework.

TADOStoredProc Parameter Returns wrong Value

Friday, December 9th, 2011

The other day I was trying to make a stored procedure call using hcOPF and kept getting a ‘parameter object is improperly defined’ error.  It has to be the most frustrating ADO error I’ve ever encountered, and I’ve come across a few in my time.  What makes it so frustrating is that the error message gives no indication of what parameter is the source of the problem.

As a developer, I would recommend you be as specific as possible when raising exceptions.  Imagine a stored proc taking 30 parameters, and the time it would take to figure out all the possible reasons why any one of them might cause this error when you have absolutely no idea why an API call you have made a thousand times before without a problem, now fails.

What I ended up doing is making the call manually in SQL Management Studio (SMS) to verify the back end was functioning,  Then I wrote a test application in Delphi that simply made the same call using a TADOStoredProc component with the same parameters I used in SMS.  The call succeeded, but one of the input/output values was not what I expected.  After experimenting at length, and discussing this situation with a co-worker, I discovered that the input/output parameter in question was a string defined as a varchar(max) in SQL Server, and it was being truncated at the length of the string I initially populated it with as an Input.  Once I verified this hypothesis, I filed a QC report (101665).

I probably should also have filed a report to fix the generic exception I encountered initially but I had already spent enough time isolating and filing the first bug report.  At some point you have to actually get some work done instead of helping fix someone else’s bugs ;-)