I use this blog as a soap box to preach (ahem... to talk :-) about subjects that interest me.

Wednesday, May 23, 2012

A Walk in the Sun

I recently read the short story “A Walk in the Sun” by Geoffrey A. Landis. It was based on the fact that on the Moon, if you walk towards the Sun, you can keep up with it.

I absolutely needed to check it!

The calculation is trivial. The circumference of the Moon at the equator is 10,921 km. Its orbital period around Earth is 27.322 days. Then, the surface speed at the equator is 10,921 / 27.322 / 24 = 16.65 km/h (or 10.35 miles/h). Considering that the Moon gravity is about 1/6g, it should be possible to sustain 16.65 km/h for quite a while.

In the story, an astronaut stranded on the Moon, in order to survive, needs to keep the solar panels of her life-support unit in sunlight. She has no problem in keeping up with Sun, at least on the near side of the Moon, which is less rugged than the far side. In fact, at times, she can easily gain ground.

The pilot crash-lands her shuttle near Mare Smythii, which is close to the equator. Therefore, Landis is right in saying that she needs to run at about 10 miles/h. But, in my opinion, he made a mistake: instead of running directly towards the Sun, considering that she could actually outrun it and that the Sun was still quite high, the pilot should have also moved towards one of the poles (e.g., the North Pole).

This is because what the pilot needed was to move towards the Sun 360 / 27.322 / 24 = 0.55 degrees of longitude per hour, not to run at 10 miles/h around the equator. The closer to a pole, the slower she would have needed to move. At a pole, by climbing to the top of a hill or of a crater, she might have not needed to move at all, and just adjust the orientation of the solar array every now and then.

Assuming that the pilot moved along a major circle of constant inclination with respect to the equator, to calculate how she should have moved, we have to look at spherical triangles. We can first of all define the following:
O: The point of origin, where the shuttle crashed, assumed to be on the equator. We can also use this symbol to indicate the angle of inclination of the pilot’s path.

t: The current time.

P: The point reached by the pilot at time t while moving on a great circle with inclination O and speed V.

E: The point on the equator on the same meridian of P.

d: The distance between O and P measured on the Moon surface.

R: The Moon radius (average = 1,737.10 km).

lat: The latitude of P. That is, the angle subtended by the radii through P and E.

lon: The difference in longitude between O and P (or between O and E, as E, by definition, has the same longitude as P). That is, the angle subtended by the radii through O and E.

W: The speed of 16.65 km/h necessary to keep up with the Sun when running on the equator.

The spherical triangle OPE is right in E, because a meridian always intersect the equator at 90 degrees. Therefore, from a simple (!) formula of spherical trigonometry for right triangles, we can write:

(1): sin(lat) = sin(O) * sin(d/R)

In case you are interested, the formula can be expressed in words as follows: “In every right spherical triangle, the sine of one of the sides adjacent to the right angle equals the sine of the opposite angle multiplied by the sine of the hypotenuse”. Note that in spherical geometry, instead of saying “the angle formed by the radii passing through the ends of a segment of great circle”, you can simply say “the sine of the segment”.

Another formula of spherical trigonometry let us calculate the difference in longitude between O and P:

tg(lon) = tg(d/R) * cos(O)

If we impose to keep pace with the Sun, tg(lon) becomes tg(W*t/R).

(2): tg(W*t/R) = tg(d/R) * cos(O)

This lets us resolve (2) in d:

(3): d(t) = R * arctg(tg(W*t/R) / cos(O))

When the pilot starts her run, she needs to maintain a speed given by W/cos(O). For example, if she travels with an inclination of 30 degrees, she needs to go just a bit faster than 19.2 km/h. With an inclination of 45 degrees, her initial speed needs to be around 23.5 km/h.

As she progresses, the length of the parallel she is on becomes shorter. That means that she can walk slower and still maintain the 0.55 degrees/hour necessary to keep up with the Sun.

There is a problem, though: when t passes the value 1.57*R/V (i.e., 163.8 h), W*t/R becomes greater than 90 degrees (which means that the pilot has completed 1/4 of the journey around the Moon), and tg(W*t/R) goes through a point of singularity before becoming negative. It turns out (but I am too lazy to study the configuration and understand why) that the singularity always occurs when the latitude equals the inclination (i.e., when lat equals O).

The solution is to move O to the coordinates of P when the tangent diverges, and keep going from there. To do so, we need to replace W with the speed needed to keep up with the Sun when travelling at the latitude of P, which is given by Wp = W * cos(latp). But in tg(W*t/R), we also need to replace R with R * cos(latp). This means that we can leave (3) as it is. And it makes sense, because we are only interested in the angle around the Moon, not in the actual distance travelled.

Well, I have spent quite a bit of effort on this problem, and it’s time to stop. The conclusion is that, if the pilot had run at an inclination of 30 degrees, she would have reached a latitude of 60 degrees in less than two weeks, progressively slowing down from the initial speed of 19.2 km/h to a more sedated 9.6 km/h. Then, she could have followed the 60 degree parallel and kept up with the Sun by walking at 8.3 km/h.

If the pilot had maintained a more ambitious inclination of 45 degrees, after two weeks, she would have reached the pole. The initial speed would have needed to be a more brisk 23.5 km/h. But only initially, because already after six days, the speed to keep up with the Sun would have gone down to 16.8 km/h.

The bottom line is: if you remain stranded on the Moon and need to keep pace with the Sun, don’t just run towards the Sun. Go as quickly as possible towards the nearest pole.

Friday, May 4, 2012

Be in control of your poo

Since time unmemorable, human beings have done their best to control their surroundings.  More control means fewer risks.  And fewer risks mean more safety and less stress.  Therefore, it makes a lot of sense to attempt to avoid surprises.

One way in which parents of small children attempt to be in control is by encouraging/forcing their little boys and girls to pee before they leave the house.  This amounts to a veritable conditioning that in many cases persists for the rest of our lives.

This emphasis on urine is probably due to the fact that most people need to urinate several times a day, but I find that the passing of solid waste has been neglected for too long.

I personally hate to have to sit on “alien” toilets.  Especially public toilets tend to be less hygienic than what I would like them to be.  The ladies, who, because of their anatomy, are forced to sit even just to pass some water, have all my sympathy.  Although, I am told that ladies public toilets are usually cleaner than those for so-called gents.

The paper in public toilets (when provided!) is usually of low quality and often not much stronger than two layers of spider web.  And remember the disgusting smell that often lingers in such places.  There is also the issue of touching cabinet locks, taps, and door handles that are indubitably receptacle of who knows how many microbes.  Think twice before holding that piece of pizza after using public facilities.

And what about having sometimes to endure the promiscuity of sitting one metre away from people doing their business in neighbouring cabinets, with associated smells and noises.  Don’t forget that smelling something means that tiny particles of “that something” enter your nose and are absorbed by it...

If what I said resonates with you, rejoice!  There is a simple way to avoid having to defecate in public toilets.  I discovered it at the beginning of the year and have never looked back at darker times.

I simply go to the toilet before going to bed, regardless of whether I feel the need for it or not.  You can obviously choose another time of the day.  For example, after getting up in the morning or when you arrive back home from work.  The important thing is that you do it every day more or less at the same time.

If nothing seems to happen when you sit down, give it a couple of minutes.

The first time, you might be disappointed by your meagre production, but stick to the method and you will be rewarded.  Think about it: if your body produces on average enough waste for a daily session, by initially forcing a time, you automatically synchronise on a 24-hours cycle.  It makes sense, doesn’t it?

This method also works for people who need to go more than once.  They only need to set two appropriately spaced times instead of one.

Perhaps, many before me discovered my solution but have never mentioned it because of the taboo surrounding faeces and bodily functions in general.  No matter.  Now you know!

Monday, April 23, 2012

A real small-world network #2

It turns out that I hadn't counted the airports correctly: they are 698, not 699 as I stated in my previous article on this subject.

Furthermore, MMU (Morristown NJ) and SSI (Brunswick GA) are only connected with one another. Same story with MXY (McCarthy AK) and MYK (May Creek AK). Therefore, they are not really part of the network.

This leaves a network of 694 airports. Here is a table showing the minimum path lengths between all possible pairs:

Length    #
      1     3,692
      2    42,794
      3    74,998
      4    74,064
      5    39,197
      6     5,452
      7       268
      8         6
              --------
Total  240,471

Indeed, 240,471 corresponds to all possible airport pairings: 294 * 293 / 2.

As a result, the average path length is 3.498. Quite short, when considering that the network consists of 694 nodes.

Next, I have to calculate the clustering coefficient of the network as the fraction of pairs of nodes that, being directly connected to a third node, are also directly connected with each other.

Another way to see clustering is to consider triplets of nodes that are directly connected. If the nodes of a triplet are connected by two links, the triplet is said to be open. If all three nodes are directly connected to each other (i.e., with three links), the triplet is said to be closed. The clustering coefficient is calculated by dividing the total number of closed triplets by the total number of triplets.

We already know that the total number of open triplets in the network of US airports is 42,794, because that is the number of nodes connected via an intermediate node but not connected directly to each other. Those triplets are open because I programmed the database to rejected duplicate pairs. Therefore, pairs found to be connected via a path of length 2 couldn't be inserted into the database if they were already present with a path of length 1.

I wrote a program that, instead of attempting to insert pairs connected with a path of length 2 into the database, counts the cases in which the third node is connected to the first one. I avoided counting more the once the triplets by only considering triplets in which the nodes were in alphabetical order.

The program counted 17,440 closed triplets, resulting in a clustering factor of 0.29. This is higher than the clustering of the Web and of the Internet, as shown in a presentation slides dated May 2008 (www.newton.ac.uk/programmes/CSM/seminars/050114001.pdf):






Network Vertices  γ Path Cluster
WWW 2 × 108 2.1 16 0.1078
Internet, router 1500002.4 11 0.18
Movie actors 212250 2.3  4.54 0.79
Maths, coauthors 70975 2.5  9.5 0.59
Phone calls 53 × 106 2.1

Synonyms 22311 2.8 4.5 0.7


Original sources: Adamic (1999), Aiello et al (2000), Barabási, Albert (1999),Broder (2000), Watts, Strogatz (1998).

The "γ" indicates how long the right tail of the power-law distribution of cluster sizes is. The lower the γ, the slower the number of clusters decreases with the cluster size. The expression for the power law is as follows: N(size) = K * size-γ, where K is a constant. A γ of 1 means that the number of clusters halves when their size doubles. A γ of 2 means that the number of clusters is reduced to a quarter when their size doubles. And so on.

To calculate the distribution for "my" network, I needed to write another small program that listed the number of links of each airport (i.e., node) or, to say it in a different way, the cluster sizes.

It turned out that there are 128 airports with a single connection to another airport. In case you are curious, the best connected city is Atlanta, with non-stop flights to 158 destinations, followed by Minneapolis/Saint Paul with 146, Chicago with 142, and Denver with 141.

The following plot shows log(N) vs. average log(size). This means that γ = 1.25, and K = 264. K should match 128. Why is it much larger? I haven't got a clue. The discrepancy sounds dramatic, but when considering the logarithms, as it appears on the plot, it doesn't look catastrophic.

And why is the γ half of what reported in the examples? Again, I have no idea.


In any case, now that I have found a bona-fide small-world network, I think for a while I will concentrate on something else.

Saturday, April 21, 2012

Soldiers and body parts. What's new?

The publication of photos that show US soldiers posing with dismembered suicide bombers have drawn almost universal condemnation.

I confess I don't understand what the fuss is all about. Perhaps we have become accustomed to neat pictures of laser-guided missiles hitting their targets with uncanny precision, and have forgotten that war on the ground is not like that.

Although I know that sometimes wars are unavoidable and even appropriate, I am at heart a pacifist and a non-violent. To the point that I avoid swatting flies. That said, the images of soldiers pissing on dead enemies or posing with dead bodies, dismembered or not, don't surprise me in the least.

I would never do it, but then, I am not a soldier fighting a guerrilla war. To kill other human beings is not part of human nature. For the vast majority of people, killing somebody is a shock. Even when the killing is done in self defence. That's why combat training always involves creating automatisms and dehumanising the enemy. The more a soldier sees an enemy as a target or a threat rather than as a fellow human being, the more he is likely to shoot first and survive.

And then, there is the suppressed fear of dying and suffering, which bottles up on every mission and sortie. It is inevitable that under such circumstances, some soldiers go further than what we, watching a sanitised war on TV from our comfortable sofa, find acceptable.

The massacres of My Lai and Srebrenica are excesses that happened because the soldiers didn't consider their victims as other human beings. Same story with the Nazis and the Holocaust: it was OK to kill the Jews because, according to Hitler & Co., they were subhuman.

But to come back to the recent pictures of soldiers and body parts, they are not even something new. I found in my personal library a photographic book in Italian about the Vietnam War. The title, translated into English, is "Vietnam – Against a Genocide" (Vietnam – contro un genocidio), edited by Livia Rokach and published in 1972 by Napoleone Editore. Here is the picture on the front cover:


I know: it is very upsetting. But the point I want to make is that wars are always ugly.

Politicians want to have the cake and eat it too. Fortunately, the soldier who made the photos public, reminded us that war is not nice. The only clean war is a war that doesn't take place at all!

There is also another picture I would like to show you. This one shows a torture that we now call "waterboarding". In Vietnam, they didn't use a board, but the technique was the same. The soldier with a helmet is a colonel.

Wednesday, April 18, 2012

A real small-world network

I am fascinated by small-world networks and, for once, I would like to analyse a real network of which I know the complete structure.  This would make possible for me to calculate its average path length and its clustering.

After thinking about it for a while, given the fact that I am interested in civil aircrafts, I though it would be nice to study the global air-route network.

Years ago, I had a list of all air sectors in existence.  It was in one of those telephone-book-sized manuals marked "ABC" and used by travel agents.  But I must have thrown it away before one of my many moves, and I suspect that nowadays no travel agent has even ever seen such a book.

I couldn't find anything useful on the IATA (International Air Travel Association) and ICAO (International Civil Aviation Organization) websites.

When I searched Google for "nonstop flights XXX", with XXX set to a IATA airport code (e.g., JFK for New York's Kennedy) it showed a list of all cities with non-stop flights to that airport.

"That's what I need!" I thought.  "I only need to download from somewhere a list of all airport codes and write a little script that interrogates Google for all of them.  Then, I can convert the city names to IATA codes to have a list of all airport pairs.  I'll have to merge the lists of airports located near the same city (e.g., FCO for Rome Fiumicino and CIA for Rome Ciampino), but I can do that.  Once I have all city pairs, I can build my network.

It sounded reasonable, but there was a catch: Google makes it very difficult to be able to execute a query programmatically.  So much so that I gave up.

I had to find another network.

Fortunately, I discovered the site http://nsflight.com.  It lists all pairs of US airports that are connected non-stop.  As it turned out, to limit the study to the US was a blessing in disguise, because the analysis of the air routes requires an immense amount of computing time.

On April 13th (a black Friday), I finally had my list of US cities with an airport (699) and a list of directly-connected city pairs.  That's when I discovered that it would take days and days to get a result.

What I needed to build my network was a program to merge non-stop pairs into one-stop pairs, then to two-stop pairs, and so on until all 699 nodes had been connected to each other.  That is an enormous number: 699 x 698 / 2 = 243,951.  Certainly, too big to be kept in memory.  I had to build a database with the pairs.  Here is the SQL script I used:
create database pairs;
create table pairs.pairs (
  one character(3),
  two character(3),
  len integer
  );
create index one_key on pairs.pairs (one, len);
create index two_key on pairs.pairs (two, len);
create index len_key on pairs.pairs (len);
create unique index pair_key on pairs.pairs (one, two);

As you can see, each record consists of a pair of three-letter city codes and a number, which represents the minimum number of intermediate stops (i.e., the minimum path length between the pair of nodes).

The fourth index associates to the pair of city codes a unique key.  This guarantees that each pair can only appear once in the database.  I decided that the nodes of each pair would always appear in alphabetical order.  This avoided useless duplications that I would have had to remove later.

After writing an SQL script to insert the 1-pairs (i.e., the pairs with a single link between them), I wrote a JSP script to discover all possible combinations of pairs "back to back" and insert them as 2-pairs.

The JSP script went through the hard-coded list of city-codes one by one and queried the database to obtain all pairs that had the current city-code in either position and the len column set to 1.  This returns a list of all pairs containing the current city-code.  Then, the scripts repeats the query for each one of the other city-code of each pair, which returns another list of pairs.

For example, "GAM" (Gambell AK) is directly connected with five other cities (Elim, Nome, Shaktoolik, Savoonga, and White Mountain, all in Alaska).  The first query in the script returns this list:
ELI GAM
GAM OME
GAM SKK
GAM SVA
GAM WMO

The script executes the second database query for all five.  For example, the query for Shaktoolik returns the following list:
ELI SKK
GAM SKK
KKA SKK
OME SKK
SKK SMK
SKK UNK

The script then combines the 1-pairs obtained with the second query with the original 1-pair GAM-SKK to form six tentative 2-pairs:
GAM SKK ELI
GAM SKK GAM
GAM SKK KKA
GAM SKK OME
GAM SKK SMK
GAM SKK UNK

While going through the 2-pairs, the script discards GAM-SKK-GAM because the two ends are identical, but tries to insert into the database the other five 2-pairs with len set to 2. The first one fails because GAM-ELI is already present with len = 1, but the other four succeed.

Once obtained all 2-pairs, I launched the script again but with the len parameter of the second query set to 2.  This gave me all 3-pairs, but I had to go through all cities in three chunks, because the computer ran out of memory.  Two factors contributed to this debacle: firstly, I had to launch the script from a web browser, which gobbled up quite a bit of memory; secondly, the script was executed within the Tomcat Java server, which also used up plenty of memory and was known in the past to have memory leaks.  Even without leaks, it would have probably failed.

At this point, I converted the JSP script into a Java application, and the Windows Task Manager told me that the usage of physical memory remained around 40%.

At the moment of writing, I am running the application with 1-pairs and 4-pairs to obtain 5-pairs.  It has been running for hours, and I expect it to run overnight.  The CPU usage remains well below 15%.  This means that the time goes into database access.  In fact, I can hear that the hard disk is working hard. I don't see how I could speed that up.  Perhaps I could create a virtual disk in memory and use that to store the database.  I am open to suggestions...

The total number of 1-, 2-, 3-, and 4-pairs is 195,550.  The program will still have to run for a while longer to reach the longest of the shortest paths between pairs of nodes.

Once I will have the list of all pairs, I will be able to calculate their average length.  I'll keep you posted.

Thursday, April 12, 2012

Small-world networks (or not?)

I published three articles on small world networks.  The first one was in August 2010: "Network of Feedbacks on eBay".  The second and third articles were in March 2012: "The small world of this blog" and "More on visitors to this blog".

In those occasions, I stated that the feedbacks on eBay and the visitors to this blog formed small-world networks because the number of links attached to was distributed across the nodes according to a power law.

But a couple of days ago, in those moments of semi-lucidity that precede sleep, I realised that the presence of a power-law distribution does not prove the presence of a small-world network.

According to Steven Strogatz, a network is called "small-world" when the average number of links between nodes is low and when clustering is high.  The distribution of the number of links attached to each node doesn't always follow a power law.  Therefore, a power-law distribution is not a necessary condition for a network to represent a small-world.

But the crucial point is that I haven't found anywhere a statement claiming that a power-law distribution is sufficient to identify small-world networks.  In fact, power-laws pop up in many places.  For example, the spectrum emitted by supernova remnants and other non-thermal sources of radiation follows power laws.

The bottom line is that the power-law distributions I discovered in the eBay feedbacks and in the blog visitors, contrary to what I stated in my previous articles, do not automatically imply that we are looking at small-world networks.

Wikipedia states that "a small-world network is defined to be a network where the typical distance L between two randomly chosen nodes (the number of steps required) grows proportionally to the logarithm of the number of nodes N in the network."

Scholarpedia, more generally, states that "A small-world network refers to an ensemble of networks in which the mean geodesic (i.e., shortest-path) distance between nodes increases sufficiently slowly as a function of the number of nodes in the network."

It seems that a universally recognised definition of "small-world network" is not available. But I don't like the definitions given by Wikipedia and Scholarpedia, because they depend on being able to "grow" the network or, at the very least, to have several instances of the network you are studying.  But what do you do if you only have one network to work with?  You cannot simply choose subsets of nodes, because the resulting networks might not be meaningful.

I like the definition used by Strogatz and Watts: a small-world network is characterised by having low "average path length" and high "clustering".  You can apply such a definition to any individual network.  To calculate the average path length, take any pair of nodes and count the number of links that form the shortest chain between them; then, repeat it for all pairs of nodes and average the result.  Clustering measures the level of overlapping in the network and is calculated as the probability that two nodes linked to a common node are also linked with each other.  Or, speaking of frequencies instead of probabilities, clustering measures the fraction of pairs of nodes that, being directly connected to a third node, are also directly connected with each other.

Low "average path length" can be identified in terms of network size.  The most well known example is the "six degrees of separation" with a world population (i.e., nodes) of six billions.  This was sort-of verified in 1967 by Stanley Milgram. He asked 160 randomly-chosen residents of Wichita, Kansas, and Omaha, Nebraska, to send letters to a particular person or, if they didn't know the person, to somebody who might know him/her.  As recipients, he chose the wife of a divinity graduate student in Sharon, Massachusetts, and a stockbroker in Boston. Of the 160 letters, 42 reached their destination, after an average of 5.5 intermediaries.  Now, 6.5 links is clearly very low when compared to the number of nodes in the network.  In case you are interested, the Web has 19 degrees of separation and the Internet 10.

Understanding what "high clustering" means is a bit trickier.  A loop in which all nodes are connected to two neighbours as 0 clustering, because no two nodes connected to the same node are ever connected together.  At the other end of the spectrum, a network in which all nodes are connected with each other has a clustering of 1.  In a fully-connected network, the average path length is exactly 1 regardless of the network size.  Therefore, such a network is a small world, although not particularly interesting.

In general, in loosely connected networks, the presence of "hubs" that connect many nodes is sufficient to reduce the average path length and increase the clustering.  This is what happens in social media: some people with many connections in FaceBook or LinkedIn connect through them pairs of people who would normally be "very far" from each other.

To go back to what motivated me to write this article, the power-law distributions I showed in my previous articles might as well to do with small-world networks, but to prove it is for all practical purposes impossible.

I have to think about it...

Tuesday, April 10, 2012

Linear and nonlinear systems

I am reading a very interesting book: "Sync – the emerging science of spontaneous order", by Steven Strogatz, published by Penguin Books in 2004.

On page 181 of the book, I found the best description of linearity (and nonlinearity) I have ever found. I thought I might share it with you.
The mathematician Stanislaw Ulam once said that calling a problem non-linear was like going to the zoo and talking about all the interesting non-elephant animals you see there. His point was that most animals are not elephants, and most equations are not linear. Linear equations describe simple, idealized situations where causes are proportional to effects, and forces are proportional to responses. If you bend a steel girder by two millimeters instead of one, it will push back twice as hard. The word linear refers to this proportionality: If you graph the deflection of the girder versus the force applied, the relationship falls on a straight line. (Here, linear does not mean sequential, as in “linear thinking,” plodding along, one thing after another. That’s a different use of the same word.)

Linear equations are tractable because they are modular: They can be broken into pieces. Each piece can be analyzed separately and solved, and finally all the separate answers can be recombined -literally added back together- to give the right answer to the original problem. In a linear system, the whole is exactly equal to the sum of the parts.

But linearity is often an approximation to a more complicated reality. Most systems behave linearly only when they are close to equilibrium, and only when we don’t push them too hard. A civil engineer can predict how a skyscraper will sway in the wind, as long as the wind is not too strong. Electrical circuits are completely predictable -until they get fried by a power surge. When a system goes nonlinear, driven out of its normal operating range, all bets are off. The old equations no longer apply.

Still, you shouldn’t get the idea that nonlinearity is dangerous or even undesirable. In fact, life depends on nonlinearity. In any situation where the whole is not equal to the sum of the parts, where things are cooperating or competing, not just adding up their separate contributions, you can be sure that nonlinearity is present. Biology uses it everywhere. Our nervous system is built from nonlinear components. The laws of ecology (to the extent we know them) are nonlinear. Combination therapy for AIDS patients -drug cocktails- are effective precisely because the immune response and the viral population dynamics are both nonlinear; the three drugs in combination are much more potent than the sum of the three of them taken separately. And human psychology is absolutely nonlinear. If you listen to your two favorite songs at the same time, you won’t get double the pleasure.

This synergistic character of nonlinear systems is precisely what makes them so difficult to analyze. They can’t be taken apart. The whole system has to be examined all at once, as a coherent entity.

Friday, April 6, 2012

Buying a Chinese book

As the translators didn't reply (see my previous article), I decided to seek help elsewhere. I sent a message to one of the Yahoo groups I belong to: the Canberra Speculative Fiction Guild (also see the CSFG website csfg.wordpress.com/).

The CSFG Yahoo group consists of more than 200 people interested in Science Fiction, Fantasy, and/or Horror. It is a bunch of enthusiastic and active people and, although the group is based in Canberra, Australia, it attracts members from everywhere.

I thought: the book I'm trying to buy in Chinese has nothing to do with Speculative Fiction, but some of the CSFGers might be able to help. They are always very available.

And it worked! Robin Shortt sent me all the information I needed. Robin, if you are reading this, thanks again.

And here is how you can buy a book in Chinese without understanding a word of it:

  1. Use the web browser Chrome, which you can download from google.com/chrome. The reason for this is that it can automatically translate web pages from Chinese (simplified Han) to English. It doesn't translate the text inside buttons, but sometimes you can see the corresponding URL by placing the cursor over them.
  2. Go to amazon.cn. It offered my book cheaper than the other five online bookshops I could find. This was also a tip from Robin.
  3. Create a user ID. You will not be able to use your "Western" user ID that is valid with amazon UK, US, DE, FR, etc.
  4. When you order a book, to be able to enter your address outside China, you will have to click on the link that is above the form to enter a Chinese address. It looks like this: 海外地址
  5. Pay with a credit card.

I paid ¥41.30 for the book and ¥110.00 for shipping.  More or less AUD 23.30.

Thursday, April 5, 2012

My Book in Chinese

For a couple of years my attempts to obtain a copy of the Chinese version of my book "Beginning JSP,JSF, and Tomcat Web Development"  has been completely unsuccessful.

A few days ago, I decided I had to find a way. It took me some inventive "googling" to find the name of the publisher, but I finally found it: product.china-pub.com/195967.

I discovered that the Chinese edition only became available in September 2009, almost two years after the original.

Here is an image of the front cover:


It costs AUD 9.00, much less than the original. I expected that.

Thanks to Google Translate, I was able to send a message to the publisher via the contact page on their website. I quickly received a reply (in Chinese). They told me that I have to buy it through their website and that they only ship domestically.

I sent another email. I cannot give up so quickly, can I?

The book was translated by Shi Xiaohui and Yuan Yong Kay and I believe I have found them. I send them emails and asked them whether they can halp me in getting a copy of the book. But, to be on the safe side, I also send a message to three more people named Shi Xiaohui, two of whom are on FaceBook.

I know: it's desperate...

I just discovered that I can buy the book from Biblio. But it would cost me AUD84. MMmmm... Quite a markup from the AUD9 dollars the Chinese pay domestically...

Friday, March 30, 2012

The war on drugs has been lost

Just yesterday I wrote about how futile the war on drug is, and today I read an article in the latest issue of Time (April 2nd) that confirms it. The title, "Incarceration Nation – The war on drugs has succeeded only in putting millions of Americans in jail", says it all.

Some figures are mind boggling: while Japan has 63 prisoners per 100,000 citizens, Germany 90, France 96, and Britain (one of the highest rates) 153, the USA has 760! (In agreement with the figure of 743 reported by Wikipedia ;-)

The population of US prisoners today is more than five times what it was in 1980. Still according to Times, this is due to the so-called war on drugs, as more than half of today’s inmates were convicted on drug-related offences.

Another staggering figure: in 2009, 1.66 million Americans were arrested on drug charges, and 4/5 of them simply for possession.

Last year, a global commission on drug policy consisting of very authoritative politicians and former world-leaders stated that "The global war on drugs has failed." Its main recommendation was to "encourage experimentation by governments with models of legal regulation of drugs to undermine the power of organized crime and safeguard the health and security of their citizens."

I couldn't agree more...

Thursday, March 29, 2012

Drug Scores

The UK Advisory Council for the Misuse of Drugs published in 2010 an interesting report.  Among other interesting data, I discovered in it the following histogram:


What interests me is the harm done to others.  The seven most damaging drugs are: alcohol, heroin, crack cocaine, tobacco, cannabis, cocaine, and amphetamine.

Alcohol  is more than twice as harmful to others than heroin, and tobacco is worse than cocaine, cannabis, and amphetamine.

And yet, while in most countries you can buy alcohol and tobacco in drugstores (interesting name for a type of shop, actually), in many places you can end up in jail for smoking a joint.  I might be mistaken but, as far as I know, except in Holland and California, you cannot even use cannabis for therapeutic purposes.  How ridiculous is that?

I am in favour of LEGALISING all drugs (not just decriminalising some of them).

I have heard lots of arguments and discussions concerning pros and cons, but the bottom line is that forbidding the use of drugs doesn't work, as shown by the failure of alcohol prohibition in the USA between the two wars.  By making drugs illegal, we only sustain the criminality associated with their illegal trade.

If we legalised all drugs, most of the effort and money currently wasted on the losing war on drugs could be redirected towards more productive purposes, including educating people on how to deal with those substances.

The heavy taxes on alcohol, tobacco, and gambling mean, among other things, that smuggling of cigarettes into Australia remains a profitable trade. Therefore, I have no doubt that a legalised trade of opiates and cannabis would not completely remove their illegal trafficking.  Still, it would significantly reduce an important source of income for terrorists and other criminal organisations.

Let's face it, we only make a distinction between, say, alcohol and cannabis because of cultural and traditional reasons.  Such a dramatically different attitude towards different types of drugs is not based on Science and logic.

I think that governments should prevent people from harming others.  That's why I welcome heavy fines given to people who drive in an altered state.

But I also think that governments should help those who harm themselves, and in my opinion, the best way to help addicts is to try to understand why they do it, and ensure that they have access to clean drugs and needles.  If heroin were legal, deaths due to overdose would become a thing of the past, and most addicts would no longer need to resort to prostitution or crime to finance their dependency.

Addiction in itself should be treated as an illness, not a crime, and it should not be stigmatised.  Some people can drink a lot without becoming alcoholics, while others can become addicted to alcohol very easily.  Both genetic predisposition and societal factors play a role with any drug.

Many think: it will never happen to me.  But they might be wrong.  Sometimes, for some reason, people lose control over one of their needs or desires and begin over-drinking or over-eating, or become addicted to adrenaline or sex.  When will we step down from our pulpit and help them, rather than condemn them as sinners?

Wednesday, March 28, 2012

Thank You!

Dear visitor from Montana,

Thanks to you, I have had visitors from all 50 USA and Washington DC.

OK. The next post will be more interesting (at least for some :-).  I promise.

Monday, March 19, 2012

Earlobes

There are two types of earlobes: attached and free, as shown in the following picture I found in BasicGenetics – Examples of Dominant and Recessive Traits.


Apparently, attached earlobes are a recessive character, although it is not always clear whether a particular earlobe is attached or not, and several genes seem to be involved.

The only study I found about the frequency of the two types of earlobes was conducted on a sample of 1600 unrelated individuals in Lagos (Nigeria). It stated: the population frequency of attached is 25.37%, a value within the range for Caucasoids but lower than for Mongoloids. OK. One in four.

In any case, my earlobes are free. I got interested in earlobes after noticing that, while turning in bed, the lobe of the ear resting on the pillow was folded up. I used my index finger to unfold it because it made me feel more comfortable. No big deal. But I wonder for how many years I had done it without realising it.

Now, as earlobes (like noses) tend to grow with old age, perhaps this action of unfolding earlobes when lying on my side only became necessary in recent years. But perhaps I have always done it automatically, without becoming aware of doing it. It might have happened all my life.

This makes me wonder how many other actions I perform without being aware of them.

And is it only me or other people do it as well? Further, if they don't, is it because their earlobes don't fold or because they don't notice it?

Perhaps most people with free earlobes need to unfold them every now and then. If this were the case, I like to think that this article will make some of you aware of it!

Thursday, March 15, 2012

Probably not a scam...

A few days ago, I published in this blog my second article about email scams. Then, just yesterday, I received the following email:


At first sight, it looks reasonable. A few years ago I wrote a book titled Beginning JSP, JSF, and Tomcat Web Development http://zambon.com.au/non_fiction/books_and_manuals/jsp_jsf_tomcat/, and Udemy does offer courses online at udemy.com http://www.udemy.com/

But this email remain suspicious, because the links don't point to the URLs they claim to be pointing to: if you hover with the cursor over the link Udemy.com at the beginning of the message, you see that it actually points to go.toutapp.com/vmqy0979d (as shown in the snapshot). The link in the middle of the message points to another go.toutapp.com page: 97rma91x6. The two links apparently pointing to two different press releases, actually point to the same page 1edz9gz8n, and the link to www.udemy.com points to fc7tpmwsj.

Now, all this could be perfectly legitimate, as toutapp.com http://toutapp.com exists and provides services to track access to websites. Also, the pages mentioned in the email exist.

This might just be a "good old-fashion" junk mail, like all unsolicited messages that offer services or products. But this hiding of URLs behind links that claim to point to other pages is in itself suspicious, and I strongly recommend never to follow them. I don't.

Tuesday, March 13, 2012

Religion and Multiculturalism

I just read a couple of articles on the Canberra Times, Canberra's major daily newspaper, that made me reflect on some issues connected with religion and multiculturalism.

First of all, I discovered that in the Australian Federal Parliament, before each sitting day, the Speaker of the House and the President of the Senate request God's blessing and read the Lord's prayer.

Apparently, the political leaders agree that this 'monocultural' and discriminating practice should continue.  I personally, perhaps not surprising to those who know me even just a bit, find it appalling.

Although Australia doesn't have a state religion like Britain and the Australian constitution even prohibits the establishment of a national church, we don't have a clear separation of State and Church like in the USA.

One side effect of this is that we spend a lot of money to support religious schools.  I agree that in a free country religious organisations should be able to indoctrinate (ahem...  I meant: to educate ;-) children in the tenets of their religion.  But what I don't agree about is that they receive state subsidies while doing so.

In general, the existence of expensive private schools encourages and perpetuates a classist society.  Therefore, I am against public funding of private schools, whether they are religious or not.  The objection that abolition of public funding would force closure of many private schools is not a valid one, because it has been shown over and over again that government subsidies of private enterprises result in inefficiency and complacency.  That money should go to improve public schools: higher pay for teachers, smaller classes, better infrastructures.  Then, with time, the idea that private schools provide better education would fade away.

But I am digressing...

By funding religious schools, beside diverting money away from public schools, the State legitimises them.  I don't think that any public penny should support, for example, the juxtaposition on equal footing of unprovable beliefs and proven scientific theories, like stating that Intelligent Design is as valid a theory as Evolution by Natural Selection.

About Multiculturalism, I would like first of all to state unequivocally that I am in favour of maintaining cultural diversity.  I read in several articles that Multiculturalism in Europe has failed.  This might well be, and I cannot be sure that the idea of Multiculturalism is in fact unworkable on the long run.  But it seems to me that we have no choice, and that we should work hard to keep it alive.

What are the alternatives?  Ghettoes?  A revival of the White-Australia Policy?  Forcible integration by banning cultural diversity?  I don't think so.

In Australia, despite some cases of ghettoisation, like with the Vietnamese community in Cabramatta in the late 20th century, Multiculturalism seems to be working.  I feel I don't need to cease being an Italian and a Roman in order to be and Australian and a Canberran.

This is what I understand as Multiculturalism: a blending of communities that integrate their traditions into the fabric of Australian society.  I have no doubt that Australia has benefited from the presence of substantial minorities coming from different cultures and languages.

Perhaps, if my skin were not lily-white, I would feel differently.  Perhaps, if I had not been educated in a European country, I would find it much more difficult to integrate into the Australian society while maintaining what makes me an Italian.  Perhaps, if  I were a Muslim man and wore a black long beard, I would be looked at with hostility and fear.  I don't know.  I hope not.

I believe that everybody should be able to maintain their traditions and, even if I am an atheist, practice their faiths.  But, although I am not in favour of a policy of total assimilation, there are practices that I don't find acceptable.  I know: who am I to claim the higher moral ground?  Why should the rules of our society, based on the Christian tradition and an Anglo-Saxon model of state, be better or preferable to those of other societies?

These are not easy issues to talk about, but they have to be resolved nonetheless, if we want to maintain a peaceful coexistence in our country.

I am against forced marriages, infibulation of women, circumcision of women and men, and violent domination of female family members, to name some.  Also, I find that punishing people by stoning to death or by cutting a limb has no place in a free society.  Therefore, I would never agree to introduce a form of Sharia law as, I believe, has happened in Britain.  The laws of the country should equally apply to everyone.

Circumcision of minors, unless done for documented and validated medical reasons, is nothing else than gratuitous mutilation.  I would like to see it banned in Australia.  If Jews and Muslims, instead of cutting the foreskin of their male children, had the tradition of cutting off their left ear, I am confident that it would have been banned long ago.  Then, why should religious circumcision be tolerated?

We now condemn how children were treated in Australian orphanages decades ago.  They were subjected to damagingly harsh discipline and physically and sexually abused.  We now condemn the practice of taking aboriginal children away from their families to educate them in our European ways.  We now think that lashing people until their back is reduced to a bloody pulp is barbaric.  We are appalled at learning that people were routinely lobotomised in order to calm them down.  And yet, not long ago, these practices were perfectly acceptable.

Our society is based on respecting the integrity of the individuum, both physical and psychological.  The general principle is that we are free to do what we want as long as we don't affect others.  This is why we now ban smoking almost everywhere: to protect the health of those who would be passive smokers.  But I find it absurd that we can tell a parent: stop smoking in the car if your child is on board, but please feel free to cut away a part of his body if it makes you feel better!

Is this arbitrary?  Absolutely!  And who should be entrusted with the task of deciding what is acceptable and what is not?  In a democratic country, only one answer is possible: through legislation passed by elected representatives.

Inevitably, cultural minorities will invoke the application of anti-discrimination laws designed to protect them to continue practices that the vast majority of Australian people would find unacceptable.  And so they should.  But a culture that is unable to adapt is destined to oblivion.  In the end, they should accept the changes, as we all do.

In my opinion, practices should be considered in terms of the permanent impact they have on the subject.  One month after I was born, I was taken to a church and received some cold water sprinkled on my head.  I cried for that, but no permanent damage was done.  But if my father had come from some regions of Sudan, he would have made three cuts on my face, which would have scarred me for life.  I say: if we have to allow people to scar their children in the name of traditions, to hell with those traditions!

Thursday, March 8, 2012

More on visitors to this blog

My second-last article showed that the countries of people who visit this blog form a small-world network. To prove it, I plotted the number of countries versus their number of unique visitors and showed that it resulted in a power-law dependency.

But what if you simply rank the countries on the basis of their number of visitors and then plot the number of visitors per country against the country ranks?

I didn't really know what to expect. I knew in advance that the points would run from top left to bottom right, because the highest ranks (1, 2, ...) are for countries with large numbers of visitors, while the lowest ranks are for countries with small numbers of visitors. That was a direct consequence of how I had defined the ranking. I also knew that I would have many more points for the lower ranks. But why should there be a relationship between the number of visitors of a country and its rank? A rank seems such an ad-hock number...

If the points aligned along a curve, it would imply the presence of some sort of correlation among the countries, which seems preposterous.

Guess what? the plot turns out to be a power law:


N(R) = 1524.4 * R-1.1685

With R = number-of-visitors rank and N = number of visitors.

If you choose any pair of countries R1 and R2, you obtain:

N1/N2 = (R1/R2) -1.1685

If the exponent where -1, you would have straight inverse proportionality: double the rank and you half the number of visitors. As it is, The number of visitors decreases a bit more rapidly: when you double the rank, you get a bit less than half the number of visitors (~0.445). And this happens in the same way for, say, ranks 3 and 6 as for ranks 10 and 20 or 50 and 100.

What is the meaning of this? Some deeper understanding is required...