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

Tuesday, December 31, 2013

Reflections on Faith and Science

I haven't written a single article during this month of December.  It is today or never.

I am an atheist.  No doubt about it.  I don't believe that some all-powerful, self-conscious entity is interested in our lives or even that it exists.  There are no reasons for believing that a God exists, but neither are there reasons for not believing that it exists.  Therefore, the most logical position is to be an agnostic, not an atheist.  I should be able to say: I neither believe nor disbelieve.  And yet, I don't believe.  For somebody like me, who has a scientific formation, this is not completely satisfying, because I am asserting something that can be neither proven nor disproven.

In any case, the existence or non-existence of God doesn't affect my life in any way.  At least not directly, as what believers manage to impose on everybody else does have an influence on me.  Religious fervour has resulted in laws prohibiting abortion (like in Malta and Chile), traditions keeping girls out of school (like in Afghanistan), and regulations forcing restrictive dress codes on women (like in the Orthodox Jewish quarter of Tel Aviv, where women must cover their arms).  Obviously, I will never need an abortion, I have been able to attend school, and I am allowed to wear short-sleeved shirts wherever I want.  Nevertheless, these rules, often directed at women, are deeply annoying.

This distinction between atheism and agnosticism is just another way of placing people in boxes.  A more important distinction is whether people have doubts or not.  Certainties are dangerous.  Certainties make possible for fanatics to strap around their waists belts full of explosive and blow themselves up in public places.  Certainties have caused over the whole recorded history of Humanity persecutions of entire ethnics groups and tortures of millions.

In fact, I believe that certainties are responsible for most of the problems we have today.  There are too many faithfuls and not enough scientists.

What many non-scientists have difficulties in grasping is that no scientific statement can ever be proven to be absolutely true.  For example, Newton's theory of gravitation worked flawlessly for a long time and is still used every day.  But it was discovered that it couldn't fully explain the orbit of the planet Mercury.  Einstein's theory of gravitation solved that problem and has been confirmed by countless measurements.  Does it mean that Newton was wrong?  Not at all.  It only means that Newton's theory is an approximation of general relativity or, if you prefer, that Einstein's theory can explain a wider class of phenomena and with more accuracy.  Does it mean that Einstein's theory will always be right?  Again, not at all.  It only means that, so far, it has never been proven to be at fault (although, truth be told, general relativity has not been successfully integrated with quantum mechanics; but that's another story).

Scientific statements, therefore, are a never-ending work-in-progress.  They can be proven wrong in some cases, but the proof of their correctness never ends.  Despite of their intrinsic uncertainties, all these temporary laws of Physics can still be used to discover further laws that explain our universe.  It is a bit like crossing an infinitely wide mountain creek on wobbling stones: scientists keep stepping on the same wobbly theories and, as they progress, the older theories become more and more trustworthy; more stable paths are identified.

People who insist that Intelligent Design (ID) should be taught at school in Science classes as an alternative to Evolution by Natural Selection (ENS) can only do so because most people don't know what I have explained in the previous two paragraphs.  The ID people state that ENS is an unproven theory.  But there is no scientific theory completely proven.  It is impossible.  The key issue is that ENS can be disproven, while ID cannot.  That is why ENS is a scientific theory and ID is not!

The same problem pops up with the hoopla about climate change, levels of CO2, and whether the changes are anthropic or not.  People ignorant in Science would like to have clear, unambiguous, and final answers, and confuse scientific results with beliefs.  But certainty has no place in Science.

My attitude towards God is scientific: if, after asking me whether I believe that a God exists (to which, as I said, I would reply no), you asked me whether I'm sure, I would have to answer with another no.  Of course I'm not sure.  How could I?  But I don't need to introduce an "ad hock" entity that explains everything Science cannot [yet] understand.  For centuries, the Catholic Church was a drag on Science because it wanted to cling to what its revealed truth (actually, it still is).  It was (is) a problem caused by certainties (not "misplaced certainties", because all certainties are misplaced).

All so-called proofs of the existence of God that come to mind rely on negatives: all this beauty of nature cannot be the result of random events; we don't know how our universe came into existence; it cannot be that our existence has no purpose; etc.  But how can one claim to prove anything on the basis of what one doesn't know?  It is baffling.

I know little about Judaism and Islam (of which I am somewhat ashamed), but I was taught the Catholic catechism.  I strongly encourage you to have a look at it, especially if you have never done it before.  It is an amazing construction of cross-linked concepts.  I have to wonder how many so-called faithfuls actually believe much of what is in there...

As Alain de Botton convincingly explained in his book Religion for Atheists, religion has its functions and its usefulness in society.  But it should be kept in check and not overpower everything else.

Christianity might have shaped morality and laws of the western world, but I don't need a priest to tell me that to contribute to a harmonious society I should behave with others as I would like them to behave with me.  Luke's do to others as you would have them do to you (verse 6:31) is only an expression of a Golden Rule that has been recognised and applied everywhere since antiquity.

I believe that ENS has resulted in the collaborative attitude of human beings.  A typical example of such a "social" attitude is shown by how people behave when confronted with the game called "the prisoner's dilemma".  From Wikipedia (look in particular to the last sentence):

Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of speaking to or exchanging messages with the other. The police admit they don't have enough evidence to convict the pair on the principal charge. They plan to sentence both to a year in prison on a lesser charge. Simultaneously, the police offer each prisoner a Faustian bargain. Each prisoner is given the opportunity either to betray the other, by testifying that the other committed the crime, or to cooperate with the other by remaining silent. Here's how it goes:

  • If A and B both betray the other, each of them serves 2 years in prison
  • If A betrays B but B remains silent, A will be set free and B will serve 3 years in prison (and vice versa)
  • If A and B both remain silent, both of them will only serve 1 year in prison (on the lesser charge)
It's implied that the prisoners will have no opportunity to reward or punish their partner other than the prison sentences they get, and that their decision won't affect their reputation in future. Because betraying a partner offers a greater reward than cooperating with them, all purely rational self-interested prisoners would betray the other, and so the only possible outcome for two purely rational prisoners is for them to betray each other. The interesting part of this result is that pursuing individual reward logically leads both of the prisoners to betray, when they would get a better reward if they both cooperated. In reality, humans display a systematic bias towards cooperative behavior in this and similar games, much more so than predicted by simple models of "rational" self-interested action.

It makes sense to speak of rules of ethics applicable to everyone, but, except for predispositions resulting from ENS, they ought to be based on rationality, with the aim of maximising our collective well-being, not allegedly inspired by a God invented to comfort us.  There is no need for a God to explain the validity of moral codes.

For millennia, religions played an important role in constraining some of human emotions that, if uncontrolled, would have resulted in chaos.  But, at the same time, religions also exploited those same emotions for their own purposes of expansion and control.  I say: let's get rid of them!

We must invest as much as possible in education, so that a secular, conscious morality will eventually replace the rules imposed by superstition, regardless of whether it is called witchcraft or religion.  One day, with the help of Science, we will be able to control our destructive emotions rationally, while still enjoying the positive ones.  Only then, we will have left behind the caves of our ancestors and be ready to explore the universe.

Wednesday, November 27, 2013

My custom tiles for Carcassonne

I have played so far 94 games of Carcassonne, of which 89 where with The River extension, and 86 with the additional extension Inns and Cathedrals.  Additionally, I also played 17 times Carcassonne's Winter Edition, which is almost identical to the standard game.



I have a couple of other extensions, but I like best the combination of the basic game plus The River and Inns and Cathedrals.

That said, I started thinking that a couple of tiles where missing, and decided to make them myself.  Note that I always play Carcassone by taking the tiles from a canvas bag (rather than from piles as recommended in the rules).  Therefore, it doesn't really matter to me whether the back of the tiles I make looks identical to that of the original set.  That is, to be playable, my tiles only need to feel like the standard ones.

I used PaintShop Pro to edit scanned images of existing tiles, printed them on matt self-adhesive paper, and stuck them onto the right type of cardboard.

The first tiles I added where two each of the following ones:



Then, I decided to extend Inns and Cathedrals by adding the following two:


And finally, I extended The River by adding a river branch, (which required an additional river end) and a straight section of river:



But there was a problem with The River: I usually play the 10 tiles (now 12) by simply turning them face down on the table.  To be able to keep doing that, I made my own source and both ends.  This allowed me to stick the new river branch and the new river section to the front of the original source and end.  This worked because the additional thickness of the tiles due to the adhesive paper is not enough to make the tiles distinguishable when they are face down.

If you want to reproduce the tiles, download the images in this articles and print them with the scale of 100%.  As they have a resolution of 600dpi, they look as good as the originals!

2020-04-01: I have updated this post, but only to ensure that all images were displayed correctly. As of today, 6y 4m after posting this article, I have played 317 different board games a total of 1246 times, but Carcassonne has remained one of my favourite, with 211 plays. Check out my page on BoardGameGeek for more.

Saturday, November 23, 2013

Everybody spies on everyone

The relationship between the two governments of Australia and Indonesia is currently strained because the Australian Signal Directorate (which corresponds to the American NSA) has been caught spying on the telephone calls of the Indonesian president, his wife, and more than half a dozen senior officials.  I allowed myself to copy from the ABC-Australia web site the following slide, which was part of a presentation disclosed by Edward Snowden.  I'm confident that the ABC will not mind, as it has been shown in other web sites.




The release of the list has caused an uproar in Indonesia, with Australian flags being burned and demonstrations being held before the Australian embassy.  But everybody always spies on everybody else.  President Obama has reassured Bundeskanzlerin Merkel that the NSA will not spy again on her phone, but who believes it?  I certainly don't.

So, now Mr. Yudohoyono, the Indonesian president, to save face with his constituents, demands explanations and reassurances from Mr. Abbott, the Australian Prime Minister.  And to excercise pressure, he has also recalled the Ambassador and suspended a series of bilateral agreements.

As everything happened on the public scene, the Indonesian president had to react, and our Prime Minister has shown to be wet behind the ears by not satisfying his friend's Susilo Bambang's demands.  How silly is that?  Come on, mate.  Tell Susilo that you will not spy on him and his entourage anymore, and make peace, like two good boys!

Friday, November 22, 2013

Authors' Mistakes #26 - CSI Miami #2 (Robert Hornak)

Another mistake in CSI Miami (see my post of three weeks ago for the first mistake in CSI Miami I reported).  This time, it is in episode 4 of season 8, In Plane Sight.



The CSIs ask a murder suspect to pop one of his contact lenses to compare it with the one they found on the crime scene.  The suspect pull the contact lense off his right eye, and it turns out to match the one left behind by the murderer.

Now, I have still to hear of somebody with identical corrections for the two eyes.  It is not possible to swap spectacle lenses by mistake, but contact lenses containers are always clearly mark L and R, precisely because they are different.

And yet, the CSIs ask to "pop a lense" and it turns out to be a match.  You might think that, failing the first attempt, they would have asked to pop the other one, but you would be mistaken.  In fact, they had already tested in the same way another suspect, and also in that case they had only checked one lense.

But it get worse: the episode shows the precise moment in which a contact lense falls off one of the murderer's eye, and it is the left one!

They really got it wrong.

For your reference, here are the links to all past “Authors’ Mistakes” articles:
Lee Child: Die Trying
Colin Forbes: Double Jeopardy
Akiva Goldsman: Lost in Space
Vince Flynn: Extreme Measures
Máire Messenger Davies & Nick Mosdell: Practical Research Methods for Media and Cultural Studies
Michael Crichton & Richard Preston: Micro
Lee Child: The Visitor
Graham Tattersall: Geekspeak
Graham Tattersall: Geekspeak (addendum)
Donna Leon: A Noble Radiance
007 Tomorrow Never Dies
Vince Flynn: American Assassin
Brian Green: The Fabric of the Cosmos
John Stack: Master of Rome
Dean Crawford: Apocalypse
Daniel Silva: The Fallen Angel
Tom Clancy: Locked On
Peter David: After Earth
Douglas Preston: Impact
Brian Christian: The Most Human Human
Donna Leon: Fatal Remedies
Sidney Sheldon: Tell Me Your Dreams
David Baldacci: Zero Day
Sidney Sheldon: The Doomsday Conspiracy
CSI Miami
Christopher L. Bennett: Make Hub, Not War

Friday, November 15, 2013

Authors' Mistakes #25 - Christopher L. Bennett

Christopher L. Bennett wrote many Star Trek books and articles, and I'm sorry to have to criticise a fellow Trekker, but in the novellette Make Hub, Not War, published in the November 2013 issue of Analog Science Fiction and Fact, he got something wrong.


Many will probably find that what I'm going to say is way over the top, but authors who use Italian names or elements of Italian cultures too often get it wrong.

In Make Hub, Not War, Bennett gave the name Andrea to an Italian woman.  The problem is that in Italy Andrea is a name for males.  With so many Italian names and so many web sites that list them, why had Bennett to use Andrea?  He clearly didn't do any research at all.  And Analog's editors didn't notice the mistake either.

By using an Italian mother, Bennett could name one of his characters David LaMacchia and have people sit around a table and eat pasta.  I wonder why so many English-writing authors have this fascination with everything Italian and French.  Anyhow, to be picky (and I certainly am) LaMacchia is not a valid Italian family name.  In Italian, it would have to be written "La Macchia" (which means "the spot") or possibly, although unlikely, "Lamacchia".  Actually, now that I think about it, no capital letters ever appear in the middle of a name in any language I know.

Am I excessive?  Certainly.  But these things annoy me a lot...

For your reference, here are the links to all past “Authors’ Mistakes” articles:
Lee Child: Die Trying
Colin Forbes: Double Jeopardy
Akiva Goldsman: Lost in Space
Vince Flynn: Extreme Measures
Máire Messenger Davies & Nick Mosdell: Practical Research Methods for Media and Cultural Studies
Michael Crichton & Richard Preston: Micro
Lee Child: The Visitor
Graham Tattersall: Geekspeak
Graham Tattersall: Geekspeak (addendum)
Donna Leon: A Noble Radiance
007 Tomorrow Never Dies
Vince Flynn: American Assassin
Brian Green: The Fabric of the Cosmos
John Stack: Master of Rome
Dean Crawford: Apocalypse
Daniel Silva: The Fallen Angel
Tom Clancy: Locked On
Peter David: After Earth
Douglas Preston: Impact
Brian Christian: The Most Human Human
Donna Leon: Fatal Remedies
Sidney Sheldon: Tell Me Your Dreams
David Baldacci: Zero Day
Sidney Sheldon: The Doomsday Conspiracy
CSI Miami

Wednesday, October 30, 2013

Authors' Mistakes #24 - CSI Miami (Marc Dube)

I confess: I am a fan of CSI Miami.  I don't like the CSI series located in Las Vegas and New York.  But the Miami series is bathed in warm colours and shows beautiful scenery.  I know that it was actually filmed in California and that the warm feel was obtained by saturating the colours, but who cares?  I also find the characters reasonably appealing.

Anyhow, last night I discovered a mistake in episode 16 of season 7 (Sink or swim).  I am not referring to the many licences that the authors take with the way CSI people operate in real life.  I understand that if our fictitious CSIs were confined to the labs and spend days to analyse a sample, the stories would evaporate.  What they did in Sink or swim violated the laws of Physics!



Here it goes.
An assassin kills a lady standing at the railing of a yacht by shooting her from underwater.
Do you see no problem with that?

There is one: when a ray of light crosses the boundary between water and air, it changes direction.  This phenomenon is called refraction (see for example the refraction page on Wikipedia).  Here is a nice diagram (also from Wikipedia) to describe it:


Suppose that the top side is air (with refractive index n1 = 1) and the bottom side is water (with refractive index n2 = 1.33).  Snell's law tells you that sin(θ2) = sin(θ1) * n1 / n2.  This means that light entering the water with an angle of, say 30°, is deflected to approximately 22°.  As a result of the deflection, the underwater shooter of CSI Miami saw his target 8° higher than it was.  With a target placed, say, 5 metres above the water, 8° roughly correspond to more than 80 cm.  Enough to shoot above the target's head instead of hitting her heart.  The effect increases when the angle increases.  So, for example, with θ1 = 45°, θ2 becomes 32°, which is 13° less than θ1.

Obviously, the positions of both the target and the shooter also play a crucial role.  For example, the 80 cm of the previous calculation are reduced to 49 cm if the target is only 3 m above the water instead of 5.

Now, refraction has no impact if the shooter is directly below the target, because both angles become zero.  But this is not what happened in CSI Miami, as the shooter had to be somewhat away from the boat in order to clearly see his target.

All in all, there is no way that the shooter could have made the kill.

Funnily enough, the Archerfish manages to hit insects one or two metres above the water by spitting at them from underwater.  A thorough study about that fish was published by Lawrence M. Dill in 1977 (Refraction and the Spitting Behavior of the Archerfish (Taxotes chatareus), Behavioral Ecology and Sociology, 2, 169-184).

For your reference, here are the links to all past “Authors’ Mistakes” articles:
Lee Child: Die Trying
Colin Forbes: Double Jeopardy
Akiva Goldsman: Lost in Space
Vince Flynn: Extreme Measures
Máire Messenger Davies & Nick Mosdell: Practical Research Methods for Media and Cultural Studies
Michael Crichton & Richard Preston: Micro
Lee Child: The Visitor
Graham Tattersall: Geekspeak
Graham Tattersall: Geekspeak (addendum)
Donna Leon: A Noble Radiance
007 Tomorrow Never Dies
Vince Flynn: American Assassin
Brian Green: The Fabric of the Cosmos
John Stack: Master of Rome
Dean Crawford: Apocalypse
Daniel Silva: The Fallen Angel
Tom Clancy: Locked On
Peter David: After Earth
Douglas Preston: Impact
Brian Christian: The Most Human Human
Donna Leon: Fatal Remedies
Sidney Sheldon: Tell Me Your Dreams
David Baldacci: Zero Day
Sidney Sheldon: The Doomsday Conspiracy

Tuesday, October 22, 2013

KenKen and CalcuDoku Revisited

Almost two years ago, I posted an article to this blog about KenKen and CalcuDoku.  In that article, I compared the 9x9 puzzles made available in the web sites kenken.com (® Nextoy LLC), calcudoku.org, and zambon.com.au (my own).  Like last time, I will use K to identify the puzzles provided by kenken.com, C to identify those provided by calcudocu.org, and Z to identify mine.

Of the three web sites, only the K site provides 9x9 puzzles of different levels of difficulty, but I have only ever solved the "tough" ones.

After solving more than 500 9x9 puzzles, I have a much better feel about the differences between the puzzles generated by the three sites.

K and Z are comparable in terms of difficulty and general "feel".  The C puzzles are different.

First of all, the C puzzles include many more single-cell cages.  Patrick (the developer of the C site) told me that he uses singles to remove ambiguities.  I understand why the singles are there, but I have always found it annoying that their average number exceeds 9.  K puzzles include very few singles (0 to 3), and I can configure my generator to limit the number of singles to whatever I like.  I normally set the maximum number of singles to 3, but I could also set it to 0 (I have tried it out) and systematically generate puzzles without singles at all, although it requires on average a longer time to generate each puzzle.

I don't think that Patrick's decision to "single out" the ambiguities was a good one.  I commented on the C web site that I didn't like to go through the chore of filling up so many singles when starting with a new puzzle, but other users replied that it didn't bother them.  Fair enough.

Another problem I have with C puzzles is that the difficulty of solving them is not uniform as you progress: invariably, it is easy to fill in a third of the cages or so without much need for reflection.  Then, you hit a wall and the cages suddenly become very difficult.  It might be connected to the fact that there are many single cages used for disambiguation, but I am not sure.

I have lived for almost two years with the two problems I have just mentioned, because 9x9 C puzzles also have an interesting feature: they can have divisions and subtractions in cages with more than two cells.  For example, an angled three-cell cage with "2:" as target admits 841, 822, 631, 421, and 211 as possible solutions.

But there is another problem that has finally convinced me to stop solving C puzzles for good: some of them are not solvable analytically, and I refuse to solve a puzzle by trial and error.  I find it very frustrating when I encounter a puzzle that cannot be solved without guessing.

I know what you are thinking: perhaps I'm not good enough.  It's possible, but, perhaps not surprisingly, I don't think so.

I believe that the problem is due to the fact that C puzzles sometimes have too many large[r] cages with sums and subtractions.  This can result in untameable combinatorial explosions.  Those angle cages with targets ranging between 13+ and 20+ and between -0 and -4 sometimes combines in ways that leave too many alternatives open.

Patrick calculates for each puzzle a difficulty level, which for 9x9 puzzles is in the range 100±30 (i.e., I haven't seen anything outside that interval).  I asked him how he arrives to those figures, but he refused to divulge his algorithm.  I understand that when he started his web site he went though several tests, but his calculations are not right.  Last June, I solved a puzzle with an alleged difficulty of 129.3, but in September I didn't succeed in solving a puzzle with a difficulty of 70.2.

Here are the statistics for the June puzzle:
#1-cell: 8
#2-cell: 16 (3+, 9-, 2x, 2:)
#4-cell: 4 (1+, 2x, 1:) all T-shaped
#5-cell: 5 (2+, 3x) 1 cross-shaped, 4 angled

And here are those for the September puzzle:
#1-cell: 9
#2-cell: 13 (2+, 3-, 8x)
#3-cell: 6 (1+, 4-, 1x) all angled
#4-cell: 4 (3+, 1-) 1 T-shaped, 2 squares, 1 lightning-shaped
#5-cell angled: 2 (1+, 1x) 1 cross-shaped, 1 tap/fawcett-shaped

Do you see what I mean?  The June puzzle, which was supposed to be among the most difficult ones, had no 3-cell cages, and of the 9 cages with 4 and 5 cells, only 3 had sums.  The September puzzle, which was supposed to be among the easiest 9x9s, had only two multiplications among the 12 cages with at least 3 cells.  In two adjacent columns, there were three 3-cell cages with 4-, 1-, and 0-, and arranged in such a way that they took up six cells of one column.

4- can be 941, 932, 831, 822, 721, 611; 1- can be 971, 962, 953, 944, 861, 852, 843, 751, 742, 733, 641, 632, 531, 522, 421, 311; and 0- can be 981, 972, 963, 954, 871, 862, 853, 844, 761, 752, 743, 651, 642, 633, 541, 532, 431, 422, 321, 211.  Yes, there were some crossings that reduced the possibilities, but the same puzzle also included two 4-cell 15+, a 4-cell 16+, a 4-cell 0-, and a 5-cell 32+.  No way that it could have been solved analytically!

All in all, I finally got fed up with the C puzzles.  That's why a couple of days ago I gave up on them.

The C web site has the best application to solve the puzzles online, but for the 9x9 puzzles (and I am not interested in the smaller ones), the best way is to print them out and use pencil and eraser.  Therefore, no loss there...

Tuesday, September 10, 2013

Converting UTF-8 to Unicode

To be stored digitally, each character of a piece of text is encoded into a particular bit pattern.

For exampe, according to the ASCII (American Standard Code for Information Interchange) standard, which has been around for half a century, the letter 'A' is encoded with the 7 bits 10000012 or, in hexadecimal notation, 4116, which I prefer to write with the Java/C syntax: 0x41.  With 7 bits, only 128 patterns can be encoded (i.e., 27), just enough for plain Latin characters, numbers, and a few special symbols.

Over the past couple of decades, a different type of encoding called UTF-8, based on a variable number of bytes, has established itself as the most common encoding used in HTML pages.

Often, UTF-8 is confused with Unicode, but while UTF-8 is a way of encoding characters, Unicode is a character set.  That is, a list of characters.  This means that the same Unicode character can be encoded in UTF-8, UTF-16, ISO-8859, and other formats.  You will find that most people on the Internet refer to Unicode as an encoding.  Now you know that they are not completely correct, although, to be fair, the distinction is usually irrelevant.

The Wikipedia pages on Unicode and UTF-8 are very informative.  Therefore, I don't want to repeat them here.  But I would like to show you a couple of examples taken from the UTF-8 encoding table and Unicode characters.

The charcter 'A', which was encoded as 0x41 in ASCII, is character U+0041 in Unicode and is encoded as 0x41 in UTF-8.  "Wait a minute", you might say, "what's a point of all the fuss if the number 0x41 stays the same everywhere?"

The answer is simple: the ASCII and UTF-8 encodings for all Unicode characters from U+0000 to U+007F are identical.  This makes sense for back compatibility.  But while ASCII only encodes 128 characters, UTF can encode all many thousands of Unicode characters.  To see the differences, you have go beyond U+007F.

For example, U+00A2, the cent sign '¢', which doesn't exist in ASCII, is encoded as 0xC2A2 in UTF-8.  Note that U+C2A2 is a valid Unicode character, but it has nothing to do with the 0xC2A2 UTF-8.  Don't get confused!  U+C2A2 is the character '슢' (a syllable of the Korean alphabet that, according to Google Translate, is called Syup...).  This is the first hint at why we might need to convert UTF-8 to Unicode although Unicode is not an encoding!

The problem arises when you want to work in Java with text that you have 'grabbed' from a web page: the web page is encoded in UTF-8, while Java strings (i.e., objects of type java.lang.String) consist of Unicode characters.  If you grab from the Web a piece of text, store it into a Java string, and display it, only the "ASCII-like" characters are displayed correctly.

For example, the Wikipedia page about North Africa contains "Mizrāḥîm", but if you display it without any conversion, you get "MizrƒÅ·∏•√Æm".

In the rest of this article, I will explain how you can correctly store into a Java string text grabbed from the Web.  There will perhaps/probably be better ways to do it, but my way works.  If you find a better algorithm and would like to share it, I would welcome it.

To help you understand my code, before I show it to you, I would like you to observe that when you match Unicode code points (that's how the U+hexbytes codes are called) and UTF-8 codes, there are discontinuities.  For example, U+007F is encoded in UTF-8 as UTF-8 0x007F, but U+0080 (the following character) corresponds in UTF-8 to 0xC280.  Another example of discontinuity: while U+00BF corresponds to 0xC2BF, U+00C0 corresponds to 0xC380.

One last thing: all bytes of UTF-8, with the exception of the first 128 (used for the good old ASCII codes), have the most significant bit set.  For example, the cent sign is encoded as 0xC2A2, which in binary is 110000102 and 101000102.
Here is how you can read a web page into a Java string:

    final int     BUF_SIZE = 5000;
    URL           url = new URL("http://en.wikipedia.org/wiki/North_Africa");
    URLConnection con = url.openConnection();
    InputStream   resp = con.getInputStream();
    byte[]        b = new byte[BUF_SIZE];
    int n = 0;
    s = "";
    do {
      n = resp.read(b);
      if (n > 0) s += new String(b, 0, n);
      }
    resp.close();

Pretty straightforward.  But if you do so, when you display the string, all multi-byte UTF-8 characters will show up as rubbish.  Here is how I fixed it:



  final int     BUF_SIZE = 5000;
  URL           url = new URL("http://en.wikipedia.org/wiki/North_Africa");
  URLConnection con = url.openConnection();
  InputStream   resp = con.getInputStream();
  byte[]        b = new byte[BUF_SIZE];
  int n = 0;
  s = "";
  do {
    n = resp.read(b);
    if (n > 0) s += new String(b, 0, n);
    }
  resp.close();

Pretty straightforward.  But if you do so, when you display the string, all multi-byte UTF-8 characters will show up as rubbish.  Here is how I fixed it:

  final int     BUF_SIZE = 5000;
  URL           url = new URL("http://en.wikipedia.org/wiki/North_Africa");
  URLConnection con = url.openConnection();
  InputStream   resp = con.getInputStream();
  byte[]        b = new byte[BUF_SIZE];
  final int[]   uniBases = {-1, 0, 0x80, 0x800, 0x10000};

  int n = 0;
  int[] utf = new int[4];
  int nUtf = 0;
  int kUtf = 0;
  int kar = 0;
  s = "";
  do {
    n = resp.read(b);
    if (n > 0) {
      i1 = -1;
      for (int i = 0; i < n; i++) {
        if (b[i] < 0) {
          kar = b[i];
          kar &= 0xFF;
          kUtf++;
          if (kUtf == 1) {
            if (kar >= 0xF0) {
              nUtf = 4;
              utf[0] = kar - 0xF0;
              }
            else if (kar >= 0xE0) {
              nUtf = 3;
              utf[0] = kar - 0xE0;
              }
            else {
              nUtf = 2;
              utf[0] = kar - 0xC2;
              }
            i1++;
            if (i > 0) s += new String(b, i1, i - i1);
            }
          else {
            utf[kUtf - 1] = kar - 0x80;
            if (kUtf == nUtf) {
              kar = uniBases[nUtf] + utf[nUtf - 1] + (utf[nUtf - 2] << 6);
              if (nUtf == 3) {
                if (utf[0] > 0) kar += ((64 - 0x20) << 6) + ((utf[0] - 1) << 12);
                }
              else if (nUtf == 4) {
                kar += utf[1] << 12;
                if (utf[0] > 0) kar += ((64 - 0x10) << 12) + ((utf[0] - 1) << 18);
                }
              s += (char)kar;

              // Prepare for the next UTF multi-byte code
              kUtf = 0;
              nUtf = 0;
              i1 = i;
              }
            }
          } // if (b[i] ..
        } // for (int i..

      // Save the remaining characters if any
      if (kUtf == 0) {
        i1++;
        if (i1 < n) s += new String(b, i1, n - i1);
        }
      } // if (n > 0..
    } while (n > 0);
  resp.close();

Clearly, I only need to process the incoming bytes that have the most significant bit set (i.e., those for which b[i] < 0).  First of all, I store the byte into an integer, so that I can work more comfortably with it.  When I encounter the first of these "non-ASCII" bytes (i.e., when kUtf == 1), I check its value to determine how many bytes the UTF-8 code requires (four, three, or two).  This tells me how many bytes I still have to collect before I can determine the corresponding Unicode character.

I accumulate the bytes into the utf integer array.  While I do so, I also do some pre-processing to remove the discontinuities.  When I have all the necessary bytes, I just shift them appropriately into the variable kar to form the Unicode character, which I then store into the Java string.

Sunday, September 8, 2013

John Kerry's Negationism

Less than an hour ago, I saw the American Secretary of State John Kerry on TV.  Talking about Bashar Al Assad, he stated something like "Since the use of poisonous gases was banned after WWI, only Hitler and Saddam Hussein used them".

He "forgot" Italy and Japan.  Everybody can condemn Nazi Germany and Saddam.  But it wouldn't be proper to criticise two modern allies, would it?

Italy dropped mustard gas on Ethiopia in 1935, when Mussolini decided to give to Italy's king the additional title of Emperor of Ethiopia.  According to Wikipedia, 150,000 people were killed, but even if you don't consider Wikipedia as a reliable source of information, it is clear that Italy killed many Ethipians with chemical warfare.

Still according to Wikipedia, Japan used chemical warfare in China in many occasions.

Apparently, for fear of retaliation, Germany made very limited use of gases during WWII.  It doesn't seem entirely convincing because, by the time the allies had landed in Normandy, Nazi Germany had little to lose.  In any case, Cyclon-B was used extensively in concentration camps to kill scores of people.

In conclusion, all three Axis powers used chemical warfare before or during WWII.  Because of their racist ideologies or perhaps to avoid retaliation in kind, the gases were only used on blacks, Asians, and what the Germans classified as Untermenschen (subhumans: Jews, homosexuals, Romani people, and others).

I don't know about Japan, but I know that, even before the end of WWII, Italy was seen as a key piece of the frontier between Capitalism in the West and Communism in the East.  It would have not been convenient for the Allies to institute an Italian version of the Nuremberg trials, especially considering that Italy's population included many Socialists and Communists

That's why all atrocities committed by Fascist Italy befor and during WWII were quietly ignored, including the gassing of thousands of Ethiopians (or the atrocities committed in Albania).  The myth of the "good Italian soldier" was created and most Italians were happy to believe it.

John Kerry is only continuing the tradition of neatly dividing the world in goodies and badies according to what is convenient.  He could have just stayed quiet, though...

Saturday, September 7, 2013

Australian Federal Elections

This morning I went to vote.

The Australian Federal Parliament consists of two houses: the House of Representative, with 150 members, and the Senate, with 76 members.

There are two major political blocks, the Australian Labor Party (the ALP) and the coalition of two conservative parties (the Liberal Party of Australia and the National Party of Australia, which in Queensland have actually merged into the Liberal National Party of Queensland).  The third largest party is The Australian Greens.

As the Representatives are elected for three years in 150 electoral divisions, it is difficult for members of groupings other the ALP and the Coalition to get elected.  In 2010, at the last elections, only five independents and one Green were elected to the House of Representatives.

The things are more complicated with the Senate.  There are twelve Senators for each state elected every six years, plus two senators for the Australian Capital Territory (ACT) and two for the Northern Territory elected every three years.  Half of the six-year senators plus the four three-year senators are elected together with the representatives.  Because of the size of the electorates, the minor parties and the independents can more easily get elected than in the House of Representatives.  In the current Senate, there are nine Greens senators and three senators not belonging to either of the two major groupings.

I live in the ACT in the electoral division of Fraser.

The ballot paper to elect my Representative for the next three years had a list of seven candidates.  To vote, I had to number all the candidates in order of preference, from 1 to 7.  That was no so bad.

But the ballot paper to elect my two senators for the next three years had a list of 27 (yes, 27) names, with 13 parties with two names each plus one independent. Now, you can vote for the Senate in two ways: either you write a 1 beside your preferred party or you "grade" all candidates.

This is not nice.  I would have liked to be able to give my preference to more than one party but deny my preference to some of the parties.  Unreasonably, this is not possible when voting for the Australian Senate: either you choose one party (and that party passes it on to parties of their choice if they cannot use it) or you give a preference to all candidates (including the parties you hate, which might then get your preference).

My best solution was to give the top four preferences to the Greens and the ALP and my bottom two preferences to the Liberals (with the last one, number 27, to the top Liberal candidate).  Then, I assigned the preferences 5 to 25 to the remaining candidated from left to right and from top to bottom, without even checking who they were.  After all, I know that the two senators will be elected among the top candidates of Greens, ALP, and Liberals.  The ALP candidate, Kate Lundy, most likely, and the Greens candidate, Simon Sheikh, hopefully.  Simon has a chance, although both the ALP and the Liberals have advised their voters to place the Greens below their main opponent, which is nonsensical, especially for the ALP.

Ther other thing that I don't like in the Australian elections is that no proper identification of the voters is done.  Imagine: you are not asked to show any form of identification!  When you go to collect the ballot paper, you state your name and address.  If that combination is in the big book containing the list of all registered voters, you are asked whether you have already voted somewhere else.  If you answer "no", you get your ballot paper and vote.

This is simply ridiculous.  I don't suggest that we dip a finger in indelible ink like in many thirld-world countries, but, at the very least, we should show our driver's licence.

In any case, even if we were required to prove our identity, who's going to check whether our name was ticked in two different big books (actually, I'm not even sure that they tick anything)?  What would prevent me to go several times to vote in different voting places?  In this day and age (don't you just love clichés?), anything short of flagging your name in a centralised database and in real time is simply not good enough.

And why do we still have to use pencil and paper?  When are we going to vote electronically at the federal elections?  Actually, I would like to be able to vote from home, with my identity proven via an electronic certificate.  Come on!

Monday, August 12, 2013

Authors' Mistakes #23 - Sidney Sheldon #2

I recently read another novel by Sidney Sheldon that, once more, had many mistakes. The Doomsday Conspiracy (ISBN 978-0-00-78375-2) is a nice novel.  I enjoyed reading it, but I can only wonder why editing at Harper Collins lets so many mistakes through.




The first problem is on page 50: "Robert strapped himself in and leaned back in his seat as the plane taxied down the runway. A minute later, he felt the familiar pull of gravity".  Pull of gravity?  Please!  Gravity has nothing to do with what happens when an airplane takes off.  We feel pushed back but, in reality, we are just trying to remain stationary.  As the airplane accelerates, the seat, which is part of it, pushes our backside forward in order to takes us along.  It is a similar situation when a lift starts towards higher floors: we feel pushed down because, in fact, the floor of the lift is pushing us upward.  And when we sit in a car and drive along a curve, we feel thrown "outisde", but in fact it is the car door that is pushing our shoulder to keep us "inside".

Page 70: There is no "Lavesseralle" in Zurich and, even if it existed, it would be written "Lavessner Allee".

Pages 87/88, talking about an alien space ship: "Our best guess is that it uses monoatomic hydrogen in a closed loop so its waste product is water that can be continually recycled into hydrogen for power. With all that perpetual energy, it has a free ride in interplanetary space".  Goodness me!  Even ignoring the gobbledygook, this is utter nonsense.  It is nothing else than a modern version of a "Perpetuum Mobile" (perpetual motion), which is a physical impossibility but which many so-called scientists have tried to achieve since the middle ages. In any case, the amount of energy needed to break down water into hydrogen and oxygen is exactly the same amount of energy obtained when obtaining water by burning hydrogen in an atmosphere of pure oxygen.  Nothing is left to accelerate or slow down the space ship.  The term "monoatomic" is also nonsensical.  And, to top it off, Sheldon totally ignores the oxygen part.

On page 93, Sheldon writes: "It's been proven over and over that living plants have an intelligence".  This is obviously not true.  According to Sheldon, the fact that carnivorous plants can trap insects and others can attract them for pollination confirms their intelligence!

In three occasions (pages 75, 81, and 106), while the protagonist is in Switzerland, Marks (instead of Swiss Francs) are used as currency.

Page 122: "he strapped himself into his first-class seat on the Swissair flight [Zurich to London]. As the plane rushed down the runway, its huge Rolls-Royce engines ...".  The novel was first published in 1991, which means that it was written in 1990 or 1991.  If I remember correctly, already by then, the best seats you could get on intra-European flights were Business class, and not on all fligts.  But there is another problem: "huge Rolls-Royce angines" suggests a wide-body airplane. At the time, the only short- to medium-range wide-body operated by Swissair was the Airbus A310, for which Rolls-Royce never delivered engines!  I know, most people wouldn't care about such details, which don't affect the story, but I can't help noticing them.  It seems disrespectful towards the readers to make up stuff just because it sounds good.

On page 206, a minor character states that in the Italian city of Orvieto only one government television channel was available.  The statement contributes to moving the plot forward, but it is wrong.  For almost one decade before 1991, Italy already had six television channels with full national coverage: three public (RAI 1, RAI 2, and RAI 3) and three private (Canale 5, Italia 1, and Rete 4, owned by Berlusconi, who later became a controversial prime minister).  In addition to those major channels, there were also many regional channels.

On page 209, is the first of the language-related errors that pepper many English novels. Sheldon writes: "Vietato passare oltre i limiti".  It was meant to indicate "Forbidden Entry", but it is not correct Italian.  "Vietato oltrepassare i limiti" would be the correct sentence, but the meaning would still be wrong.  In Italian, it would be a funny expression equivalent to "It is forbidden to exagerate"!  What is written on fences surrounding military installations is usually "Limite invalicabile".  In general, "Ingresso vietato" is the expression used to signal that people should not enter a private area.

On page 210, Sheldon mention a certain "Signora Fillipi".  Pity that "Fillipi" is a family name that doesn't exist in Italy.  "Filippi" would have been OK.

On pages 240/241, one of the characters appreciates Bahnhofstrasse, the main shopping street in Zurich.  According to Sheldon, you can buy there "dresses and coats and shoes and lingerie and jewellery and dishes and furniture and automobiles and books and television sets and radios and toys and pianos".  I'm not sure about pianos, but I am certain that you cannot buy cars in Bahnhofstrasse.  My wife and I lived in Zurich for longer than a decade and we agree on that.

On page 292 is another "pearl" of bad Italian. Somebody says "How are you, mio amico?"  This is a straight translation from English that doesn't work in Italian.  In Italian, at best, you would say "How are you, amico mio?"  But I wouldn't use it and I doubt that any other Italian would.

On page 305 there are two further expressions of bad Italian.  The first one is the exclamation "Cacatura!".  I understand that Sheldon wanted to translate "Shit!", but, at best, he should have used "Merda!", because "Cacatura!" is an almost never used word that means either "fly escrement" or the act of defecating.  In any case, "merda" is somewhat old fashion.  I would have written the almost universal term "cazzo", which means "cock" (in the sense of "penis") and is used to express shock or strong disappointment.  Some people liberally sprinkle "cazzo" in many sentences, like some English speakers do with "fuck".

The second mistake on page 305 is "Andate al dietro, subito".  In Italian, that sentence doesn't mean anything.  Sheldon wanted to translate "Go to the back, quickly", but he should have written "Andate sul retro, presto".

Page 312: "Twenty minutes later they had reached Tor di Ounto, Rome's red light district, populated by whores and pimps. They drove down Passeggiata Archeologica...".  Now, in Rome there is no red-light district and no quarter or suburb called "Tor di Ounto" (mistake repeated on page 345).  There is a quarter (and also an adjacent suburb) called "Tor di Quinto", which makes me think that "Tor di Ounto" is the result of a double typo.  I'm not sure whether there are many prostitutes in Tor di Quinto.  Perhaps, Sheldon wanted to avoid the risk of being sued by some of the 27,000 people who live in Tor di Quinto for denigrating their suburb.  But he didn't have any problem in saying the same about the Passeggiata Archeologica.  There are several areas of Rome where prostitutes "roam", and the Passeggiata Archeologica is indeed one of them (another well-known place for prostitutes is the area adjacent to the Terme di Caracalla), but it is located between Aventino and Celio, far away from Tor di Quinto.

On page 314, Sheldon introduces a new female character named Pier.  Well, I'm sorry, but Pier doesn't exist in Italian.  With so many Italian names, I wonder why Sheldon had to invent something so wrong...

On page 323, Pier says: "Cacchio!"  That's not realistic because Pier, being born in the late 1960s, would never think of saying that word.  "Cacchio" is an old-fashion euphemism for "Cazzo".  It is a bit like in English saying "shoot" instead of "shit".  I don't think that anybody used it after the 1960s.

On page 339, referring to a man and a woman travelling together, Sheldom writes: "They had been driving in silence for the last half an hour, each preoccupied with his own thoughts".  But one of them was a woman.  Therefore, "his" is not appropriate.  He could have said "They had been driving in silence for the last half an hour, preoccupied with their own thoughts".

On page 349, the Italian name "Dell'Ovo" is broken at the end of a line as "Dell'" and "Ovo". This is not acceptable in Italian. The name should have been broken as "Del-" and "l'Ovo".  Perhaps, I'm being a bit too demanding here, but when writing foreign terms, I believe it would be best to respect the foreign grammar.

On page 366, somebody receives an unexpected visitor.  While standing naked at the open door, he says to the visitor: "Che Cosa? What the hell are you doing up so early?"  Beh, "Che cosa?" is not right.  No Italian would ever say it.  Perhaps Sheldon tried to translate "What?".  He could have asked "Che vuoi?" ("What do you want?") or "Che c'è?" ("What's up?").

On page 368, Sheldon uses the word "Orologia", which doesn't exist in Italian.  He should have written "Orologeria".

On page 387, Sheldon states something that is wrong in more than one way.  When referring to Civitavecchia, on the coast of mainland Italy, he writes: "The port is one of the busiest in Europe, servicing all sea-going traffic to and from Rome and Sardinia".  Now, the traffic going through Civitavecchia is a small fraction of what goes through major European ports like Hamburg, Bremen, and Amsterdam.  But there is another problem: the awkward expression "to and from Rome and Sardinia" literally means "to Rome and Sardinia and from Rome and Sardinia" (or, if you prefer, "to and from Rome and to and from Sardinia"), which is clearly impossible.  He certainly meant to say "between Rome and Sardinia".

On page 392, Sheldon writes: "one of the most famous palindromes was supposedly said by Napoleon: 'Able was I ere I saw Elba'". Give me break!  Napoleon was perhaps the most French person of the times.  He certainly didn't invent any palindrome in English.  Somebody else did.

Perhaps, I should stop reading Sheldon's books.  It takes me too much time to list his mistakes in this blog!  But I still have one of his novels in my bookshelf: "The best laid plans".  MMmmm...  What are "laid plans"?  He should have inserted a hyphen between "best" and "laid" to avoid the ambiguity.  Perhaps, he felt that a title like "The best-laid plans" would have been uncool...

For your reference, here are the links to all past “Authors’ Mistakes” articles:
Lee Child: Die Trying
Colin Forbes: Double Jeopardy
Akiva Goldsman: Lost in Space
Vince Flynn: Extreme Measures
Máire Messenger Davies & Nick Mosdell: Practical Research Methods for Media and Cultural Studies
Michael Crichton & Richard Preston: Micro
Lee Child: The Visitor
Graham Tattersall: Geekspeak
Graham Tattersall: Geekspeak (addendum)
Donna Leon: A Noble Radiance
007 Tomorrow Never Dies
Vince Flynn: American Assassin
Brian Green: The Fabric of the Cosmos
John Stack: Master of Rome
Dean Crawford: Apocalypse
Daniel Silva: The Fallen Angel
Tom Clancy: Locked On
Peter David: After Earth
Douglas Preston: Impact
Brian Christian: The Most Human Human
Donna Leon: Fatal Remedies
Sidney Sheldon: Tell Me Your Dreams
David Baldacci: Zero Day

Sunday, August 4, 2013

Authors' Mistakes #22 - David Baldacci

David Baldacci is one of my favourite authors. I like his writing style and his plots are always interesting. But, contrary to what I had thought before reading Zero Day (ISBN 978-0-230-75490-4), he also makes mistakes.


To be fair, most errors were minor. I would have not reported them. But I also detected an inconsistency that couldn't let pass.

A typo on page 87: "skort" instead of "skirt".

On page 311, an accent is missing in an Italian word: "Vera Felicita" instead of "Vera Felicità". This is repeated several time in following pages. It is not uncommon to find that accents and diacritical marks of foreign languages have been dropped in English texts, but I would have expected a correct spelling from Baldacci (especially considering his Italian family name!).

On page 370, Baldacci writes: "You get plutonium-239 mostly from radiating uranium". Well, considering that 239Pu doesn't exist in nature, as far as I know, synthesis from uranium-238 is the only way to obtain it. Therefore, Baldacci could have dropped the "mostly". But the issue in his sentence is that it is produced by "irradiating", rather than "radiating", uranium.

On page 371, Baldacci, talks about gun-type nuclear bombs. They work by firing a "bullet" of enriched uranium into a subcritical mass (also made of uranium). Baldacci writes: "You'd need a tube of infinite length to sustain the chain reaction". A longer barrel makes possible to accelerate the bullet to higher speeds, thereby reducing the probability of the bomb "fizzling" (i.e., generating an explosion sufficient to take the bomb apart before a significant nuclear explosion takes place). I don't know where Baldacci got the idea of a very long barrel, but it is nonsense.

On page 390 is the bad mistake. Baldacci writes: "They were now in a long hall formed from concrete painted yellow". It sounds good, but the problem is that the protagonists of the story were wearing night-vision goggles. They could only see shades of green!

On page 394, Baldacci repeates the same mistake. He writes: "There was a light coming from the opposite side of the building. A soft green light. It had just come on. In the pitch dark he would've seen it before". Baldacci specifies that the light is green because, once more, he has overlooked the fact that his character is still looking through night-vision goggles, where everything is green.

For your reference, here are the links to all past “Authors’ Mistakes” articles:
Lee Child: Die Trying
Colin Forbes: Double Jeopardy
Akiva Goldsman: Lost in Space
Vince Flynn: Extreme Measures
Máire Messenger Davies & Nick Mosdell: Practical Research Methods for Media and Cultural Studies
Michael Crichton & Richard Preston: Micro
Lee Child: The Visitor
Graham Tattersall: Geekspeak
Graham Tattersall: Geekspeak (addendum)
Donna Leon: A Noble Radiance
007 Tomorrow Never Dies
Vince Flynn: American Assassin
Brian Green: The Fabric of the Cosmos
John Stack: Master of Rome
Dean Crawford: Apocalypse
Daniel Silva: The Fallen Angel
Tom Clancy: Locked On
Peter David: After Earth
Douglas Preston: Impact
Brian Christian: The Most Human Human
Donna Leon: Fatal Remedies
Sidney Sheldon: Tell Me Your Dreams

Tuesday, July 23, 2013

Authors' Mistakes #21 - Sidney Sheldon


It is very annoying how even the most famous authors who write in English think they can get away with wrong sentences in other languages. Italian, my native language, is almost always abused. Perhaps the authors arrogantly think that they write in any language. Or perhaps they only care about English readers. It is as if many English authors, whether they are from the US, the UK, or Australia, thought that English is the only language worth knowing (and respecting).

I just finished reading Tell Me Your Dreams, by Sydney Sheldon and, once more, I discovered that Italian was butchered (and, actually, German as well).


It’s a pity, because Tell Me Your Dreams is an interesting story and, in general, well written. OK. Let’s go through this Calvary...

On Page 26, “Fra Bartolomeo” is misspelled “Fra Bartolommeo”. It’s a typo, like the one on page 337, where “doz-” appears at the end of a line but “en” is missing from the beginning of the next one. And yet, it is probably not a chance that the incorrect spelling appears in an Italian name.

On page 27/28, Sheldon writes: “And then she thought, Non faccia, lo stupido. Maybe in another lifetime, creep” [Italics in the original]. Sheldon managed to make two mistakes in four words. The first mistake is that there shouldn’t be a comma between “faccia” and “stupido” and the second one is that “faccia” should really be “fare”. The sentence means “don’t be stupid”, although the literal, word-by-word translation from the Italian would be “don’t do the stupid” (which proves that literal translations don’t work!). In English, you wouldn’t dream of placing a comma between “don’t be” and “stupid”, and the same applies to Italian. The second mistake has to do with formal vs. informal addressing: the present subjunctive (“faccia”) would be correct when addressing a person formally, but you wouldn’t do that when addressing a “creep”. For addressing somebody informally in a negative sentence, the infinitive (“fare”) is the correct form.

On page 47, Sheldon writes “I feel dispiace – sorry for her” [his Italics]. The Italian translation of “sorry” is “dispiaciuta”, which is the past participle (feminine) of the verb “dispiacere”, while “dispiace” is a form of the present tense. That said, no Italian would say “mi sento dispiaciuta per lei”, which is the correct literal translation of “I feel sorry for her” (a better expression would be “mi dispiace per lei”), but the mixed expression “I feel dispiaciuta – sorry for her” would have been OK.

On page 87, to the question “How was Quebec?”, Alette replies “va bene” [Italics in the original]. In Italian, “va bene” could have been an answer to the question “come va?” (the Italian equivalent of the Australian “How are you going?” and the American “How are you doing?”). But as an answer to “How was Quebec?”, “va bene” is nonsensical. Perhaps Sheldon wanted to translate “it’s OK”. Then, he should have written “non male” (“not bad”) or “bella” (“beautiful”).

On page 91, in all capitals, Sheldon writes the following sentences with an orgy of mistakes:
Serial killer loose...
Quatres hommes brutalement tués et castrés...
Wir suchen für ein Mann der castriert seine Hopfer...
Maniac di homicidal sullo spree crespo di uccisióne.

The French line is the translation of “Four men brutally killed and castrated”, but “Quatres” should have been “Quatre”.

The German line is the translation of “We are looking for a man who castrates his victims”, but the correct German would have been “Wir suchen einen Mann, der seine Opfer kastriert”. If I have counted them correctly, the sentence as written by Sheldon contains six mistakes. Let’s see:
  1. The verb “suchen” requires a direct object, not an indirect object with the preposition “für”;
  2. “ein” should have been “einen” because “ein” is used with a subject, not with a direct masculine object like in the sentence (i.e., “ein” is the Nominative form while “einen” is the Accusative);
  3. there should be a comma between the principal and the dependent clauses;
  4. in a dependent clause, the verb goes at the end;
  5. the German word for “victims” is “Opfer”, not “Hopfer”;
  6. the verb “kastrieren” is spelled with a “k”, not with a “c”.
Note that German nouns should be written with a capital first letter, but Sheldom (prudently!) wrote in all caps. Otherwise, I’m confident that he would have managed to cram into the sentence one or two additional mistakes.

I’m not sure about the language of the last sentence, but I fear that it was meant to be Italian, because I recognise the three words “sullo” (“on the”), “di” (“of”), and “uccisione” (“killing”, although it should be written without any accent). Perhaps “Maniac di homicidal” was meant to be “Maniaco omicida”. The word “spree” seems to be taken directly from English (like in “shopping spree”). The adjective “crespo” means “frizz”, and I cannot really imagine what Sheldon meant with it.

Painful...

On page 276, the word “trovo” is spelled “travo”, and the word “pazzo” should have been plural (“i.e., “pazzi”).

Finally, on page 328, the “sweetest” mistake of all: Ashley replies to “My pleasure, luv” with “Minièra anche” [author’s Italics]. This is a real pearl, worthy of Google Translate at its worst. It baffled me for a second, until I imagined that in English the appropriate reply would have been “Mine too”. As it happens, if you forget that “mine” is in this case is a pronoun and translate it into Italian as a noun (i.e., the place where minerals are extracted), you get... “miniera”! The correct literal translations would have been “Anche il mio” (masculine, because “pleasure” translates to “piacere”, which is masculine).

This is gross!

Just for fun, I typed “mine too” into Google Translate and got “anche la mia”, which is the feminine form of “anche il mio”. One could only speculate on why Google assumed that the object referred to by the pronoun “mine” was feminine, but this “gender stuff” is difficult for English speakers... :-)

For your reference, here are the links to all past “Authors’ Mistakes” articles: