Sunday, February 06, 2011

Bizarre Conditions for Internet Cafe Owners in Iran

An article in January 29 issue of Sharq newspaper lists the new bizarre conditions for Internet cafe owners and their establishments (roughly translated):
  • Married, and at least 30 years old.
  • Having ICDL or equivalent license.
  • Having surveillance cameras installed.
  • The establishment needs to be at the side of the streets.
  • The establishment should not be inside buildings.
  • The establishment should not be near a girls' school.
  • The establishment should have fully transparent glass doors through which the inside is clearly visible.
  • Putting any kind of posters or blinds that blocks the view of the interior from outside is forbidden.
  • Men and women, even related, cannot sit side by side.
  • Foreign names should not be used for the establishment.
  • Having fire extinguishers and first aid kits is mandatory.
  • The time of entrance and departure for each user should be registered.
  • Users should have valid identification. The identity of each user (including their national ID numbers) needs to be registered. This information needs to be kept for at least six months

Saturday, October 16, 2010

Melville's First Incompleteness Theorem

I promise nothing complete; because any human thing supposed to be complete, must for that very reason infallibly be faulty.

These are Ishmael's words from Herman Melville's Moby-Dick (Chapter 32). This reminds me of Gödel's First Incompleteness Theorem, though broader in its implications. I'm going to call this Herman Melville's First Incompleteness Theorem!

Tuesday, October 12, 2010

The Most Disturbing Novel I've Ever Read

The last two days weren't fun. I spend all of my commute time listening to audio books, and the book I've been listening to in the last two days was Digital Fortress, by Dan Brown. Disturbing book, that one is. I've read all of Brown's other books. Da Vinci Code, The Lost Symbol, and Angels & Demons I loved. Deception Point was fine, though its many scientific inaccuracies somehow marred the experience. Digital Fortress, Brown's debut novel, was completely another matter. Inaccuracies are so wild it causes physical pain to those who understand the subject matter, namely computers and cryptography. Here's a list of only some of the problems and inaccuracies of the novel:

  • When reading The Da Vinci Code, I got the impression that Dan Brown doesn't know what public-key encryption is. The name was used merely in passing however, and I thought that maybe it was only a mistake.

    Oh, I was so wrong. Here, Dan Brown actually "explains" (or rather fails to explain) public-key encryption. What he describes is just plain old symmetric encryption. The brilliance of public-key encryption is using two keys each of which can decrypt what is encrypted by the other one. One of the keys is (widely) distributed and is called, wait for it, the public key! The other is not distributed at all. If I want to send someone a secret message, I simply encrypt it with their public key, knowing that it can only be decrypted by the intended party. This way, there is no need for communicating a "pass-key" at all.
  • "Simple syntactical errors--such as a programmer mistakenly inserting a comma instead of a period--could bring entire systems to their knees."

  • Plain wrong. Programs with syntactical errors don't compile and run at all.

  • "Numataka could embed the algorithm in tamper-proof, spray-sealed VSLI chips..."

    Come on! At least get the name right. It's VLSI (Very Large Scale Integration). Is it so hard?

  • '"When the denominator's zero," Midge explained, "the quotient goes to infinity. Computers hate infinity, so they type all nines."'

    Not so. Dividing by zero usually causes an error, and even in systems in which infinity is represented by the maximum integer, you get all ones (in binary) not all nines.

    Also, computers don't type, people do.

  • Firewalls are not like brick walls. Breaking a firewall, means to find a weak point in it and use it to open a way in or out. The final chapters of the book in which the firewalls of the NSA are gradually breaking down are simply ridiculous.

  • The novel is mainly built around the idea of an unbreakable code. Unbreakable codes do exist, though they are rarely used in practice, but unlike the novel says, an unbreakable code is a code which absolutely cannot be broken unless you have the key. You can use brute-force even with unbreakable codes.

  • As far as I know, the Nagasaki bomb was a Plutonium bomb. The book claims this is a widely accepted misconception. I looked up different sources and they all corroborate the fact that the Nagasaki bomb was indeed a Plutonium bomb.
Apart from inaccuracies, there are other things I didn't like about the book.

  • Misrepresenting the EFF. Disgusting.

  • Characters with an IQ of 170 who, when the cheesy story-line demands, can show the IQ of the average chicken. Or killers who always get their target but fail to do so, repeatedly, by making rookie mistakes when it comes to killing a protagonist.

  • There are real-world stories about NSA putting back doors in encryption mechanisms (especially in Windows encryption code). No matter these are true or false I was horrified to see that Brown (well, his protagonists) actually defend the idea.
Both the lists can go on and on. Maybe the reason I enjoyed Da Vinci Code, The Lost Symbol and Angels & Demons was, after all, the fact that I know very little about symbology and art history. Maybe there are art historians who tremble when reading those novels.

The moral of the story: If you are not William Gibson, you cannot write wildly inaccurate novels and expect people to like them!

Saturday, September 18, 2010

Why We Love Harry Potter

I just finished reading Ursula K. Le Guin's A Wizard of Eearthsea. The story is beautiful, and the prose nothing less than masterful, yet I felt something unappealing about it. Now, I try to read books critically, since I have always dreamed of once becoming a good writer myself (or at least a normal one!), so I'm trying to figure out what it is that makes me love Harry Potter stories so much, while this one is only interesting to me. This is what I came up with.

Though both stories are told by third person narrators, Harry Potter's narrator is much closer to the main characters. The narrator shows us the story as the life of Harry and his friends progresses, telling us about all the interesting things that happen around them in detail. The narrator of A Wizard of Earthsea on the other hand, is more distant from the protagonist. I simply can't fully feel for Ged. Of course, in many parts of the story I really, really hate Harry and the other protagonists, but the simple fact that I do have a feeling (although it is hate) means that Rowling has been successful in engaging me with her story.

Another point, and this is the more crucial one I believe, is that Rowling uses much less exposition in her books, than Le Guin does in hers. Though Le Guin's prose is much better than Rowling's, still someone is telling me (albeit in a wonderful prose) what is going on all the way through the story. In Harry Potter, I simply see events as they unfold. Following the old "Show, don't tell" advice here makes Rowling the clear winner.

This is more of a reminder to myself. When I write a story, I want to be able to enjoy reading it like I do when reading Harry Potter. Indeed, aside from Stanislaw Lem's The Invincible, there is no other book I have read over and over again more than Harry Potter books.

So dear Homayoon, if you want people like your stories, read Harry Potter even more, and learn showing your readers what is going on. Avoid exposition at all costs!

Monday, July 05, 2010

Crazy Iranian Copyright

Like everything in Iran, our copyright law has always irrational and haphazard. Up until now, the copyright law for books was retained for the heirs of the author for thirty years after his death. Also, a work is not automatically copyrighted like in most other countries. It has to be registered (typical Iranian bureaucracy), and that means a book cannot be copyrighted unless it is approved by the authorities. Lately however, the crazy law has changed again into something even more insane.

The Iranian legislators changed the copyright law by removing its time limit entirely. From now on, any copyrighted work will be the property of the creator and his/her inheritors indefinitely. And if at any given point of time, there are no more inheritors, the copyrighted work will be passed on to the supreme leader! So we should forget about a Project Gutenberg equivalent for Iranian works. The ISNA report rationalizes the passing on of the work to the supreme leader as "for public use," that is the work will be owned to the leader so that he can use it "for the public benefit" as he sees fit. Again here's a typical behavior of the Islamic regime. Instead of passing something directly to the people (as in other countries in which the work goes to the public domain after a certain amount of time), it is handed to the authorities, because they see themselves the only ones who know the good of people.

UPDATE: A friend told me that the law has been vetoed by the Guardian Council, though I can't find any sources to corroborate the story.

Sunday, July 04, 2010

Gods and Atheists

[T]he gods had a habit of going round to atheists' houses and smashing their windows.

--The Colour of Magic, by Terry Pratchett

If only gods did that in our world too (or kept on doing that for the last millennia or so), a lot of doubts concerning their existence would vanish.

Note to terrorists and extremists: No. You doing that in their place, even if it's by the will of God/gods, doesn't prove anything.

Friday, June 18, 2010

Hijab Ticket

Somebody posted this today on Facebook (

It's a ticket in the amount of 22500 tomans (around US$22) for failing to observe the Islamic modesty code. If you want to know what kind of looks can get you in trouble in Iran, here's what it reads.

The table at the left lists the possible charges:
  1. Eye-glasses over the head: 18000 tomans (US$18)
  2. Short manteu: 25000 tomans (US$25)
  3. Bright-colored manteu (especially green or red): 25000 tomans (US$25)
  4. Nail polish: 5000 tomans (US$5) per finger
  5. Tanned skin: 25000 tomans (US$25)
  6. Light-colored hair (depends on the color): from 50000 to 150000 tomans (US$50 to US$150)
The right sections contains information about the offender and the person/group who issued the ticket.

It's sick; that's all I can say.