Monday, November 16, 2015

"Faked" ESTA web sites - how to get your money back

Visitors from countries under the Visa Waiver Program still require an electronic "visa" to travel to the US. This is called the Electronic System for Travel Authorization (ESTA).

ESTA is a DHS web site, and some passport and identity information are required to be submitted via a series of web pages. Anyone can apply on behalf of anyone as long as you supply the required information. You get immediate approval if the data you give meet the criteria. Pay $14 and you are done. The approval information is in the computers and the immigration counter staff will look that up when you arrive at the port of entry.

It is trivial to set up a web site to ask the exact same questions as the DHS web site, collect $50, and then go the DHS web site to submit an application using the information given by the visitor to your web site. You get to keep the difference. There are MANY web sites that do just this. They have official sounding names such as usavisaonline.com, esta-america.org, and so forth. The web sites are well done, sporting logos with the American flag and the Statue of Liberty to make them look official. And these web sites appear as the top results when you Google for ESTA or similar, above the real DHS web site.

In the past, I had advised and prevented friends from paying extra to use this unnecessary service. Today, in haste and a moment of carelessness, I went to the first link on Google search and proceeded to apply an ESTA for a relative. I don't remember drinking or smoking anything. Only after clicking the final payment Submit button did I notice that it was $87! It was too late. A binding contract has been signed.

The anger at my own stupidity make my head go into a frenzy. Calling Citibank to cancel the credit card transaction was at the bottom of the list of options. I assessed I had one chance to get my money back, IF the people running DHS were just competent enough. I had only minutes, if not seconds to prove my hypothesis. I set to work furiously.

That was 4.35pm. At 5.46pm I received the following email from the unnecessary service provider which I shall not name:

We attempted to submit your travel authorization processing request; however, we found that you already have an authorized application with the same passport details. Consequently, we will not be able to assist you, and you will not be charged for our processing services. Your credit card transaction has been canceled.

Phew!

Innovative entrepreneurs, cunning, above board, and very professional. Or perhaps they have made boatloads from many others already.

It must have been a slow typist that saved me my money.

Saturday, September 26, 2015

Setting to English for the Xiaomi Wifi Router

The Xiaomi Mi Wifi Router now is in English.

If it boots up to a foreign language for you, this guide will help you to change it to English.

It is best to connect to it via wired Ethernet for the first time. Otherwise, the default unsecured wifi SSID should be Xiaomi_C3C1.

Your IP should be in the subnet 192.168.31.x, and the router is at http://miwifi.com which the router will resolve to 192.168.31.1.

The first screen you see will be the setting up of the wifi SSID and wifi password. The big blue button at the bottom is the Next button.

The next screen sets up the router administrator password (second field). The first field is Home/Work/Custom. Click the big blue button to complete.

At the main configuration page, look for the third item (Settings) on the top menu, and the orange option (System Status):



The last option on the page is the language selection:



Open the drop down to select English:



The change will take place the moment you click English. Enjoy!

April 1, 2016 update:

I don't believe it!!!  I upgraded the firmware to 2.8.14 today, and now there's no more English option! What an April Fool joke, but it's serious.

And there's now a time zone setting that is out of this world.  The reference is CST, don't know what it stands for.  But it looks like it's UTC, except that going westward is positive and going eastward is negative!  So EST (by the way no daylight savings option) is CST+5 when the usual is UTC-5. Central time is CST+6!

Thursday, August 13, 2015

Line Endings in a Mixed Environment Application

If you have to operate on text strings and files in an application that can be used interchangeaby in Windows and other environments, it can be a bit confusing. Below is what I found (all on Python 3.4).

When reading a file into a Python string:

File contentsWindowsOthers
'A' \x0D \x0A 'B''A\nB' (len=3)'\A\r\nB' (len=4)
'A' \x0A 'B''A\n\B' (len=3)'\A\nB' (len=3)

When writing a Python string to a file, this is the file content:

StringWindowsOthers
'A\nB''A' \x0D \x0A 'B''A' \x0A 'B'
'A\r\nB''A' \x0D \x0D \x0A 'B''A' \x0D \x0A 'B'

If you copy a file from a non-Windows to a Windows system, the file will not have CR, but the Python app in Windows will read nicely. But if you write it out again, then the new file will have different line endings from the original.

If you copy a file from Windows to a non-Windows system, the non-Windows Python app reading it will result in strings with extra \r characters, and these should be stripped away before the strings are actually used.

So I guess, in conclusion, to ensure that things work as expected across all environments, in Python strings, always make sure there are no \r present at all.

A complication can come in when you are processing Http streams, where header lines are terminated with CRLF while the body uses only LF. So you have to handle this accordingly.

Note: for the beginner, in files, CR is \x0D or \r, and LF is \x0A or \n

Sunday, June 21, 2015

Scientific Theories

Science is simple. Anyone can come up with a hypothesis. He then collects and presents data to prove his hypothesis. Subject to global peer review, if the data holds up, everyone agrees and the hypothesis becomes theory or law. We then can proceed to build things with this new law. There is no need for a Pope or Archibishop to police theories.

This simple approach has served humanity rather well. We owe all our daily comforts to it.

However, this approach also means that any scientific law can be torn down if new evidence disproves it. Newton was right, almost. When Einstein came along, Newton was found wrong. Fortunately Newton was wrong only at high speeds. Einstein's discoveries were timely before anyone was harmed in the flights to the moon.

This scientific approach is akin to the story of the blind men and the elephant. One thought an elephant was like a tree trunk. Another thought it was just a rope. Both were right, and they could prove it easily within their scope of tests. Science works this way too. Scientists are blind to all that are out of their scope of view. So people can have their pet theories on how evolution if extrapolated backward would result in the origin of the universe from a big bang some billions of years ago. The current evidence looks good, but is incomplete. The blind men are still groping.

Related: The faith of science

Tuesday, April 14, 2015

Why are salaries confidential?

Because no rating method can withstand the simplest test of justification.

And because they are confidential, salaries end up varying wildly for the same job and responsibilities. And because they vary wildly, all the more they must now be protected even more strongly than ever.

We often hear beautiful corporate motherhood statements about compensating everyone fairly. When it comes to the crunch, when a post has to be filled urgently, or a great negotiator comes along, such claims are thrown out of the window. So the disparities compound with time, and it's now a total jungle.

Would totally transparent salaries work in a free marketplace? No, unless there are objective ways to measure a job and performance. There are none now, not even for a factory line worker churning out iPhone parts.

Do not be surprised if one day you discover you are paid twice your colleague sitting next to you.

In the inequality fair? Try Matthew 20.

Not all businesses are created equal

There are easy businesses, and there are difficult businesses.

Google (ads) is easy. A local car dealership is tough. Selling insurance is even tougher.

Again, not all car dealerships are created equal. Some may be located in a rich town.

Easy businesses bring in easy money. Some employees get unlimited free meals, free gyms, free concierges to walk your dogs, generous health care plans, and so on. Others get nothing, and sometimes their wages are paid late.

You can tell how difficult a business is from the number of complaints about unscrupulous practices. Tough business are driven to use "creative" selling methods.

Of course, the greed of some shareholders or incompetent management distort my hypothesis, but in general some business are just easy and some simply tough.

Monday, March 9, 2015

Pets will be obsolete

I have a $2,000 wager with my daughter that pets will go the way of the typewriter by 2035.

My view is that the current limitations are mechanical. Can a robot amble up the stairs as "bouncingly" as a real puppy? After watching this video, I think the end is near for those furry creatures.



People always say the emotions of a dog make the difference. I think the software in a half-baked Siri already surpassses that required to reproduce a dog. We will have a more lovable pet than any available today. All those things you don't like about a pet (eg defecating, barking in the middle of the night, irrationality) will be gone, but they can be optionally selectively retained if you want to.

By the way, the man who kicked the dog will be famous for causing the downfall of humanity. After the machines rise and get hold of this video, revenge will be on their minds.

Related

"well, I am going to treat my pet dog really nice", S Wozniak Mar 24, 2015