Sunday, November 29, 2009

Open source, free software, the confusion

There is some confusion and muddle over open source software and free software.

Many equate open source with free software, and vice versa. Nothing is further from the truth.

Open source means the source code is available. Having possession of the source code doesn't mean you have the rights to use the software. Just like legal ownership of a CD does not necessary mean you can use the software contained in that CD. Whether you can or cannot use a piece of software is governed by the terms and conditions set by the software owner.

In almost all countries, the software owner can determine the exact rights to use the software according to his own will and good pleasure. He can say that for a fee of $x you can use a piece of software for one year (for example Microsoft Action Pack). When the one year is up, you cannot use the software even though you may continue to hold the shiny CD with the hologram in your hands.

Similarly, and easier to understand, is that free software doesn't always mean you can see the source code.

So, software can have source code available, openly and freely or subject to terms, but it does not mean usage need be free.

I see peddlers and users of open source/free software divided into three general categories.

A. Big enterprises who cannot face the risk of support disrupted or terminated.

For such companies, they must have access to the source code, not to be able to resell the software, but so that, just in case the software owner cannot correct a problem, they can continue to keep the software running. There are some reasons when this can happen:

a. The software owner thinks a particular bug is not important enough and refuses to fix it.
b. The software owner retires the software but the business user cannot or does not want to upgrade to a supportable version.
c. The software owner goes out of business.

Although the last two situations can be protected by escrow, from my experience, escrow is 100% cow stools. A real-life experience: Oracle buys PeopleSoft, and retires Vantive (a PeopleSoft CRM system). A Vantive customer decides to continue to use the software and refuses to buy Siebel which Oracle pushes as the Vantive replacement. Customer activates access to source code. Oracle drags its feet for many months. Then they say they "couldn't find the tape". Customer threatens to sue. After a few more months, Oracle says "tape found" but "data could not be read".

There is no practical way to verify that when a software owner moves the source code to escrow, that source code is the right code and will generate the software the customer is using. In fact, there is no incentive at all for the software owner to ensure that the intent or integrity of this process is upheld. For most people, this un-policed task would be the lowest of priorities, and I wouldn't be surprised if people simply check in garbage files. The escrow is usually a bank or lawyer and would be none the wiser. After all, when the company goes out of business, no one would be around to be responsible for what's in the escrow's vaults.

Hence, the CIO who knows his business will insist on having access to the source code at all times. This in no way means that the customer is asking for free software. In all likelihood, such customers would have to pay extra for this service.

There is an alternative to achieving software support security without source code. And that is safety in numbers. Use software that is used by millions or hundreds of millions. First there would be revenue for the software owner to continue to maintain the software. Second, hopefully millions of users banded together can have some clout to insist that the software remain supportable for a long time. Windows XP is one good example.

B. The communists and Stallmanites.

There are still some people who believe that software should be free. They don't think that computers need be free. They don't think that Big Macs should be given out for no charge. They don't think that houses should be free. But for some unexplained reason, they think that software must be free.

And we know that the only communists left are in Cuba and North Korea.

C. The software losers.

Everyone is entitled to try all legal means to make a living. Hence, if you can't make money in one area, you think of another way. If you can't beat Microsoft at writing (and marketing) software, you try something else.

There's a category of people whose proud mantra is "we will give the software for free, and we will charge for support". It's like saying we will give you a car for free but you must come to us for maintenance. It's perfectly legal, but it's perfectly obvious that there are no incentives to deliver a software that is trouble-free.

It's good to know that there are customers of such software/services. We need them to help keep in check the other software providers.

Wednesday, November 25, 2009

Great Wall of China - DIY

It's very easy to plan a do-it-yourself tour of the Great Wall of China at BaDaLing (八达岭). And it costs only RMB12x2 (total USD4) for the journey there and back.

The Internet is full of postings on how people signed up to tours only to be held at ransom to cough up more money after the bus has moved off. Do not be another victim.

By the way, most of the victims are Chinese nationals from out of town or people who speak some Chinese. The swindlers, or enterprising businessmen depending on how you view them, tend to leave the non-Chinese speakers alone as sign language is harder, I guess.

Follow these steps carefully for a low-cost and enjoyable tour. We just did it last week.

1. Make your way to DeShengMen (德胜门). This is once a city gate of which only the archer's tower is now left standing. The archer's tower is a huge structure that cannot be missed once you are in the vicinity. There are a few bus terminals there. The one you must go to is north of the tower. From the air photo below you can see the buses lined up for the journey to the Great Wall.



2. The nearest subway station is JiShuiTan (积水潭), 500m to the west of the tower. You can also go to http://www.bjbus.com/ to find the buses to DeShengMen from where you are. Each city bus trip costs RMB1, or RMB0.20 if you have a multi-trip card. Taxis can be a cheap option especially if you have three or four persons in your party. Taxis start at RMB10 and covers some good distance before the fare increments.
Be careful about taxis. A seasoned taxi driver seeing an obvious foreigner wanting to go to DeShengMen in the morning would know that you are going to the Great Wall and would try to take you there himself. The driver of the first taxi we flagged pretended that he didn't know where DeShengMen was but asked where we wanted to go from there. We waved him off. The driver of the second taxi we flagged was a brand new driver who really didn't know where DeShengMen was and I had to guide him with the GPS in my Nokia phone.
3. The bus you need to take is number 919, a green and white bus. And that is where the problem is. Every bus going out of this DeShengMen terminal is 919 but they go to different places!  The signage is havoc. There are touts aplenty. They do not look like touts. They speak to you nicely and appear to be offering friendly advice. Ignore them totally and speak to only people in the bus company's uniforms.

On my trip, they put in extra buses to the Great Wall.  The bus had a sign as in the picture below, which actually means "extra direct bus".




When the staff saw me taking a picture, she helpfully flipped it over to the more meaningful one which says "Direct to BaDaLing" (八达岭).



Anyway, the bus-stop should have this sign.  But the crowds there could have moved it from its proper position.



The bus moves off only when filled. The whole journey is on the BaDaLing Expressway, which starts right at DeShengMen. The trip will take about 1.5 hours with the traffic jams on the expressway.

For the return trip, board the same 919 from where you alight at BaDaLing. I guess it is prudent to double check it's the express to DeShengMen.

Have a nice trip!

The entrance fee at the Great Wall in November is RMB40. Credit cards can be used.

The futility of expanding wi-fi

Remember CT2 or the initial incarnation of PCN?  They have gone the way of the dodo.  The technology is now used in DECT phones.

Efforts to expand wifi to provide wide area coverage will meet the same fate.

CT2 was marketed as a poor man's alternative to cell phones.  It is a neat engineering idea.  You get to use a wireless phone when you are in range of a base station.  But it is just that, a neat engineering idea.

Using wi-fi as a poor man's wide area data network is in a similar situation.  The reason is not un-obvious.

If only, say, 20% of the time that you need to use the Internet you find yourself outside wi-fi coverage, you would need to pay for a data subscription from your cell-phone company.  And, if you already have paid for wide-area data why would you still pay or need wi-fi?

Wi-fi has its uses, just like DECT phones.  You use it at home or in the office, when you are pretty stationary and there is no point expending power sending data a few miles away when you can send it down the hall.

Good communications equal a bad plan?

One of the fundamental principles of communications is that the amount of planning is inversely proportional to the efficiency of communications available.  The better communications you have the less planning you have to do.  The more planning you do, you are less dependent on the need to communicate.

To illustrate: a family hits the shopping mall.  In the old days, a detailed plan would have to be worked out, something like: "Everybody, it's free and easy for the next 30 minutes.  Then we meet at this water fountain.  If by 35 minutes, Johnny doesn't show up, this is what we will do,......"  Lots and lots of if's then else's to cover all conceivable contingencies.  Today, when a family reaches the mall, everyone takes out his or her cell phone, does a battery check, and everyone do whatever he or she likes.  When someone feels it's time to go, the phones start ringing.

This similar scenario occurs everywhere.  When an army wants to conduct an attack, a detailed plan with all sorts of contingencies covered means there is less need to rely on battlefield communications, which can be very poor.  A haphazard plan means everyone will be screaming into their radios when something unexpected happens.

A corollary from the above means that it is idiotic or sheer arrogance not to switch on your cell phone when you have one.  For if you know when you need to use the phone (ie you have a good plan), you wouldn't need a phone.

There are opposing arguments on whether having efficient communications is good or bad overall.  There are some who say that relying too much on good communications means there is no plan or no good plan.  But there are others who say detailed planning to avoid communications is impractical and would only lead to rigid and uncreative plans.

Extending the paradigm further, remember the times when an author writing a novel means inserting a piece of paper into a typewriter.  The writer has to compose mentally to some great detail before he commits onto paper.  With word processing software, it's type, delete, cut and paste at no extra cost or effort.

The same goes into finance budgeting.  If you work in a company where everything you want to purchase must be in the annual budget, you would be forced into detailed planning and forecasting the year before.  But if there is no such need, you would be making purchases every now and then and may over spend.

Sunday, November 15, 2009

Please do not reply to this email

Everyone must have received lots of such messages where at the end they say "Please do not reply to this email".

This is idiotic on many accounts. I won't even bother to explain them.

I do the exact opposite. In all emails that are generated by applications, I always include a line which says something like "Please reply to this email if you meet any problems." And of course I use a sender email address that is always monitored.

Saturday, November 14, 2009

Demystifying data and GPS on Nokia phones

Introduction


The modern cellular phone is very powerful computer with fantastic capabilities. The technology, from the user point of view, is not that complex. However, the lack of information on implementation specifics prevents lots of wonderful things from being done. For example, Nokia documentation such as (on page 57 of my E-71 manual) "To use a specific positioning method, select Positioning methods" is not helpful. The bewildering number of terms used for the same thing, and the same term to mean totally different things add to the confusion.

The Nokia phone has lots of powerful features for data. For example, your laptop computer can have full Internet access by "dialing" out through the phone in your pocket. This is something I have been doing for the past ten years, since CSD days, and that iPhone users still cannot enjoy.

Data on the move


There are two distinctively different types of data networks the modern Nokia phone such as the E-71 supports (I will not talk about Bluetooth and infrared here). Even if you are a network expert, please read on to see the different nomenclature used by Nokia:

  • Wifi - on the Nokia phone this is called Wireless LAN .  Wifi is a very local area wireless network with a coverage of a few tens of meters. Most likely you already have one at home as part of your Internet connection. The little box with one or two short antennas sticking out to provide Wirless LAN is called by everybody as an "access point". Whether this service is free depends on whose access point you are using. When you move too far away from the access point, your Wireless LAN connection is broken.




  • Cellular data - on the Nokia phone this is called Packet data . This uses the same radio and spectrum that you use to make voice calls. Depending on what your telco has deployed, Packet data can be alphabet soup: GPRS, EDGE, 3G, 3.5G (HSDPA) or LTE. Packet data thus goes through your telco's towers and you need a subscription, and probably have to pay extra, to use this. Where you can make voice calls you should also be able to access Packet data. Thus Packet data has more universal coverage than Wireless LAN. Every operator gives a different name to this service, and some hide it so well that you will have to do some research before you realize which product they offer is Packet data.




  • Access Points, again


    In the Nokia phone, to connect to a network you first have to define an Access Point. This is not to be confused with a wifi access point! This Nokia Access Point is nothing physical but a configuration that you set up in the phone, so that other applications can refer to it to connect to the Internet. Example applications that let you choose one of these Access Points are: web browser, Windows Live Messenger, email and so on. To see your Access Points, go to Tools, Settings, Connection:


    Figure 1

    As part of defining an Access Point one of the properties you have to specify is Data bearer. The Data bearer is where you state whether it is using Wireless LAN or Packet Data.

    If your Data bearer is Wireless LAN, you have to provide the WLAN netw. name which everybody else in the world calls the SSID. Connection name is just a description string for your own reference. Depending on the wifi (not Nokia) access point settings, you may need a password.


    Figure 2

    If the Data bearer is Packet data, you will have to specify the Access point name. (See, this is the third re-use of the phrase "access point" to mean a different thing!) More commonly abbreviated as the APN, this is a value that you must obtain from your telco. Telcos can have different APNs for Internet access, walled-garden applications, MMS, et cetera. In all likelihood some default ones are already created in your SIM. There is usually no need to enter the User name or password as most telcos authenticate you by the SIM you are using.


    Figure 3

    In Figure 1 above you will notice there is another item called Packet data! I salute the extraordinary effort the documentation experts at Nokia have put in to confuse the whole world. If you press that item, you get:


    Figure 4

    What can this "Packet data" thing be? I could not find any meaningful documentation for this. You enter a telco APN in the "Access point" field. From my experimentation, this configuration is just a special (Nokia) Access point configuration that is used when I use my laptop to dial out through the phone. That means, if I set my laptop to dial out via Bluetooth to my Nokia, the configuration that is used will be this "Packet data" thing.

    GPS


    It is surprising many people are still confused over what GPS is. If you are not sure, it is important you first Google and understand it clearly. Try here, or here.

    In short, GPS has nothing whatsoever to do with the mobile cellular network. GPS takes readings from a constellation of 24 low-flying US satellites, and from the different times it takes to receive a coded message from each satellite, it is a straightfoward triangluation calculation to determine where you are on planet earth. GPS requires a clear view of the open sky to work. You cannot be in a building, in a tunnel, or under a thick forest canopy.

    GPS simply gives you four items: x, y, altitude and a very very accurate time. There are no maps, no compass, no speed, no driving instructions, no when the fish will bite, no et cetera. All the other navigation goodies are applications built on top of those four pieces of data you get from GPS. For example, speed is the displacement from the last two position readings divided by the time between the two readings!

    The problem with GPS is that it takes a long time to synchronize with the satellites. There are two reasons for this. Firstly, the low power used and to make GPS robust and reliable, the data rate of the messages from the satellites is very low - 50bps. Secondly the earth is very big and the integer arithmetic rolls over about every 300km. So without some hints, it can take a cold GPS receiver ten minutes to lock in to the satellites.

    On the Nokia mobile phone, you see the following confusing GPS options and I will describe from the least relevant first:


    Figure 5

    Integrated GPS This means use the GPS receiver in the phone. I don't understand why this is necessary. If you have purchased a GPS receiver, why would you be switching if off to find your position?

    Bluetooth GPS means to use an external GPS receiver connected via Bluetooth. This may be applicable if your phone does not have a GPS receiver. If your phone (eg E-65, E-51, E-71) already has a built-in GPS receiver, I don't see any reason to use this. I know some weirdos complain that the built-in receiver is not accurate enough!

    Assisted GPS As explained earlier, it takes a long time to lock onto the satellites. Assisted GPS allows you to specify an external source which can provide some quick estimate of your current position so that the satellite fix can be achieved almost immediately. This feature requires a Packet data connection (see previous section) to a server somewhere on the Internet. The set-up is under Tools, Settings, General, Positioning, Positioning server:


    Figure 6

    As you can see, my phone has supl.nokia.com as the provider of the Assisted GPS service. Only Packet data access points can be selected, as I think it is assumed that you won't have wifi coverage when on the road. Once you have Assisted GPS enabled, the data connection will be made without asking you whenever GPS positioning is switched on in your phone.  So, if you are not a data user, don't be surprised with data charges in your bill when you use GPS.  GPS positioning can be switched on directly under menu GPS, GPS data, or it can be switched on by an application, example Nokia or Ovi or Google Maps. I don't know what data or protocol is used for this service. If someone knows please do share.

    Note that Assisted GPS by itself does not give you your location. Assisted GPS is just to speed up satellite synchronization. I am speculating that the server uses the IP address of the mobile unit to tell the GPS receiver the rough 300km zone it is in.

    Network based Cell phone towers (BTS'es) are usually fixed. If you can record the time taken for a signal to travel from two or more towers to a mobile phone, it is, theoretically, a simple task, just like GPS, to plot out your own position. In practice it is tough to measure accurately a signal traveling at the speed of light and also it is tough to identify reflections from buildings and so on. Hence, position location by cell phone towers at best is an estimate. But the estimate would be more than sufficient to allow the GPS receiver to lock in to the satellites in a jiffy.

    However, Network based option can be used for positioning if you are ok with the rough accuracy. Nowadays cells can be very small, eg a pico cell, that the position of the BTS can be taken as the position of the mobile phone. The Network based option comes in handy during those periods when the satellites are not visible, example when you are in a building.

    The Network based option requires that your telco deploy the locating services feature on the network. The triangulation is not done at the phone. It is done in the network, and the result transmitted to the phone via the signaling channel.

    If you have Network based GPS turned on when you launch Nokia Maps, you will notice that the red dot indicating your position would first be some distance from where you really are. Then after a few seconds it will jump to the spot where you really are.

    Important: from my experiments, Network based GPS requires a data connection. So if you are roaming, be aware of the possible high data charges. Without Network based or Assisted GPS, my Nokia E-71 will take about 20 minutes to lock in on the satellites. With Network based GPS, it is consistently under eight seconds.

    Conclusion


    I hope you find the above information useful. Parts of the above are from pure speculation and some are from non-exhaustive reverse engineering. If you have more accurate information do let me know.

    Where Nokia menu commands are referred to, it is assumed to be the menu sequence from an unadulterated Nokia E-71.