Wednesday, July 8, 2009

Using app.config with Visual C++/CLI

Still on my C++ project with Aculab, I tried putting my application parameters onto a .config XML file just like I normally would with my C# programs. The steps seemed obvious at first -- I added a config file using the templates, then I added a reference to the System.Configuration assembly.

But from inside my code, calling ConfigurationManager::AppSettings does not seem to resolve to anything. I checked the output folder and did not see any application.exe.config that one normally expects from C# projects.

I did a little bit of research and found this app.config article for C++/CLI in CodeProject. It seems that the key is in the project property's post-build event. Specifically, you have to run the external command:
copy app.config "$(TargetPath).config"

This properly copies the config file to the object code output location where it can be read by the application.

The next hurdle is converting the managed System::String^ class, that is returned by the System::Configuration methods, to the old c-style null-terminated string. This one is achieved by using the System::Runtime::Interopservices::Marshal methods. The shortest way of writing this expression that I've seen is this one from MSDN.

Tuesday, July 7, 2009

Trying Out Twitter

Everybody seems to be onto Tweeter nowadays. Its like a micro-blog or micro-diary of what you are doing at a point in time. Frankly, I still don't quite see what is so great about having a service that lets you type what you are currently doing in about 140 characters. But nonetheless, all the big name tech companies seem to have a Tweeter site. So here goes.

I created a Tweeter account for our online payment gateway, Mozcom PayEasy. The site can be accessed at http://tweeter.com/MozcomPayEasy. My first Tweeter username choice was actually just plain 'PayEasy'. But it looks like somebody beat me to it. And whatever that person did seem to be not so nice because Tweeter shows a message that the account has been blocked. Probably somebody doing a financial-related scam.

Just as Google seems to like indexing blogs, it also actively indexes Tweeter contents. So for those who are interested in search engine optimization, extending one's website to Tweeter seem to help in getting found. I made a couple of initial entries onto my Tweeter account, and within the hour, I started getting Google Alerts on PayEasy's Tweeter entries.

I also created a Twitter account for Picatoo at http://tweeter.com/Picatoo.

Sunday, July 5, 2009

The Knowing

We watched Nicholas Cage's Knowing at the home theater tonight. My sister-in-law was telling us last night that she did not like the ending of the movie. So that kinda made us more curious as to how it ends.

The story is set in Lexington, Massachusetts. That brought back some memories of my 2-year stay in Wellesley, which is pretty close to Lexington. In fact, I used to attend church with my classmate Clement, at a Chinese church in Lexington. But aside from the sweeping view of the MIT campus, the rest of the movie was actually shot in Australia.

The movie is about the visions of a grade school girl of disasters that will happen -- complete with the exact date, location (in longitude + latitude coordinates) and the number of deaths. If I did not know any better, I would have assumed that it was an M. Night Shyamalan movie. The plot and topic is very typical of Shyamalan's stories.

In a lot of ways, the movie reminded me a lot of The Happening. And just like that movie, the ending is a bit too fantastic and anti-climactic. From a suspense/thriller/horror-type of movie, it suddenly shifted into full-blown science fiction with alients and spaceships. But, at least, I liked the way they imagined the spaceships. It was not your typical flying saucer with lights. And for once, Nicholas Cage's character died in a movie he starred in!

Saturday, July 4, 2009

Dr. Who and Bionic Woman

Just saw the Dr. Who Special - Planet of the Dead. The setting of the movie is in some remote desert planet, but it was actually shot on location in the sand dunes of Dubai. The Doctor (still played by David Tennant) did not start with a female companion. I'm not sure why. Is this after Season 4 with Catherine Tate?

But not to fret. He was able to hook up with a new character, Lady Christina de Souza (played by Michelle Ryan). Lady Christina is supposed to be some adventure/thrill-seeking aristocrat-turned-cat burglar. She is actually a very interesting character and it would be great if she were to really become a regular travelling partner of the Doctor.
I never really liked Rose Tyler (played by Billie Piper) of Seasons 1 and 2. Martha Jones (Freema Agyeman) of Season 3 was great and much better looking than Rose. Donna Noble (Catherine Tate) of Season 4 added a nice twist of humor, but I found her too old.

Michelle Ryan is better known in the title role of the 2007 remake of Bionic Woman. I watched the first few episodes of that series which was shown on C/S channel, but found it terribly boring. I don't know if the show is still running or it got canned.


Planet of the Dead is supposed to be the first of a series of Dr. Who specials starting 2009 with David Tennant bowing out as the 10th doctor. Sad to hear that. I hope the new guy is as good. I hated Christopher Eccleston (the one who came before Tennant) of Season 1. Its a good thing they killed him off and have him regenerate as Tennant.

Disparity in Gas Prices

I'm just amazed at how large the disparity of gas prices can be nowadays between different gas stations. Today, for example, Shell Katipunan and C5 charges Php37 per liter for their Unleaded/E-10. But go down the road further towards Commonwealth and you will see a Shell Station there charging Php39 for the same product.

Go further to Quezon City and all the gas stations there along Quezon Avenue are also in the Php39 range. QC seem to have the highest gas prices. Certain Caltex outlets seem to be much cheaper than Shell. Caltex Connecticut/EDSA is around Php35 and the Caltex on the south-bound lane going towards Guadalupe only charges Php34. That's a Php5/liter difference compared to those QC stations!

I recently opened a Shell Citi Visa to avail of Shell's 5% gas rebate. The tricky part that I found out afterwards is not all Shell stations participated to the promo. I guess most of the Shell franchisees did not opt in as it would lower their profits.

HSBC has a similar scheme going with Caltex. They claim also giving a 5% rebate. But the catch is -- as Cols found out much later, you can only avail of it if your total monthly purchases hit something like Php50k. What a rip-off!

New E-Commerce Player

Its a Saturday morning, but I woke up early to get dressed up and ready for the launching of our new Malaysian partner, Platform2u.com's SMilDS e-commerce platform at Makati Shangrila, 9am. They were referred to me by PayEasy's Malaysian payment gateway partner, iPay88/Mobile88. So PayEasy was announced as a major partner for this endeavor along with LBC and DHL.

The Platform2U guys rented the Rizal ballroom. There were about 30 tables and a grand stage. They certainly did not scrimp on the launching. Aside from the ballroom, they rented a separate function room at the 3rd floor for the press conference. There were several VIP's including a representative from the DTI, the Malaysian Ambassador to the Philippines, and Platform2u's chairman, who is apparently a former cabinet minister and member of parliament of Malaysia.

The name of their e-commerce platform is SMilDS. Personally, I find the name to be not too marketing-friendly. As a rule, I always tell clients to choose domain names that are easy to recall and does not require much explanation or instructions on how to spell. If you have to expain it, then it must be complicated. SMilDS (pronounced "smile-ds") is actually an acronym. I wish they could have chosen an easier-to-remember name.

A sister company of SMilDS is Easy Pha-max. Its a health supplement made from wheat grass. Their local celebrity endorser is TV host (Sports Unlimited) and former tennis professional athlete, Dyan Castillejo. During lunch at the Shang Palace chinese restaurant, I was seated beside Dyan and had a good time talking with her. She's really into the wheat grass product and even gave me a sample to drink. I have to admit that I did not like the taste though. Its probably an acquired taste as she said she drinks it at least 3 times a day.

Later in the evening, we had dinner at Speaker Perez because Cols' mom and grandma are in town.

Thursday, July 2, 2009

Philippine Online Payment Expands to Europe and North America

We're announcing the integration of UseMyBank to PayEasy today. UseMyBank is a Canadian based online payment company that focuses on direct bank debits. By integrating with their system, PayEasy can now accept real-time online payments from Australia, Austria, Belgium, Canada, China, Germany, Netherlands, Switzerland, and UK.

What makes their service very different from the other gateways I've met is their anti-fraud screening mechanism. When you register or use UseMyBank for the first time, their automated system will perform a call-out to your number. You then need to key-in the 4-digit PIN that you see on your screen. Its their way of validating your telephone number. With this system, they claim to have at least a 99.9999% fraud-free transaction rate. That's great news for merchants who are used to dealing with credit card fraud.

Because of the very low rate of fraud, UseMyBank is popular with high-risk merchants such as online gambling and remittances. In fact, most of the online casinos use UseMyBank's service for getting funds from their bettors. These are two niche markets that we hope to tap into.