Buying an iPhone in China
by Dyrathror on Dec.13, 2009, under Around the World, China
Lately it was the time that I had to replace my old PDA with something new because I dropped it one time too much on the floor. Because we had business in Shanghai and found a shop with “original” iPhones we decided to switch to iPhones.
The first question when you buy something like an iPhone in China is: How can you be sure it really is an Apple iPhone and not a chinese clone? First I would suggest to search for some detailled pictures of original iPhones, they are very slim and have a characteristic position and border of the embedded camera. But I think the easiest way to identify an iPhone is the software on the phone. If you make a photo with the phone and scale it with the multi-touch ability of the iPhone the image scales and corrects the image resolution at the same time so that you can hardly see pixels while zooming.
So we went into this shop and in total bought 3 iPhones. The iPhones were neatly packed, seemingly in original, brand new boxes and my test showed that they were real Apple iPhones.
Before I bought the iPhones I didn’t now anything about jailbreaking and unlocking. I just tried my chinese and my german SIM card in the phone and both worked.
Back in the hotel the problems started. I reconfigured my phone and it didn’t work with any SIM card any more. So we went back to the shop and they made it run within 5 min and gave it back to me. While leaving they told me better not to update the software on the phone myself which finally made me really curious and back in the hotel I started an internet research to find out if the iPhones where original ones.
Especially the Apple Service and Repair webpage was very helpful. One of the iPhones was a replacement part without any guarantee, the other two were already several month old. Conclusion we bought refurbished iPhones sold as new ones. When the battery life of the replacement part showed that the battery was already quite old we decided to go back to the shop another time and ask the sellers directly about the fact that they hid that they sold refurbished iPhones.
The result was not really satisfactory. They changed the replacement iPhone with the damaged battery to another one but that was all.
Because one of us was really pissed off, she called the police later to ask them what to do. The police forwarded us to a special unit which deals with these matters and they told us that only China Unicom is allowed to sell iPhones in China and therefore they will do nothing about our case.
After we got this information I finally understood what happend to my iPhone which suddenly didn’t work any more and had a closer look on the installed software. The iPhones were original China Unicom phones which have been jailbreaked and unlocked!
As final resultI can only warn you to be aware that most phones, even in official China Mobile Reseller Shops like the one where we bought our phones, are fakes or refurbished. This puts the price we payed into a complete new perspective!
The Nonsense of Software Patents
by Dyrathror on Aug.13, 2009, under Patents, Programming
I am Software Developer and my opinion is that Software Patents are not only Nonsense but also counterproductive!
There are not infinitely many ways to program something. Computer Science Theory already shows that for many problems there are only few methods to solve the problem with programming in a reasonable way if they are solvable at all. And then there are best practices in programming which simply evolved from many programmers coding a huge amount of code and trying to make everything more manageable.
On the other hand there are the software companies who try to claim every idea as theirs to gain control over their competitors or even a part of the software development universe. This turns programming more and more into a run through a minefield and I am already sure that one day when I finally think that I get a big success with one of my programs there comes one of these big patent hoarders and wants its part of my cake because I violated some sort of broad spread patent.
As I can read on Heise Online today this time someone tries to get his piece of cake from our dear competitor Microsoft. It seems that the Canadian company i4i holds a US Patent No. 5,787,449 which describes the separate manipulation of architecture information and data of a document within the same file.
Not that I am not a little bit mischievous that it hit Microsoft, one of the biggest supporters of software patents and rigorous enforcer of his own “rights”, but I have to state that I am a little bit astonished that such a patent is possible after all! I mean, the patent was filed in 1994 but at this time we had already the Java Programming language since 1992. And together with this language came the famous JAR-file which is an zip-archive enhanced with a metadata file. This metadata file describes the “architecture” of the jar-archive and can be manipulated independently from the class files which normally constitute the data. It becomes even more obvious that this method is common sense when you examine the usage of ear- or war-archives because with the appearance of J2EE the usage of XML-Files within the archive for configuration and architecture description of the data within the archive went a huge step further.
Since 2006 the Open Document Standard is specified, which actually does what every smart programmer would do without any guidance. It packs together the formatting information and the data of a document into one archive, the exact same path which was already prepared by the jar-archives.
So, especially in direction of Microsoft, I would like to ask: Does anybody else have the same impression as I that software patents are really counterproductive an therefore should be forbidden?
I for myself have never in this business seen a striking innovation where I would have agreed that this should be protected by a patent. But I am only about 20 years in this business. Perhaps this point is still to come.
Back after a Break
by Dyrathror on Aug.06, 2009, under Misc
I didn’t write anything for quite a while. But now I am back
My break had two reasons. The really good one is that I became father of a little daughter named Thalea in the mid of July. Naturally I hope for the next talent in computer science but who knows. If she is only a little bit like her mother she will absolutely have her own head and push her own ideas!
If you hope that I will publish family pictures regularly now I have to disappoint you. Family business stays private. The next public pictures of Thalea you can see perhaps in her own blog one day.
The second reason for not publishing articles was the deceasing of my beloved IBM Thinkpad Tablet. I think the heat and moisture of Hainan have been too much for it and when the fan finally gave up …
As a more suitable solution for the Hainan weather conditions I bought a desktop computer with many fans
and installed Linux in form of the Fedora 11 distro on it. Perhaps installed is said too much. After over a week of installation I am still struggling to get all components supported and fully up and running. Hope that one day I manage to have installed this cool machine as it should be, including accelerated graphics and dolby surround sound.
Nevertheless I will try to revive the laptop. The tablet functionality is simply cool to manipulate images.
Ruby Objects, Class-Objects and MetaClass-Objects
by Dyrathror on Jul.13, 2009, under Programming, Ruby
After a while of evaluation I started over programming mainly in Ruby about two month ago.
Long time ago I learned for a short while object orientation programming in Smalltalk-80 but soon started to use C++, first with the AT&T preprocessor and later with the gcc. Since 1998 I am programming Java. All these years have left me with a certain idea of practical object orientation which was not really what I learned from Smalltalk-80.
But Ruby changed things a lot as I have to admit. In Ruby everything is an object and Ruby is interpreted like Smalltalk! What are the consequences. This is what my post will try to figure out.
From Ruby Core – Class documentation:
Classes in Ruby are first-class objects—each is an instance of class Class.
In Ruby everything is an object. This includes as well Integers as Classes. So what happens if you write something like:
a = "test1" b = "test2"
You get references a and b to your Objects a and b of class String which is an object too and has the class object Object as superclass. So far the only difference is that the Classes are realized as objects themselves.
But you can do things in Ruby which you cannot do in C++ or Java. For example you can add a method only to one object like:
c = 'test' class < < c def double self + self end end c.double =>"testtest"
This piece of code generates a virtual class exclusively for the object c.
But back to our simple example. What happens if you try the following:
b = 7 class < < b def double self + self end end TypeError: no virtual class for Fixnum
So what is this? I thought that all objects can have virtual (or singleton) classes which hold the methods specially attached to this object?
The solution is quite simple. There are special classes like Fixnum which are called eigenclasses. Instead of a reference to an object these classes return the class object itself (for example as parameter for a method call). Eigenclass objects only have one single Object for example for each Fixnum value. This is why it is not possible to create singleton classes for eigenclass objects.
But what you can do is to extend an eigenclass with your own attributes like:
class Fixnum attr_accessor :name end b = 5 b.class => Fixnum b.name 'five' => "five"
The next thing I want to do is to define a class variable. I found a nice article about class variables in Ruby on John Nunemakers blog. At first I was really astonished about this:
class Polygon @@sides = 10 def self.sides @@sides end end puts Polygon.sides # => 10
This is a Polygon class with a class variable which holds the number of sides of the Polygon and a getter class method. Now we create a subclass which inherits from Polygon and holds its own number of sides:
class Triangle < Polygon @@sides = 3 end puts Triangle.sides # => 3 puts Polygon.sides # => 3
What happens here? The Polygon sides have been set to 10 originally.
To understand this behavior you must have an understanding about the Ruby Meta-class and look-up mechanism for methods and variables. When you create a class variable or method Ruby actually creates the following Meta-Class for you:
The Meta-Class hold the Class level extensions of your class. If you subclass Polygon now you have the following image:
In Ruby everything, including class definitions, are executable code. The assignment to the class variable @@sides in the class Triangle leads the Ruby interpreter to search for an existing class variable @@sides which he finds in the Meta-Class of the superclass Polygon first and makes an assignment to this variable instead of creating a new meta-Class with the same variable for Triangle.
So what can we do if we want to have a variable for the sides of our class which is unique to the according class? As the class itself is an object you can assign a variable to the class object
You can do this with the following code:
class Polygon @sides class < < self attr_accessor :sides end end
for the Class Polygon and the same for class Triangle. Be aware that you have to assigne the accessors to the class object and not to the object itself.
I hope that my explanations are correct and can help other newbies in Ruby to understand the Class handling a little bit.
Tropical Thunderstorms
by Dyrathror on Jul.04, 2009, under Around the World, China
When I arrived in Haikou a year ago my only experience with a tropical region has been 6 month on Martinique between my studies in physics and the start of my computer science studies. On Martinique the rainy season is about 3 month and the rest of the year there is more or less sunshine.
The September in Haikou last year has been nice even though it was quite warm with around 38°C. In October the Taifun season began and I can tell you that we got drown in our apartment in the fourth floor. The wind pressed the gigantic amount of water which has been carried along with the Taifun directly through the windows into the apartment. This rainy period continued more or less until mid December. The rest of December and January have been dry but unusual cold, specially because there is no heating in the apartment.
In February it started to rain again. First only sometimes and after a while more and more. Since two month now we have temperatures above 30°C and about one thunderstorm every day. The record has been three thunderstorms in a row during one afternoon. When you are outside in such a storm, there is no protection. When you wear a slicker you are wet from your own sweat, otherwise from the rain. The water in the road can easily raise to a torrent of more than 10cm depth. There is no sewer which can take that much water in such a short time even though the city of Haikou is cleaning them all the time. A gaze through the window shows me grey in grey during such a storm and I can hardly see the neighbour building which is only about 30m away.
I never imagined that on a tropical island like Hainan it could be more rainy than in northern Germany where I come from and which I once left because of the “bad weather”. I think life is really funny and we should enjoy this fact much more !
Joke about EU request to stop internet filtering in China
by Dyrathror on Jun.27, 2009, under Around the World, China, Misc, Politics
This can only be a political joke!
I was pointed by the german netzpolitik.org and Die Neuen Menschen blogs to an article you can read in the news at N24 or Deutschlandradio about a statement from Viviane Reding, commissioner for media of the European Union, about the chinese internet filters.
“Das Blockieren oder Filtern bestimmter Internet-Inhalte ist für die Europäische Union völlig inakzeptabel.”
or in english translation:
“The blocking or filtering of certain internet content is completely inacceptable for the European Union.”
I mean the enforced distribution of the “Green Dam – Youth Escort” software is discussed in China as well and the installation is not mandatory any more as stated by the chinese government.
But I would suggest the European Union to first stop all internet filtering within the Union before pointing out that they think that internet filtering is inacceptable !!!
The internet citizens in Europe are laughing about this sentence.
Politik der verbrannten Erde
by Dyrathror on Jun.25, 2009, under Germany, Politics
Was sich derzeit in der deutschen Politik so abspielt läßt sich nur noch schwer mit einem Generationenkonflikt erklären. Ich möchte hier nicht noch einmal auf die Argumente gegen eine Vorratsdatenspeicherung oder eine Netzzensur eingehen wie sie in der letzten Zeit beschlossen wurden.
Was mich erschreckt hat ist wie die regierenden Politiker mit den jungen Mitbürgern in Deutschland umgehen. Wahrscheinlich mit Blick auf die Demographie, die bestätigt, daß das Gros der Wähler bereits genauso überaltert ist wie die Kader der regierenden Politiker, wurden die Mitglieder der oppositionellen Bewegung als Sympatisanten wenn nicht gar selbst als Kinderschänder dargestellt. Die jungen Menschen die mehr als berechtigte Einwende gegen die Zensurgesetze haben und diese auch nüchtern argumentativ untermauert konnten, wurden wie kleine Kindern abgekanzelt und mit leeren Verbalien abgespeist. In der ganzen Debatte um das neue Internet-Zensur-Gesetz habe ich von keinem der befürwortenden Politiker gehört das er einmal direkt auf die Argumente der Gesetzesgegner eingegangen ist oder diese gar wiederlegen konnte.
Die größte Frechheit habe ich dann heute in einem Interview in der Zeit-Online mit Frau von der Laien und Franziska Heine gelesen.
Heine: … Die Unterzeichner der Petition haben gesehen, wie Entscheidungen in der Politik getroffen werden – und das wird sie nachhaltig prägen.
von der Leyen: Das ist doch etwas Tolles
Heine: Für uns war das nicht so toll.
von der Leyen: Das ist lebendige Demokratie.
… Natürlich kann Frustration entstehen, wenn man merkt, dass da auch andere demokratische Prozesse laufen, zum Beispiel Ausschussberatungen, in denen gewählte Vertreter Entscheidungen fällen, …
Ich möchte einmal fragen, was soll daran toll sein wenn einem auf den Kopf gekackt wird? Denn nichts anderes haben die Politiker gerade mit den meist jüngeren Gegnern des Zensurgesetzes gemacht. Gibt den Politikern der Fakt das sie einmal gewählt wurden tatsächlich für die gesamte Legislaturperiode das Recht die Bevölkerung bei den Entscheidungen die sie treffen total zu ignorieren? Na, da haben die jungen Leute ja wirklich den politischen Umgang in einer Demokratie gelernt.
Und dann wird da auch noch ganz frech gelogen:
von der Leyen: … Diese Daten werden jetzt sofort gelöscht. So steht es im Gesetz.
Hat Frau von der Laien das Gesetz zur Vorratsdatenspeicherung wieder abgeschafft? Also stehen die Daten ohnehin bereits gespeichert zur Verfügung und müssen “bei Bedarf” nur noch angefordert werden.
Ich würde diese Art Politik zu betreiben als Politik der verbrannten Erde bezeichnen. Die Kontrollmechanismen werden heute unter Beteuerung sie nie zu missbrauchen eingeführt, populistisch ausgeschlachtet und gepusht mit dem Killer-Argument gegen Kindesmissbrauch zu kämpfen und wir alle haben dann in Zukunft damit zu leben. Diese Zukunft kann für einen jungen Menschen noch ziehmlich lange dauern! Aber was interessiert das schon einen Politiker der bereits an der Grenze des Rentenalters ist (oder bereits darüber hinaus) und noch ein letztes Mal in den Bundestag gewählt werden möchte!
[Nachtrag]
Ein guter Artikel über die Situation auf Spiegel-Online. Ich denke die Politiker, die die ganze Zeit fälschlicher Weise behaupteten das Internet wäre ein Rechtsfreier Raum, werden in Zukunft feststellen müssen das die Proteste gegen ihre Politik nicht nur auf das Internet beschränkt sind sondern direkte Auswirkungen auf ihre Wiederwahl haben werden weil dort wirklich Menschen im richtigen Leben dahinter stehen!
[Nachtrag]
Hier noch ein sehr interessanter Artikel auf Heise-Online über den Umfang der Informationen die bei der Vorratsdatenspeicherung gesammelt werden. Im Internet sind die Bürger längst transparent! Wann kommt die Forderung das sie dies im Leben ausserhalb des Internet ebenfalls werden müssen?
SPD und CDU wenden sich gegen ihre jungen Wähler
by Dyrathror on Jun.21, 2009, under Germany, Politics
Eigentlich hatte ich meinen Blog begonnen weil ich meine Freunde und Verwandte in der ganzen Welt ein wenig auf dem Laufenden halten wollte wie es mir in China so ergeht und sie mit Bildern und Geschichten vom anderen Ende der Welt versorgen wollte.
Leider haben die aktuellen politischen Ereignisse aus Deutschland mich eingeholt und ich bin fast Sprachlos was die grosse Koalition da gerade anrichtet. Ich hatte diese Koalition sogar einmal befürwortet da sie in meinen Augen damals die einzige reelle Chance darstellte in dieser sich gegenseitig blockierenden politischen Landschaft noch einen Schritt nach vorne zu tun und gemeinsam die wirklich notwendigen Reformen anzustossen. Stattdessen ist der Kleinkrieg hinter dem Vorhang weitergegangen und die Ergebnisse dieser Politik sind eher erschreckend als positiv.
Es war in meinen Augen schon immer etwas zweifelhaft wenn Menschen plötzlich Ressorts regieren von denen sie überhaupt nichts verstehen. Da gab es Verkehrminister die nicht einmal einen Führerschein besaßen, Lehrer die plötzlich Finanzminister wurden und ähnliche Dinge. Trotzdem haben sich diese Politiker in meinen Augen noch wacker geschlagen da sie auf ihre, auf diesem Gebiet spezialisierten, Berater gehört haben.
Diese Legislaturperiode ist allerdings gekennzeichnet von einer absoluten Sinnfreiheit, besonders der Massnahmen um das Internet. Da brockt uns eine Justizministerin die Vorratsdatenspeicherung ein die nicht einmal weiß was ein Browser ist und die Familienministerin besiegelt dieses Tun dann durch die Einrichtung einer Zensur Infrastruktur für das Internet. Dem Wirtschaftsminister, dem eigentlich bei diesem Tun die Haare zu Berge stehen müssten, begreift scheinbar die langfristigen Folgen dieser Maßnahmen ebensowenig wie die meinsten Mitglieder des Bundestages und unterstützt diesen Unsinn auch noch.
Die Politiker scheinen zu glauben das eine Zensur des Internet zu Stabilität führt, wobei sie sich wahrscheinlich die plötzliche Einführung von Recht und Ordnung im Internet darunter vorstellen. Die Geschichte sollte ihnen allerdings gezeigt habe das solche Maßnahmen im besten Fall zur Stagnation führen. Wenn sie dies als Stabilität definieren haben sie natürlich Recht. In einer sich rasch vorwärts bewegenden Welt bedeutet Stagnation allerdings stetiger Rückschritt!
Wer glaubt das eine Zensur des Internet keinen Einfluss auf die Wirtschaft haben wird, der glaubt wahrscheinlich auch noch an den Weihnachtsmann. Zumindest auf die Software Industrie wird diese Maßnahme einen Einfluß haben, wie mir ein Jahr in China deutlich gemacht habt. Die vorderste Front in Technologien wird heutzutage in Blogs und Foren diskutiert und allenfalls noch in Wiki’s festgehalten. Von China aus habe ich täglich mit dem Kollateralschaden der Internetzensur zu kämpfen. Ungefähr jeder zweite Blog und Forum sind gesperrt und wenn ich an die Informationen heran kommen möchte muss ich erst einige technische Tricks nutzen. Geht man nach den Politikern hier in China suche ich anscheinend permanent nach Porno Inhalten oder extremistischen politischen Ansichten! Wie die praktischen Auswirkungen sind kann jeder sehen der die Analysen der “Green Dam” Filter Software der Firma Jinhui gelesen hat! Die Programmierer dieser Firma sind in die typischen Fallen geraten die schon seit Jahren in Foren und Blogs diskutiert werden und inzwischen als nicht nur überholte sondern sogar gefährliche Programmiertechniken angesehen werden.
Und der Unsinn geht sogar noch weiter! Natürlich sind die nächsten Schritte bereits Forderungen nach Zensur von Gewaltspielen oder das die Netzsperren Europaweit eingeführt werden. Gleichzeitig stellen einige Politiker einmal deutlich klar das sie unfähig zu seinen scheinen logisch zu denken und von sich ausgehend dies scheinbar auch bei ihren Wählern vermuten.
Besonders geschockt hat mich allerdings das Verhalten der SPD die ich seit über 20 Jahren wähle. Ich habe mich schon gefragt wie es mit dem rechtstaatlichen Verständnis innerhalb der SPD aussieht als die Anzeige gegen Herrn Tauss erhoben wurde. Eigentlich gilt in unserem Rechtstaat die Unschuldsvermutung. Davon war allerdings bei den Genossen des Herrn Tauss in der SPD wenig zu sehen. Und dann diese Katastrophe mit der Vorratsdatenspeicherung und der Internetzensur.
Ich muss gestehen, auch wenn ich nach wie vor nicht weiss wem ich im September noch guten Gewissens meine Stimme geben kann, für die SPD werde ich nach über 20 Jahren diesmal nicht stimmen.
Bewundernswert ist für mich die junge Generation von Demokraten die jetzt die Konsequenzen zieht und der SPD den Rücken kehrt wie Torben Friedrich und Julia Reda. Aber auch eingefleischten Demokraten wie Jörg Kantel kehren der SPD gerade den Rücken. Da verbleibt eigentlich kaum technischer Sachverstand in dieser Partei das diese noch zukunftsorientierte Politik betreiben kann.
Wie eigentlich mit dem Thema Kinderpornographie umgegangen werden sollte kann sich Frau von der Laien vielleicht einmal in Italien beispielhaft anschauen. Dort wird etwas dagegen getan anstatt den Mantel des Schweigens über diese absheulichen Verbrechen zu hängen. Bezeichnender Weise scheint ein nicht unerheblicher Teil des strafbaren Materials von einem deutschen Server herunter geladen worden zu sein. Wo waren Frau Zypries und Frau von der Laien denn da wieder? Im Wahlkampf?
[Nachtrag]
Hier noch ein kleiner Ausblick drauf was als nächstes aus dem Internet gefiltert wird.
[Nachtrag]
Der nächste Austritt aus der SPD, Manuela Schauerhammer.
Solange es Menschen gibt die erkennen das die Politik der großen Parteien mit einem demokratischen Verständnis längst nicht mehr vereinbar ist und daraus die Konsequenzen ziehen gebe ich die Hoffnung nicht auf! Die Politiker in Deutschland, die auf so einem hohen moralischen Ross gegenüber den politischen Systemen hier in Asien sitzen, sind gerade dabei diese System auf der äußerst rechten Spur zu überholen.
Verdict in Capitol Records v. Thomas-Rasset
by Dyrathror on Jun.19, 2009, under Around the World, USA
In the second trial against Jammie Thomas-Rasset, mother of four children, the jury awarded the recording companies $1.92 million, $80,000 per uploaded song for 24 songs.
Naturally the representative of the recording industry from the RIAA was happy about the hight of the penalty and took this as a sign that the court took the violation of copyrights as serious as the recording industry.
If they would have punished her for all 1,700 songs found on her harddrive the penalty would have been $136,000,000
I had to think a little bit about this verdict and started to calculate my expenses into music and film during the last 25 years. I could only make an estimation but I had around 150 music discs before I started to collect my about 1,200 CDs and around 200 VHS films and several hundered DVDs. Lets say a total value of around $28,000 in 25 years, not counting about 30 to 40 films I watch in a cinema every year or at least over 100 concerts I have seen.
I always thought that a penalty has to be spoken according to the commensurability of the delict but in this case I cannot find any proportions which makes me believe that behind the curtains there might be more agreement between the plaintiffs, the jury and the judge than obvious.
I think that this verdict is a slap into the face of everybody who supported the recording industry during the last 20-30 years by legally buying records so that they could become that powerful.
My reaction to this will be that I have to think about my collecting habits.
Practical Experience with Internet Censorship
by Dyrathror on Jun.17, 2009, under Misc, Politics
As stated before I am a german computer scientist living in China at the moment. Therefore I am especially ashamed about the current ruling parties in germany who just agreed to establish internet censorship against all expert knowledge brought into the discussion and against a huge part of the internet citizens which stood up against this bill and filed an e-petition with the biggest attendance ever for a german e-petition.
I would like to invite the german politicians to come to China to practically see how internet censorship is working. They can go to the chinese government if they want to see what it costs to maintain the Chinese Firewall and then they can come to me when they want to see how much it costs to dig a hole into it because that’s my daily business. As collateral damage of the aggressive censorship many pure development sites which I need for my programming are blocked, like jruby.org, …
I have a proxy Addon installed in my Firefox and it takes me exactly 2 seconds to view the blocked site through the proxy. Every now and then I have to search for a new proxy because the government found and blocked the one I am using but there are so many proxy lists in the internet that you can easily google for them, test for 2 minutes and have a new running proxy.
From my side it is annoying to see so many programming blogs and websites blocked but the total additional costs in a month may come up to be around 1 hour.
What does your internet censorship cost during a month? Can you really tell your electors that they have to pay millions of Euros every month for an infrastructure which can be bypassed within seconds and they will reelect you? Specially in times of a global financial crisis ???

