05.17.07
Posted in Uncategorized at 9:12 am by ryan
A few months back, I purchased an iPhone. No, not the cool new Apple iPhone but a Cisco/Linksys iPhone so make Skype calls without a computer. Living in China, I use Skype frequently and appreciate the convenience of being able to talk without being tethered to my computer. I’ll probably buy a second iPhone shortly and use it at my office.
Unfortunately, the iPhone interferes with all of your text messages on Skype. Skype does not deal gracefully with one user being logged in at multiple computers, and it deals especially badly with this situation when one of those computers is a Skype phone. So, for the last 2 months I’ve only been able to receive a small fraction of the Skype text messages (not SMS) that have been sent to me.
To work around this problem, I came up with what I thought to be a simple solution. Just setup another Skype account and use it exclusively with your Skype iPhone(s). Due to EBay/Skype’s business rules, this is much more difficult than I could have ever expected.
The first time I tried to place an order, I used the Visa that I use to pay for my primary Skype account. Skype rejected that order. Skype has a business rule that a Credit Card may only be used to fund a single Skype account, though multiple credit cards may be used to fund the same Skype account. You just can’t then reused that Credit Card to open an additional Skype account. OK, not exactly reasonable, but what choice do I have?
The second time I tried to place an order, I though to myself, why not just use my PayPal account as it will draft directly from my bank account and hopefully bypass this credit card restriction? Problem, even though Skype promotes PayPal payments on their website, they do not allow an order to be submitted via PayPal’s default “bank draft” method, and even though both of these are EBay companies, the two don’t bother to work together to make it possible to pay for Skype via the default PayPal payment method.
The third time I tried, I finally caved in and decided to use another credit card. Unfortunately, it was rejected because that payment method wasn’t available “available in your country“. I tried a 4th time, a 5th time…. 10 more times I tried and the payment method failed because it wasn’t available in my country.
As somebody who’s run a large E-Commence business (Oakley Direct), I zeroed in on what was happening - risk management. Skype must get a lot of fraudulent payments with stolen credit cards placed by people in Mainland China, so rather than trying to figure out a way to cash in on a growing market and an ever appreciating currency (rather than the ever deflating dollar), they’ve decided to prevent all credit card payments coming from China, at least if there is an address verification. This sort of idea is like a Car Alarm. It might make some of the criminals look for the next easier target, but I doubt it. The same way that I’m basically stuck with Skype because it’s the only product that meets my international telephony needs, I assume that all of the hl33t hax0r’s running around in China are as well. And in a nation with 5 times the population of the USA, a chronic 10%+ unemployment rate, and 50%+ of the population under-employed, plus a shortage of girls (and therefore girlfriends), China is bound to stay the haxor breeding ground that it is, at least for the near term.
On the other hand, let’s see what happens if Allibaba or Tencent (QQ) decides to compete with Skype for the domestic market. Skype will probably find themselves in the position that EBay already experiences in China. Low ROI. Low market penetration.
To bypass EBay/Skype’s questionable “business logic”, I simply used a “proxy server” in the United States and placed the order with one of my (previously rejected) Credit Cards. The order was instantly approved. All information was the same. Only my IP address changed, even though it didn’t really. It’s just that Skype accepted the Proxy’s IP as my own.
Technorati Tags: China
Permalink
05.16.07
Posted in Uncategorized at 4:17 am by ryan
Jarmark.org » AppConfig:
If you’ve got a RAILS configuration on your hands, give AppConfig a shot to store all of your local configuration requirements. It integrates seamlessly with the master rails configuration files (environment.rb). You can install it by just running:
script/plugin install http://svn.jarmark.org/rails/app_config
Unfortunately, the actual Parameter names are NOT Unicode safe, that is to say, only A-Z, a-z and 0-9 can be used as the Parameter name, but parameter values are unicode safe, so they’ll work just fine for those chinese characters of yours… Just don’t go trying:
logger.error( AppConfig.汉子 )
logger.error( AppConfig[:汉子] )
logger.error( AppConfig.param(’汉子‘) )
logger.error( AppConfig.param(:汉子) )
As none of those will work
Fortunately, the output of these will work just fine.
(In config/environment.rb)
Rails::Initializer.run do |config|
# My Killer App Specific Settings…
config.app_config.MY_PARAM = ‘在这里用UTF-8是很方便!‘
end
(In your app/controller/some_controller.rb)
logger.error( AppConfig. MY_PARAM)
logger.error( AppConfig[:MY_PARAM] )
logger.error( AppConfig.param(’MY_PARAM’) )
logger.error( AppConfig.param(:MY_PARAM) )
By the way, don’t forget to set: KCODE=’UTF8′ inside of your config/environment.rb… Otherwise, you’re unicode will be all messed up.
Permalink
05.12.07
Posted in Uncategorized at 7:10 am by ryan
If you’re doing development of software in China, you’ll almost certainly know you’re way around encodings. If you don’t, you better learn quick
If you’re using subversion to manage your software version control, then you’ll probably also want to use Trac access an easy to navigate, visual, color view of your source code repository. Additionally, you’ll probably want to use svn-mailer to send out notification messages to the entire development team about each new change as it comes up. Well, if on your Ubuntu box you just do an:
$ sudo aptitude install svnmailer
You’ll be unpleasantly surprised that you’re messages get mutilated… Additionally, Trac URLs is only supported in svn-mailer 1.10 and later. You might install the svnmailer package just to take care of any dependancies, but you’ll want to download the source version and install it too (at least until later 2007 when I would expect the svnmailer package to be in the Ubuntu base distribution).
wget http://storage.perlig.de/svnmailer/svnmailer-1.1.0-dev-r1373.tar.bz2
tar -jxvf svnmailer-*.bz2
cd svnmailer-* && sudo python setup.py install
Next, you’ll want to create an svnmailer.conf file that looks something like this:
[general]
smtp_host = localhost:25
config_charset = utf-8
[defaults]
commit_subject_prefix = [svn] commit:
apply_charset_property = yes
show_applied_charset = yes
from_addr = svn@example.org
to_addr = epsilon@example.org delta@example.org gamma@example.org
browser_base_url = Trac http://example.org/trac/example/browser/
mail_transfer_encoding = 8bit
Note that if you specify a mail_transfer_encoding other than 8bit, you’re messages will almost certainly get mangled… But try it if you like. Note that if you we’re seeing the equals sign (=) being replaced with =3D=3D=3D=3D… in your svn-mailer files, setting the mailer_transfer_encoding to 8bit will also fix that!
Next, you’ll want to cd inside of the root of a copy of your svn checkout and run:
svn pedit svnmailer:content-charset .
(Note the “.” at the end of this line)
Next, a window of vim or some other editor should come up, in which you probably want to type:
* = utf-8
That’s it. Save and quit out of your editor, then svn ci the root directory of your checkout. Afterward, you should see that from svn-mailer’s prospective you’re files are by default encoded with UTF-8. You can change the encoding for any subdirectory, while will be inherited by descendants if you need to use some other encoding. You can also write the encoding for a specific file with:
svn pset svnmailer:content-charset utf-8 somefile
That’s it. You can read more about the svnmailer character set options in the apply_charset_property section of the svnmailer documentation.
Technorati Tags: China, Encoding Issue, 乱码
Permalink
05.08.07
Posted in Uncategorized at 7:29 am by ryan
WFOEs Take Control Over Supply Chain and Distribution in China | Establish:
In the past, foreign firms selling in China were required to work with distributors. However, in 2006 the early batch of new WFOE (Wholly Owned Foreign Enterprise) trading companies are now beginning to take control over their supply chains. These companies are replacing the role that their distributors once played and are realizing the need to develop and refine their distribution network strategy for China.
Permalink
Posted in Uncategorized at 7:20 am by ryan
Venture Capital Funding in Singapore ~ Wholly Foreign Owned Enterprises in China:
Interesting article on the ever loosing restrictions on WOFE in China. WOFE’s are now permitted to enter the retailing sector, and the minimum deposit of registered capital during the research phase can be as low as RMB 100,000. If you’re an entrepreneur incorporating a WOFE in China, you’ll probably want to read this one.
Technorati Tags: China, WOFE
Permalink
Posted in Uncategorized at 7:01 am by ryan
Help Feed China! [Fool.com]
This article at Fool.com is already more than 2 years old, but it is still an extremely insightful portrait of China business and related issues. The analysis in this piece is right on. I missed out on my opportunity to buy Canada Potash, but this analysis perspective is excellent. Even better, the Canada investment isn’t as adversely affected by the ever falling dollar. Excellent read.
Permalink
05.05.07
Posted in Uncategorized at 7:52 am by ryan
Weaning China Off Cash: There’s No Silver Bullet - Seeking Alpha:
There is already a natural propensity among policy makers in the PRC to try to shoot their way out of problems with simple solutions rolled out on a massive scale. This should be discouraged - the line between “simple” and “simplistic” is a narrow one indeed, and the last thing the nation needs is intelligent outsiders encouraging this misguided approach.
Interesting article about payment systems in China. I’m inclined to agree with David Wolf’s criticality of the McKinsey suggestion, and particularly agree with the article’s overriding point: THERE IS NEVER A SILVER BULLET.
I question basically everything about the assumptions though. The economy can easily support expanding the banking infrastructure and no, cost isn’t really a specific issue. It will take about 15 years to industrialize the remaining 45% of agricultural China and the expansion of existing systems to suit that growth should work just fine. There’s no reason to make ultra cheap ATMs. If the price of the ATM is too high, just open an bank instead. Western folks tend to think of the cost of a manual process as cost prohibitive, but you’ve always got to compare it to the cost of the capital equipment.
Generally, I think most American’s commenting about China issues, particularly technology issues, are way off. Investigate for yourself before investing.
Permalink
05.04.07
Posted in Uncategorized at 12:07 am by ryan
OK - first, this is a China blog. The China angle here is that it’s impossible to find PHP programmers in China. Fortunately, RoR (Ruby on Rails) is taking off like the Shanghai stock market, and unlike the local exchange this one’s not a bubble! There are tens of thousands of Java developers here in China and many of them are rapidly running to Rails! Sure helps my life
I’ve got a little integration project to connect with Dynamic AX (Formerly Known as Axapta), a product that provides MSFT Web Services. If the integration is developed properly, it should be possible to run the SalesOrderCreation methods in Real Time, and fall back to a bullet proof batch mode whenever murphy kicks in.
BASIC AUTHENTICATION
The first trick in getting connected from Ruby to MSFT Web Services is the authentication factor. MSFT forces the NTLM authentication method, and it seems that in the latest versions of IIS (at least), this method is only compatible with Microsoft Internet Explorer on Windows as the HTTP client. If you can’t even connect to it in FireFox, you’re going to be had pressed to connect to it with libcurl or similar. Simply replace the NTLM authentication method on the IIS server with the HTTP BASIC auth method and you should have no problem getting a connection to the service.
SOAP4R AND BASIC AUTH
If you read the SOAP4R documentation, you will see that basic auth is easily supported. Code just like the following should work just fine.
ws = SOAP::WSDLDriverFactory.new(WSDL_FILE).create_rpc_driver
ws.wiredump_dev = STDOUT
ws.options[’protocol.http.basic_auth’] << [’Some Realm’, ‘MyUsername’, ‘MyPassword’]
should work just fine… Famous last words. If your situation is anything like mine, it doesn’t work at all. Turns out that SOAP4R BASIC AUTH requires http-access2. http-access2 is a replacement for net/http that offers significantly more functionality. You can download it from dev.ctor.org/http-access2 or install the gem with:
$ gem install http-access –source http://dev.ctor.org/download/
ADDITIONAL SOAP4R RESOURCES
- Slides for the SOAP4R Presentation by Emil — Good overview of Rails RPC options
- SOAP4R Google Group — Search for answers about specific error messages
- SOAP4R Trac Site - Scroll down to the “HowTo” section for solutions to specific problems
Technorati Tags: RoR, Ruby, SOAP, SOAP4R
Permalink