Archiv für den Monat: November 2011

Androids Marktanteil bei 50%

Laut den Zahlen von Gartner hat Android bei den Smartphone-Betriebssystemen einen Marktanteil von 50% an den im dritten Quartal 2011 verkauften Geräten erreicht.

Während Apple mit den iPhones die Stückzahlen steigern konnte (aber trotzdem etwas an Marktanteil einbüsste) blieben RIMs BlackBerries bei den Stückzahlen stabil, was einen grösseren Verlust beim Marktanteil zur Folge hat. Microsoft verlor sowohl bei den Stückzahlen als auch beim Marktanteil. Microsoft muss sich also sehr sputen, wenn die Prognosen von Gartner vom Frühling erreicht werden sollen.

Microsoft wurde bereits von Samsung mit ihrem eigenen Betriebssystem Bada überholt (Steigerung beim Marktanteil von 100%!). Bada ist aber noch weit von den Big 4 (Android, Symbian, iOS und Research In Motion) entfernt, von denen Symbian als der grosse Verlierer angesehen werden muss.

Warten wir mal gespannt auf die Abschlusszahlen für 2011 und vergleichen diese dann mit den alten Prognosen.

Slippery When Wet #5: The Process object or Optimization? don’t do it!

Slippery When WetI proudly present to you the fifth in a infinite number of posts of “Slippery When Wet.” In these posts I show you a little bastard I stumbled on.

To get the memory usage information you can use the System.Diagnostics.Process class. As I wantet to check the memory usage regularly I kept the reference to the Process object in my class. But the value never changed anymore… Then I tried to get the Process object every time i needed the current memory size – and it worked.

So I read the documentation a little more carefully and got to this part:

The process component obtains information about a group of properties all at once. After the Process component has obtained information about one member of any group, it will cache the values for the other properties in that group and not obtain new information about the other members of the group until you call the Refresh method. Therefore, a property value is not guaranteed to be any newer than the last call to the Refresh method. The group breakdowns are operating-system dependent.

So I changed my code again to not get the Process every time I wanted the current memory size but call the Refresh method.

And what did we learn from this episode?

Michael A. Jackson („The First Rule of Program Optimization: Don’t do it (…)„) and Donald Knuth („(…) premature optimization is the root of all evil (…)„) are right. Don’t do optimization, especially not if you don’t really know what you are doing…